Fix some tests following the removal of Num's superclasses
[ghc.git] / testsuite / tests / numeric / should_run / arith013.hs
1 -- Test gcdInt/gcdInteger
2
3 import GHC.Real ( gcdInt )
4 import GHC.Integer.GMP.Internals ( gcdInteger )
5
6 main :: IO ()
7 main = do
8 test gcdInt [ -42, 0, 105 ]
9 test gcdInteger [-12193263111263526900, -42, 0, 105, 1234567890 ]
10
11
12 test :: (Show a, Integral a) => (a -> a -> a) -> [a] -> IO ()
13 test f xs = mapM_ print [ (a, b, f a b) | a <- xs, b <- reverse xs, a /= 0 || b /= 0 ]