one more type error to be rescued.

This commit is contained in:
Kazu Yamamoto 2014-08-14 16:42:05 +09:00
parent 4f785d7f8a
commit 8606316d84

View File

@ -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:"