Commit 7f0d3699 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢

Fix whitespace

parent c3cca39c
......@@ -3,7 +3,7 @@
module Data.BenchBlockQueue (benchmarks) where
import Prelude hiding (elem)
import Prelude hiding ( elem )
import Criterion
......@@ -49,18 +49,14 @@ benchDequeue = bgroup
]
benchElem :: Benchmark
benchElem = bgroup "elem"
[ mkBench 10
, mkBench 20
, mkBench 30
, mkBench 100
, mkBench 200
, mkBench 300
]
benchElem = bgroup
"elem"
[mkBench 10, mkBench 20, mkBench 30, mkBench 100, mkBench 200, mkBench 300]
where
mkBench n = bench (show n ++ " blocks") $
withInit (create n) (\q -> mapM_ (`elem` q) [Block i | i <- [0..n-1]])
mkBench n = bench (show n ++ " blocks") $ withInit
(create n)
(\q -> mapM_ (`elem` q) [ Block i | i <- [0 .. n - 1] ])
instance NFData (BlockQueue RealWorld) where
rnf p = seq p ()
......@@ -68,7 +64,7 @@ instance NFData (BlockQueue RealWorld) where
create :: Int -> ST s (BlockQueue s)
create n = do
q <- empty n
mapM_ (enqueue q . Block) [0..n-1]
mapM_ (enqueue q . Block) [0 .. n - 1]
return q
withInit
......
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