on master help sign in
Apply hlint suggesstions on common array test file
commit5998dd8c419f534372375e40c3b54a9b52b68183 authoradithyaov <adithya@composewell.com> dateSat 27 Nov 2021, 02:57 (5 years ago) parent9c04f40
1 file changed+5−5
test/Streamly/Test/Data/Array/Common.hs+5−5
test/Streamly/Test/Data/Array/Common.hs+5−5
@@ -32,7 +32,7 @@ genericTestFrom arrFold =
3232 assert (A.length arr == len)
3333
3434testLength :: Property
35−testLength = genericTestFrom (\n -> S.fold (A.writeN n))
35+testLength = genericTestFrom (S.fold . A.writeN)
3636
3737testLengthFromStreamN :: Property
3838testLengthFromStreamN = genericTestFrom A.fromStreamN
@@ -53,16 +53,16 @@ genericTestFromTo arrFold arrUnfold listEq =
5353
5454testFoldNUnfold :: Property
5555testFoldNUnfold =
56− genericTestFromTo (\n -> S.fold (A.writeN n)) (S.unfold A.read) (==)
56+ genericTestFromTo (S.fold . A.writeN) (S.unfold A.read) (==)
5757
5858testFoldNToStream :: Property
5959testFoldNToStream =
60− genericTestFromTo (\n -> S.fold (A.writeN n)) A.toStream (==)
60+ genericTestFromTo (S.fold . A.writeN) A.toStream (==)
6161
6262testFoldNToStreamRev :: Property
6363testFoldNToStreamRev =
6464 genericTestFromTo
65− (\n -> S.fold (A.writeN n))
65+ (S.fold . A.writeN)
6666 A.toStreamRev
6767 (\xs list -> xs == reverse list)
6868
@@ -79,7 +79,7 @@ testFromListN =
7979 forAll (vectorOf len (arbitrary :: Gen Int)) $ \list ->
8080 monadicIO $ do
8181 let arr = A.fromListN n list
82− xs <- run $ S.toList $ (S.unfold A.read) arr
82+ xs <- run $ S.toList $ S.unfold A.read arr
8383 listEquals (==) xs (take n list)
8484
8585foldManyWith :: (Int -> Fold IO Int (Array Int)) -> Property