Inferring from context declarations

George Russell ger@tzi.de
Wed, 21 Feb 2001 17:12:27 +0100


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.