git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #1424 from mjgpy3/say_correct_level_in_link_text
6bbe003Phil Freeman
src/Language/PureScript/Errors.hs+6−1
@@ -399,7 +399,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
399 prettyPrintErrorMessage em =
399 prettyPrintErrorMessage em =
400 paras $
400 paras $
401 go em:suggestions em ++
401 go em:suggestions em ++
402− [line $ "See " ++ wikiUri ++ " for more information, or to contribute content related to this error."]
402+ [line $ "See " ++ wikiUri ++ " for more information, or to contribute content related to this " ++ levelText ++ "."]
403 where
403 where
404 wikiUri :: String
404 wikiUri :: String
405 wikiUri = "https://github.com/purescript/purescript/wiki/Error-Code-" ++ errorCode e
405 wikiUri = "https://github.com/purescript/purescript/wiki/Error-Code-" ++ errorCode e
@@ -736,6 +736,11 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
736 lineWithLevel :: String -> Box.Box
736 lineWithLevel :: String -> Box.Box
737 lineWithLevel text = line $ show level ++ " " ++ text
737 lineWithLevel text = line $ show level ++ " " ++ text
738
738
739+ levelText :: String
740+ levelText = case level of
741+ Error -> "error"
742+ Warning -> "warning"
743+
739 suggestions :: ErrorMessage -> [Box.Box]
744 suggestions :: ErrorMessage -> [Box.Box]
740 suggestions = suggestions' . unwrapErrorMessage
745 suggestions = suggestions' . unwrapErrorMessage
741 where
746 where