@@ -156,6 +156,7 @@ data ErrorMessageHint
156 | ErrorCheckingAccessor Expr String
156 | ErrorCheckingAccessor Expr String
157 | ErrorCheckingType Expr Type
157 | ErrorCheckingType Expr Type
158 | ErrorCheckingKind Type
158 | ErrorCheckingKind Type
159+ | ErrorCheckingGuard
159 | ErrorInferringType Expr
160 | ErrorInferringType Expr
160 | ErrorInApplication Expr Type Expr
161 | ErrorInApplication Expr Type Expr
161 | ErrorInDataConstructor ProperName
162 | ErrorInDataConstructor ProperName
@@ -530,15 +531,15 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
530 , indent $ prettyPrintValue expr
531 , indent $ prettyPrintValue expr
531 ]) binding
532 ]) binding
532 renderSimpleErrorMessage (TypesDoNotUnify t1 t2)
533 renderSimpleErrorMessage (TypesDoNotUnify t1 t2)
533− = paras [ line "Could not match expected type"
534+ = paras [ line "Could not match type"
534 , indent $ typeAsBox t1
535 , indent $ typeAsBox t1
535− , line "with actual type"
536+ , line "with type"
536 , indent $ typeAsBox t2
537 , indent $ typeAsBox t2
538 renderSimpleErrorMessage (KindsDoNotUnify k1 k2) =
539 renderSimpleErrorMessage (KindsDoNotUnify k1 k2) =
539− paras [ line "Could not match expected kind"
540+ paras [ line "Could not match kind"
540 , indent $ line $ prettyPrintKind k1
541 , indent $ line $ prettyPrintKind k1
541− , line "with actual kind"
542+ , line "with kind"
542 , indent $ line $ prettyPrintKind k2
543 , indent $ line $ prettyPrintKind k2
544 renderSimpleErrorMessage (ConstrainedTypeUnified t1 t2) =
545 renderSimpleErrorMessage (ConstrainedTypeUnified t1 t2) =
@@ -730,6 +731,10 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
730 , typeAsBox ty
731 , typeAsBox ty
734+ renderHint ErrorCheckingGuard detail =
736+ , line "while checking the type of a guard clause"
733 renderHint (ErrorInferringType expr) detail =
738 renderHint (ErrorInferringType expr) detail =
734 paras [ detail
739 paras [ detail
735 , Box.hsep 1 Box.top [ line "while inferring the type of"
740 , Box.hsep 1 Box.top [ line "while inferring the type of"