 typeFail = (message, t1, t2) ->
   [first, second] = sortBasedOnOriginPosition t1, t2
   substitutionFail
-    message: "#{message} #{(safePrintType first)}, #{(safePrintType second)}"
+    message: "#{message} #{(prettyPrintForError first)}, #{(prettyPrintForError second)}"
     conflicts: [first, second]
-    # types: [t1, t2]
+    types: [t1, t2]
 
 sortBasedOnOriginPosition = (t1, t2) ->
   if (originOf t1)?.start > (originOf t2)?.start

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

instanceLookupFailed = (constraint) ->
  [first, second] = sortBasedOnOriginPosition constraint, constraint.types.types[0]
  substitutionFail
    message: "No instance found to satisfy #{prettyPrintForError constraint}"
    conflicts: [first, second]

_names = (list) ->
