Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
351f39d6
Commit
351f39d6
authored
May 17, 2002
by
simonmar
Browse files
[project @ 2002-05-17 09:28:18 by simonmar]
Add test for correct 'negate' handling (currently an expected failure).
parent
b51edfa4
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/deSugar/should_run/all.T
View file @
351f39d6
...
...
@@ -13,3 +13,5 @@ test "dsrun005" { vtr("", "", "1") }
test
"
dsrun006
"
{
vtr
("",
"",
"")
}
test
"
dsrun007
"
{
vtr
("",
"",
"
1
")
}
test
"
dsrun008
"
{
vtr
("",
"",
"
1
")
}
test
"
dsrun009
"
{
$expect
=
"
fail
"
vtr
("",
"",
"")
}
testsuite/tests/ghc-regress/deSugar/should_run/dsrun009.hs
0 → 100644
View file @
351f39d6
-- !!! 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
testsuite/tests/ghc-regress/deSugar/should_run/dsrun009.stdout
0 → 100644
View file @
351f39d6
(Negate (FromInteger 2),True)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment