Hindley–Milner is a polymorphic extention of simply typed lamda calculus, weaker than system F. It is also the name of type inference algorithm is this type system.
This wiki page give its basic principle. The basic principle is that first use some type variable and semantic of abstraction and application to generate a list of type constraint, and then use unification to solve it. In one world, to find the most general type setting to satisfy the list of type constraint.
Here is the implementation of Hindley–Milner in perl language. it is based on Basic Polymorphic Typechecking.
订阅:
博文评论 (Atom)
没有评论:
发表评论