cvs commit: cpphs CppIfdef.hs

panne 2004/06/27 10:09:49 PDT 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. Revision Changes Path 1.15 +3 -10 cpphs/CppIfdef.hs

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
participants (2)
-
Malcolm Wallace
-
Sven Panne