     throw new Error "Unrecognized type in printType"
 
 collectArgs = (type) ->
-  if type.TypeApp
+  if type.TypeVariable and type.ref.val
+    collectArgs type.ref.val
+  else if type.TypeApp
     op = collectArgs type.op
     arg = collectArgs type.arg
     if (Array.isArray op) and (Array.isArray arg) and

      emptySubstitution()
    else
      unifyFail t1, t2
  else if t1.TypeVariable and kindsEq (kind t1), (kind t2)
    t1.ref.val = t2 #newSubstitution t1.name, t2
    # console.log "attaching", t1.name, t2
    # console.log "attached", (printType t2)
    newSubstitution()
  else if t2.TypeVariable and t2.ref.val
    matchType t1, t2.ref.val
  else if t1.TypeConstr and t2.TypeConstr and t1.name is t2.name
    emptySubstitution()
  else if t1.TypeApp and t2.TypeApp

      if instanceContraints
        toNormalize.push instanceContraints...
      else
        return error: instanceLookupFailed constraint
      after = subLimit ctx.substitution
      # There was a functional dependency, renormalize
