Quasi-quotation (or, code templates) has long been used as a convenient tool for code generation, commonly implemented as a pre-processing/translation into code-generation combinators. The original MetaOCaml was also based on such translation, done post type checking. BER MetaOCaml employs a significantly different, efficient (especially in version N114) translation integrated with type-checking, in the least intrusive way. This paper presents the integrated efficient translation for the first time.
@article{arxiv.2309.08207,
title = {MetaOCaml Theory and Implementation},
author = {Oleg Kiselyov},
journal= {arXiv preprint arXiv:2309.08207},
year = {2023}
}
Comments
Peer-reviewed, accepted for presentation and presented at the ACM SIGPLAN OCAML 2023 workshop