To refine Alejandro's answer a bit: The OutsideIn(X) paper is really the one to read. It's long, but I think it would have to be! The later papers he mentions describe enhancements to the internal, typed language (called variously System FC or GHC Core -- they're more or less the same). With these enhancements came some changes to type inference, but not major ones. The "Promotion" paper describes a bit about polymorphic kind inference in datatype definitions, but the details aren't really there. The "Closed Type Families" paper does not really address type inference, as the closed type families feature (somewhat surprisingly) doesn't interact much with type inference at all.

It would be great to see this work be adopted into another language. Good luck!
Richard

On Feb 25, 2014, at 8:46 AM, Alejandro Serrano Mena <trupill@gmail.com> wrote:

The current version of GHC does type inference by (an advanced version of) the OutsideIn(X) algorithm.
You can check the original paper at http://research.microsoft.com/en-us/um/people/simonpj/papers/constraints/jfp-outsidein.pdf
The initial algorithm was then enhanced with datatype promotion and closed type families, which you can learn about in "Giving Haskell a Promotion" and "Closed Type Families with Overlapping Equations".


2014-02-25 14:38 GMT+01:00 Di Xu <xudifsd@gmail.com>:
Hi, all

I'm new to haskell, I'm learning haskell for its type system, and I found haskell type inference is excellent, I'm interested in its type inference algorithm, could you give me some paper or material reference that describe the haskell type inference algorithm? I want to port it to typed clojure.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe