diff --git a/Language/Haskell/GhcMod/Logger.hs b/Language/Haskell/GhcMod/Logger.hs index d3b712b..9e78fb5 100644 --- a/Language/Haskell/GhcMod/Logger.hs +++ b/Language/Haskell/GhcMod/Logger.hs @@ -106,12 +106,14 @@ ppMsg spn sev dflag style msg = prefix ++ cts file <- normalise <$> Gap.getSrcFile spn let severityCaption = Gap.showSeverityCaption sev pref0 - | typeWarning `isPrefixOf` cts = file ++ ":" ++ show line ++ ":" ++ show col ++ ":" - | otherwise = file ++ ":" ++ show line ++ ":" ++ show col ++ ":" ++ severityCaption + | typeWarning1 `isPrefixOf` cts || + typeWarning2 `isPrefixOf` cts = file ++ ":" ++ show line ++ ":" ++ show col ++ ":" + | otherwise = file ++ ":" ++ show line ++ ":" ++ show col ++ ":" ++ severityCaption return pref0 -- DeferTypeErrors turns a type error to a warning. -- So, let's turns it the error again. - typeWarning = "Couldn't match expected type" + typeWarning1 = "Couldn't match expected type" + typeWarning2 = "Couldn't match type" checkErrorPrefix :: String checkErrorPrefix = "Dummy:0:0:Error:"