Skip to content

Commit 06073a4

Browse files
Adapt to fourmolu
1 parent e753e87 commit 06073a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+8885
-8709
lines changed

bench/Constrained/Bench.hs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,38 @@ import Data.Tree
1818

1919
benchmarks :: Benchmark
2020
benchmarks =
21-
bgroup
22-
"constrained"
23-
[ benchSpec 10 30 "TrueSpec@Map" (trueSpec :: Specification (Map Int Int))
24-
, benchSpec 10 30 "TrueSpec@[]" (trueSpec :: Specification [Int])
25-
, benchSpec 10 30 "TrueSpec@Set" (trueSpec :: Specification (Set Int))
26-
, benchSpec
27-
10
28-
30
29-
"TrueSpec@Tree"
30-
(giveHint (Nothing, 30) <> trueSpec :: Specification (Tree Int))
31-
, benchSpec 10 30 "roseTreeMaybe" roseTreeMaybe
32-
, benchSpec 10 30 "listSumPair" listSumPair
33-
]
21+
bgroup
22+
"constrained"
23+
[ benchSpec 10 30 "TrueSpec@Map" (trueSpec :: Specification (Map Int Int))
24+
, benchSpec 10 30 "TrueSpec@[]" (trueSpec :: Specification [Int])
25+
, benchSpec 10 30 "TrueSpec@Set" (trueSpec :: Specification (Set Int))
26+
, benchSpec
27+
10
28+
30
29+
"TrueSpec@Tree"
30+
(giveHint (Nothing, 30) <> trueSpec :: Specification (Tree Int))
31+
, benchSpec 10 30 "roseTreeMaybe" roseTreeMaybe
32+
, benchSpec 10 30 "listSumPair" listSumPair
33+
]
3434

3535
roseTreeMaybe :: Specification (Tree (Maybe (Int, Int)))
3636
roseTreeMaybe = constrained $ \t ->
37-
[ forAll' t $ \mp ts ->
38-
forAll ts $ \t' ->
39-
onJust mp $ \p ->
40-
onJust (rootLabel_ t') $ \p' ->
41-
fst_ p' ==. snd_ p
42-
, forAll' t $ \mp _ -> isJust mp
43-
, genHint (Nothing, 10) t
44-
]
37+
[ forAll' t $ \mp ts ->
38+
forAll ts $ \t' ->
39+
onJust mp $ \p ->
40+
onJust (rootLabel_ t') $ \p' ->
41+
fst_ p' ==. snd_ p
42+
, forAll' t $ \mp _ -> isJust mp
43+
, genHint (Nothing, 10) t
44+
]
4545

4646
listSumPair :: Specification [(Int, Int)]
4747
listSumPair = constrained $ \xs ->
48-
[ assert $ foldMap_ fst_ xs ==. 100
49-
, forAll' xs $ \x y -> [20 <. x, x <. 30, y <. 100]
50-
]
48+
[ assert $ foldMap_ fst_ xs ==. 100
49+
, forAll' xs $ \x y -> [20 <. x, x <. 30, y <. 100]
50+
]
5151

5252
benchSpec :: (HasSpec a, NFData a) => Int -> Int -> String -> Specification a -> Benchmark
5353
benchSpec seed size nm spec =
54-
bench (unlines [nm, show (genFromSpecWithSeed seed size spec)]) $
55-
nf (genFromSpecWithSeed seed size) spec
54+
bench (unlines [nm, show (genFromSpecWithSeed seed size spec)]) $
55+
nf (genFromSpecWithSeed seed size) spec

0 commit comments

Comments
 (0)