category-extras-0.1: Various modules and constructs inspired by category theory.ContentsIndex
Control.Functor.Adjunction
Portabilitynon-portable (fundeps)
Stabilityexperimental
Maintainerdan.doel@gmail.com
Description
Synopsis
class (Functor f, Functor g) => Adjunction f g | f -> g, g -> f where
leftAdjunct :: (f a -> b) -> a -> g b
rightAdjunct :: (a -> g b) -> f a -> b
unit :: a -> g (f a)
counit :: f (g a) -> a
Documentation
class (Functor f, Functor g) => Adjunction f g | f -> g, g -> f where

Minimal definitions:

1. leftAdjunct and rightAdjunct

2. unit and counit

Given functors f and g, Adjunction f g implies Monad (g `'O'` f) and Comonad (f `'O'` g).

Methods
leftAdjunct :: (f a -> b) -> a -> g b
rightAdjunct :: (a -> g b) -> f a -> b
unit :: a -> g (f a)
counit :: f (g a) -> a
Produced by Haddock version 2.1.0