package atd

  1. Overview
  2. Docs

Module Ast.MapSource

Replace nodes by other nodes of the same type. First the user-given mapper is applied to a node, then the children nodes are mapped recursively.

Sourcetype mappers = {
  1. type_expr : type_expr -> type_expr;
}
Sourceval default_mappers : mappers
Sourceval type_expr : mappers -> type_expr -> type_expr
Sourceval variant : mappers -> variant -> variant
Sourceval field : mappers -> field -> field
Sourceval type_def : mappers -> type_def -> type_def
Sourceval module_item : mappers -> module_item -> module_item
Sourceval module_body : mappers -> module_body -> module_body
Sourceval full_module : mappers -> full_module -> full_module