pandora-0.2.0: A box of patterns and paradigms

Pandora.Pattern.Functor.Invariant

Synopsis
• class Invariant (t :: * -> *) where
• invmap :: (a -> b) -> (b -> a) -> t a -> t b

# 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)

Methods

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

Instances
 Source # Instance detailsDefined in Pandora.Paradigm.Basis.Endo Methodsinvmap :: (a -> b) -> (b -> a) -> Endo a -> Endo b Source # Invariant (Constant a :: Type -> Type) Source # Instance detailsDefined in Pandora.Paradigm.Basis.Constant Methodsinvmap :: (a0 -> b) -> (b -> a0) -> Constant a a0 -> Constant a b Source #