Re: (drop)CommonPrefix: ccs call implementation

2014-06-06 Thread Simon Marlow
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.

(drop)CommonPrefix: ccs call implementation

2014-06-05 Thread Maarten Faddegon
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