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

Safe HaskellSafe
LanguageHaskell2010

Control.Functor.Contravariant

Synopsis

Documentation

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

When providing a new instance, you should ensure it satisfies the two laws:
* Identity morphism: contramap identity ≡ identity
* Composition of morphisms: contramap f . contramap g ≡ contramap (g . f)

Minimal complete definition

(>$<)

Methods

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

Infix version of contramap

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

Prefix version of >$<

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

Replace all locations in the output with the same value

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

Flipped version of >$

full :: t () -> t a Source #

Fill the input of evaluation