Cost of Overloading vs. HOFs
Stefan O'Rear
stefanor at cox.net
Fri May 4 20:13:02 EDT 2007
On Fri, May 04, 2007 at 05:06:10PM -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?
Because compilation might take forever - it is possible to write a
program that uses a statically unbounded number of types. See
Data.Sequence for a non-contrived example of this. (In fairness the
issue won't appear because Data.Sequence doesn't use overloading, but
in general this is a problem.)
Stefan
More information about the Glasgow-haskell-users
mailing list