@@ -156,6 +156,7 @@ data ErrorMessageHint
156156 | ErrorCheckingAccessor Expr String
157157 | ErrorCheckingType Expr Type
158158 | ErrorCheckingKind Type
159+ | ErrorCheckingGuard
159160 | ErrorInferringType Expr
160161 | ErrorInApplication Expr Type Expr
161162 | ErrorInDataConstructor ProperName
@@ -530,15 +531,15 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
530531 , indent $ prettyPrintValue expr
531532 ]) binding
532533 renderSimpleErrorMessage (TypesDoNotUnify t1 t2)
533− = paras [ line "Could not match expected type"
534+ = paras [ line "Could not match type"
534535 , indent $ typeAsBox t1
535− , line "with actual type"
536+ , line "with type"
536537 , indent $ typeAsBox t2
537538 ]
538539 renderSimpleErrorMessage (KindsDoNotUnify k1 k2) =
539− paras [ line "Could not match expected kind"
540+ paras [ line "Could not match kind"
540541 , indent $ line $ prettyPrintKind k1
541− , line "with actual kind"
542+ , line "with kind"
542543 , indent $ line $ prettyPrintKind k2
543544 ]
544545 renderSimpleErrorMessage (ConstrainedTypeUnified t1 t2) =
@@ -730,6 +731,10 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
730731 , typeAsBox ty
731732 ]
732733 ]
734+ renderHint ErrorCheckingGuard detail =
735+ paras [ detail
736+ , line "while checking the type of a guard clause"
737+ ]
733738 renderHint (ErrorInferringType expr) detail =
734739 paras [ detail
735740 , Box.hsep 1 Box.top [ line "while inferring the type of"