Created
October 15, 2018 08:07
-
-
Save zerobias/fe36121cdf42d2339bdd47f4c9fd549d to your computer and use it in GitHub Desktop.
[reason] Private row types http://caml.inria.fr/pub/docs/manual-ocaml/extn.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module F = (X: {type c = pri {.. x: int};}) => { | |
| let get_x = (o: X.c) => o#x; | |
| }; | |
| module G = | |
| ( | |
| X: { | |
| type c = | |
| pri { | |
| .. | |
| x: int, | |
| y: int, | |
| }; | |
| }, | |
| ) => { | |
| include F(X); | |
| let get_y = (o: X.c) => o#y; | |
| }; | |
| type t = [ | `A(int) | `B(bool)]; | |
| type u = pri [> t]; | |
| type v = pri [< t > `A]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment