This library provides a data structure, a Registry
, to control the creation of functions from other functions. You can use this technique to:
- create applications out of software components ("dependency injection")
- fine tune JSON encoders/decoders
- create composable data generators for nested datatypes
The following sections introduce in more details the problem that this library is addressing, the concepts behind the solution and various use-cases which can arise on real projects:
- what is the problem?
- the concept of a Registry and the resolution algorithm
- how does this compare to monad and effects?
- use a
Registry
to compose Hedgehog generators - use a
Registry
to create applications and define components
- how to install this library?
- how to do mocking?
- how to specialize some values in some contexts?
- how to make a singleton for a database?
- how to allocate resources which must be finalized?
- how to initialize components in an application?