Re: Closure elimination transformation (continuation style passingcode)

2009-05-20 Thread Tyson Whitehead
On May 20, 2009 05:50:54 Claus Reinke wrote: > I'm not at all sure what you're aiming for (the above doesn't compile), Yeah. The newtype Step a b was required to break the recursive types, and I dropped it when performing the various transformations, so they don't type check. Here it is again

Re: Closure elimination transformation (continuation style passingcode)

2009-05-20 Thread Max Bolingbroke
2009/5/20 Claus Reinke : > Work is underway to make library-specified optimizations > more expressive (as core2core pass plugins), though I don't know the status > of either that  (Max?-) I submitted a final version of the plugins patch to Simon some time ago - it's waiting for him to find some ti

Re: Closure elimination transformation (continuation style passingcode)

2009-05-20 Thread Claus Reinke
1- avoid forming the (iter xs) and (count i+1) closures by passing the function and the arguments instead of the function bound to the argument iter [] next i done = done iter (x:xs) next i done = next i x iter xs count i x step xs = step xs count (i+1) (i+1) test xs = iter xs count 0 0