minioperational-0.4: fast and simple operational monad

PortabilityRankNTypes
Stabilityexperimental
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Safe HaskellSafe-Inferred

Control.Monad.Trans.Operational.Mini

Description

Simple operational monad transformer

Synopsis

Documentation

newtype ProgramT t m a Source

Constructors

ProgramT 

Fields

unProgram :: forall r. (a -> m r) -> (forall x. t x -> (x -> m r) -> m r) -> m r
 

Instances

interpret :: Monad m => (forall x. t x -> m x) -> ProgramT t m a -> m aSource

Interpret a Program using the given transformation.

data ReifiedProgramT t m a whereSource

Constructors

Return :: a -> ReifiedProgramT t m a 
:>>= :: t a -> (a -> ReifiedProgramT t m b) -> ReifiedProgramT t m b 
Lift :: m a -> (a -> ReifiedProgramT t m b) -> ReifiedProgramT t m b