[Haskell-cafe] Rewrite thunk action rule?

2008-12-21 Thread Peter Todd
I have a program with this data structure: data Element = Element { elementOrigin :: V, elementSubs :: [Element] } and this important bit of code that operates on it: transform :: T - Element - Element transform t e = Element { elementOrigin = tmulv t

Re: [Haskell-cafe] Rewrite thunk action rule?

2008-12-21 Thread Peter Todd
On Sun, Dec 21, 2008 at 02:56:06AM -0700, Luke Palmer wrote: 2008/12/21 Peter Todd p...@petertodd.org If I could somehow arrange for the transform function to detect when it is being applied to a unevaluated thunk, and then modify the thunk in place, that would basically be the behavior I