From 7aaeaf81ea95c36fe1dc4da449cf6092a792fd09 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 25 Sep 2015 18:00:19 +0200 Subject: 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 --- compiler/iface/TcIface.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/iface/TcIface.hs') 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 -- cgit v1.2.1