Krzysztof Kościuszkiewicz wrote:
> I have tried both Poly.StateLazy and Poly.State and they work quite well
> - at least the space leak is eliminated. Now evaluation of the parser
> state blows the stack...
>
> The code is at http://hpaste.org/6310
Apparently, stUpdate is too lazy. I'd define
stUpdate' :: (s -> s) -> Parser s t ()
stUpdate' f = stUpdate f >> stGet >>= (`seq` return ())
and try using stUpdate' instead of stUpdate in incCount.
HTH,
Bertram
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe