Category extrasSource codeContentsIndex
Control.Functor.Adjunction
Portability non-portable (fundeps)
Stability experimental
Maintainer zednenem@psualum.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
Instances
Adjunction ((,) a) ((->) a)
Produced by Haddock version 0.6