On Sat, 22 Dec 2007, Cristian Baboi wrote:

> On Sat, 22 Dec 2007 17:13:55 +0200, Philippa Cowderoy <[EMAIL PROTECTED]>
> wrote:
> 
> > Here's a trivial example that does so:
> > 
> > (\x -> x) (\x -> x)
> > 
> > A lambda calculus classic that doesn't typecheck in Haskell:
> > 
> > (\x -> x x) (\x -> x x)
> 
> > Feel free to try evaluating it!
> 
> Thank you for your message.
> 
> I tryed and this is what I've got:
> ERROR - cannot find "show" function for:
> *** Expression : (\x -> x) (\x -> x)
> *** Of type    : a -> a
> 

Yep, that's because while it can evaluate it down to (\x -> x) your 
interpreter doesn't know how to print the result. You can demonstrate that 
it works by then passing in something to that result though:

((\x ->x) (\x -> x)) 1

You'll have to evaluate the other one by hand. Don't spend too long with 
it though!

-- 
[EMAIL PROTECTED]

"The reason for this is simple yet profound. Equations of the form
x = x are completely useless. All interesting equations are of the
form x = y." -- John C. Baez
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to