Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- class TransLogicState s t where
- observeT :: Monad m => s -> t m a -> m a
- observeAllT :: Monad m => s -> t m a -> m [a]
- observeManyT :: forall m a. Monad m => s -> Int -> t m a -> m [a]
- liftWithState :: Monad m => (s -> m (a, s)) -> t m a
- observe :: TransLogicState s t => s -> t Identity a -> a
- observeAll :: TransLogicState s t => s -> t Identity a -> [a]
- observeMany :: TransLogicState s t => s -> Int -> t Identity a -> [a]
Documentation
class TransLogicState s t where Source
Additions to MonadTrans specifically useful for LogicState
observeT :: Monad m => s -> t m a -> m a Source
Extracts the first result from a 't m' computation, failing otherwise.
observeAllT :: Monad m => s -> t m a -> m [a] Source
Extracts all results from a 't m' computation.
observeManyT :: forall m a. Monad m => s -> Int -> t m a -> m [a] Source
Extracts up to a given number of results from a 't m' computation.
liftWithState :: Monad m => (s -> m (a, s)) -> t m a Source
Lift a monad by threading the state available in the transformed monad through it
TransLogicState (gs, bs) (LogicStateT gs bs) Source |
observe :: TransLogicState s t => s -> t Identity a -> a Source
Extracts the first result from a LogicVar computation.
observeAll :: TransLogicState s t => s -> t Identity a -> [a] Source
Extracts all results from a LogicVar computation.
observeMany :: TransLogicState s t => s -> Int -> t Identity a -> [a] Source
Extracts up to a given number of results from a LogicVar computation.