Infinite types

Ken Shan ken at
Mon Dec 8 16:00:22 EST 2003

On 2003-12-08T12:42:46-0800, Jeffrey A. Scofield wrote:
>     b = () -> (a, b)
> [...]
> I'm wondering how to tell, as a relative newcomer to
> Haskell, that they aren't allowed.

I think the rule you're looking for is the following: Don't equate a
type variable with something that contains that type variable.  This
is known as the "occurs check".  This rule prohibits "equi-recursive"
types like "b" above, but not "iso-recursive" types like

    data List a = Nil | Cons a (List a)

because the type "List a" is merely isomorphic to something containing
"List a", but not equal to it.

Edit this signature at
International Human Rights Day * 2003-12-10 *

What if All Chemists Went on Strike? (science fiction)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the Haskell-Cafe mailing list