@@ -29,8 +29,9 @@ withWarnings :: GhcMonad m => T.Text -> ((ModSummary -> ModSummary) -> m a) -> m
29withWarnings diagSource action = do
29withWarnings diagSource action = do
30 warnings <- liftIO $ newVar []
30 warnings <- liftIO $ newVar []
31 oldFlags <- getDynFlags
31 oldFlags <- getDynFlags
32+ let newAction :: DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> SDoc -> IO ()
32− let newAction dynFlags _ _ loc _ msg = do
33+ newAction dynFlags _ _ loc style msg = do
33− let d = diagFromErrMsg diagSource dynFlags $ mkPlainWarnMsg dynFlags loc msg
34+ let d = diagFromErrMsg diagSource dynFlags $ mkWarnMsg dynFlags loc (queryQual style) msg
34 modifyVar_ warnings $ return . (d:)
35 modifyVar_ warnings $ return . (d:)
35 setLogAction newAction
36 setLogAction newAction
36 res <- action $ \x -> x{ms_hspp_opts = (ms_hspp_opts x){log_action = newAction}}
37 res <- action $ \x -> x{ms_hspp_opts = (ms_hspp_opts x){log_action = newAction}}