grouped-list 0.2.1.3 → 0.2.1.4
raw patch · 4 files changed
+5/−2 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/GroupedList.hs +1/−1
- grouped-list.cabal +1/−1
- test/examples.hs +2/−0
- test/properties.hs +1/−0
Data/GroupedList.hs view
@@ -236,7 +236,7 @@ instance Foldable Grouped where foldMap f (Grouped gs) = foldMap (foldMap f) gs #if MIN_VERSION_base(4,8,0)- length (Grouped gs) = foldl' (+) 0 $ fmap length gs+ length (Grouped gs) = foldl' (\s g -> s + length g) 0 gs null (Grouped gs) = null gs #else
grouped-list.cabal view
@@ -1,5 +1,5 @@ name: grouped-list-version: 0.2.1.3+version: 0.2.1.4 synopsis: Grouped lists. Equal consecutive elements are grouped. description: Grouped lists work like regular lists, except for two conditions:
test/examples.hs view
@@ -62,3 +62,5 @@ =: [3,3,2,3] runIdentity (fmap snd $ GL.traverseGroupedByGroupAccum (\acc g -> Identity (acc+1, GL.map (+acc) $ GL.fromGroup g)) 0 [1,2,3,3,4]) =: [1,3,5,5,7]+ length ([1,2,2,3,4,4,4,5] :: Grouped Int)+ =: 8
test/properties.hs view
@@ -33,6 +33,7 @@ [ prop "left mempty" $ \(G xs) -> GL.empty <> xs == xs , prop "right mempty" $ \(G xs) -> xs <> GL.empty == xs , prop "mappend" $ \(G xs) (G ys) (G zs) -> (xs <> ys) <> zs == xs <> (ys <> zs)+ , prop "mappend length" $ \(G xs) (G ys) -> length xs + length ys == length (xs <> ys) , prop "index" $ \(G xs) -> let n = GL.length xs in (\i ->