     # typeFail "Kinds of types don't match: ", variable, type
     [first, second] = sortBasedOnOriginPosition variable, type
     desc = (type) ->
-      "#{safePrintType type} which
+      "#{prettyPrintForError type} which
       #{if type is variable then 'should be' else 'is'} a
       #{(printKind kind type)}"
     substitutionFail

  toClassName = (c) -> c.className
  classParams = ctx.classParamsForType constraint
  if not classParams
    ctx.extendSubstitution substitutionFail substitutionFail message:
      message: "Constraint #{printType constraint} is ambiguous"
      conflicts: [constraint]
    return {}
  # return "{}" unless classParams
  for className, dict of values classParams
    if chain = findSuperClassChain ctx, className, constraint.className
      return accessList dict, chain
  throw new Error "Couldn't find dict for #{safePrintType constraint}"

findSuperClassChain = (ctx, className, targetClassName) ->
  for s in (ctx.classNamed className).supers


declaredTypeMissingConstraint = (ctx, name, constraint) ->
  ctx.extendSubstitution substitutionFail
    message: "#{name}'s declared type is too weak, missing #{prettyPrintForError replaceQuantifiedByOrigin constraint}"
    conflicts: [constraint, constraint.types.types[0]]

replaceQuantifiedByOrigin = (type) ->
