KtorZ commented on this pull request.
+— Buckets boundaries can be constructed in different way
+data BoundType = Log10 | Haphazard
+generateBounds :: BoundType -> NonEmpty Word64
+generateBounds bType =
+ let (^!) :: Word64 -> Word64 -> Word64
+ (^!) = (^)
+ in case bType of
+ Log10 -> NL.fromList $ ( map (\toPower -> 10 ^! toPower) [1..16] ) ++ [45 * (10 ^! 15)]
+ Haphazard -> NL.fromList [10, 100, 1000, 10000]
+instance Arbitrary HistogramBar where
+ arbitrary = do
+ possiblenames <- elements $ map show (NL.toList $ generateBounds Log10) + bound <- arbitrary Sorry :s .. I probably induced you to use `suchThat` here. That's wasn't my best choice of words / example ...