effect-monad-0.6: Embeds effect systems into Haskell using parameteric effect monads

Safe HaskellNone
LanguageHaskell98

Control.Effect.Parameterised

Synopsis

Documentation

newtype T i a Source

Implements Bob Atkey's 'parametric monads', and also the Control.Monad.Indexed package, by emulating indexing by morphisms

Data type of morphisms

Constructors

T a 

Instances

Effect (Morph * *) T 
type Unit (Morph * *) T = Id * * 
type Plus (Morph * *) T (Id * *) (M * * a b) = M * * a b 
type Plus (Morph * *) T (M * * a b) (Id * *) = M * * a b 
type Plus (Morph * *) T (M * * a b) (M * * c d) = M * * a d 
type Inv (Morph * *) T (M * * a b) (M * * c d) = (~) * c d 

data Morph a b Source

Data type denoting either a morphisms with source and target types, or identity

Constructors

M a b 
Id 

Instances

Effect (Morph * *) T 
type Unit (Morph * *) T = Id * * 
type Plus (Morph * *) T (Id * *) (M * * a b) = M * * a b 
type Plus (Morph * *) T (M * * a b) (Id * *) = M * * a b 
type Plus (Morph * *) T (M * * a b) (M * * c d) = M * * a d 
type Inv (Morph * *) T (M * * a b) (M * * c d) = (~) * c d