Skip to content

Instantly share code, notes, and snippets.

@fluffywaffles
Created September 21, 2017 20:52
Show Gist options
  • Save fluffywaffles/9c7466490a021e267d446b8c66fa75f5 to your computer and use it in GitHub Desktop.
Save fluffywaffles/9c7466490a021e267d446b8c66fa75f5 to your computer and use it in GitHub Desktop.
module MakeAThing (M: sig type t end) = struct
type t =
| M of M.t
| SomethingElse
end
module MyThing = MakeAThing(struct type t = | It | Has | Variants end)
let _ = MyThing.(M It) (* --> Error, unbound constructor "M" *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment