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

Safe HaskellSafe
LanguageHaskell2010

Control.Functor.Covariant

Synopsis

Documentation

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

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

Minimal complete definition

(<$>)

Methods

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

Infix version of comap

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

Prefix version of <$>

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

Replace all locations in the input with the same value

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

Flipped version of <$

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

Discards the result of evaluation