# module type S = sig type t and s = t end # module type S' = sig type s = int end # module type S = sig module rec M : sig end and N : sig end end # module type S' = sig module rec N : sig end end # * * * * * * * * * * * * * * * * type -'a t class type c = object method m : [ `A ] t end # module M : sig val v : (#c as 'a) -> 'a end # val id : 'a -> 'a = # val ko : 'a -> unit = # Characters 64-99: struct type +'a t = private int end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: Signature mismatch: Modules do not match: sig type +'a t = private int end is not included in sig type -'a t = private int end Type declarations do not match: type +'a t = private int is not included in type -'a t = private int Their variances do not agree. # module type A = sig type t = X of int end # type u = X of bool # Characters 23-33: module type B = A with type t = u;; (* fail *) ^^^^^^^^^^ Error: This variant or record definition does not match that of type u The types for field X are not equal. # Characters 121-124: module type S = sig exception Foo of int exception Foo of bool end;; ^^^ Error: Multiple definition of the extension constructor name Foo. Names must be unique in a given structure or signature. # module F : functor (X : sig end) -> sig val x : int end # Characters 0-3: F.x;; (* fail *) ^^^ Error: The module F is a functor, not a structure #