pipes-2.2.0: Compositional pipelines

Safe HaskellSafe-Infered

Control.IMonad.Trans.Free

Contents

Description

This module is the indexed version of Control.Monad.Trans.Free

Synopsis

Free monad transformers

Indexed free monad transformers lift the constructor signatures to the category of indexed Haskell functions: (:->).

 Return ::   r :-> IFreeF f r x
 Wrap   :: f x :-> IFreeF f r x

 IFreeT :: m (IFreeF f r (IFreeT f m r)) :-> IFreeT f m r

data IFreeF f r x i Source

Indexed equivalent to FreeF

Constructors

Return (r i) 
Wrap (f x i) 

newtype IFreeT f m r i Source

Indexed equivalent to FreeT

Constructors

IFreeT 

Fields

runIFreeT :: m (IFreeF f r (IFreeT f m r)) i
 

Instances

IFunctor f => IMonadTrans (IFreeT f) 
(IFunctor f, IMonad m) => IFunctor (IFreeT f m) 
(IFunctor f, IMonad m) => IMonad (IFreeT f m) 

wrap :: IMonad m => f (IFreeT f m r) :-> IFreeT f m rSource

Indexed equivalent to wrap

liftF :: (IFunctor f, IMonad m) => f r :-> IFreeT f m rSource

Indexed equivalent to liftF