effect-monad-0.8.1.0: Embeds effect systems and program logics into Haskell using graded monads and parameterised monads

Safe HaskellNone
LanguageHaskell98

Control.Effect.ParameterisedAsGraded

Synopsis

Documentation

newtype T (i :: Morph * *) 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 Source # 

Associated Types

type Unit T (m :: T -> * -> *) :: k Source #

type Plus T (m :: T -> * -> *) (f :: T) (g :: T) :: k Source #

type Inv T (m :: T -> * -> *) (f :: T) (g :: T) :: Constraint Source #

Methods

return :: a -> m (Unit T m) a Source #

(>>=) :: Inv T m f g => m f a -> (a -> m g b) -> m (Plus T m f g) b Source #

(>>) :: Inv T m f g => m f a -> m g b -> m (Plus T m f g) b Source #

type Unit (Morph * *) T Source # 
type Unit (Morph * *) T = Id * *
type Plus (Morph * *) T (Id * *) (M * * a b) Source # 
type Plus (Morph * *) T (Id * *) (M * * a b) = M * * a b
type Plus (Morph * *) T (M * * a b) (Id * *) Source # 
type Plus (Morph * *) T (M * * a b) (Id * *) = M * * a b
type Plus (Morph * *) T (M * * a b) (M * * c d) Source # 
type Plus (Morph * *) T (M * * a b) (M * * c d) = M * * a d
type Inv (Morph * *) T (M * * a b) (M * * c d) Source # 
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 Source # 

Associated Types

type Unit T (m :: T -> * -> *) :: k Source #

type Plus T (m :: T -> * -> *) (f :: T) (g :: T) :: k Source #

type Inv T (m :: T -> * -> *) (f :: T) (g :: T) :: Constraint Source #

Methods

return :: a -> m (Unit T m) a Source #

(>>=) :: Inv T m f g => m f a -> (a -> m g b) -> m (Plus T m f g) b Source #

(>>) :: Inv T m f g => m f a -> m g b -> m (Plus T m f g) b Source #

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