git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
s/redudant/unreachable
3e3f803Phil Freeman
src/Language/PureScript/Errors.hs+7−6
@@ -639,15 +639,16 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
639 goSimple (WildcardInferredType ty) =
639 goSimple (WildcardInferredType ty) =
640 line $ "The wildcard type definition has the inferred type " ++ prettyPrintType ty
640 line $ "The wildcard type definition has the inferred type " ++ prettyPrintType ty
641 goSimple (NotExhaustivePattern bs b) =
641 goSimple (NotExhaustivePattern bs b) =
642− indent $ paras $ [ line "A case expression could not be determined to cover all inputs."
642+ paras $ [ line "A case expression could not be determined to cover all inputs."
643− , line $ "The following additional cases are required to cover all inputs:\n"
643+ , line "The following additional cases are required to cover all inputs:\n"
644 , Box.hsep 1 Box.left (map (paras . map (line . prettyPrintBinderAtom)) (transpose bs))
644 , Box.hsep 1 Box.left (map (paras . map (line . prettyPrintBinderAtom)) (transpose bs))
645− ] ++ if not b then [line "..."] else []
645+ ] ++
646+ [ line "..." | not b ]
646 goSimple (OverlappingPattern bs b) =
647 goSimple (OverlappingPattern bs b) =
647− indent $ paras $ [ line "A case expression contains redundant cases."
648+ paras $ [ line "A case expression contains unreachable cases:\n"
648− , line $ "The expression has the following redundant cases:\n"
649 , Box.hsep 1 Box.left (map (paras . map (line . prettyPrintBinderAtom)) (transpose bs))
649 , Box.hsep 1 Box.left (map (paras . map (line . prettyPrintBinderAtom)) (transpose bs))
650− ] ++ if not b then [line "..."] else []
650+ ] ++
651+ [ line "..." | not b ]
651 go (NotYetDefined names err) =
652 go (NotYetDefined names err) =
652 paras [ line $ "The following are not yet defined here: " ++ intercalate ", " (map show names) ++ ":"
653 paras [ line $ "The following are not yet defined here: " ++ intercalate ", " (map show names) ++ ":"
653 , indent $ go err
654 , indent $ go err