registry-0.1.5.5: data structure for assembling components

Safe HaskellNone
LanguageHaskell2010

Data.Registry.State

Synopsis

Documentation

runS :: (MFunctor m, Monad n) => Registry ins out -> m (StateT (Registry ins out) n) a -> m n a Source #

Run some registry modifications in the StateT monad

addFunTo :: forall m a b ins out. (ApplyVariadic m a b, Typeable a, Typeable b, IsSubset (Inputs b) ins, Contains (Output b) out) => a -> Registry ins out -> Registry ins out Source #

Add an element to the registry without changing its type

addFunTo' :: forall m a b ins out. (ApplyVariadic m a b, Typeable a, Typeable b, IsSubset (Inputs b) ins) => a -> Registry ins out -> Registry ins out Source #

Add an element to the registry without changing its type *** This possibly adds untracked output type! ***

addFunToUnsafe :: forall m a b ins out. (ApplyVariadic m a b, Typeable a, Typeable b) => a -> Registry ins out -> Registry ins out Source #

Add an element to the registry without changing its type *** This possibly adds untracked input types / output type! ***

addFunS :: (Typeable a, IsSubset (Inputs a) ins, Contains (Output a) out, MonadState (Registry ins out) m) => a -> m () Source #

Add an element to the registry without changing its type, in the State monad

addFunS' :: (Typeable a, IsSubset (Inputs a) ins, MonadState (Registry ins out) m) => a -> m () Source #

Add an element to the registry without changing its type, in the State monad *** This possibly adds untracked output type! ***

addFunUnsafeS :: (Typeable a, MonadState (Registry ins out) m) => a -> m () Source #

Add an element to the registry without changing its type, in the State monad *** This possibly adds untracked input types / output type! ***

addToS :: forall n a b m ins out. (ApplyVariadic n a b, Typeable a, Typeable b, Typeable a, IsSubset (Inputs b) ins, Contains (Output b) out, MonadState (Registry ins out) m) => a -> m () Source #

Add an element to the registry without changing its type, in the State monad

addToS' :: forall n a b m ins out. (ApplyVariadic n a b, Typeable a, Typeable b, Typeable a, IsSubset (Inputs b) ins, MonadState (Registry ins out) m) => a -> m () Source #

Add an element to the registry without changing its type, in the State monad *** This possibly adds untracked output type! ***

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 () Source #

Add an element to the registry without changing its type, in the State monad *** This possibly adds untracked input types / output type! ***

addFun :: (Typeable a, IsSubset (Inputs a) ins, Contains (Output a) out) => a -> Registry ins out -> Registry ins out Source #

Add an element to the registry without changing its type

addFun' :: (Typeable a, IsSubset (Inputs a) ins) => a -> Registry ins out -> Registry ins out Source #

Add an element to the registry without changing its type *** This possibly adds untracked output type! ***

addFunUnsafe :: Typeable a => a -> Registry ins out -> Registry ins out Source #

Add an element to the registry without changing its type *** This possibly adds untracked input types / output type! ***

modifyRegistry :: (Typeable a, IsSubset (Inputs a) ins, Contains (Output a) out) => Typed a -> Registry ins out -> Registry ins out Source #

Register modifications of elements which types are already in the registry

modifyRegistry' :: (Typeable a, IsSubset (Inputs a) ins) => Typed a -> Registry ins out -> Registry ins out Source #

Register modifications of elements for which only the input types are in the registry

modifyRegistryUnsafe :: Typeable a => Typed a -> Registry ins out -> Registry ins out Source #

Register modifications of the registry without changing its type