Lennart Augustsson writes:

> I thought there were problems with extending Hindley-Milner type systems
> with cyclic types:  The type inference can handle type correct programs,
> but will loop for certain type incorrect programs, or am I mistaken?

It is absolutely unproblematic to extend  Hindley-Milner type systems with
cyclic types, provided you use the right unification algorithm (ie you don't
just leave out the occurs-check as in some Prologs). However, in the
resulting system any closed lambda-term without constants has a type, in
particular \x.(x x). This kind of type system is implemented in Stefan Kaes'
Sample language.

Tobias

Reply via email to