Copyright | (c) Conal Elliott 2007 |
---|---|

License | BSD3 |

Maintainer | conal@conal.net |

Stability | experimental |

Portability | TypeOperators |

Safe Haskell | Safe |

Language | Haskell98 |

Bijections. For a more general setting, see also [1]
*There and Back Again: Arrows for Invertible Programming*,
http://citeseer.ist.psu.edu/alimarine05there.html.

- data Bijection j a b = Bi {}
- type (:<->:) a b = Bijection (->) a b
- idb :: Arrow j => Bijection j a a
- inverse :: Bijection j a b -> Bijection j b a
- bimap :: Functor f => (a :<->: b) -> f a :<->: f b
- (--->) :: Arrow j => Bijection j a b -> Bijection j c d -> (a `j` c) :<->: (b `j` d)
- inBi :: Arrow j => Bijection j a b -> (a `j` a) -> b `j` b