|
@@ -1785,17 +1785,6 @@ let rec unify a b =
|
|
(match !t with
|
|
(match !t with
|
|
| None -> if not (link t b a) then error [cannot_unify a b]
|
|
| None -> if not (link t b a) then error [cannot_unify a b]
|
|
| Some t -> unify a t)
|
|
| Some t -> unify a t)
|
|
- | TType (t1,tl1), TType (t2,tl2) when t1 == t2 ->
|
|
|
|
- if not (List.exists (fun (a2,b2) -> fast_eq a a2 && fast_eq b b2) (!unify_stack)) then begin
|
|
|
|
- try
|
|
|
|
- unify_stack := (a,b) :: !unify_stack;
|
|
|
|
- List.iter2 unify tl1 tl2;
|
|
|
|
- unify_stack := List.tl !unify_stack;
|
|
|
|
- with
|
|
|
|
- Unify_error l ->
|
|
|
|
- unify_stack := List.tl !unify_stack;
|
|
|
|
- error (cannot_unify a b :: l)
|
|
|
|
- end
|
|
|
|
| TType (t,tl) , _ ->
|
|
| TType (t,tl) , _ ->
|
|
if not (List.exists (fun (a2,b2) -> fast_eq a a2 && fast_eq b b2) (!unify_stack)) then begin
|
|
if not (List.exists (fun (a2,b2) -> fast_eq a a2 && fast_eq b b2) (!unify_stack)) then begin
|
|
try
|
|
try
|