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

Safe HaskellNone




class Coeffect c where Source

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

Associated Types

type Inv c s t :: Constraint Source

type Unit c :: k Source

type Plus c s t :: k Source


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 s and t on its parameter computations get combined in the parameter computation by Plus


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


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


class Subcoeffect c s t where Source

Specifies sub-coeffecting behaviour


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