category-extras-0.44.4: Various modules and constructs inspired by category theory

Portabilitynon-portable (functional-dependencies)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Functor.Adjunction

Description

 

Synopsis

Documentation

class (Functor f, Functor g) => Adjunction f g 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

newtype ACompF f g a Source

Adjunction-oriented composition, yields monads and comonads from adjunctions

Constructors

ACompF (CompF f g a) 

Instances

Composition ACompF 
Adjunction f g => Monad (ACompF g f) 
(Functor f, Functor g) => Functor (ACompF f g) 
Adjunction f g => Applicative (ACompF g f) 
(Full f, Full g) => Full (ACompF f g) 
Adjunction f g => Copointed (ACompF f g) 
Adjunction f g => Pointed (ACompF g f) 
(ExpFunctor f, ExpFunctor g) => ExpFunctor (ACompF f g) 
Adjunction f g => Comonad (ACompF f g)