
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 http://www.digitas.harvard.edu/cgi-bin/ken/sig International Human Rights Day * 2003-12-10 * http://www.un.org/rights/ What if All Chemists Went on Strike? (science fiction) http://www.iupac.org/publications/ci/2003/2506/iw3_letters.html