   else if type instanceof ClassContraint
     "(#{type.className} #{printType type.type})"
   else if type instanceof Constrained
-    "(: #{printType type.type} {#{(map printType, type.constraints).join ' '}})"
+    "(: #{(map printType, join [type.type], type.constraints).join ' '})"
   else if type instanceof TempType
     "(. #{printType type.type})"
   else if Array.isArray type

    newMapWith variable.name, type

# Returns a substitution
match = (ctx, t1, t2) ->
  if t1 instanceof TypeVariable and kindsEq (kind t1), (kind t2)
    newMapWith t1.name, t2
  else if t1 instanceof TypeConstr and t2 instanceof TypeConstr and
    t1.name is t2.name
      emptySubstitution()
  else if t1 instanceof TypeApp and t2 instanceof TypeApp
    s1 = match t1.op, t2.op
    s2 = match t1.arg, t2.arg
    s3 = mergeSubs s1, s2
    s3 or
      newMapWith "could not unify", [(printType t1), (printType t2)]

    return
  try
    log (collapse toHtml compiled.ast)
    if not isMapEmpty compiled.subs
      log compiled.subs
    if result isnt (eval compiled.compiled)
      log "Wrong result", result
  catch e
