diff options
author | Peter Wortmann <scpmw@leeds.ac.uk> | 2013-10-22 16:05:16 +0100 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-12-16 15:02:24 -0600 |
commit | a0895fcb8c47949aac2c5e4a509d69de57582e76 (patch) | |
tree | 08e4ccb607b40a41d5b629dd4f9064da68d930a5 | |
parent | 4cdbf80250da2d3ba1c63451e5fbc9b5ca9cbfe9 (diff) | |
download | haskell-a0895fcb8c47949aac2c5e4a509d69de57582e76.tar.gz |
Strip source ticks from iface code if DWARF is disabled
They would be unneeded at minimum. Not completely sure this is the right
place to do this.
(From Phabricator D169)
-rw-r--r-- | compiler/iface/TcIface.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs index 96e72df502..cf0dc5b9a3 100644 --- a/compiler/iface/TcIface.hs +++ b/compiler/iface/TcIface.hs @@ -1009,8 +1009,14 @@ tcIfaceExpr (IfaceLet (IfaceRec pairs) body) tcIfaceExpr (IfaceTick tickish expr) = do expr' <- tcIfaceExpr expr - tickish' <- tcIfaceTickish tickish - return (Tick tickish' expr') + -- If debug flag is not set: Ignore source notes + dbgFlag <- fmap (gopt Opt_Debug) getDynFlags + case tickish of + IfaceSource{} | not dbgFlag + -> return expr' + _otherwise -> do + tickish' <- tcIfaceTickish tickish + return (Tick tickish' expr') ------------------------- tcIfaceApps :: IfaceExpr -> IfaceExpr -> IfL CoreExpr |