@@ -120,7 +120,7 @@ data SimpleErrorMessage
120120 | TransitiveExportError DeclarationRef [DeclarationRef ]
121121 | ShadowedName Ident
122122 | WildcardInferredType Type
123- | NotExhaustivePattern [[Binder ]]
123+ | NotExhaustivePattern [[Binder ]] Bool
124124 | ClassOperator ProperName Ident
125125 deriving (Show )
126126
@@ -230,7 +230,7 @@ errorCode em = case unwrapErrorMessage em of
230230 (TransitiveExportError _ _) -> " TransitiveExportError"
231231 (ShadowedName _) -> " ShadowedName"
232232 (WildcardInferredType _) -> " WildcardInferredType"
233- (NotExhaustivePattern _) -> " NotExhaustivePattern"
233+ (NotExhaustivePattern _ _) -> " NotExhaustivePattern"
234234 (ClassOperator _ _) -> " ClassOperator"
235235
236236-- |
@@ -561,11 +561,11 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
561561 ]
562562 goSimple (WildcardInferredType ty) =
563563 line $ " The wildcard type definition has the inferred type " ++ prettyPrintType ty
564- goSimple (NotExhaustivePattern bs) =
565- paras $ [ line " Pattern could not be determined to cover all cases."
564+ goSimple (NotExhaustivePattern bs b ) =
565+ indent $ paras $ [ line " Pattern could not be determined to cover all cases."
566566 , line $ " The definition has the following uncovered cases:\n "
567- , indent $ Box. hsep 1 Box. left (map (paras . map (line . prettyPrintBinderAtom)) (transpose bs))
568- ]
567+ , Box. hsep 1 Box. left (map (paras . map (line . prettyPrintBinderAtom)) (transpose bs))
568+ ] ++ if not b then [line " ... " ] else []
569569 go (NotYetDefined names err) =
570570 paras [ line $ " The following are not yet defined here: " ++ intercalate " , " (map show names) ++ " :"
571571 , indent $ go err
0 commit comments