memory performance problem when compiling lots of derived instances in a single file
I'm playing with deriving
Data/Typeable for the GHC AST types (you'll need a recent HEAD for the standalone deriving fixes #2378 (closed), and I've got to use the generics-internal CPP tricks to work around #2433 (closed)).
After getting the first compiler-complaint-free version of the instances source, self-same compiler went away and tried to get all the memory it could find (I had to kill the process). After splitting the source into two, one importing the other, there is no problem loading them anymore.
GHCi, version 6.9.20080709works fine.
All.hsmerges the source of
Instances0into a single module: trying to load
GHCi, version 6.9.20080709consumes memory like crazy.
All.hs shouldn't behave like this in the first place, but if just splitting the file into two helps, the compiler should be able to do the split implicitly (sparing me the manual dependency analysis).