AstMap
Mapping functions allows to apply some treatment to some constructors and use the default treatment to recurse for the other constructor.
The output of Mapping function are bindlib's boxes, so you can use Mapping functions to bind some variables in a kind or ordinal
type map_kind = Ast.occur -> Ast.kind -> self_kind -> self_ord -> (Ast.kind -> Ast.kbox) -> Ast.kbox
map_kind
and map_ord
are the type of the function you need to write to define your own ast mapper. They receive in argument 1°) the variance of the current kind/ordinal 2°) the kind/ordinal itself 3°) the function of type self_kind
corresponding to a recursive call for kind 4°) the function of type self_ord
corresponding to a recursive call for ordinals 5°) the function for to call to get the defaut behavious (which copy the Ast.
Mapping for kinds. The default value of the argument would just copy the kind ast.