Portability | TypeOperators |
---|---|
Stability | experimental |
Maintainer | [email protected] |
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 (~>) a b = Bi {}
- type :<->: a b = Bijection (->) a b
- idb :: Arrow ~> => Bijection ~> a a
- inverse :: Bijection ~> a b -> Bijection ~> b a
- bimap :: Functor f => (a :<->: b) -> f a :<->: f b
- (--->) :: Arrow ~> => Bijection ~> a b -> Bijection ~> c d -> (a ~> c) :<->: (b ~> d)
- inBi :: Arrow ~> => Bijection ~> a b -> (a ~> a) -> b ~> b