Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module type S = sig
- type t = [`A of int | `B of int]
- val f : [>`A of int] -> int
- end
- module M : S = struct
- type t = [`A of int | `B of int]
- let f (`A i) = i
- end
- (*
- Error: Signature mismatch:
- Modules do not match:
- sig
- type t = [ `A of int | `B of int ]
- val f : [< `A of 'a ] -> 'a
- end
- is not included in
- S
- Values do not match:
- val f : [< `A of 'a ] -> 'a
- is not included in
- val f : [> `A of int ] -> int
- *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement