summaryrefslogtreecommitdiff
path: root/compiler/iface/TcIface.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2015-09-25 18:00:19 +0200
committerBen Gamari <ben@smart-cactus.org>2015-11-23 17:47:41 +0100
commit7aaeaf81ea95c36fe1dc4da449cf6092a792fd09 (patch)
tree79703e6d9db2f81507272d9efd1a5952b17c7924 /compiler/iface/TcIface.hs
parentbb249aa749c82590823855e970bcc1c4d4b23523 (diff)
downloadhaskell-7aaeaf81ea95c36fe1dc4da449cf6092a792fd09.tar.gz
Support multiple debug output levels
We now only strip block information from DebugBlocks when compiling with `-g1`, intended to be used when only minimal debug information is desired. `-g2` is assumed when `-g` is passed without any integer argument. Differential Revision: https://phabricator.haskell.org/D1281
Diffstat (limited to 'compiler/iface/TcIface.hs')
-rw-r--r--compiler/iface/TcIface.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs
index 80de36e82d..45b583cd91 100644
--- a/compiler/iface/TcIface.hs
+++ b/compiler/iface/TcIface.hs
@@ -1088,9 +1088,9 @@ tcIfaceExpr (IfaceLet (IfaceRec pairs) body)
tcIfaceExpr (IfaceTick tickish expr) = do
expr' <- tcIfaceExpr expr
-- If debug flag is not set: Ignore source notes
- dbgFlag <- fmap (gopt Opt_Debug) getDynFlags
+ dbgLvl <- fmap debugLevel getDynFlags
case tickish of
- IfaceSource{} | not dbgFlag
+ IfaceSource{} | dbgLvl > 0
-> return expr'
_otherwise -> do
tickish' <- tcIfaceTickish tickish