
sorry, got diverted by paper writing.
GHC desugars Hsakell into Core, and it's Core that you are consuming in the ESC stuff. However, Core for an *overloaded* function contains dictionary applications and abstractions. Furthermore, overloaded operators turn into selectors, which pick out a particular field from a dictionary. See any description of how to compile type classes for examples of this.
So here you've got something like
(>) d x y
where (>) is defined like this
(>) (MkOrd _ _ gr _) = gr
That is, (>) picks out the gr field from the dictionary. So it's all very higher-order in reality. And that is what is giving trouble to the ESC stuff. After all, what do we know about *all* implementations of (>) at *all* types? Not much!
Dana and I did not explore much how to give a good treatment to overloaded functions. I would not expect it to "just work".
I hope this helps a bit
Simon
| -----Original Message-----
| From: Colin Paul Adams [mailto:colin@colina.demon.co.uk]
| Sent: 08 April 2009 11:04
| To: Simon Peyton-Jones
| Cc: glasgow-haskell-users@haskell.org
| Subject: Re: Functions for builtin operators (?)
|
| >>>>> "Simon" == Simon Peyton-Jones