Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
Symmetric
Bifunctor
s.
swap
.swap
=id
If
p
is a
Bifunctor
the following property is assumed to hold:
swap
.bimap
f g =bimap
g f .swap
Swap
isn't a subclass of
Bifunctor
, as for example
>>>
newtype Bipredicate a b = Bipredicate (a -> b -> Bool)
is not a
Bifunctor
but has
Swap
instance
>>>
instance Swap Bipredicate where swap (Bipredicate p) = Bipredicate (flip p)
Instances
Swap Either Source # | |
Swap (,) Source # | |
Defined in Data.Bifunctor.Swap |
|
Swap ( (,,) x) Source # | |
Defined in Data.Bifunctor.Swap |
|
Swap ( (,,,) x y) Source # | |
Defined in Data.Bifunctor.Swap |
|
Swap ( (,,,,) x y z) Source # | |
Defined in Data.Bifunctor.Swap |
|
Swap p => Swap ( Flip p) Source # | |
Swap ( (,,,,,) x y z w) Source # | |
Defined in Data.Bifunctor.Swap |
|
( Swap p, Swap q) => Swap ( Sum p q) Source # | |
( Swap p, Swap q) => Swap ( Product p q) Source # | |
Swap ( (,,,,,,) x y z w v) Source # | |
Defined in Data.Bifunctor.Swap |
|
( Functor f, Swap p) => Swap ( Tannen f p) Source # | |
(f ~ g, Functor f, Swap p) => Swap ( Biff p f g) Source # | |