Commit a0895fcb authored by Peter Wortmann's avatar Peter Wortmann Committed by Austin Seipp
Browse files

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)
parent 4cdbf802
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment