(* 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"