Hi Simon,
Thank you for the explanation, I begin to understand the reasoning
behind your definition now. I have another question though:
If inlining sets the call site's stack as prefix, I would say that the
following definition:
call sApp sLam = sApp ++ sLam'
| sApp `isPr
The motivation for this design is to make it so that
let
f = \x . E
in
... f y ...
Gives the same call stack as
... (\x . E) y ...
That is, inlining a function does not change the call stack. GHC
assumes that this is valid, so the call stack semantics should reflect that.
I
Dear list,
I am reading up on cost centre stacks. Simon Marlow's "solving an old
problem"-slides is the more recent resource I could find. On slide 43 he
describes a call function implemented as:
call Sapp Slam = foldr push Spre Slam’
where (Spre, Sapp’, Slam’) = commonPrefix Sapp Sl