|Maintainer||Neil Sculthorpe <firstname.lastname@example.org>|
A bi-directional translation is a translation that can be applied in either direction.
- data BiTranslate c m a b
- type BiRewrite c m a = BiTranslate c m a a
- bidirectional :: Translate c m a b -> Translate c m b a -> BiTranslate c m a b
- forewardT :: BiTranslate c m a b -> Translate c m a b
- backwardT :: BiTranslate c m a b -> Translate c m b a
- whicheverR :: MonadCatch m => BiRewrite c m a -> Rewrite c m a
- invertBiT :: BiTranslate c m a b -> BiTranslate c m b a
- beforeBiR :: Monad m => Translate c m a b -> (b -> BiRewrite c m a) -> BiRewrite c m a
BiTranslate that shares the same source and target type.
BiRewrite forewards, then backwards if that fails.
Useful when you know which rule you want to apply, but not which direction to apply it in.
Invert the forewards and backwards directions of a