Or how is it represented in OCaml AST?
Ok, Obj.magic worked for me
But it’s still interesting to know the answer.
Not sure you can with metaquot. I use metaquot in the RescriptRelay PPX, and I postprocess the AST generated by metaquot. Please note this is a pretty dumb transform that doesn’t care about arity:
- Utils: https://github.com/zth/rescript-relay/blob/master/packages/rescript-relay/rescript-relay-ppx/library/UncurriedUtils.ml
- Example application: https://github.com/zth/rescript-relay/blob/b34745bcfc7d682ad2d45411c790c1a2d8bc0efa/packages/rescript-relay/rescript-relay-ppx/library/Fragment.ml#L107-L112