summaryrefslogtreecommitdiff
path: root/compiler/GHC/IfaceToCore.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/IfaceToCore.hs')
-rw-r--r--compiler/GHC/IfaceToCore.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/IfaceToCore.hs b/compiler/GHC/IfaceToCore.hs
index 782b572cf8..95f4496212 100644
--- a/compiler/GHC/IfaceToCore.hs
+++ b/compiler/GHC/IfaceToCore.hs
@@ -1561,9 +1561,9 @@ tcIfaceExpr (IfaceLet (IfaceRec pairs) body)
tcIfaceExpr (IfaceTick tickish expr) = do
expr' <- tcIfaceExpr expr
-- If debug flag is not set: Ignore source notes
- dbgLvl <- fmap debugLevel getDynFlags
+ need_notes <- needSourceNotes <$> getDynFlags
case tickish of
- IfaceSource{} | dbgLvl == 0
+ IfaceSource{} | not (need_notes)
-> return expr'
_otherwise -> do
tickish' <- tcIfaceTickish tickish