Safe Haskell | None |
---|---|
Language | Haskell2010 |
Classes for co- and contravariant bifunctors.
This module is intended for internal use only, and may change without warning in subsequent releases.
Synopsis
- class Bifunctor p where
- class Bicontravariant p where
- contrabimap :: (b -> a) -> (d -> c) -> p i a c -> p i b d
- contrafirst :: (b -> a) -> p i a c -> p i b c
- contrasecond :: (c -> b) -> p i a b -> p i a c
- lphantom :: (Profunctor p, Bifunctor p) => p i a c -> p i b c
- rphantom :: (Profunctor p, Bicontravariant p) => p i c a -> p i c b
Documentation
class Bifunctor p where Source #
Class for (covariant) bifunctors.
class Bicontravariant p where Source #
Class for contravariant bifunctors.
contrabimap :: (b -> a) -> (d -> c) -> p i a c -> p i b d Source #
contrafirst :: (b -> a) -> p i a c -> p i b c Source #
contrasecond :: (c -> b) -> p i a b -> p i a c Source #
Instances
lphantom :: (Profunctor p, Bifunctor p) => p i a c -> p i b c Source #
If p
is a Profunctor
and a Bifunctor
then its left parameter must be
phantom.
rphantom :: (Profunctor p, Bicontravariant p) => p i c a -> p i c b Source #
If p
is a Profunctor
and Bicontravariant
then its right parameter
must be phantom.