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

Portabilitynon-portable (class-associated types)
MaintainerEdward Kmett <>






class Functor f => Full f whereSource

A Full Functor F : C -> D provides for every pair of objects c, c' in C and every morphism g : F c -> F c'l in D, a morphism g' : c -> c' in C. In short map has a right-inverse under composition.

 fmap . premap = id


premap :: (f a -> f b) -> a -> bSource


Full Identity 
(Full f, Full g) => Full (CompF f g) 
(Full f, Full g) => Full (ACompF f g) 
(Full f, Full g) => Full (DistCompF f g) 
(Full f, Full mw) => Full (PreCompF f mw) 
(Full mw, Full f) => Full (PostCompF mw f) 
(Full f, Full g) => Full (PointedCompF f g) 

class Functor f => Faithful f Source


unmap :: (Full f, Faithful f) => (f a -> f b) -> a -> bSource

For every pair of objects a and b in C a Full Faithful Functor F : C -> D maps every morphism f : a -> b onto a distinct morphism f : T a -> T b (since it is faithful) and every morphism from g : T a -> T b can be obtained from some f. (It maps Hom-sets bijectively, or in short fmap has both a left and right inverse under composition.

 unmap . fmap = id