





Synopsis 

module Control.Monad   class (Functor f, Monad m) => MonadFree f m where      isPure :: Free t t1 > Bool   isImpure :: Free t t1 > Bool   foldFree :: Functor f => (a > b) > (f b > b) > Free f a > b   foldFreeM :: (Functor f, Traversable f, Monad m) => (a > m b) > (f b > m b) > Free f a > m b   evalFree :: (a > b) > (f (Free f a) > b) > Free f a > b   mapFree :: (Functor f, Functor g) => (forall a. f a > g a) > Free f a > Free g a   mapFreeM :: (Traversable f, Functor g, Monad m) => (forall a. f a > m (g a)) > Free f a > m (Free g a)   newtype FreeT f m a = FreeT {}   foldFreeT :: (Traversable f, Monad m) => (a > m b) > (f b > m b) > FreeT f m a > m b   foldFreeT' :: (Traversable f, Monad m) => (a > b) > (f b > b) > FreeT f m a > m b   mapFreeT :: (Functor f, Functor m) => (forall a. m a > m' a) > FreeT f m a > FreeT f m' a   trans :: (Functor f, Monad m) => Free f a > FreeT f m a   trans' :: (Functor f, Monad m) => m (Free f a) > FreeT f m a   untrans :: (Traversable f, Monad m) => FreeT f m a > m (Free f a)   liftFree :: (Functor f, Monad m) => (a > Free f b) > a > FreeT f m b 


Documentation 

module Control.Monad 

Free Monads



This type class generalizes over encodings of Free Monads.
  Methods   ::   => m a  Opens a computation and allows to observe the side effects
 > m (Either a (f (m a)))  
   ::   => f (m a)  Wraps a side effect into a monadic computation
 > m a  

  Instances  



Constructors  Impure (f (Free f a))   Pure a  
 Instances  
















Free Monad Transformers



Constructors   Instances  








Translate between Free monad and Free monad transformer computations










Produced by Haddock version 2.6.0 