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
The current version of GHC does type inference by (an advanced version of) the OutsideIn(X) algorithm.
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".
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe