Commit 8a664967 authored by Ben Gamari's avatar Ben Gamari 🐢

ghc-compact: Use Char instead of Integer in compact_share test

The representation of Integer depends upon the choice of integer backend whereas
Char should be consistent.
parent 8a0fca09
import Data.Char
import GHC.Compact
import qualified Data.Map as Map
main = do
let m1 = Map.fromList [(x,show x) | x <- [1..(10000::Integer)]]
m2 = Map.fromList [(x,y) | x <- [1..(10000::Integer)],
let m1 = Map.fromList [(x,show x) | x <- ['a'..chr 10000]]
m2 = Map.fromList [(x,y) | x <- ['a'..chr 10000],
Just y <- [Map.lookup x m1]]
c <- compact (m1,m2)
print (length (show (getCompact c)))
......
275599
1900544
275599
1114112
411963
2588672
411963
1343488
275599
3801088
275599
2228224
411963
5177344
411963
2686976
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment