From 8606316d8428c71ee565a95d500398dc33392791 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Thu, 14 Aug 2014 16:42:05 +0900 Subject: [PATCH] one more type error to be rescued. --- Language/Haskell/GhcMod/Logger.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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:"