-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support inline records of OCaml 4.03? #9
Comments
Inline records are indeed not supported at the moment. The 4.03-compatible version of our libraries and tools was meant as "a preview"/"an alpha release": we released it during the beta of the compiler so people could start trying their codebase with the new compiler. In particular the main interest was to work with existing (4.02) code, supporting new features of the language was not required. We are going to switch to 4.03 internally very soon, at which point we will release new versions of our libraries which will work with 4.03 and should support these new features. |
+1 |
It's almost done internally. We are just discussing whether the sexp for |
Any updates on this? |
It's already fixed in our bleeding-edge release, which you can access here: |
Great, thanks! |
I just found that inline records has been supported type shape =
| Circle of { center_x: float;
center_y: float;
radius: float;
}
| Rect of { x_lo: float;
y_lo: float;
x_hi: float;
y_hi: float;
}
[@@deriving sexp]
;;
type shape =
Circle of { center_x : float; center_y : float; radius : float; }
| Rect of { x_lo : float; y_lo : float; x_hi : float; y_hi : float; } |
I tried to test the example from this post:
It works as expected, but there's error when I add
[@@deriving sexp]
:The text was updated successfully, but these errors were encountered: