Re: Typchecking for modern languages

Hans Aberg <>
28 Jun 2004 20:04:08 -0400

          From comp.compilers

Related articles
Typchecking for modern languages (2004-06-26)
Re: Typchecking for modern languages (2004-06-28)
Re: Typchecking for modern languages (Hans Aberg) (2004-06-28)
Re: Typchecking for modern languages (Daniel C. Wang) (2004-06-30)
| List of all articles for this month |

From: Hans Aberg <>
Newsgroups: comp.compilers
Date: 28 Jun 2004 20:04:08 -0400
Organization: Compilers Central
References: 04-06-101
Keywords: types
Posted-Date: 28 Jun 2004 20:04:08 EDT

>I'm looking for books or papers that explain how to implement
>typechecking inside a compiler.
>Typechecking for Pascal is easy... I need to understand how to
>implement typechecking for languages that combine inheritance with
>parametric polymorphism (such as the new proposals for Generic Java
>and Generic C#).
>Any pointers or other help would be appreciated.

The Hindley-Milner type system, as used in language like Haskell, make use
of unification. Unification is described in books on parsing, such as the
one by Aho, Sethi & Ullman, "Compilers". You also find it in the
Mini-Prolog program that comes with the Hugs distribution
<>. There is also a book by Simon Peyton Jones and
David Lester, "Implementing functional languages: a tutorial", that used to
be online, which contains some stuff on template instantiation.

    Hans Aberg

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.