Safe Haskell | Safe-Inferred |
---|

General purpose tree walking boilerplate.

- class TransformDownMX m c where
- transformDownX :: forall c a n. (Ord n, TransformDownMX Identity c) => (KindEnv n -> TypeEnv n -> Exp a n -> Exp a n) -> KindEnv n -> TypeEnv n -> c a n -> c a n
- transformDownX' :: forall c a n. (Ord n, TransformDownMX Identity c) => (Exp a n -> Exp a n) -> c a n -> c a n

# Documentation

class TransformDownMX m c whereSource

:: Ord n | |

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

-> KindEnv n | Initial kind environment. |

-> TypeEnv n | Initial type environment. |

-> c a n | Transform this thing. |

-> m (c a n) |

Top-down monadic rewrite of all core expressions in a thing.

Monad m => TransformDownMX m Alt | |

Monad m => TransformDownMX m Lets | |

Monad m => TransformDownMX m Exp | |

Monad m => TransformDownMX m Module |

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

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

-> KindEnv n | Initial kind environment. |

-> TypeEnv n | Initial type environment. |

-> c a n | Transform this thing. |

-> c a n |

Top-down rewrite of all core expressions in a thing.

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

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

-> c a n | Transform this thing. |

-> c a n |

Like transformDownX, but without using environments.