logicst-0.1.0.0: Backtracking mutable references in the ST and IO monads

Safe HaskellSafe-Inferred

Control.Monad.ST.Logic.Internal

Documentation

data LogicT s m a Source

Instances

Monad (LogicT s m) 
Functor (LogicT s m) 
MonadST m => MonadPlus (LogicT s m) 
Applicative (LogicT s m) 
MonadST m => Alternative (LogicT s m) 
MonadIO m => MonadIO (LogicT s m) 
MonadST m => MonadLogic (LogicT s m) 

runLogicT :: MonadST m => (forall s. LogicT s m a) -> (a -> m r -> m r) -> m r -> m rSource

observeT :: MonadST m => (forall s. LogicT s m a) -> m aSource

observeAllT :: MonadST m => (forall s. LogicT s m a) -> m [a]Source

observeManyT :: MonadST m => Int -> (forall s. LogicT s m a) -> m [a]Source

liftST :: MonadST m => ST (World m) a -> m aSource

runLogicST :: (forall s. LogicT s (ST s) a) -> (a -> r -> r) -> r -> rSource

observeST :: (forall s. LogicT s (ST s) a) -> aSource

observeAllST :: (forall s. LogicT s (ST s) a) -> [a]Source

observeManyST :: Int -> (forall s. LogicT s (ST s) a) -> [a]Source

data Ref s m a Source

newRef :: MonadST m => a -> LogicT s m (Ref s m a)Source

readRef :: MonadST m => Ref s m a -> LogicT s m aSource

writeRef :: MonadST m => Ref s m a -> a -> LogicT s m ()Source

modifyRef :: MonadST m => Ref s m a -> (a -> a) -> LogicT s m ()Source

modifyRef' :: MonadST m => Ref s m a -> (a -> a) -> LogicT s m ()Source