demarcate-0.1.0: Demarcating transformed monad.

Portabilityghc
Stabilityexperimental
Maintainernickolay.kudasov@gmail.com
Safe HaskellTrustworthy

Control.Monad.Trans.Demarcate

Description

Interface for Demarcate monad transformer.

Synopsis

Documentation

data Demarcate t m a Source

Demarcate monad transformer.

demarcateM :: m a -> Demarcate t m aSource

Lift pure monadic computation into Demarcate t m a

demarcateT :: t m a -> Demarcate t m aSource

Lift transformed monadic computation into Demarcate t m a

execDemarcate :: (Monad (t m), Monad m, MonadTrans t) => Demarcate t m a -> t m aSource

Execute demarcated computation.

wrapT :: (Functor f, MonadFree f m, MonadTrans t, Monad (t m)) => f (t m a) -> t m aSource

Helper function (useful with transformDemarcateFree). I believe it should be somewhere in Control.Monad.Free

transformDemarcateM :: (forall b. m b -> Demarcate t m b) -> Demarcate t m a -> Demarcate t m aSource

Substitute monad computations with demarcated.

transformDemarcateFree :: Functor f => (forall b. f (Demarcate t (Free f) b) -> Demarcate t (Free f) b) -> Demarcate t (Free f) a -> Demarcate t (Free f) aSource

Substitute free monad actions with demarcated monad computations.

hoistDemarcateT :: (forall b. t m b -> t' m b) -> Demarcate t m a -> Demarcate t' m aSource

Subsitute monad transformer.