Re: (drop)CommonPrefix: ccs call implementation

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

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. I

(drop)CommonPrefix: ccs call implementation

2014-06-04 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 Sl