ixmonad-0.56: Embeds effect systems into Haskell using parameteric effect monads

Safe HaskellNone
LanguageHaskell98

Control.Coeffect

Synopsis

Documentation

class Coeffect c where Source

Specifies "parametric coeffect comonads" which are essentially comonads but annotated by a type-level monoid formed by |Plus m| and |Unit m| |

Associated Types

type Inv c s t :: Constraint Source

type Unit c :: k Source

type Plus c s t :: k Source

Methods

extract :: c (Unit c) a -> a Source

Coeffect-parameterised version of extract, annotated with the 'Unit m' effect, denoting pure contexts |

extend :: Inv c s t => (c t a -> b) -> c (Plus c s t) a -> c s b Source

Coeffect-parameterise version of extend. The two coeffec annotations f and g on its parameter computations get combined in the result by 'Plus m s t' |

Instances

class CoeffectZip c where Source

Zips two coeffecting computations together |

Associated Types

type Meet c s t :: k Source

type CzipInv c s t :: Constraint Source

Methods

czip :: CzipInv c s t => c s a -> c t b -> c (Meet c s t) (a, b) Source

Instances

class Subcoeffect c s t where Source

Specifies sub-coeffecting behaviour |

Methods

subco :: c s a -> c t a Source