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