I’m interested in writing source-to-source program transformation that exploit some typing information. Thus, I’m looking for a variant of ast_mapper that would provide as input a typed AST (typedtree) and produces an untyped AST (parsetree), so that I don’t have to bother rebuilding valid types.
Afaik, the typed AST carries the required information for rebuilding the untyped AST. (Note that I only need this to work for the core language.)
Has anyone written such a variant of the ast_mapper?
Anyone seeing particular difficulties in doing so?