adjunctions-0.2.1: Adjunctions

Portabilityrank 2 types, MPTCs, fundeps
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Data.Functor.Adjunction

Description

 

Synopsis

Documentation

class (Functor f, Functor g) => Adjunction f g | f -> g, g -> f whereSource

An adjunction between Hask and Hask.

 rightAdjunct unit = id
 leftAdjunct counit = id 

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

Instances

data Representation f x Source

Constructors

Representation 

Fields

rep :: forall a. (x -> a) -> f a
 
unrep :: forall a. f a -> x -> a