Portability | ghc |
---|---|

Stability | unstable |

Maintainer | Andy Gill <andygill@ku.edu> |

- data Translate m dec exp1 exp2
- apply :: (Monoid dec, Monad m) => Translate m dec exp1 exp2 -> exp1 -> RewriteM m dec exp2
- runTranslate :: (Monoid dec, Monad m) => Translate m dec exp res -> dec -> exp -> m (Either String (res, dec))
- translate :: (Monoid dec, Monad m) => (exp1 -> RewriteM m dec exp2) -> Translate m dec exp1 exp2

# Documentation

data Translate m dec exp1 exp2 Source

`Translate`

is a translation or strategy that translates between `exp1`

and `exp2`

, with the posiblity of failure,
and remembers identity translations.

runTranslate :: (Monoid dec, Monad m) => Translate m dec exp res -> dec -> exp -> m (Either String (res, dec))Source

`runTranslate`

executes the translation, returning either a failure message,
or a success and the new parts of the environment.