summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Utils
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-01-18 16:12:28 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-02-01 14:06:11 -0500
commitb1a17507229b00820b9552a423342f8c354267d4 (patch)
treefbd5d3a8cb6bab8b275ac0dfc85817e0f840d227 /compiler/GHC/Tc/Utils
parentddc2a7595a28b6098b6aab61bc830f2296affcdc (diff)
downloadhaskell-b1a17507229b00820b9552a423342f8c354267d4.tar.gz
Rename ErrMsg into MsgEnvelope
Updates Haddock submodule
Diffstat (limited to 'compiler/GHC/Tc/Utils')
-rw-r--r--compiler/GHC/Tc/Utils/Monad.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/GHC/Tc/Utils/Monad.hs b/compiler/GHC/Tc/Utils/Monad.hs
index 76856d7439..ead974bdcf 100644
--- a/compiler/GHC/Tc/Utils/Monad.hs
+++ b/compiler/GHC/Tc/Utils/Monad.hs
@@ -992,14 +992,14 @@ discardWarnings thing_inside
************************************************************************
-}
-mkLongErrAt :: SrcSpan -> SDoc -> SDoc -> TcRn (ErrMsg [SDoc])
+mkLongErrAt :: SrcSpan -> SDoc -> SDoc -> TcRn (MsgEnvelope [SDoc])
mkLongErrAt loc msg extra
= do { printer <- getPrintUnqualified ;
unit_state <- hsc_units <$> getTopEnv ;
let msg' = pprWithUnitState unit_state msg in
- return $ mkLongErrMsg loc printer msg' extra }
+ return $ mkLongMsgEnvelope loc printer msg' extra }
-mkErrDocAt :: SrcSpan -> [SDoc] -> TcRn (ErrMsg [SDoc])
+mkErrDocAt :: SrcSpan -> [SDoc] -> TcRn (MsgEnvelope [SDoc])
mkErrDocAt loc errDoc
= do { printer <- getPrintUnqualified ;
unit_state <- hsc_units <$> getTopEnv ;
@@ -1011,24 +1011,24 @@ mkErrDocAt loc errDoc
addLongErrAt :: SrcSpan -> SDoc -> SDoc -> TcRn ()
addLongErrAt loc msg extra = mkLongErrAt loc msg extra >>= reportError
-reportErrors :: [ErrMsg [SDoc]] -> TcM ()
+reportErrors :: [MsgEnvelope [SDoc]] -> TcM ()
reportErrors = mapM_ reportError
-reportError :: ErrMsg [SDoc] -> TcRn ()
+reportError :: MsgEnvelope [SDoc] -> TcRn ()
reportError err
- = do { traceTc "Adding error:" (pprLocErrMsg err) ;
+ = do { traceTc "Adding error:" (pprLocMsgEnvelope err) ;
errs_var <- getErrsVar ;
msgs <- readTcRef errs_var ;
writeTcRef errs_var (err `addMessage` msgs) }
-reportWarning :: WarnReason -> ErrMsg [SDoc] -> TcRn ()
+reportWarning :: WarnReason -> MsgEnvelope [SDoc] -> TcRn ()
reportWarning reason err
= do { let warn = makeIntoWarning reason err
- -- 'err' was built by mkLongErrMsg or something like that,
+ -- 'err' was built by mkLongMsgEnvelope or something like that,
-- so it's of error severity. For a warning we downgrade
-- its severity to SevWarning
- ; traceTc "Adding warning:" (pprLocErrMsg warn)
+ ; traceTc "Adding warning:" (pprLocMsgEnvelope warn)
; errs_var <- getErrsVar
; (warns, errs) <- partitionMessages <$> readTcRef errs_var
; writeTcRef errs_var (mkMessages $ (warns `snocBag` warn) `unionBags` errs) }