
Krasimir Angelov
I have to deal with another hack this time. See the comment from IExtract.hs:
-- addPreludeTupleInstances is an efficiency hack. -- It takes a long time to parse the Prelude.hi file, and adding large -- numbers of tuple instances to the .hi file increases compile-times -- by 30% or more. -- Omitting them from the .hi file and adding them by hand here, therefore -- gives a big time saving.
I wrote that comment (and the code it refers to).
The problem is that all instances for tuples >3 aren't defined in the prelude but the required type declarations are injected explicitly in the IExtract.hs module. In this way no bytecode for them will be generated.
Actually, the code for the instances is supposed to be generated by a 'deriving' clause on each tuple data declaration. In nhc98, the relevant source files are src/prelude/D[2..15].hs These deriving clauses seem to have disappeared in the move to a single Prelude file in yhc. Regards, Malcolm