Dear all, GHC 5.0.3 supports rank-n polymorphism. Could anyone please point me to a paper that describes type inference algorithm used. Thanks in advance Artem Alimarine
On Thursday 07 March 2002 08:26 am, you wrote:
Dear all,
GHC 5.0.3 supports rank-n polymorphism. Could anyone please point me to a paper that describes type inference algorithm used.
The main paper is "Putting Type Annotations to Work" by Odersky and L"aufer: @InProceedings{Odersky-Laufer96, author = "Martin Odersky and Konstantin L{\"a}ufer", title = "Putting Type Annotations to Work", key = "Odersky \& Laufer", pages = "54--67", booktitle = "Conference Record of POPL '96: The 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, St. Petersberg Beach, Florida", year = "1996", organization = "ACM", address = "New York, NY", month = jan, annote = "31 references.", } Cheers, Andy -- Andy Moran Ph. (503) 526 3472 Galois Connections Inc. Fax. (503) 350 0833 3875 SW Hall Blvd. http://www.galois.com Beaverton, OR 97005 moran@galois.com
Someone already sent you the Odersky paper, but in brief, there is no type inference (as it is undecidable). Rank-n polymorphism can only happen via explicit type signatures. My understanding is that if these type signatures are not there, GHC will automatically lift all the foralls to the front in type inference. - Hal -- Hal Daume III "Computer science is no more about computers | hdaume@isi.edu than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Thu, 7 Mar 2002, Artem S Alimarine wrote:
Dear all,
GHC 5.0.3 supports rank-n polymorphism. Could anyone please point me to a paper that describes type inference algorithm used.
Thanks in advance Artem Alimarine
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
GHC 5.0.3 supports rank-n polymorphism. Could anyone please point me to a paper that describes type inference algorithm used.
Rank-n polymorphism can only happen via explicit type signatures.
SPJ and I are working on a formal description of how all of this works, and should have a manuscript ready in few weeks. Yes: the inference is based on Odersky & Laufer, and yes: the trick is to exploit type annotations. The full system, however, has required quite a few innovations beyond this. Our manuscript also describes how to extend Haskell with first-class existentials, in the style described in our FOOL 9 paper "First-class modules for Haskell." Fun for all the family. Regards, Mark
Artem Alimarine asks:
GHC 5.0.3 supports rank-n polymorphism. Could anyone please point me to a paper that describes type inference algorithm used.
"Putting Type Annotations To Work", Martin Odersky and Konstantin Läufer. In Proceedings, 23rd ACM Symposium on Principles of Programming Languages, St. Petersburg, Florida, January 1996. Available from <http://lampwww.epfl.ch/~odersky/papers/>. Cheers, Ronny Wichers Schreur
participants (5)
-
Andy Moran -
Artem S Alimarine -
Hal Daume III -
Mark B Shields -
Ronny Wichers Schreur