Access conflicting infix operator


I’m working on an interactive terminal library (a la inquirer.js) tentatively called Reinquire (although if anyone has a better name that starts with “re” I’m all ears!). The goal is to compile to native and ideally to Inquirer when used in JS land.

For the native side, I’m using Notty. It’s attribute module uses ++ to combine attributes. It has the following signature:

val (++) : attr -> attr -> attr

Is there any way to access this function in Reason?


Good find - I think this is a bug. I don’t see a way to access a function with the OCaml name ++ in Reason currently. There is some related discussion here. I added a link to your question from that issue.


Thanks for the link - interesting discussion going on there.

Until then, I guess it’s time to rewrite the function with a different name. :grinning:


Yeah, for a quick hack you could add a local OCaml syntax file with the rebinding in it. Not the most glamorous fix, but it should allow you to get by :slight_smile:


Ahh, I’d forgotten about that—you can put .ml and .re files side by side, correct?

So used to Reason syntax, the simple solution didn’t even cross my mind. :roll_eyes::joy:


Is your project on github? I was recently looking for something similar in OCaml.


Yep! It makes working around issues like this, thankfully, pretty straightforward. And relatively easy to remove once a fix lands upstream.