
You're right, of course. I totally spaced out while reading the error message. That'll teach me to reply to lists while on the phone. :/ On Jun 22, 2011, at 7:21 PM, Felipe Almeida Lessa wrote:
On Wed, Jun 22, 2011 at 8:07 PM, Jack Henahan
wrote: Use
myAND F _ = F
instead of using x.
Actually that doesn't change anything and both definitions are the same thing. The problem here is that "type checking is not lazy" =). The second argument of myAND in "myAND F (1/0)" isn't being evaluated at all; actually your code isn't running at all. What is being reported is a type error, not a runtime error. Try one of these instead:
myAND F undefined myAND F (error "foo") myAND F (let x = x in x) myAND F (unsafePerformIO $ launchMissiles)
Cheers! =)
-- Felipe.