Commit a70a6e39 authored by Simon Marlow's avatar Simon Marlow
Browse files

FIX #2500: Don't log warnings in getHeader

parent 199dc742
......@@ -59,8 +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
logWarnings warns
let ms@(_warns, errs) = getMessages pst
-- don't log warnings: they'll be reported when we parse the file
-- for real. See #2500.
-- logWarnings warns
if errorsFound dflags ms
then liftIO $ throwIO $ mkSrcErr errs
Supports Markdown
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