-
Notifications
You must be signed in to change notification settings - Fork 430
Open
Description
Problem:
The following OCaml input to refmt does not translate back to the same OCaml.
OCaml Input:
let (++) a b = a + bReason Output / Input:
let (++) = (a, b) => a + b;OCaml Output:
let (^) a b = a + bThis means that libraries like notty can not be used, because they only define a (++) operator and no alternative function with a name.
Proposed solution:
Perhaps preserving all operators is impossible at this stage, but it'd be great if I didn't have to redefine operators because the OCaml output is different than what I'm expecting.
Alternatively, providing a cheatsheet of what operators will be replaced by what (and a way to circumvent it) would be a very nice gesture.
E.g,
| Desc. | Reason | OCaml |
|---|---|---|
| String concatenation. | (++) |
(^) |
| Value dereferencing. | (^) |
(!) |
| Negation | (!) |
not |
| Some custom operator | ??? |
(++) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels