[Haskell-cafe] A voyage of undiscovery

Miguel Mitrofanov miguelimo38 at yandex.ru
Thu Jul 16 14:40:27 EDT 2009

> Consider the following expression:
> (foo True, foo 'x')
> Is this expression well-typed?
> Astonishingly, the answer depends on where "foo" is defined. If  
> "foo" is a local variable, then the above expression is guaranteed  
> to be ill-typed. However, if we have (for example)

That's not true:

main = let foo x = x in print (foo True, foo 'x')

works like a charm.

More information about the Haskell-Cafe mailing list