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

Safe HaskellNone
LanguageHaskell2010

Algebra.Monad.Foldable

Contents

Synopsis

The MonadList class

class Monad m => MonadList m where Source #

Minimal complete definition

choose

Methods

choose :: [a] -> m a Source #

Instances

MonadList m => MonadList (Free m) Source # 

Methods

choose :: [a] -> Free m a Source #

Monad m => MonadList (ListT m) Source # 

Methods

choose :: [a] -> ListT m a Source #

MonadList m => MonadList (ReaderT r m) Source # 

Methods

choose :: [a] -> ReaderT r m a Source #

MonadList m => MonadList (StateT s m) Source # 

Methods

choose :: [a] -> StateT s m a Source #

(MonadList m, Monoid w) => MonadList (WriterT w m) Source # 

Methods

choose :: [a] -> WriterT w m a Source #

(Monad m, Invertible t) => MonadList (ProbT t m) Source # 

Methods

choose :: [a] -> ProbT t m a Source #

(Monoid w, MonadList m) => MonadList (RWST r w s m) Source # 

Methods

choose :: [a] -> RWST r w s m a Source #

Foldable monads transformers

The List transformer

data ListT m a Source #

Instances

MonadTrans ListT Source # 

Methods

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

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

Methods

throw :: Void -> ListT m a Source #

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

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

Methods

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

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

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

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

Methods

get :: ListT m s Source #

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

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

Unit m => Unit (ListT m) Source # 

Methods

pure :: a -> ListT m a Source #

Monad m => MonadList (ListT m) Source # 

Methods

choose :: [a] -> ListT m a Source #

MonadFix m => MonadFix (ListT m) Source # 

Methods

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

Traversable m => Traversable (ListT m) Source # 

Methods

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

Foldable m => Foldable (ListT m) Source # 

Methods

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

Monad m => Monad (ListT m) Source # 

Methods

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

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

Applicative m => Applicative (ListT m) Source # 
SemiApplicative m => SemiApplicative (ListT m) Source # 

Methods

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

Functor m => Functor (ListT m) Source # 

Methods

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

Applicative m => Monoid (ListT m a) Source # 

Methods

zero :: ListT m a Source #

SemiApplicative m => Semigroup (ListT m a) Source # 

Methods

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

listT :: Iso (ListT m a) (ListT m' a') (m [a]) (m' [a']) Source #

The Tree transformer

newtype TreeT m a Source #

Constructors

TreeT (Compose' Tree m a) 

Instances

MonadTrans TreeT Source # 

Methods

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

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

Methods

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

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

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

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

Methods

ask :: TreeT m r Source #

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

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

Methods

get :: TreeT m s Source #

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

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

Unit m => Unit (TreeT m) Source # 

Methods

pure :: a -> TreeT m a Source #

MonadFix m => MonadFix (TreeT m) Source # 

Methods

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

Traversable m => Traversable (TreeT m) Source # 

Methods

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

Foldable m => Foldable (TreeT m) Source # 

Methods

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

Monad m => Monad (TreeT m) Source # 

Methods

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

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

Applicative m => Applicative (TreeT m) Source # 
SemiApplicative m => SemiApplicative (TreeT m) Source # 

Methods

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

Functor m => Functor (TreeT m) Source # 

Methods

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

treeT :: Iso (TreeT m a) (TreeT n b) (m (Tree a)) (n (Tree b)) Source #

The Maybe transformer

newtype MaybeT m a Source #

Constructors

MaybeT (Compose' Maybe m a) 

Instances

MonadTrans MaybeT Source # 

Methods

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

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

Methods

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

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

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

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

Methods

ask :: MaybeT m r Source #

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

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

Methods

get :: MaybeT m s Source #

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

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

Unit m => Unit (MaybeT m) Source # 

Methods

pure :: a -> MaybeT m a Source #

MonadFix m => MonadFix (MaybeT m) Source # 

Methods

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

Traversable m => Traversable (MaybeT m) Source # 

Methods

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

Foldable m => Foldable (MaybeT m) Source # 

Methods

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

Monad m => Monad (MaybeT m) Source # 

Methods

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

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

Applicative m => Applicative (MaybeT m) Source # 
SemiApplicative m => SemiApplicative (MaybeT m) Source # 

Methods

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

Functor m => Functor (MaybeT m) Source # 

Methods

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

Applicative m => Monoid (MaybeT m a) Source # 

Methods

zero :: MaybeT m a Source #

SemiApplicative m => Semigroup (MaybeT m a) Source # 

Methods

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

maybeT :: Iso (MaybeT m a) (MaybeT m' b) (m (Maybe a)) (m' (Maybe b)) Source #

The Strict Monad transformer

newtype StrictT m a Source #

Constructors

StrictT (Compose' Strict m a) 

Instances

MonadTrans StrictT Source # 

Methods

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

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

Methods

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

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

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

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

Methods

ask :: StrictT m r Source #

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

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

Methods

get :: StrictT m s Source #

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

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

Unit m => Unit (StrictT m) Source # 

Methods

pure :: a -> StrictT m a Source #

MonadFix m => MonadFix (StrictT m) Source # 

Methods

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

Traversable m => Traversable (StrictT m) Source # 

Methods

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

Foldable m => Foldable (StrictT m) Source # 

Methods

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

Monad m => Monad (StrictT m) Source # 

Methods

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

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

Applicative m => Applicative (StrictT m) Source # 
SemiApplicative m => SemiApplicative (StrictT m) Source # 

Methods

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

Functor m => Functor (StrictT m) Source # 

Methods

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

strictT :: Iso (StrictT m a) (StrictT m' b) (m (Strict a)) (m' (Strict b)) Source #

Orphan instances

MonadList [] Source # 

Methods

choose :: [a] -> [a] Source #