Portability | portable |
---|---|
Stability | experimental |
Maintainer | ross@soi.city.ac.uk |
Safe Haskell | Safe-Inferred |
Control.Monad.Trans.List
Description
The ListT monad transformer, adding backtracking to a given monad, which must be commutative.
The ListT monad transformer
newtype ListT m a
Parameterizable list monad, with an inner monad.
Note: this does not yield a monad unless the argument monad is commutative.
Instances
MonadTrans ListT | |
Monad m => Monad (ListT m) | |
Functor m => Functor (ListT m) | |
(Monad (ListT m), Monad m) => MonadPlus (ListT m) | |
(Functor (ListT m), Applicative m) => Applicative (ListT m) | |
Foldable f => Foldable (ListT f) | |
(Functor (ListT f), Foldable (ListT f), Traversable f) => Traversable (ListT f) | |
(Applicative (ListT m), Applicative m) => Alternative (ListT m) | |
(Monad (ListT m), MonadIO m) => MonadIO (ListT m) |
Lifting other operations
liftCallCC :: ((([a] -> m [b]) -> m [a]) -> m [a]) -> ((a -> ListT m b) -> ListT m a) -> ListT m a
Lift a callCC
operation to the new monad.