data-category-0.7.1: Category theory

LicenseBSD-style (see the file LICENSE)
Maintainersjoerd@w3future.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

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 where Source #

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) Source #

The category of Kleisli arrows.

Instance details

Defined in Data.Category.Kleisli

Methods

src :: Kleisli m a b -> Obj (Kleisli m) a Source #

tgt :: Kleisli m a b -> Obj (Kleisli m) b Source #

(.) :: Kleisli m b c -> Kleisli m a b -> Kleisli m a c Source #

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

data KleisliAdjF m Source #

Constructors

KleisliAdjF (Monad m) 
Instances
(Functor m, Dom m ~ k, Cod m ~ k) => Functor (KleisliAdjF m) Source # 
Instance details

Defined in Data.Category.Kleisli

Associated Types

type Dom (KleisliAdjF m) :: Type -> Type -> Type Source #

type Cod (KleisliAdjF m) :: Type -> Type -> Type Source #

type (KleisliAdjF m) :% a :: Type Source #

Methods

(%) :: KleisliAdjF m -> Dom (KleisliAdjF m) a b -> Cod (KleisliAdjF m) (KleisliAdjF m :% a) (KleisliAdjF m :% b) Source #

type Dom (KleisliAdjF m) Source # 
Instance details

Defined in Data.Category.Kleisli

type Dom (KleisliAdjF m) = Dom m
type Cod (KleisliAdjF m) Source # 
Instance details

Defined in Data.Category.Kleisli

type Cod (KleisliAdjF m) = Kleisli m
type (KleisliAdjF m) :% a Source # 
Instance details

Defined in Data.Category.Kleisli

type (KleisliAdjF m) :% a = a

data KleisliAdjG m Source #

Constructors

KleisliAdjG (Monad m) 
Instances
(Functor m, Dom m ~ k, Cod m ~ k) => Functor (KleisliAdjG m) Source # 
Instance details

Defined in Data.Category.Kleisli

Associated Types

type Dom (KleisliAdjG m) :: Type -> Type -> Type Source #

type Cod (KleisliAdjG m) :: Type -> Type -> Type Source #

type (KleisliAdjG m) :% a :: Type Source #

Methods

(%) :: KleisliAdjG m -> Dom (KleisliAdjG m) a b -> Cod (KleisliAdjG m) (KleisliAdjG m :% a) (KleisliAdjG m :% b) Source #

type Dom (KleisliAdjG m) Source # 
Instance details

Defined in Data.Category.Kleisli

type Dom (KleisliAdjG m) = Kleisli m
type Cod (KleisliAdjG m) Source # 
Instance details

Defined in Data.Category.Kleisli

type Cod (KleisliAdjG m) = Dom m
type (KleisliAdjG m) :% a Source # 
Instance details

Defined in Data.Category.Kleisli

type (KleisliAdjG m) :% a = m :% a

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