Commit e213baf0 authored by Ian Lynagh's avatar Ian Lynagh

Fix error handling

After the fix to #2500, we could get "Failing due to -Werror." but no
warnings printed. Now we don't fail in that case.
parent 6a37d4e7
......@@ -59,9 +59,10 @@ getImports dflags buf filename source_filename = do
case unP parseHeader (mkPState buf loc dflags) of
PFailed span err -> parseError span err
POk pst rdr_module -> do
let ms@(_warns, errs) = getMessages pst
let _ms@(_warns, errs) = getMessages pst
-- don't log warnings: they'll be reported when we parse the file
-- for real. See #2500.
ms = (emptyBag, errs)
-- logWarnings warns
if errorsFound dflags ms
then liftIO $ throwIO $ mkSrcErr errs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment