>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
<http://haskell.org/hugs>. 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.