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
Bicontravariant ( Forget r) Source # | |
Defined in Optics.Internal.Bi contrabimap :: (b -> a) -> (d -> c) -> Forget r i a c -> Forget r i b d Source # contrafirst :: (b -> a) -> Forget r i a c -> Forget r i b c Source # contrasecond :: (c -> b) -> Forget r i a b -> Forget r i a c Source # |
|
Bicontravariant ( ForgetM r) Source # | |
Defined in Optics.Internal.Bi contrabimap :: (b -> a) -> (d -> c) -> ForgetM r i a c -> ForgetM r i b d Source # contrafirst :: (b -> a) -> ForgetM r i a c -> ForgetM r i b c Source # contrasecond :: (c -> b) -> ForgetM r i a b -> ForgetM r i a c Source # |
|
Bicontravariant ( IxForget r) Source # | |
Defined in Optics.Internal.Bi contrabimap :: (b -> a) -> (d -> c) -> IxForget r i a c -> IxForget r i b d Source # contrafirst :: (b -> a) -> IxForget r i a c -> IxForget r i b c Source # contrasecond :: (c -> b) -> IxForget r i a b -> IxForget r i a c Source # |
|
Bicontravariant ( IxForgetM r) Source # | |
Defined in Optics.Internal.Bi contrabimap :: (b -> a) -> (d -> c) -> IxForgetM r i a c -> IxForgetM r i b d Source # contrafirst :: (b -> a) -> IxForgetM r i a c -> IxForgetM r i b c Source # contrasecond :: (c -> b) -> IxForgetM r i a b -> IxForgetM r i a c Source # |
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.