Re: [Haskell-cafe] RE: simple function: stack overflow in hugs vsnonein ghc

2007-09-24 Thread Claus Reinke
afraid not the given example is too strict, the requirement is to generate the matched portion lazilly, and return the tail (unconsumed portion). ah yes, without optimisations, Prelude.span builds up stack, while the continuation-based alternative i mentioned is too strict for some uses. In

[Haskell-cafe] Re: simple function: stack overflow in hugs vsnonein ghc

2007-09-24 Thread apfelmus
Claus Reinke wrote: the given example is too strict, the requirement is to generate the matched portion lazilly, and return the tail (unconsumed portion). ah yes, without optimisations, Prelude.span builds up stack, I don't quite understand why it does so at all. span p [] = ([],[])

Re: [Haskell-cafe] RE: simple function: stack overflow in hugs vsnonein ghc

2007-09-24 Thread john lask
PROTECTED] To: john lask [EMAIL PROTECTED] CC: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] RE: simple function: stack overflow in hugs vsnonein ghc Date: Mon, 24 Sep 2007 16:20:42 +0100 afraid not the given example is too strict, the requirement is to generate the matched portion