diff options
Diffstat (limited to 'compiler/coreSyn/CorePrep.hs')
-rw-r--r-- | compiler/coreSyn/CorePrep.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/coreSyn/CorePrep.hs b/compiler/coreSyn/CorePrep.hs index 58eda2fb5c..fb00f2bb4b 100644 --- a/compiler/coreSyn/CorePrep.hs +++ b/compiler/coreSyn/CorePrep.hs @@ -967,8 +967,13 @@ tryEtaReducePrep bndrs (Let bind@(NonRec _ r) body) where fvs = exprFreeVars r -tryEtaReducePrep bndrs (Tick tickish e) - = fmap (mkTick tickish) $ tryEtaReducePrep bndrs e +-- NB: do not attempt to eta-reduce across ticks +-- Otherwise we risk reducing +-- \x. (Tick (Breakpoint {x}) f x) +-- ==> Tick (breakpoint {x}) f +-- which is bogus (Trac #17228) +-- tryEtaReducePrep bndrs (Tick tickish e) +-- = fmap (mkTick tickish) $ tryEtaReducePrep bndrs e tryEtaReducePrep _ _ = Nothing |