Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
The base representation for bidirectional arrows (bijections).
Documentation
data Bijection (a :: * -> * -> *) b c Source #
A representation of a bidirectional arrow (embedding-projection pair of arrows transformer): an arrow and its inverse.
Most uses will prefer the specialized <->
type for function arrows.
To constitute a valid bijection, biTo
and biFrom
should be inverses:
biTo . biFrom = id
biFrom . biTo = id
It may be argued that the arguments should be in the opposite order due to the arrow syntax, but it makes more sense to me to have the forward function come first.