Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
35d2c756
Commit
35d2c756
authored
Oct 12, 2011
by
Ian Lynagh
Browse files
Fix some tests following the removal of Num's superclasses
parent
6a58730c
Changes
6
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/codeGen/should_run/cgrun044.hs
View file @
35d2c756
...
...
@@ -98,7 +98,7 @@ float_numbers =
-------------
denorm
::
RealFloat
a
=>
[
a
]
->
String
denorm
::
(
Show
a
,
RealFloat
a
)
=>
[
a
]
->
String
denorm
numbers
=
unlines
(
""
...
...
@@ -109,7 +109,7 @@ denorm numbers =
where
showPerform
=
showAndPerform
(
isDenormalized
)
"isDenormalised"
pos_inf
::
RealFloat
a
=>
[
a
]
->
String
pos_inf
::
(
Show
a
,
RealFloat
a
)
=>
[
a
]
->
String
pos_inf
numbers
=
unlines
(
""
...
...
@@ -120,7 +120,7 @@ pos_inf numbers =
where
showPerform
=
showAndPerform
(
isInfinite
)
"isInfinite"
neg_inf
::
RealFloat
a
=>
[
a
]
->
String
neg_inf
::
(
Show
a
,
RealFloat
a
)
=>
[
a
]
->
String
neg_inf
numbers
=
unlines
(
""
...
...
@@ -131,7 +131,7 @@ neg_inf numbers =
where
showPerform
=
showAndPerform
(
\
x
->
isInfinite
x
&&
x
<
0
)
"isNegInfinite"
nan
::
RealFloat
a
=>
[
a
]
->
String
nan
::
(
Show
a
,
RealFloat
a
)
=>
[
a
]
->
String
nan
numbers
=
unlines
(
""
...
...
@@ -142,7 +142,7 @@ nan numbers =
where
showPerform
=
showAndPerform
(
isNaN
)
"isNaN"
pos_zero
::
RealFloat
a
=>
[
a
]
->
String
pos_zero
::
(
Show
a
,
RealFloat
a
)
=>
[
a
]
->
String
pos_zero
numbers
=
unlines
(
""
...
...
@@ -153,7 +153,7 @@ pos_zero numbers =
where
showPerform
=
showAndPerform
(
==
0
)
"isPosZero"
neg_zero
::
RealFloat
a
=>
[
a
]
->
String
neg_zero
::
(
Show
a
,
RealFloat
a
)
=>
[
a
]
->
String
neg_zero
numbers
=
unlines
(
""
...
...
testsuite/tests/codeGen/should_run/cgrun071.hs
View file @
35d2c756
...
...
@@ -53,7 +53,7 @@ test_popCnt64 = test popcnt64 (slowPopcnt . fromIntegral . (mask 64 .&.))
mask
n
=
(
2
^
n
)
-
1
test
::
Num
a
=>
(
a
->
Word
)
->
(
a
->
Word
)
->
String
test
::
(
Show
a
,
Num
a
)
=>
(
a
->
Word
)
->
(
a
->
Word
)
->
String
test
fast
slow
=
case
failing
of
[]
->
"OK"
((
_
,
e
,
a
,
i
)
:
xs
)
->
...
...
testsuite/tests/ghci/scripts/ghci008.stdout
View file @
35d2c756
class
(Eq a, Show a) =>
Num a where
class Num a where
(+) :: a -> a -> a
...
-- Defined in `GHC.Num'
infixl 6 +
class
(Eq a, Show a) =>
Num a where
class Num a where
(+) :: a -> a -> a
...
-- Defined in `GHC.Num'
...
...
testsuite/tests/numeric/should_run/arith003.hs
View file @
35d2c756
...
...
@@ -10,7 +10,7 @@ main
showit
(
do_ops
integer_ops
)
)
showit
::
Integral
a
=>
[(
String
,
a
,
a
,
a
)]
->
String
showit
::
(
Show
a
,
Integral
a
)
=>
[(
String
,
a
,
a
,
a
)]
->
String
showit
stuff
=
concat
[
str
++
" "
++
show
l
++
" "
++
show
r
++
" = "
++
show
result
++
"
\n
"
|
(
str
,
l
,
r
,
result
)
<-
stuff
...
...
testsuite/tests/numeric/should_run/arith011.hs
View file @
35d2c756
...
...
@@ -22,7 +22,7 @@ test = do
testIntlike
"Word64"
(
0
::
Word64
)
testInteger
testIntlike
::
(
Bounded
a
,
Integral
a
,
Ix
a
,
Read
a
,
Bits
a
)
=>
String
->
a
->
IO
()
testIntlike
::
(
Bounded
a
,
Integral
a
,
Ix
a
,
Show
a
,
Read
a
,
Bits
a
)
=>
String
->
a
->
IO
()
testIntlike
name
zero
=
do
putStrLn
$
"--------------------------------"
putStrLn
$
"--Testing "
++
name
...
...
testsuite/tests/numeric/should_run/arith013.hs
View file @
35d2c756
...
...
@@ -9,5 +9,5 @@ main = do
test
gcdInteger
[
-
12193263111263526900
,
-
42
,
0
,
105
,
1234567890
]
test
::
Integral
a
=>
(
a
->
a
->
a
)
->
[
a
]
->
IO
()
test
::
(
Show
a
,
Integral
a
)
=>
(
a
->
a
->
a
)
->
[
a
]
->
IO
()
test
f
xs
=
mapM_
print
[
(
a
,
b
,
f
a
b
)
|
a
<-
xs
,
b
<-
reverse
xs
,
a
/=
0
||
b
/=
0
]
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