Some general guidelines about src syntax, the core AST - FStarLang/FStar GitHub Wiki
- See
syntax.fsifor the core AST (term’ and term) - Using
Syntax.gen_bv/new_bvto generate fresh names - Use
Subst.compressbefore inspecting a term; never inspectTm_delayednodes - Build terms that have binders in them using
Util.abs,Util.arrow, etc. - Otherwise, see
Subst.close* andSubst.open* to work with binders - General rule: do not manipulate de Bruijn indices yourself
Add to this, as needed