[project @ 2001-03-15 07:40:06 by qrczak]
[ghc-hetmet.git] / ghc / tests / numeric / should_run / num003.hs
1 -- Testing readInt, lightly.
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 (1212 :: Int)))
17    print (rd (show (591125662431 `div` (517::Int))))
18    print (rd (show (-111::Int)))
19    print (rd (show (232189458241::Integer)))
20