Why is this function type-correct

Martin Norbäck d95mback@dtek.chalmers.se
04 Mar 2002 16:05:04 +0100


mån 2002-03-04 klockan 15.11 skrev Rijk J. C. van Haaften:
> Hello,
> 
> Recently, I wrote a function similar to
> 
> x :: a
> x = x 42
> 
> which is type-correct (Hugs, Ghc, THIH).
> Still, from the expression it is clear
> that the type shoud have a function type.

It might interest you to know that this function is also type correct:

x :: x
x = x x x x x x

I would like to see a compiler derive that type though...

Regards,

	Martin

-- 
[ http://www.dtek.chalmers.se/~d95mback/ ] [ PGP: 0x453504F1 ] [ UIN:
4439498 ]
    Opinions expressed above are mine, and not those of my future
employees.
SIGBORE: Signature boring error, core dumped