Commit 4200c4a4 authored by Simon Marlow's avatar Simon Marlow

FloutOut.wrapTick: don't forget to tick the args of a constructor app

Thanks to Peter Wortmann for pointing out this bug.
parent 15e4f93b
......@@ -10,7 +10,7 @@ Utility functions on @Core@ syntax
module CoreUtils (
-- * Constructing expressions
mkCast,
mkTick, mkTickNoHNF,
mkTick, mkTickNoHNF, tickHNFArgs,
bindNonRec, needsCaseBinding,
mkAltExpr,
......
......@@ -562,7 +562,7 @@ wrapTick t (FB tops defns)
wrap_one (FloatLet bind) = FloatLet (wrap_bind bind)
wrap_one (FloatCase e b c bs) = FloatCase (maybe_tick e) b c bs
maybe_tick e | exprIsHNF e = e
maybe_tick e | exprIsHNF e = tickHNFArgs t e
| otherwise = mkTick t e
-- we don't need to wrap a tick around an HNF when we float it
-- outside a tick: that is an invariant of the tick semantics
......
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