[Haskell-cafe] Memory leak in streaming parser

2007-04-03 Thread Oren Ben-Kiki
I refactored the code and uploaded a new version to Hackage (YamlReference-0.2). It is cleaner now and much more efficient. It is still leaking memory though. The profiler hints at bindReply as the culprit retaining State and Reply objects, but it isn't clear to me why the code would do that.

Re: [Haskell-cafe] Memory leak in streaming parser

2007-04-02 Thread Malcolm Wallace
Oren Ben-Kiki [EMAIL PROTECTED] wrote: I just created an initial version of a streaming parser. This parser is intended to serve as a reference parser for the YAML spec. An observation about your state setter functions, e.g. setDecision :: String - State - State setDecision decision state

Re: [Haskell-cafe] Memory leak in streaming parser

2007-04-02 Thread Oren Ben-Kiki
On Mon, 2007-04-02 at 13:54 +0100, Malcolm Wallace wrote: An observation about your state setter functions, ... You can shorten your code considerably by using the standard named-field update syntax for exactly this task: setDecision :: String - State - State setDecision decision state =

[Haskell-cafe] Memory leak in streaming parser

2007-04-01 Thread Oren Ben-Kiki
I just created an initial version of a streaming parser. This parser is intended to serve as a reference parser for the YAML spec. Efficiency isn't the main concern; the priority was to have it use the BNF productions from the spec without any changes (ok, with tiny, minor, insignificant changes