registry 0.3.1.0 → 0.3.2.0
raw patch · 3 files changed
+7/−3 lines, 3 files
Files
- registry.cabal +2/−2
- src/Data/Registry.hs +0/−1
- src/Data/Registry/State.hs +5/−0
registry.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 3c653e562fef6ce8efe101a3641ba29c4cd0d899ba38a68c108d2d21a06ebe91+-- hash: 63f09863d931c472e14fddae51fd7cf72418e1f06b45ee3f1e8602188d2e680a name: registry-version: 0.3.1.0+version: 0.3.2.0 synopsis: data structure for assembling components description: This library provides a "Registry" which is a data structure containing a list of functions and values representing dependencies in a directed acyclic graph. A `make` function can then be used to create a value of a specific type out of the registry. You can start with the [README](https://github.com/etorreborre/registry/blob/master/README.md) for a full description of the library.
src/Data/Registry.hs view
@@ -14,6 +14,5 @@ import Data.Registry.RIO as M -- ResourceT monad for effectful instantiation import Data.Registry.Registry as M -- The Registry data structure import Data.Registry.Solver as M -- Type-level constraints to check if we can make a component from a registry-import Data.Registry.State as M -- Stateful modifications of a registry import Data.Registry.Statistics as M -- Provide statistics about the execution of a registry import Data.Registry.Internal.Types -- Export the Typed data type because it appears in Registry's API
src/Data/Registry/State.hs view
@@ -9,6 +9,11 @@ import Data.Registry.Solver import Protolude +{-+ This module is experimental and is not added to the top level module Data.Registry.+ It is not quite sure if we can / should support a useful state monad for passing a registry around.+-}+ -- | Run some registry modifications in the StateT monad runS :: (MFunctor m, Monad n) => Registry ins out -> m (StateT (Registry ins out) n) a -> m n a runS r = hoist (`evalStateT` r)