public static final TCon VEC_COMP = con(BUILTIN, "VecComp");
public static final TCon BINDING = con(BUILTIN, "Binding");
+ public static final TCon TYPE = con(BUILTIN, "Type");
+
public static final TCon DYNAMIC = con("Prelude", "Dynamic");
public static final TCon VARIANT = con(BUILTIN, "Variant");
* Get the concrete type pointed to by a chain of type meta-variables.
*/
public static Type canonical(Type type) {
- while(type instanceof TMetaVar) {
+ if(type instanceof TMetaVar) {
TMetaVar metaVar = (TMetaVar)type;
type = metaVar.ref;
if(type == null)
return metaVar;
+ else
+ return metaVar.ref = canonical(type);
}
return type;
}