Portability | TypeOperators |
---|---|
Stability | experimental |
Maintainer | [email protected] |
Safe Haskell | Safe-Inferred |
Data.Bijection
Description
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