category-extras-0.53.5: Various modules and constructs inspired by category theorySource codeContentsIndex
Control.Functor.Adjunction
Portabilitynon-portable (functional-dependencies)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>
Contents
Every Right Adjoint is Representable
Description
Synopsis
class (Representable g (f ()), Functor f) => Adjunction f g | f -> g, g -> f where
unit :: a -> g (f a)
counit :: f (g a) -> a
leftAdjunct :: (f a -> b) -> a -> g b
rightAdjunct :: (a -> g b) -> f a -> b
newtype ACompF f g a = ACompF (CompF f g a)
repAdjunction :: Adjunction f g => (f () -> a) -> g a
unrepAdjunction :: Adjunction f g => g a -> f () -> a
Documentation
class (Representable g (f ()), Functor f) => Adjunction f g | f -> g, g -> f whereSource
An Adjunction formed by the Functor f and Functor g.
Methods
unit :: a -> g (f a)Source
counit :: f (g a) -> aSource
leftAdjunct :: (f a -> b) -> a -> g bSource
rightAdjunct :: (a -> g b) -> f a -> bSource
show/hide Instances
newtype ACompF f g a Source
Adjunction-oriented composition, yields monads and comonads from adjunctions
Constructors
ACompF (CompF f g a)
show/hide Instances
Every Right Adjoint is Representable
repAdjunction :: Adjunction f g => (f () -> a) -> g aSource
unrepAdjunction :: Adjunction f g => g a -> f () -> aSource
Produced by Haddock version 2.4.2