Commit 351f39d6 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-05-17 09:28:18 by simonmar]

Add test for correct 'negate' handling (currently an expected failure).
parent b51edfa4
......@@ -13,3 +13,5 @@ test "dsrun005" { vtr("", "", "1") }
test "dsrun006" { vtr("", "", "") }
test "dsrun007" { vtr("", "", "1") }
test "dsrun008" { vtr("", "", "1") }
test "dsrun009" { $expect = "fail"
vtr("", "", "") }
-- !!! Test that 'negate' is used properly to construct negative literals
main = print (minusTwo,trueOrFalse)
minusTwo = -2::N
trueOrFalse =
case minusTwo of
-2 -> True
_ -> False
data N = Negate N | FromInteger Integer deriving (Eq,Show)
instance Num N where
negate = Negate
fromInteger = FromInteger
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment