Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I hope you get some good answers to this.</p> <p>I haven't yet read the paper you link to but it sounds interesting. Have you looked at all how ad-hoc polymorphism (basically overloading) works in Haskell? Haskell's type system is H-M plus some other goodies. One of those goodies is type classes. Type classes provide overloading, or as Haskeller's call it, ad-hoc polymorphism.</p> <p>In GHC, the most widely used Haskell compiler, the type classes are implemented by passing dictionaries at run-time. The dictionary lets the run-time system do a lookup from type to implementation. Supposedly, <a href="http://repetae.net/computer/jhc/" rel="nofollow noreferrer">jhc</a> can use super-optimization to pick the right implementation at compile time but I'm skeptical it handles the fully polymorphic cases that Haskell can allow and I know of no formal proofs or papers asserting the correctness.</p> <p>It sounds like your type inference will run into the same problems as other rank-n polymorphic approaches. You may well want to read some of the papers here for additional background: <a href="http://research.microsoft.com/~simonpj/" rel="nofollow noreferrer">Scroll down to "Papers about types"</a> His papers are haskell specific but the type theoretic stuff should be meaningful and useful to you.</p> <p>I think this paper about rank-n polymorphism and the type checking issues should spark some interesting thoughts for you: <a href="http://research.microsoft.com/~simonpj/papers/higher-rank/" rel="nofollow noreferrer">http://research.microsoft.com/~simonpj/papers/higher-rank/</a></p> <p>I wish I could provide a better answer! Good luck.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload