Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class Covariant (t :: * -> *) where
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
(<$>) :: (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 <$
Discards the result of evaluation