[cvs-nhc98] cvs commit: cpphs CppIfdef.hs
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Mon Jun 28 06:16:26 EDT 2004
> Modified files:
> . CppIfdef.hs
> Log:
> Inline "trace" to make it abundantly clear where CppIfdef.cpp is cheating
> (i.e. uses unsafePerformIO). This function should really be in the IO
> monad, but to avoid space leaks, quite some restructuring would be
> necessary. Using lazy I/O via readFile should probably be avoided, too.
Hmm. Using lazy readFile is the easiest route to avoiding space
leaks here. At the moment, cpphs runs in a constant 10kb of heap space
(compiled with nhc98), no matter the size of the input file.
Regards,
Malcolm
More information about the Cvs-nhc98
mailing list