data-category-0.6.1: Category theory

Portabilitynon-portable
Stabilityexperimental
Maintainersjoerd@w3future.com
Safe HaskellSafe-Inferred

Data.Category.Kleisli

Description

This is an attempt at the Kleisli category, and the construction of an adjunction for each monad.

Documentation

data Kleisli m a b whereSource

Constructors

Kleisli :: (Functor m, Dom m ~ k, Cod m ~ k) => Monad m -> Obj k b -> k a (m :% b) -> Kleisli m a b 

Instances

Category (Kleisli m)

The category of Kleisli arrows.

kleisliId :: (Functor m, Dom m ~ k, Cod m ~ k) => Monad m -> Obj k a -> Kleisli m a aSource

data KleisliAdjF m Source

Constructors

KleisliAdjF (Monad m) 

Instances

(Functor m, ~ (* -> * -> *) (Dom m) k, ~ (* -> * -> *) (Cod m) k) => Functor (KleisliAdjF m) 

data KleisliAdjG m Source

Constructors

KleisliAdjG (Monad m) 

Instances

(Functor m, ~ (* -> * -> *) (Dom m) k, ~ (* -> * -> *) (Cod m) k) => Functor (KleisliAdjG m) 

kleisliAdj :: (Functor m, Dom m ~ k, Cod m ~ k) => Monad m -> Adjunction (Kleisli m) k (KleisliAdjF m) (KleisliAdjG m)Source