On Fri, Apr 03, 2009 at 10:22:07AM +0200, Ketil Malde wrote:
> lu...@die.net.au writes:
> 
> > I'm relatively new to haskell so as one does, I am rewriting an
> > existing program in haskell to help learn the language.
> 
> > However, it eats up all my RAM whenever I run the program.
> 
> This typically happens to me when I parse large files and either am a)
> using a parser that is too strict (like Luke says) or b) using a
> parser that is too lazy - or rather, it parses into a lazy data
> structure which is then populated with unevaluated thunks holding onto
> the input data.
> 

Thanks for all the help everyone . I've decided to dump Parsec, as the file
structure is simple enough to implement using basic list manipulation
(which is, I've read, one of haskell's strong points) and has turned
out to be much simpler code.

I think I was reading the write your own scheme tutorial when I
started writing that code, so natually started using parsec.

As a side note, I was reading the I/O section of RWH last night and
came across the lazy vs. strict I/O part, however it didn't occur to
me that Parsec was strict.

Anyway, thanks for all the help and suggestions.

-- 
Lucas Hazel <lu...@die.net.au>

Attachment: pgp5StOlyFrnV.pgp
Description: PGP signature

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to