
4 May
2007
4 May
'07
8:59 p.m.
On Fri, 2007-05-04 at 17:06 -0700, Conal Elliott wrote:
Cool. You know which types to consider because jhc is a whole-program compiler?
Given the whole program, why not monomorphize, and inline away all of the dictionaries?
That's what Felix does: typeclasses, no dictionaries: whole program analyser: resolves typeclasses, inlines whilst resolving typeclasses, monomorphises resolving typeclasses, and inlines again resolving typeclassses. Indirect dispatch can't be eliminated if the method is wrapped in a polymorphic closure. Monomorphisation alone can't eliminate second order polymorphism. [But Felix doesn't support that anyhow] -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net