Hi, I’m trying to write my first OCaml PPX extension in which the extension is used in place of a case statement. Usage would look like:
match x with
| 1 -> 1
| [%myExt pattern expression etc here]
| _ -> 3
However, when creating an extension using ppxlib I’ve only seen examples use Extension.declare , which requires an Extension.Context.t as an argument. However, there is no Context.t for Parsetree type ‘case’.
Is there any lower-level way I can create and register my extension so that it can be used in the context I need? Thanks!