git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
s/redudant/unreachable
commit3e3f80337b2c254f40145a7a2d9cb7c174a91e7d authorPhil Freeman <paf31@cantab.net> dateThu 10 Sep 2015, 17:43 (11 years ago) parentd1bd11d
1 file changed+7−6
src/Language/PureScript/Errors.hs+7−6
src/Language/PureScript/Errors.hs+7−6
@@ -639,15 +639,16 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
639639 goSimple (WildcardInferredType ty) =
640640 line $ "The wildcard type definition has the inferred type " ++ prettyPrintType ty
641641 goSimple (NotExhaustivePattern bs b) =
642− indent $ 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"
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"
644644 , Box.hsep 1 Box.left (map (paras . map (line . prettyPrintBinderAtom)) (transpose bs))
645− ] ++ if not b then [line "..."] else []
645+ ] ++
646+ [ line "..." | not b ]
646647 goSimple (OverlappingPattern bs b) =
647− indent $ paras $ [ line "A case expression contains redundant cases."
648− , line $ "The expression has the following redundant cases:\n"
648+ paras $ [ line "A case expression contains unreachable cases:\n"
649649 , Box.hsep 1 Box.left (map (paras . map (line . prettyPrintBinderAtom)) (transpose bs))
650− ] ++ if not b then [line "..."] else []
650+ ] ++
651+ [ line "..." | not b ]
651652 go (NotYetDefined names err) =
652653 paras [ line $ "The following are not yet defined here: " ++ intercalate ", " (map show names) ++ ":"
653654 , indent $ go err