type annotations for stats integers
This commit is contained in:
parent
4435a8c933
commit
9a3a5b62b6
|
|
@ -467,8 +467,8 @@ renderDistribution wcs =
|
||||||
bucketOf w
|
bucketOf w
|
||||||
| w < 500 = 0 | w < 1000 = 1 | w < 2000 = 2 | w < 5000 = 3 | otherwise = 4
|
| w < 500 = 0 | w < 1000 = 1 | w < 2000 = 2 | w < 5000 = 3 | otherwise = 4
|
||||||
labels = ["< 500", "500 \x2013 1k", "1k \x2013 2k", "2k \x2013 5k", "\x2265 5k"]
|
labels = ["< 500", "500 \x2013 1k", "1k \x2013 2k", "2k \x2013 5k", "\x2265 5k"]
|
||||||
counts = foldr (\w acc -> Map.insertWith (+) (bucketOf w) 1 acc)
|
counts = foldr (\w acc -> Map.insertWith (+) (bucketOf w) (1 :: Int) acc)
|
||||||
(Map.fromList [(i,0) | i <- [0..4]]) wcs
|
(Map.fromList [(i, 0 :: Int) | i <- [0..4]]) wcs
|
||||||
buckets = [(labels !! i, fromMaybe 0 (Map.lookup i counts)) | i <- [0..4]]
|
buckets = [(labels !! i, fromMaybe 0 (Map.lookup i counts)) | i <- [0..4]]
|
||||||
maxCount = max 1 (maximum (map snd buckets))
|
maxCount = max 1 (maximum (map snd buckets))
|
||||||
bar (lbl, n) =
|
bar (lbl, n) =
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ constraints: any.Glob ==0.10.2,
|
||||||
any.network-control ==0.1.3,
|
any.network-control ==0.1.3,
|
||||||
any.network-uri ==2.6.4.2,
|
any.network-uri ==2.6.4.2,
|
||||||
any.old-locale ==1.0.0.7,
|
any.old-locale ==1.0.0.7,
|
||||||
any.old-time ==1.1.0.4,
|
any.old-time ==1.1.0.5,
|
||||||
any.optparse-applicative ==0.18.1.0,
|
any.optparse-applicative ==0.18.1.0,
|
||||||
any.ordered-containers ==0.2.4,
|
any.ordered-containers ==0.2.4,
|
||||||
any.os-string ==2.0.10,
|
any.os-string ==2.0.10,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue