registry 0.6.3.1 → 0.6.3.2
raw patch · 7 files changed
+8/−92 lines, 7 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Data.Registry.Solver: type out :- a = Contains a out
+ Data.Registry.Solver: type (out :: [Type]) :- a = Contains a out
- Data.Registry: TypedFunction :: Function -> Typed a
+ Data.Registry: TypedFunction :: Function -> Typed (a :: k)
- Data.Registry: TypedValue :: Value -> Typed a
+ Data.Registry: TypedValue :: Value -> Typed (a :: k)
- Data.Registry: data Typed a
+ Data.Registry: data Typed (a :: k)
- Data.Registry.Dot: makeDot :: forall a ins out. Typeable a => Registry ins out -> Dot
+ Data.Registry.Dot: makeDot :: forall {k} (a :: k) (ins :: [Type]) (out :: [Type]). Typeable a => Registry ins out -> Dot
- Data.Registry.Dot: makeDotEither :: forall a ins out. Typeable a => Registry ins out -> Either Text Dot
+ Data.Registry.Dot: makeDotEither :: forall {k} (a :: k) (ins :: [Type]) (out :: [Type]). Typeable a => Registry ins out -> Either Text Dot
- Data.Registry.Internal.Cache: cacheAt :: forall a m. (Typeable a, MonadIO m, MonadReader Cache m) => Text -> m a -> m a
+ Data.Registry.Internal.Cache: cacheAt :: (Typeable a, MonadIO m, MonadReader Cache m) => Text -> m a -> m a
- Data.Registry.Internal.Cache: cacheAtKey :: forall a m. (Typeable a, MonadIO m, MonadReader Cache m) => Key -> m a -> m a
+ Data.Registry.Internal.Cache: cacheAtKey :: (Typeable a, MonadIO m, MonadReader Cache m) => Key -> m a -> m a
- Data.Registry.Internal.Cache: getCachedValue :: forall a m. (Typeable a, MonadIO m) => Key -> Cache -> m (Maybe a)
+ Data.Registry.Internal.Cache: getCachedValue :: (Typeable a, MonadIO m) => Key -> Cache -> m (Maybe a)
- Data.Registry.Internal.Cache: makeTypeText :: forall a. Typeable a => Text
+ Data.Registry.Internal.Cache: makeTypeText :: forall {k} (a :: k). Typeable a => Text
- Data.Registry.Internal.Cache: setCached :: forall a m. (Typeable a, MonadIO m, MonadReader Cache m) => Key -> a -> m ()
+ Data.Registry.Internal.Cache: setCached :: (Typeable a, MonadIO m, MonadReader Cache m) => Key -> a -> m ()
- Data.Registry.Internal.Cache: singleton :: forall a m. (Typeable a, MonadIO m, MonadReader Cache m) => m a -> m a
+ Data.Registry.Internal.Cache: singleton :: (Typeable a, MonadIO m, MonadReader Cache m) => m a -> m a
- Data.Registry.Internal.Reflection: showTheFullFunctionType :: forall (r1 :: RuntimeRep) (arg :: TYPE r1). TypeRep arg -> ([Text], Text)
+ Data.Registry.Internal.Reflection: showTheFullFunctionType :: TypeRep arg -> ([Text], Text)
- Data.Registry.Internal.Reflection: showTheFullValueType :: forall (r1 :: RuntimeRep) (arg :: TYPE r1). TypeRep arg -> Text
+ Data.Registry.Internal.Reflection: showTheFullValueType :: TypeRep arg -> Text
- Data.Registry.Internal.Stack: type Stack a = StateT Statistics (Either Text) a
+ Data.Registry.Internal.Stack: type Stack a = StateT Statistics Either Text a
- Data.Registry.Internal.Statistics: findCreatedValues :: forall a. Typeable a => Statistics -> [Value]
+ Data.Registry.Internal.Statistics: findCreatedValues :: forall {k} (a :: k). Typeable a => Statistics -> [Value]
- Data.Registry.Internal.Statistics: findMostRecentValue :: forall a. Typeable a => Statistics -> Maybe Value
+ Data.Registry.Internal.Statistics: findMostRecentValue :: forall {k} (a :: k). Typeable a => Statistics -> Maybe Value
- Data.Registry.Internal.Types: TypedFunction :: Function -> Typed a
+ Data.Registry.Internal.Types: TypedFunction :: Function -> Typed (a :: k)
- Data.Registry.Internal.Types: TypedValue :: Value -> Typed a
+ Data.Registry.Internal.Types: TypedValue :: Value -> Typed (a :: k)
- Data.Registry.Internal.Types: addEntry :: Typed a -> Entries -> Entries
+ Data.Registry.Internal.Types: addEntry :: forall {k} (a :: k). Typed a -> Entries -> Entries
- Data.Registry.Internal.Types: appendEntry :: Typed a -> Entries -> Entries
+ Data.Registry.Internal.Types: appendEntry :: forall {k} (a :: k). Typed a -> Entries -> Entries
- Data.Registry.Internal.Types: data Typed a
+ Data.Registry.Internal.Types: data Typed (a :: k)
- Data.Registry.Internal.Types: untype :: Typed a -> Untyped
+ Data.Registry.Internal.Types: untype :: forall {k} (a :: k). Typed a -> Untyped
- Data.Registry.Lift: [NAS] :: NumArgs n b -> NumArgs (S n) (a -> b)
+ Data.Registry.Lift: [NAS] :: forall (n :: Nat) b1 a1. NumArgs n b1 -> NumArgs ('S n) (a1 -> b1)
- Data.Registry.Lift: [NAZ] :: NumArgs Z a
+ Data.Registry.Lift: [NAZ] :: forall b. NumArgs 'Z b
- Data.Registry.Lift: allTo :: forall f a b. ApplyVariadic f a b => a -> b
+ Data.Registry.Lift: allTo :: forall (f :: Type -> Type) a b. ApplyVariadic f a b => a -> b
- Data.Registry.Lift: applyLast :: forall f fun. (Applicative f, CNumArgs (CountArgs fun) fun) => fun -> Apply f (CountArgs fun) fun
+ Data.Registry.Lift: applyLast :: forall (f :: Type -> Type) fun. (Applicative f, CNumArgs (CountArgs fun) fun) => fun -> Apply f (CountArgs fun) fun
- Data.Registry.Lift: applyVariadic2 :: ApplyVariadic2 f g a b => (forall x. f x -> g x) -> a -> b
+ Data.Registry.Lift: applyVariadic2 :: ApplyVariadic2 f g a b => (forall (x :: k). () => f x -> g x) -> a -> b
- Data.Registry.Lift: argsTo :: forall f a b. ApplyVariadic1 f a b => a -> b
+ Data.Registry.Lift: argsTo :: forall (f :: Type -> Type) a b. ApplyVariadic1 f a b => a -> b
- Data.Registry.Lift: class Applicative f => ApplyVariadic f a b
+ Data.Registry.Lift: class Applicative f => ApplyVariadic (f :: Type -> Type) a b
- Data.Registry.Lift: class Monad f => ApplyVariadic1 f a b
+ Data.Registry.Lift: class Monad f => ApplyVariadic1 (f :: Type -> Type) a b
- Data.Registry.Lift: class ApplyVariadic2 f g a b
+ Data.Registry.Lift: class ApplyVariadic2 (f :: k -> Type) (g :: k -> Type) a b
- Data.Registry.Lift: class CNumArgs (numArgs :: Nat) (arrows :: Type)
+ Data.Registry.Lift: class CNumArgs (numArgs :: Nat) arrows
- Data.Registry.Lift: data NumArgs :: Nat -> Type -> Type
+ Data.Registry.Lift: data NumArgs (a :: Nat) b
- Data.Registry.Lift: outTo :: forall g f a b. ApplyVariadic2 f g a b => (forall x. f x -> g x) -> a -> b
+ Data.Registry.Lift: outTo :: forall {k} g f a b. ApplyVariadic2 f g a b => (forall (x :: k). () => f x -> g x) -> a -> b
- Data.Registry.Lift: type family Apply (f :: Type -> Type) (n :: Nat) (arrows :: Type) :: Type
+ Data.Registry.Lift: type family Apply (f :: Type -> Type) (n :: Nat) arrows
- Data.Registry.Make: make :: forall a ins out. Typeable a => Registry ins out -> a
+ Data.Registry.Make: make :: forall a (ins :: [Type]) (out :: [Type]). Typeable a => Registry ins out -> a
- Data.Registry.Make: makeEither :: forall a ins out. Typeable a => Registry ins out -> Either Text a
+ Data.Registry.Make: makeEither :: forall a (ins :: [Type]) (out :: [Type]). Typeable a => Registry ins out -> Either Text a
- Data.Registry.Make: makeEitherWithContext :: forall a ins out. Typeable a => Context -> Registry ins out -> Either Text a
+ Data.Registry.Make: makeEitherWithContext :: forall a (ins :: [Type]) (out :: [Type]). Typeable a => Context -> Registry ins out -> Either Text a
- Data.Registry.Make: makeSafe :: forall a ins out. (Typeable a, Solvable ins out, Contains a out) => Registry ins out -> a
+ Data.Registry.Make: makeSafe :: forall a (ins :: [Type]) (out :: [Type]). (Typeable a, Solvable ins out, Contains a out) => Registry ins out -> a
- Data.Registry.Make: makeSpecialized :: forall a b ins out. (Typeable a, Typeable b) => Registry ins out -> b
+ Data.Registry.Make: makeSpecialized :: forall {k} (a :: k) b (ins :: [Type]) (out :: [Type]). (Typeable a, Typeable b) => Registry ins out -> b
- Data.Registry.Make: makeSpecializedEither :: forall a b ins out. (Typeable a, Typeable b) => Registry ins out -> Either Text b
+ Data.Registry.Make: makeSpecializedEither :: forall {k} (a :: k) b (ins :: [Type]) (out :: [Type]). (Typeable a, Typeable b) => Registry ins out -> Either Text b
- Data.Registry.Make: makeSpecializedPath :: forall path b ins out. (PathToTypeReps path, Typeable b) => Registry ins out -> b
+ Data.Registry.Make: makeSpecializedPath :: forall (path :: [Type]) b (ins :: [Type]) (out :: [Type]). (PathToTypeReps path, Typeable b) => Registry ins out -> b
- Data.Registry.Make: makeSpecializedPathEither :: forall path b ins out. (PathToTypeReps path, Typeable b) => Registry ins out -> Either Text b
+ Data.Registry.Make: makeSpecializedPathEither :: forall (path :: [Type]) b (ins :: [Type]) (out :: [Type]). (PathToTypeReps path, Typeable b) => Registry ins out -> Either Text b
- Data.Registry.Registry: (+:) :: Typeable a => Typed a -> Registry ins out -> Registry (Inputs a :++ ins) (Output a ': out)
+ Data.Registry.Registry: (+:) :: forall a (ins :: [Type]) (out :: [Type]). Typeable a => Typed a -> Registry ins out -> Registry (Inputs a :++ ins) (Output a ': out)
- Data.Registry.Registry: (<+>) :: Registry is1 os1 -> Registry is2 os2 -> Registry (is1 :++ is2) (os1 :++ os2)
+ Data.Registry.Registry: (<+>) :: forall (is1 :: [Type]) (os1 :: [Type]) (is2 :: [Type]) (os2 :: [Type]). Registry is1 os1 -> Registry is2 os2 -> Registry (is1 :++ is2) (os1 :++ os2)
- Data.Registry.Registry: addTypedUnchecked :: (Typeable a, Typeable b, ins ~ (Inputs a :++ Inputs b), out ~ '[Output a, Output b]) => Typed a -> Typed b -> Registry ins out
+ Data.Registry.Registry: addTypedUnchecked :: forall a b (ins :: [Type]) (out :: [Type]). (Typeable a, Typeable b, ins ~ (Inputs a :++ Inputs b), out ~ '[Output a, Output b]) => Typed a -> Typed b -> Registry ins out
- Data.Registry.Registry: appendUnchecked :: Typeable a => Registry ins out -> Typed a -> Registry (ins :++ Inputs a) (out :++ '[Output a])
+ Data.Registry.Registry: appendUnchecked :: forall a (ins :: [Type]) (out :: [Type]). Typeable a => Registry ins out -> Typed a -> Registry (ins :++ Inputs a) (out :++ '[Output a])
- Data.Registry.Registry: end :: Registry '[] '[]
+ Data.Registry.Registry: end :: Registry ('[] :: [Type]) ('[] :: [Type])
- Data.Registry.Registry: eraseTypes :: Registry ins out -> Registry '[ERASED_TYPES] '[ERASED_TYPES]
+ Data.Registry.Registry: eraseTypes :: forall (ins :: [Type]) (out :: [Type]). Registry ins out -> Registry '[ERASED_TYPES] '[ERASED_TYPES]
- Data.Registry.Registry: funAs :: forall m a b. (ApplyVariadic1 m a b, Typeable a, Typeable b) => a -> Typed b
+ Data.Registry.Registry: funAs :: forall (m :: Type -> Type) a b. (ApplyVariadic1 m a b, Typeable a, Typeable b) => a -> Typed b
- Data.Registry.Registry: funTo :: forall m a b. (ApplyVariadic m a b, Typeable a, Typeable b) => a -> Typed b
+ Data.Registry.Registry: funTo :: forall (m :: Type -> Type) a b. (ApplyVariadic m a b, Typeable a, Typeable b) => a -> Typed b
- Data.Registry.Registry: liftProvidedValue :: forall m a. (Applicative m, Typeable a, Typeable (m a), Show a) => a -> Value
+ Data.Registry.Registry: liftProvidedValue :: forall (m :: Type -> Type) a. (Applicative m, Typeable a, Typeable (m a), Show a) => a -> Value
- Data.Registry.Registry: normalize :: Registry ins out -> Registry (Normalized ins) (Normalized out)
+ Data.Registry.Registry: normalize :: forall (ins :: [Type]) (out :: [Type]). Registry ins out -> Registry (Normalized ins) (Normalized out)
- Data.Registry.Registry: register :: (Typeable a, IsSubset (Inputs a) out a) => Typed a -> Registry ins out -> Registry (Inputs a :++ ins) (Output a ': out)
+ Data.Registry.Registry: register :: forall a (out :: [Type]) (ins :: [Type]). (Typeable a, IsSubset (Inputs a) out a) => Typed a -> Registry ins out -> Registry (Inputs a :++ ins) (Output a ': out)
- Data.Registry.Registry: registerUnchecked :: Typeable a => Typed a -> Registry ins out -> Registry (Inputs a :++ ins) (Output a ': out)
+ Data.Registry.Registry: registerUnchecked :: forall a (ins :: [Type]) (out :: [Type]). Typeable a => Typed a -> Registry ins out -> Registry (Inputs a :++ ins) (Output a ': out)
- Data.Registry.Registry: safeCoerce :: IsSameSet out out1 => Registry ins out -> Registry ins1 out1
+ Data.Registry.Registry: safeCoerce :: forall (out :: [Type]) (out1 :: [Type]) (ins :: [Type]) (ins1 :: [Type]). IsSameSet out out1 => Registry ins out -> Registry ins1 out1
- Data.Registry.Registry: specialize :: forall a b ins out. Typeable a => Typed b -> Registry ins out -> Registry ins out
+ Data.Registry.Registry: specialize :: forall {k1} {k2} (a :: k1) (b :: k2) (ins :: [Type]) (out :: [Type]). Typeable a => Typed b -> Registry ins out -> Registry ins out
- Data.Registry.Registry: specializePath :: forall path b ins out. PathToTypeReps path => Typed b -> Registry ins out -> Registry ins out
+ Data.Registry.Registry: specializePath :: forall {k} (path :: [Type]) (b :: k) (ins :: [Type]) (out :: [Type]). PathToTypeReps path => Typed b -> Registry ins out -> Registry ins out
- Data.Registry.Registry: tweak :: forall a ins out. Typeable a => (a -> a) -> Registry ins out -> Registry ins out
+ Data.Registry.Registry: tweak :: forall a (ins :: [Type]) (out :: [Type]). Typeable a => (a -> a) -> Registry ins out -> Registry ins out
- Data.Registry.Registry: tweakUnspecialized :: forall a ins out. Typeable a => (a -> a) -> Registry ins out -> Registry ins out
+ Data.Registry.Registry: tweakUnspecialized :: forall a (ins :: [Type]) (out :: [Type]). Typeable a => (a -> a) -> Registry ins out -> Registry ins out
- Data.Registry.Registry: unsafeCoerce :: Registry ins out -> Registry ins1 out1
+ Data.Registry.Registry: unsafeCoerce :: forall (ins :: [Type]) (out :: [Type]) (ins1 :: [Type]) (out1 :: [Type]). Registry ins out -> Registry ins1 out1
- Data.Registry.Registry: valTo :: forall m a. (Applicative m, Typeable a, Typeable (m a), Show a) => a -> Typed (m a)
+ Data.Registry.Registry: valTo :: (Applicative m, Typeable a, Typeable (m a), Show a) => a -> Typed (m a)
- Data.Registry.Rio: cacheAt :: forall a m. (Typeable a, MonadIO m, MonadReader Cache m) => Text -> m a -> m a
+ Data.Registry.Rio: cacheAt :: (Typeable a, MonadIO m, MonadReader Cache m) => Text -> m a -> m a
- Data.Registry.Rio: class MakeSingletons ls
+ Data.Registry.Rio: class MakeSingletons (ls :: [Type])
- Data.Registry.Rio: makeSingletons :: MakeSingletons ls => SingletonsRegistry ls ins out -> SingletonsRegistry '[] ins out
+ Data.Registry.Rio: makeSingletons :: forall (ins :: [Type]) (out :: [Type]). MakeSingletons ls => SingletonsRegistry ls ins out -> SingletonsRegistry ('[] :: [Type]) ins out
- Data.Registry.Rio: makeSingletonsRegistry :: forall todo ins out. Registry ins out -> SingletonsRegistry todo ins out
+ Data.Registry.Rio: makeSingletonsRegistry :: forall (todo :: [Type]) (ins :: [Type]) (out :: [Type]). Registry ins out -> SingletonsRegistry todo ins out
- Data.Registry.Rio: runRegistryT :: forall a ins out. (Typeable a, MakeSingletons out) => Registry ins out -> ResourceT IO a
+ Data.Registry.Rio: runRegistryT :: forall a (ins :: [Type]) (out :: [Type]). (Typeable a, MakeSingletons out) => Registry ins out -> ResourceT IO a
- Data.Registry.Rio: singleton :: forall a m. (Typeable a, MonadIO m, MonadReader Cache m) => m a -> m a
+ Data.Registry.Rio: singleton :: (Typeable a, MonadIO m, MonadReader Cache m) => m a -> m a
- Data.Registry.Rio: singletons :: forall ins out. MakeSingletons out => Registry ins out -> Registry ins out
+ Data.Registry.Rio: singletons :: forall (ins :: [Type]) (out :: [Type]). MakeSingletons out => Registry ins out -> Registry ins out
- Data.Registry.Rio: startSingletonsRegistry :: Registry ins out -> SingletonsRegistry out ins out
+ Data.Registry.Rio: startSingletonsRegistry :: forall (ins :: [Type]) (out :: [Type]). Registry ins out -> SingletonsRegistry out ins out
- Data.Registry.Rio: withRegistry :: forall a b ins out m. (Typeable a, MonadIO m, MakeSingletons out) => Registry ins out -> (a -> IO b) -> m b
+ Data.Registry.Rio: withRegistry :: forall a b (ins :: [Type]) (out :: [Type]) m. (Typeable a, MonadIO m, MakeSingletons out) => Registry ins out -> (a -> IO b) -> m b
- Data.Registry.Rio: withRegistryM :: forall a b ins out m. (Typeable a, MonadResource (m (ResourceT IO)), MFunctor m, MakeSingletons out) => Registry ins out -> (a -> m IO b) -> m IO b
+ Data.Registry.Rio: withRegistryM :: forall a b (ins :: [Type]) (out :: [Type]) m. (Typeable a, MonadResource (m (ResourceT IO)), MFunctor m, MakeSingletons out) => Registry ins out -> (a -> m IO b) -> m IO b
- Data.Registry.Solver: class IsSubset (ins :: [Type]) (out :: [Type]) (target :: Type)
+ Data.Registry.Solver: class IsSubset (ins :: [Type]) (out :: [Type]) target
- Data.Registry.State: addFun :: (Typeable a, IsSubset (Inputs a) out a) => a -> Registry ins out -> Registry ins out
+ Data.Registry.State: addFun :: forall a (out :: [Type]) (ins :: [Type]). (Typeable a, IsSubset (Inputs a) out a) => a -> Registry ins out -> Registry ins out
- Data.Registry.State: addFunS :: (Typeable a, IsSubset (Inputs a) out a, MonadState (Registry ins out) m) => a -> m ()
+ Data.Registry.State: addFunS :: forall a (out :: [Type]) (ins :: [Type]) m. (Typeable a, IsSubset (Inputs a) out a, MonadState (Registry ins out) m) => a -> m ()
- Data.Registry.State: addFunTo :: forall m a b ins out. (ApplyVariadic m a b, Typeable a, Typeable b, IsSubset (Inputs b) out b) => a -> Registry ins out -> Registry ins out
+ Data.Registry.State: addFunTo :: forall (m :: Type -> Type) a b (ins :: [Type]) (out :: [Type]). (ApplyVariadic m a b, Typeable a, Typeable b, IsSubset (Inputs b) out b) => a -> Registry ins out -> Registry ins out
- Data.Registry.State: addFunToUnsafe :: forall m a b ins out. (ApplyVariadic m a b, Typeable a, Typeable b) => a -> Registry ins out -> Registry ins out
+ Data.Registry.State: addFunToUnsafe :: forall (m :: Type -> Type) a b (ins :: [Type]) (out :: [Type]). (ApplyVariadic m a b, Typeable a, Typeable b) => a -> Registry ins out -> Registry ins out
- Data.Registry.State: addFunUnsafe :: Typeable a => a -> Registry ins out -> Registry ins out
+ Data.Registry.State: addFunUnsafe :: forall a (ins :: [Type]) (out :: [Type]). Typeable a => a -> Registry ins out -> Registry ins out
- Data.Registry.State: addFunUnsafeS :: (Typeable a, MonadState (Registry ins out) m) => a -> m ()
+ Data.Registry.State: addFunUnsafeS :: forall a (ins :: [Type]) (out :: [Type]) m. (Typeable a, MonadState (Registry ins out) m) => a -> m ()
- Data.Registry.State: addToRegistry :: (Typeable a, IsSubset (Inputs a) out a) => Typed a -> Registry ins out -> Registry ins out
+ Data.Registry.State: addToRegistry :: forall a (out :: [Type]) (ins :: [Type]). (Typeable a, IsSubset (Inputs a) out a) => Typed a -> Registry ins out -> Registry ins out
- Data.Registry.State: addToRegistryUnsafe :: Typeable a => Typed a -> Registry ins out -> Registry ins out
+ Data.Registry.State: addToRegistryUnsafe :: forall {k} (a :: k) (ins :: [Type]) (out :: [Type]). Typeable a => Typed a -> Registry ins out -> Registry ins out
- Data.Registry.State: addToS :: forall n a b m ins out. (ApplyVariadic n a b, Typeable a, Typeable b, Typeable a, IsSubset (Inputs b) out b, MonadState (Registry ins out) m) => a -> m ()
+ Data.Registry.State: addToS :: forall (n :: Type -> Type) a b m (ins :: [Type]) (out :: [Type]). (ApplyVariadic n a b, Typeable a, Typeable b, Typeable a, IsSubset (Inputs b) out b, MonadState (Registry ins out) m) => a -> m ()
- Data.Registry.State: addToUnsafeS :: forall n a b m ins out. (ApplyVariadic n a b, Typeable a, Typeable b, Typeable a, MonadState (Registry ins out) m) => a -> m ()
+ Data.Registry.State: addToUnsafeS :: forall (n :: Type -> Type) a b m (ins :: [Type]) (out :: [Type]). (ApplyVariadic n a b, Typeable a, Typeable b, Typeable a, MonadState (Registry ins out) m) => a -> m ()
- Data.Registry.State: concatRegistryUnsafe :: Registry ins out -> Registry ins' out' -> Registry ins' out'
+ Data.Registry.State: concatRegistryUnsafe :: forall (ins :: [Type]) (out :: [Type]) (ins' :: [Type]) (out' :: [Type]). Registry ins out -> Registry ins' out' -> Registry ins' out'
- Data.Registry.State: concatUnsafeS :: MonadState (Registry ins out) m => Registry ins' out' -> m ()
+ Data.Registry.State: concatUnsafeS :: forall (ins :: [Type]) (out :: [Type]) m (ins' :: [Type]) (out' :: [Type]). MonadState (Registry ins out) m => Registry ins' out' -> m ()
- Data.Registry.State: runS :: (MFunctor m, Monad n) => Registry ins out -> m (StateT (Registry ins out) n) a -> m n a
+ Data.Registry.State: runS :: forall {k} m (n :: Type -> Type) (ins :: [Type]) (out :: [Type]) (a :: k). (MFunctor m, Monad n) => Registry ins out -> m (StateT (Registry ins out) n) a -> m n a
- Data.Registry.Statistics: makeStatistics :: forall a ins out. Typeable a => Registry ins out -> Statistics
+ Data.Registry.Statistics: makeStatistics :: forall {k} (a :: k) (ins :: [Type]) (out :: [Type]). Typeable a => Registry ins out -> Statistics
- Data.Registry.Statistics: makeStatisticsEither :: forall a ins out. Typeable a => Registry ins out -> Either Text Statistics
+ Data.Registry.Statistics: makeStatisticsEither :: forall {k} (a :: k) (ins :: [Type]) (out :: [Type]). Typeable a => Registry ins out -> Either Text Statistics
Files
- registry.cabal +1/−3
- src/Data/Registry/Internal/Dot.hs +1/−1
- src/Data/Registry/Internal/Dynamic.hs +3/−3
- src/Data/Registry/Internal/Reflection.hs +2/−2
- test/Test/Data/Registry/Internal/DynamicSpec.hs +1/−1
- test/Test/Tutorial/DatabaseLogger.hs +0/−46
- test/Test/Tutorial/DatabaseLoggerExample.hs +0/−36
registry.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: registry-version: 0.6.3.1+version: 0.6.3.2 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.@@ -104,8 +104,6 @@ Test.Data.Registry.THSpec Test.Tasty.Extensions Test.Tutorial.Application- Test.Tutorial.DatabaseLogger- Test.Tutorial.DatabaseLoggerExample Test.Tutorial.Exercise1 Test.Tutorial.Exercise2 Test.Tutorial.Exercise3
src/Data/Registry/Internal/Dot.hs view
@@ -130,7 +130,7 @@ -- | Don't show the counter if there showValueCounter :: ValueCounter -> Text showValueCounter Nothing = ""-showValueCounter (Just n) = "-" <> show n+showValueCounter (Just n) = "-" <> P.show n -- | We need to process the node descriptions -- - we add quotes arountd the text
src/Data/Registry/Internal/Dynamic.hs view
@@ -23,7 +23,7 @@ else Left $ "the function "- <> show (dynTypeRep (funDyn function))+ <> P.show (dynTypeRep (funDyn function)) <> " cannot be applied to an empty list of parameters" applyFunction function values = do@@ -59,7 +59,7 @@ applyFunctionDyn f [] = Left $ "the function "- <> show (dynTypeRep f)+ <> P.show (dynTypeRep f) <> " cannot be applied to an empty list of parameters" applyFunctionDyn f [i] = applyOneParam f i applyFunctionDyn f (i : is) = do@@ -69,7 +69,7 @@ -- | Apply just one dynamic parameter to a dynamic function applyOneParam :: Dynamic -> Dynamic -> Either Text Dynamic applyOneParam f i =- maybe (Left $ "failed to apply " <> show i <> " to : " <> show f) Right (dynApply f i)+ maybe (Left $ "failed to apply " <> P.show i <> " to : " <> P.show f) Right (dynApply f i) -- | If Dynamic is a function collect all its input types collectInputTypes :: Function -> [SomeTypeRep]
src/Data/Registry/Internal/Reflection.hs view
@@ -73,11 +73,11 @@ case splitTyConApp a of (con, []) -> showType con (con, [arg]) -> showType con <> " " <> showSingleType arg- (con, args) -> showType con <> " " <> show (fmap showSingleType args)+ (con, args) -> showType con <> " " <> P.show (fmap showSingleType args) where showType x = let typeWithModuleName = showWithModuleName x- in if mustShowModuleName typeWithModuleName then typeWithModuleName else show x+ in if mustShowModuleName typeWithModuleName then typeWithModuleName else P.show x -- | Return true if the module name can be shown mustShowModuleName :: Text -> Bool
test/Test/Data/Registry/Internal/DynamicSpec.hs view
@@ -28,7 +28,7 @@ test_applyFunction = test "we can apply a list of dynamic values to a dynamic function" $ do (fromDynamic @Int . valueDyn <$> applyFunction (createFunction T.length) [createValue ("hello" :: Text)]) === Right (Just 5) - let add1 (i :: Int) (j :: Int) = show (i + j) :: Text+ let add1 (i :: Int) (j :: Int) = P.show (i + j) :: Text (fromDynamic @Text . valueDyn <$> applyFunction (createFunction add1) [createValue (1 :: Int), createValue (2 :: Int)]) === Right (Just "3") -- no value is returned when an input parameter is incorrect
− test/Test/Tutorial/DatabaseLogger.hs
@@ -1,46 +0,0 @@-{-# LANGUAGE RecordWildCards #-}-{-# LANGUAGE StrictData #-}-{-# LANGUAGE OverloadedStrings #-}--module Test.Tutorial.DatabaseLogger where--import Protolude hiding (log)---- | A Logger interface-data Logger = Logger- { log :: Text -> Severity -> IO ()- }--data Severity = Info | Error | Fatal- deriving (Eq, Ord, Show)---- | The production implementation-newLogger :: Logger-newLogger = Logger (\t s -> print ("[" <> show s <> "] " <> t))---- | 2 different ways to limit the severity for a Logger-limitSeverity :: Severity -> Logger -> Logger-limitSeverity at (Logger p) =- Logger (\t s ->- if s >= at then p t s- else pure ())--newLimitedLogger :: Severity -> Logger-newLimitedLogger at = limitSeverity at newLogger---- | This Logger doesn't log anything-noLogger :: Logger-noLogger = Logger (\_ _ -> pure ())---- | A database interface-data Database = Database- { executeQuery :: Text -> IO ()- }---- | A production database using a Logger-newDatabase :: Logger -> Database-newDatabase logger = Database {..} where- executeQuery :: Text -> IO ()- executeQuery q = do- log logger ("executing query " <> q) Info- print "do it"
− test/Test/Tutorial/DatabaseLoggerExample.hs
@@ -1,36 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE PartialTypeSignatures #-}-{-# OPTIONS_GHC -fno-warn-partial-type-signatures #-}--module Test.Tutorial.DatabaseLoggerExample where--import Data.Registry-import Test.Tutorial.DatabaseLogger--prodRegistry =- fun newDatabase- <: fun newLogger--prodDatabase = make @Database prodRegistry---- Don't log anything for those tests-testRegistry1 =- fun noLogger- <: prodRegistry--testDatabase1 = make @Database testRegistry1---- Only log some messages for those tests-testRegistry2 =- tweak @Logger (limitSeverity Info) prodRegistry--testDatabase2 = make @Database testRegistry2---- Only log some messages for those tests--- Specify the severity as a separate value-testRegistry3 =- fun newLimitedLogger- <: val Info- <: prodRegistry--testDatabase3 = make @Database testRegistry3