category-extras-0.2: Various modules and constructs inspired by category theory.Source codeContentsIndex
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 whereSource

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 bSource
rightAdjunct :: (a -> g b) -> f a -> bSource
unit :: a -> g (f a)Source
counit :: f (g a) -> aSource
show/hide Instances
Adjunction ((,) a) ((->) a)
Adjunction ((,) a) ((->) a)
Produced by Haddock version 2.3.0