summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-07-14 22:58:41 -0400
committerOri Bernstein <ori@eigenstate.org>2014-07-14 22:58:41 -0400
commit4d8b6e9b82dedd90e92d0cb1be10e93b7e76da2c (patch)
tree864d8357bbab38a7aa636bb6d29bd252e5330315
parent70089e1bc3d39c6c0f5195a63f4beb7e586b4c99 (diff)
downloadmc-4d8b6e9b82dedd90e92d0cb1be10e93b7e76da2c.tar.gz
More debug dumps with final substitutions.
-rw-r--r--parse/infer.c8
-rwxr-xr-xtest/genericmakebin179952 -> 179952 bytes
2 files changed, 8 insertions, 0 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 1b70b94..fbea7a9 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1609,6 +1609,7 @@ static Type *tyfix(Inferstate *st, Node *ctx, Type *orig)
{
static Type *tyint, *tyflt;
Type *t, *delayed;
+ char *from, *to;
size_t i;
char buf[1024];
@@ -1654,6 +1655,13 @@ static Type *tyfix(Inferstate *st, Node *ctx, Type *orig)
dump(file, stdout);
fatal(t->line, "underconstrained type %s near %s", tyfmt(buf, 1024, t), ctxstr(st, ctx));
}
+ if (debugopt['u'] && !tyeq(orig, t)) {
+ from = tystr(orig);
+ to = tystr(t);
+ indentf(st->indentdepth, "subst %s => %s\n", from, to);
+ free(from);
+ free(to);
+ }
return t;
}
diff --git a/test/genericmake b/test/genericmake
index 497b3b2..b70eec5 100755
--- a/test/genericmake
+++ b/test/genericmake
Binary files differ