Right now it doesn't look like private constructors are respected in reason.
Original OCaml:
type foo += private C of int
Actual:
type foo +=
| C int;
Expected:
type foo +=
| private C int; /* Error: Unbound value pri */
Hot damn what are you trying to do
@chenglou don't worry about it 馃暤馃徎
Great first task and high pri because it's regarding completeness!
Should be familiar terrain for me, will look into it
@IwanKaramazow 馃挭
Ok, this was already implemented.
type water = ..;
type molecules = string;
type water += pri Ocean molecules;
Reason uses pri instead of private, this probably originates from @SanderSpies's new object syntax. Do we just document this? Or should I make it private in this case?
Ahh interesting - when I refmt that code I get:
type water = ..
type molecules = string
type water +=
| Ocean of molecules
So maybe it's just an issue with refmt not handling it? It doesn't work in any direction ml <=> re or self formatting.
So it parses, but prints incorrectly. I'll fix it.
In general it would be great if we could try to convert more OCaml libraries to Reason and see if it works.
Might want to do this on top of Fred's diff.
Opened a PR that should be compatible with Fred's diff, cherry-picking the commit should suffice?
Most helpful comment
So it parses, but prints incorrectly. I'll fix it.