Skip to content

Instantly share code, notes, and snippets.

@Gbury
Created April 19, 2020 21:08
Show Gist options
  • Save Gbury/aa1a49c9e126e7799071c8b63e693435 to your computer and use it in GitHub Desktop.
Save Gbury/aa1a49c9e126e7799071c8b63e693435 to your computer and use it in GitHub Desktop.
module Foo = struct
let view = function
| 0 -> `A
| 1 -> `B
| 2 -> `C
| _ -> `Other
end
module Make1(M : sig val view : int -> [> `A | `B ] end) = struct end
module Make2(M : sig val view : int -> [> `B | `C ] end) = struct end
module M1 = Make1(Foo)
module M2 = Make2(Foo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment