[project @ 2001-08-22 11:45:06 by sewardj]
[ghc-hetmet.git] / ghc / tests / numeric / should_run / num004.hs
1 -- Exercising Numeric.readSigned a bit
2 --
3 module Main(main) where
4
5 import Numeric
6 import Char
7
8 main = 
9   let 
10    rd :: ReadS Integer 
11    rd = readSigned (readInt 10 (isDigit) (digitToInt))
12   in
13   do
14    print (rd (show (343023920121::Integer)))
15    print (rd (show (3430239::Int)))
16    print (rd (show (-0 :: Int)))
17    print (rd (show (591125662431 `div` (517::Int))))
18    print (rd (show (-111::Int)))
19    print (rd (show (232189458241::Integer)))
20