Skip to content

Instantly share code, notes, and snippets.

@zerobias
Created October 15, 2018 08:07
Show Gist options
  • Select an option

  • Save zerobias/fe36121cdf42d2339bdd47f4c9fd549d to your computer and use it in GitHub Desktop.

Select an option

Save zerobias/fe36121cdf42d2339bdd47f4c9fd549d to your computer and use it in GitHub Desktop.
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