Skip to content

Commit 09a9d5f

Browse files
committed
Fix hlint suggestions
1 parent c3350c8 commit 09a9d5f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Math/NumberTheory/Primes/Sieve/Atkin.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
--
99

1010
{-# LANGUAGE BangPatterns #-}
11-
{-# LANGUAGE MagicHash #-}
1211

1312
module Math.NumberTheory.Primes.Sieve.Atkin
1413
( atkinPrimeList
@@ -131,7 +130,7 @@ traverseLatticePoints1 !sp vec (!x0, !y0) =
131130
$ head
132131
$ dropWhile (\(k, _) -> k < spLength sp)
133132
$ iterate forwardX
134-
$ (k0, x0)
133+
(k0, x0)
135134

136135
-- Step 4
137136
adjustY (!k, !y)
@@ -177,7 +176,7 @@ traverseLatticePoints2 sp vec (x0, y0) =
177176
$ head
178177
$ dropWhile (\(k, _) -> k < spLength sp)
179178
$ iterate forwardX
180-
$ (k0, x0)
179+
(k0, x0)
181180

182181
-- Step 4
183182
adjustY (!k, !y)

benchmark/Math/NumberTheory/SequenceBench.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ eratosthenesBench = bgroup "eratosthenes" $
3838

3939
atkinBench :: Benchmark
4040
atkinBench = bgroup "atkin" $
41-
map (\(x, y) -> bench (show (x, y)) $ nf atkin (x, x + y))
42-
[ (10 ^ x, 10 ^ y)
41+
[ bench (show (10^x, 10^y)) $ nf atkin (10^x, 10^x + 10^y)
4342
| x <- [10..17]
4443
, y <- [6..x-1]
4544
, x == 10 || y == 7

0 commit comments

Comments
 (0)