reasonable-operational-0.1.0.1: library for takahashi method.

Safe HaskellSafe-Inferred
LanguageHaskell98

Control.Monad.Operational

Documentation

data CoYoneda f x where Source

Constructors

CoYoneda :: (b -> x) -> f b -> CoYoneda f x 

Instances

data Free f r Source

Constructors

Free (f (Free f r)) 
Pure r 

Instances

Functor f => Monad (Free f) 
Functor f => Functor (Free f) 
Functor f => Applicative (Free f) 

liftF :: Functor f => f r -> Free f r Source

newtype Program f a Source

Constructors

Program 

Fields

toFree :: Free (CoYoneda f) a
 

Instances

singleton :: f a -> Program f a Source

interpret :: forall instr m b. Monad m => (forall a. instr a -> m a) -> Program instr b -> m b Source