relaxed instance rules spec (was: the MPTC Dilemma (please solve))

John Meacham john at
Wed Mar 1 23:26:16 EST 2006

On Thu, Mar 02, 2006 at 03:53:45AM -0000, Claus Reinke wrote:
> - Mul recurses down a type in its second parameter
> - types in Haskell are finite
> - there is a non-terminating Mul inference
> the problem is that we have somehow conjured up an infinite
> type for Mul to recurse on without end! Normally, such infinite
> types are ruled out by occurs-checks (unless you are working
> with Prolog III;-), so someone forgot to do that here. why?
> where? how?

Polymorphic recursion allows the construction of infinite types if I
understand what you mean. if you are clever (or unlucky) you can get
jhcs middle end to go into an infinite loop by using them.

> -- an infinite binary tree
> data Bin a = Bin a (Bin (a,a))

John Meacham - ⑆⑆john⑈

More information about the Haskell-prime mailing list