summaryrefslogtreecommitdiff
path: root/compiler/GHC/Stg/Lint.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Stg/Lint.hs')
-rw-r--r--compiler/GHC/Stg/Lint.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/GHC/Stg/Lint.hs b/compiler/GHC/Stg/Lint.hs
index 742b29ee71..32b213be45 100644
--- a/compiler/GHC/Stg/Lint.hs
+++ b/compiler/GHC/Stg/Lint.hs
@@ -50,7 +50,7 @@ import GHC.Types.Var.Set
import GHC.Core.DataCon
import GHC.Core ( AltCon(..) )
import GHC.Types.Name ( getSrcLoc, nameIsLocalOrFrom )
-import GHC.Utils.Error ( MsgDoc, Severity(..), mkLocMessage )
+import GHC.Utils.Error ( Severity(..), mkLocMessage )
import GHC.Core.Type
import GHC.Types.RepType
import GHC.Types.SrcLoc
@@ -242,8 +242,8 @@ newtype LintM a = LintM
-> StgPprOpts -- Pretty-printing options
-> [LintLocInfo] -- Locations
-> IdSet -- Local vars in scope
- -> Bag MsgDoc -- Error messages so far
- -> (a, Bag MsgDoc) -- Result and error messages (if any)
+ -> Bag SDoc -- Error messages so far
+ -> (a, Bag SDoc) -- Result and error messages (if any)
}
deriving (Functor)
@@ -273,7 +273,7 @@ pp_binders bs
pp_binder b
= hsep [ppr b, dcolon, ppr (idType b)]
-initL :: Module -> Bool -> StgPprOpts -> IdSet -> LintM a -> Maybe MsgDoc
+initL :: Module -> Bool -> StgPprOpts -> IdSet -> LintM a -> Maybe SDoc
initL this_mod unarised opts locals (LintM m) = do
let (_, errs) = m this_mod (LintFlags unarised) opts [] locals emptyBag
if isEmptyBag errs then
@@ -300,7 +300,7 @@ thenL_ m k = LintM $ \mod lf opts loc scope errs
-> case unLintM m mod lf opts loc scope errs of
(_, errs') -> unLintM k mod lf opts loc scope errs'
-checkL :: Bool -> MsgDoc -> LintM ()
+checkL :: Bool -> SDoc -> LintM ()
checkL True _ = return ()
checkL False msg = addErrL msg
@@ -342,10 +342,10 @@ checkPostUnariseId id =
in
is_sum <|> is_tuple <|> is_void
-addErrL :: MsgDoc -> LintM ()
+addErrL :: SDoc -> LintM ()
addErrL msg = LintM $ \_mod _lf _opts loc _scope errs -> ((), addErr errs msg loc)
-addErr :: Bag MsgDoc -> MsgDoc -> [LintLocInfo] -> Bag MsgDoc
+addErr :: Bag SDoc -> SDoc -> [LintLocInfo] -> Bag SDoc
addErr errs_so_far msg locs
= errs_so_far `snocBag` mk_msg locs
where