[Haskell-cafe] Space leak when returning pairs?
Shin-Cheng Mu
scm at ipl.t.u-tokyo.ac.jp
Fri May 19 05:27:10 EDT 2006
Dear Henning,
On May 19, 2006, at 6:16 PM, Henning Thielemann wrote:
> On Fri, 19 May 2006, Shin-Cheng Mu wrote:
>> idX :: [XMLEvent] -> ([XMLEvent], [XMLEvent])
>> idX (StartEvent a : strm) =
>> let (ts, strm') = idX strm
>> (us, strm'') = idX strm'
>> in (StartEvent a [] : ts ++ EndEvent a : us, strm'')
> let ~(ts, strm') = idX strm
> ~(us, strm'') = idX strm'
Oh, I just tried using lazy patterns for the case for StartEvent
and TextEvent. But the space behaviour remained the same. :(
sincerely,
Shin-Cheng Mu
More information about the Haskell-Cafe
mailing list