21 Feb
2001
21 Feb
'01
4:12 p.m.
Andreas Rossberg wrote: [snip]
Such monomorphisation is not possible for Haskell in general, because it allows polymorphic recursion. As a consequence, the number of dictionaries constructed for a given program also is potentially infinite. [snip] Yes OK, that's another case, like dynamically-loaded code, where you can't inline everything. You could keep the existing mechanisms (dictionaries and all) for a polymorphic call which was not inlined (this will be slow, but I doubt if many programs spend much of their time in functions that use polymorphic recursion), or if you have unlimited programming time, you could do the monomorphisation on-demand in the run-time-system.