popl-paper-ocaml/lib/ppx_poplpaper.ml
2024-04-22 15:00:46 -05:00

19 lines
393 B
OCaml

(* https://tarides.com/blog/2019-05-09-an-introduction-to-ocaml-ppx-ecosystem/ *)
open Ppxlib
let expand ~ctxt:_ (expr: expression) =
expr
let ext = Extension.V3.declare
"monomorphic"
Extension.Context.expression
Ast_pattern.(single_expr_payload __)
expand
let rule = Context_free.Rule.extension ext
let () =
Driver.register_transformation
~rules:[rule]
"monomorphic"