ocamllabs / ocaml-modular-implicits

OCaml extended with modular implicits
Other
103 stars 8 forks source link

Ctype.Unify failure for type scope error #43

Open yallop opened 8 years ago

yallop commented 8 years ago

The following program is rejected with Fatal error: exception Ctype.Unify(_):

module type T = sig type t val x : t end
let get {I:T} () = I.x
let f () = let implicit module M :T = struct type t = int let x = 0 end in get ()

but should be rejected with the usual message about a type constructor escaping its scope.