shithub: mc

Download patch

ref: 4e190b47af90933b642fe868238db2d4e801a98e
parent: 5e2b45173fadba00f73e5d34bc9c435ab4bae1a6
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Dec 23 06:53:56 EST 2015

Tyvars can no longer have subs.

--- a/parse/type.c
+++ b/parse/type.c
@@ -548,6 +548,7 @@
 	case Tyflt32:	p += bprintf(p, end - p, "flt32");	break;
 	case Tyflt64:	p += bprintf(p, end - p, "flt64");	break;
 	case Tyvalist:	p += bprintf(p, end - p, "...");	break;
+	case Tyvar:     p += bprintf(p, end - p, "$%d", t->tid);        break;
 
 	case Typtr:
 		p += tybfmt(p, end - p, t->sub[0]);
@@ -587,18 +588,6 @@
 			sep = ",";
 		}
 		p += bprintf(p, end - p, ")");
-		break;
-	case Tyvar:
-		p += bprintf(p, end - p, "$%d", t->tid);
-		if (t->nsub) {
-			p += bprintf(p, end - p, "(");
-			for (i = 0; i < t->nsub; i++) {
-				p += bprintf(p, end - p, "%s", sep);
-				p += tybfmt(p, end - p, t->sub[i]);
-				sep = ", ";
-			}
-			p += bprintf(p, end - p, ")[]");
-		}
 		break;
 	case Typaram:	p += bprintf(p, end - p, "@%s", t->pname);	break;
 	case Tyunres: