     mutateMappingOrigin type.type, expression
     for c in type.constraints
       mutateMarkingOrigin c, expression
+  else if type.Types
+    mutateMappingOrigin t, expression for t in type.types
   else
     if type.TypeApp
       mutateMappingOrigin type.op, expression

    # newMapWith variable.name, "occurs check failed"
  else if not kindsEq (kind variable), (kind type)
    # newMapWith variable.name, "kinds don't match for #{variable.name} and #{safePrintType type}"
    typeFail "Kinds of types don't match: ", variable, type
  else
    variable.ref.val = type
    newSubstitution()


kindsEq = (k1, k2) ->
  k1 is k2 or
    k1 and k2 and
    k1.from and k2.from and
    (kindsEq k1.from, k2.from) and
    (kindsEq k1.to, k2.to)

printKind = (kind) ->
  if kind instanceof KindFn
    arity = arityOfKind kind
    "type constructor taking #{arity} argument#{if arity > 1 then 's' else ''}"
  else
    "type"

arityOfKind = (kind) ->
  if kind instanceof KindFn
    1 + arityOfKind kind.arg
  else
    0

class KindFn
  constructor: (@from, @to) ->
