morphisms-functors-0.1.7: Functors, theirs compositions and transformations

Safe HaskellSafe
LanguageHaskell2010

Control.Functor.Invariant

Synopsis

Documentation

class Invariant (t :: * -> *) where Source #

When providing a new instance, you should ensure it satisfies the two laws:
Identity morphisms: invmap identity identity = identity
Composition of morphisms: invmap g j . invmap f h = invmap (g . f) (h . j)

Minimal complete definition

(<$<)

Methods

(<$<) :: (a -> b) -> (b -> a) -> t a -> t b infixr 4 Source #

Infix version of invmap

invmap :: (a -> b) -> (b -> a) -> t a -> t b Source #

Prefix version of <$<

(>$>) :: (b -> a) -> (a -> b) -> t a -> t b infixl 4 Source #

Flipped version of <$<