Commit 1608b171 authored by Simon Marlow's avatar Simon Marlow

Fix core-lint bug in GHCi

The special dead-code eliminator in CorePrep was not taking into
account free variables inside Breakpoint ticks.
parent 0a5d0840
......@@ -1056,8 +1056,10 @@ dropDeadCode (Cast e c)
= (Cast e' c, fvs)
where !(e', fvs) = dropDeadCode e
dropDeadCode (Tick t e)
= (Tick t e', fvs)
= (Tick t e', fvs')
where !(e', fvs) = dropDeadCode e
fvs' | Breakpoint _ xs <- t = fvs `unionVarSet` mkVarSet xs
| otherwise = fvs
dropDeadCode e = (e, emptyVarSet) -- Lit, Type, Coercion
dropDeadCodeAlts :: [CoreAlt] -> ([CoreAlt], VarSet)
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