|
@@ -744,12 +744,13 @@ let init_module_type ctx context_init do_init (decl,p) =
|
|
let ctx = { ctx with type_params = a.a_params } in
|
|
let ctx = { ctx with type_params = a.a_params } in
|
|
let is_type = ref false in
|
|
let is_type = ref false in
|
|
let load_type t from =
|
|
let load_type t from =
|
|
|
|
+ let _, pos = t in
|
|
let t = load_complex_type ctx true t in
|
|
let t = load_complex_type ctx true t in
|
|
let t = if not (Meta.has Meta.CoreType a.a_meta) then begin
|
|
let t = if not (Meta.has Meta.CoreType a.a_meta) then begin
|
|
if !is_type then begin
|
|
if !is_type then begin
|
|
let r = exc_protect ctx (fun r ->
|
|
let r = exc_protect ctx (fun r ->
|
|
r := lazy_processing (fun() -> t);
|
|
r := lazy_processing (fun() -> t);
|
|
- (try (if from then Type.unify t a.a_this else Type.unify a.a_this t) with Unify_error _ -> error "You can only declare from/to with compatible types" p);
|
|
|
|
|
|
+ (try (if from then Type.unify t a.a_this else Type.unify a.a_this t) with Unify_error _ -> error "You can only declare from/to with compatible types" pos);
|
|
t
|
|
t
|
|
) "constraint" in
|
|
) "constraint" in
|
|
TLazy r
|
|
TLazy r
|