ref: 6c44abcec8462f04e09db0ab62f74e4d1f384f5a
parent: cd1d6a74365f76fa168bf642d940a56d5939bf7b
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Jan 29 18:29:59 EST 2016
Unify more eagerly.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -955,8 +955,8 @@
}
r = NULL;
+ tytab[a->tid] = b;
if (a->type == Tyvar) {
- tytab[a->tid] = b;
ea = basetype(st, a);
eb = basetype(st, b);
if (ea && eb)
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -127,7 +127,7 @@
ret = mktyname(t->loc, t->name, tyspecialize(t->sub[0], tsmap, delayed));
ret->arg = arg;
ret->narg = narg;
- *var = *ret;
+ tytab[var->tid] = ret;
break;
case Tystruct:
ret = tydup(t);