@@ -309,8 +309,8 @@ toPatternReport source localizer patternRegion category tipe expected =
309309patternTypeComparison :: T.Localizer -> T.Type -> T.Type -> ( String, String, [H.Doc] ) -> H.Doc
310310patternTypeComparison localizer actual expected ( iAmSeeing, insteadOf, soHereAreSomeThoughts ) =
311311 let
312− (actualDoc, expectedDoc) =
313− error "TODO diff" localizer actual expected
312+ (actualDoc, expectedDoc, problems) =
313+ T.toDiffDocs localizer actual expected
314314 in
315315 H.stack $
316316 [ H.reflow iAmSeeing
@@ -319,6 +319,7 @@ patternTypeComparison localizer actual expected ( iAmSeeing, insteadOf, soHereAr
319319 , H.indent 4 expectedDoc
320320 ]
321321 ++ soHereAreSomeThoughts
322+ ++ map problemToHints problems
322323
323324
324325toPatternDescription :: PCategory -> String -> String
@@ -342,8 +343,8 @@ toPatternDescription category iAmTryingToMatch =
342343typeComparison :: T.Localizer -> T.Type -> T.Type -> ( String, String, [H.Doc] ) -> H.Doc
343344typeComparison localizer actual expected ( iAmSeeing, insteadOf, soHereAreSomeThoughts ) =
344345 let
345− (actualDoc, expectedDoc) =
346− error "TODO diff" localizer actual expected
346+ (actualDoc, expectedDoc, problems) =
347+ T.toDiffDocs localizer actual expected
347348 in
348349 H.stack $
349350 [ H.reflow iAmSeeing
@@ -352,6 +353,7 @@ typeComparison localizer actual expected ( iAmSeeing, insteadOf, soHereAreSomeTh
352353 , H.indent 4 expectedDoc
353354 ]
354355 ++ soHereAreSomeThoughts
356+ ++ map problemToHints problems
355357
356358
357359indentType :: T.Localizer -> T.Type -> H.Doc
@@ -387,6 +389,21 @@ toDescription category thatThingIs =
387389 OpName _ -> thatThingIs <> ":"
388390
389391
392+-- TODO be sure to avoid duplicate Problems (e.g. two instances of BadRigidVar)
393+--
394+problemToHints :: T.Problem -> H.Doc
395+problemToHints problem =
396+ case problem of
397+ T.FieldMismatch leftOnly rightOnly -> error "TODO FieldMismatch" leftOnly rightOnly
398+ T.IntFloat -> error "TODO IntFloat"
399+ T.MissingArgs numMissing -> error "TODO MissingArgs" numMissing
400+ T.ReturnMismatch -> error "TODO ReturnMismatch"
401+ T.TupleMismatch -> error "TODO TupleMismatch"
402+ T.BadFlexSuper x tipe -> error "TODO BadFlexSuper" x tipe
403+ T.BadRigidVar x tipe -> error "TODO BadRigidVar" x tipe
404+ T.BadRigidSuper x tipe -> error "TODO BadRigidSuper" x tipe
405+
406+
390407
391408-- TO EXPR REPORT
392409