Typo
[packages/base.git] / tests / data-fixed-show-read.hs
1
2 module Main (main) where
3
4 import Data.Fixed
5
6 main :: IO ()
7 main = do doit 38.001
8 doit 38.009
9 doit 38.01
10 doit 38.09
11 print (read "38" :: Centi)
12 doit (-38.001)
13 doit (-38.009)
14 doit (-38.01)
15 doit (-38.09)
16 print (read "-38" :: Centi)
17
18 doit :: Centi -> IO ()
19 doit c = do let s = show c
20 r = read s :: Centi
21 putStrLn s
22 print r