Skip to content

Instantly share code, notes, and snippets.

@Pitometsu
Created March 26, 2019 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pitometsu/dd3111b1d54578afa6eed94d2b4dc217 to your computer and use it in GitHub Desktop.
Save Pitometsu/dd3111b1d54578afa6eed94d2b4dc217 to your computer and use it in GitHub Desktop.
module type S = sig
type 'm t = [> ] as 'm
end
module type M = S with type 'm t = [ `A | `B ] as 'm
;;
Error: In this `with' constraint, the new definition of t
does not match its original definition in the constrained signature:
Type declarations do not match:
type 'a t = 'a constraint 'a = [ `A | `B ]
is not included in
type 'm t = 'm constraint 'm = [> ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment