Safe Haskell | Safe-Infered |
---|

General purpose tree walking boilerplate.

- class TransformUpMX m c where
- transformUpX :: forall c a n. (Ord n, TransformUpMX Identity c) => (Env n -> Env n -> Exp a n -> Exp a n) -> Env n -> Env n -> c a n -> c a n

# Documentation

class TransformUpMX m c whereSource

:: Ord n | |

=> (Env n -> Env n -> Exp a n -> m (Exp a n)) | The worker function is given the current kind and type environments. |

-> Env n | Initial kind environment. |

-> Env n | Initial type environment. |

-> c a n | Transform this thing. |

-> m (c a n) |

Bottom-up monadic rewrite of all core expressions in a thing.

Monad m => TransformUpMX m Alt | |

Monad m => TransformUpMX m Lets | |

Monad m => TransformUpMX m Exp |

:: forall c a n . (Ord n, TransformUpMX Identity c) | |

=> (Env n -> Env n -> Exp a n -> Exp a n) | The worker function is given the current kind and type environments. |

-> Env n | Initial kind environment. |

-> Env n | Initial type environment. |

-> c a n | Transform this thing. |

-> c a n |

Bottom up rewrite of all core expressions in a thing.