definitive-base-2.6.3: A small Prelude wrapper to simplify my own Haskell developments

Safe HaskellNone
LanguageHaskell2010

Algebra.Monad.Logic

Documentation

newtype LogicT m a Source #

Constructors

LogicT 

Fields

  • runLogicT :: forall r. (a -> m r -> m r) -> m r -> m r
     

Instances

MonadTrans LogicT Source # 

Methods

lift :: Monad m => m a -> LogicT m a Source #

Monad m => MonadLogic m (LogicT m) Source # 

Methods

deduce :: LogicT m a -> m (Maybe (a, LogicT m a)) Source #

induce :: m (Maybe (a, LogicT m a)) -> LogicT m a Source #

Monad m => MonadError Void (LogicT m) Source # 

Methods

throw :: Void -> LogicT m a Source #

catch :: (Void -> LogicT m a) -> LogicT m a -> LogicT m a Source #

MonadWriter w m => MonadWriter w (LogicT m) Source # 

Methods

tell :: w -> LogicT m () Source #

listen :: LogicT m a -> LogicT m (w, a) Source #

censor :: LogicT m (a, w -> w) -> LogicT m a Source #

MonadReader r m => MonadReader r (LogicT m) Source # 

Methods

ask :: LogicT m r Source #

local :: (r -> r) -> LogicT m a -> LogicT m a Source #

MonadState s m => MonadState s (LogicT m) Source # 

Methods

get :: LogicT m s Source #

put :: s -> LogicT m () Source #

modify :: (s -> s) -> LogicT m () Source #

Unit (LogicT m) Source # 

Methods

pure :: a -> LogicT m a Source #

MonadFix m => MonadFix (LogicT m) Source # 

Methods

mfix :: (a -> LogicT m a) -> LogicT m a Source #

(Monad m, Traversable m) => Traversable (LogicT m) Source # 

Methods

sequence :: Applicative f => LogicT m (f a) -> f (LogicT m a) Source #

(Monad m, Foldable m) => Foldable (LogicT m) Source # 

Methods

fold :: Monoid m => LogicT m m -> m Source #

Monad (LogicT m) Source # 

Methods

join :: LogicT m (LogicT m a) -> LogicT m a Source #

(>>=) :: LogicT m a -> (a -> LogicT m b) -> LogicT m b Source #

Applicative (LogicT m) Source # 
SemiApplicative (LogicT m) Source # 

Methods

(<*>) :: LogicT m (a -> b) -> LogicT m a -> LogicT m b Source #

Functor (LogicT m) Source # 

Methods

map :: (a -> b) -> LogicT m a -> LogicT m b Source #

Monoid a => Ring (LogicT m a) Source # 

Methods

one :: LogicT m a Source #

Semigroup a => Semiring (LogicT m a) Source # 

Methods

(*) :: LogicT m a -> LogicT m a -> LogicT m a Source #

Monoid (LogicT m a) Source # 

Methods

zero :: LogicT m a Source #

Semigroup (LogicT m a) Source # 

Methods

(+) :: LogicT m a -> LogicT m a -> LogicT m a Source #

listLogic :: (MonadLogic m l, MonadLogic n l') => Iso (l a) (l' b) (m [a]) (n [b]) Source #

deduction :: (MonadLogic m l, MonadLogic m' l') => Iso (m (Maybe (a, l a))) (m' (Maybe (b, l' b))) (l a) (l' b) Source #

deduceMany :: MonadLogic m l => Int -> l a -> m [a] Source #

deduceAll :: MonadLogic m l => l a -> m [a] Source #

logicChoose :: MonadLogic m l => [a] -> l a Source #

cut :: MonadLogic m l => l a -> l a Source #