Is there a way to use OCaml code (e.g. converting via reason-tools
, refmt
, or other approach) that defines a custom fat arrow (=>
) operator? Since Reason redefines =>
as function-arrow, refmt
conversion of code that defines this operator is silently invalid. (I filed an issue on that over on the reason-cli repo.) I’m a relatively new Reason/Bucklescript user and I’m currently a bit stumped by this. AFAICT, the Reason docs don’t mention any obvious syntactic workarounds, ala Haskell’s backtick-operator for using a function as infix. Specific, real world code that uses this is the small parser combinator library, opal: https://github.com/pyrocat101/opal/blob/master/opal.ml#L81
I naively tried swapping =>
for ->
in opal, but the definition of a custom thin-arrow operator ->
produces a syntax error.