On May 20, 2010, at 11:03 AM, R J wrote:

stranger f = f f


This doesn't have a type in Haskell.
Suppose f :: a -> b
Then if f f made sense, a = (a -> b) would be true,
and we'd have an infinite type.

Type the definition into a file, and try loading it
into ghci:

    Occurs check: cannot construct the infinite type: t = t -> t1
    Probable cause: `f' is applied to too many arguments
    In the expression: f f
    In the definition of `stranger': stranger f = f f

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to