ghc-compact: Use Char instead of Integer in compact_share test
[ghc.git] / libraries / ghc-compact / tests / compact_share.hs
1 import Data.Char
2 import GHC.Compact
3 import qualified Data.Map as Map
4
5 main = do
6 let m1 = Map.fromList [(x,show x) | x <- ['a'..chr 10000]]
7 m2 = Map.fromList [(x,y) | x <- ['a'..chr 10000],
8 Just y <- [Map.lookup x m1]]
9 c <- compact (m1,m2)
10 print (length (show (getCompact c)))
11 print =<< compactSize c
12 c <- compactWithSharing (m1,m2)
13 print (length (show (getCompact c)))
14 print =<< compactSize c