RE: Negative literals and the meaning of case -2 of -2 - True

2002-05-27 Thread Simon Peyton-Jones
Fixed. Simon | -Original Message- | From: Simon Marlow [mailto:[EMAIL PROTECTED]] | Sent: 17 May 2002 10:34 | To: Thomas Hallgren; [EMAIL PROTECTED] | Subject: RE: Negative literals and the meaning of case -2 of | -2 - True | | | | To find out how Haskell implementations treat

Re: Negative literals and the meaning of case -2 of -2 - True

2002-05-20 Thread Malcolm Wallace
Thomas Hallgren [EMAIL PROTECTED] writes: * hugs Dec 2001: main outputs: (FromInteger (-2),True) * ghc 5.02.2: main outputs: (FromInteger (-2),True) * hbc 0..5b: main outputs: (Negate (FromInteger 2),False) * nhc98 1.12: compiler outputs: Fail: What? matchAltIf at 7:13

RE: Negative literals and the meaning of case -2 of -2 - True

2002-05-17 Thread Simon Marlow
To find out how Haskell implementations treat negated literals, I tested the following program: main = print (minusTwo,trueOrFalse) minusTwo = -2::N trueOrFalse = case minusTwo of -2 - True _ - False data N =