RE: Why are strings linked lists?

2003-11-29 Thread Wojtek Moczydlowski
> As a matter of pure speculation, how big an impact would it have if, in
> the next "version" of Haskell, Strings were represented as opaque types
> with appropriate functions to convert to and from [Char]?  Would there be
> rioting in the streets?
>
> Andrew Bromage

I would complain. I don't care much about efficiency (though it still
bothers me that I don't have an answer yet to the
memory leak I posted some time ago), and the easiness of dealing with
strings as lists is quite important to me. Expliciting packing and unpacking
would be an incovenience.

Wojtek

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


StateT space leak

2003-11-13 Thread Wojtek Moczydlowski
Consider the following program:

module A where

import Control.Monad.State

f :: StateT Int IO ()
f = (sequence_ $ repeat $ return ())

t = runStateT f 0


When t is evaluated under ghci or hugs, the program quickly runs out of heap
memory. What's going on here? Is this inherent in StateT monad? If so, then
this is very surprising, I would expect f to run in constant space for any
sensible monad.

Wojtek

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell