Using OCaml 4.04.2 and Reason 1.13.7 installed via opam:
$ echo 'let () = let exception E in raise E' | refmt --parse=ml --print=re
refmt: internal error, uncaught exception:
Invalid_argument("No match for unparsing expression")
Thanks for reporting, it's one of those not yet implemented!
Will get to it this weekend.
Do you think this will land before the big syntax update?
I'll do my best. Looked at it two weekends & it was a lot less trivial than I thought... #parsingIsHardEvenWithMenhir
Thank you for taking a look!
Managed to parse & print:
let () = {
exception E;
raise(E)
};
What do you think of the Reason equivalent?
Would you expect let expression to work?
I'd prefer exception E; as you have it written, to mirror how local module definitions work. I'm ok with let exception E; not working as this wasn't previously supported in Reason so there's no old syntax (aside from OCaml) to be used to.
Done
Most helpful comment
Thanks for reporting, it's one of those not yet implemented!
Will get to it this weekend.