classy-prelude 0.4.1 → 0.4.2
raw patch · 4 files changed
+10/−2 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ClassyPrelude/HashSet.hs +3/−0
- ClassyPrelude/Set.hs +3/−0
- classy-prelude.cabal +1/−1
- test/main.hs +3/−1
ClassyPrelude/HashSet.hs view
@@ -33,3 +33,6 @@ instance CanFoldFunc (Set a) a accum where foldFunc = Set.foldl'++instance (Eq a, Hashable a) => CanMapM_Func (HashSet a) a where+ mapM_Func f = Prelude.mapM_ f . unpack
ClassyPrelude/Set.hs view
@@ -30,3 +30,6 @@ instance CanFoldFunc (Set a) a accum where foldFunc = Set.foldl'++instance Prelude.Ord a => CanMapM_Func (Set a) a where+ mapM_Func f = Prelude.mapM_ f . unpack
classy-prelude.cabal view
@@ -1,5 +1,5 @@ name: classy-prelude-version: 0.4.1+version: 0.4.2 synopsis: A typeclass-based Prelude. description: Focuses on using common typeclasses when possible, and creating new ones to avoid name clashing. Exposes many recommended datastructures (Map, ByteString, etc) directly without requiring long import lists and qualified modules. homepage: https://github.com/snoyberg/classy-prelude
test/main.hs view
@@ -146,7 +146,7 @@ mapMProps dummy = do let f :: Int -> Writer [Int] Int f x = tell [x] >> return x- prop "mapM_ f c == mapM_ f (toList c)" $ \c ->+ prop "mapM f c == mapM f (toList c)" $ \c -> runWriter (mapM f (c `asTypeOf` dummy)) == let (x, y) = runWriter (mapM f (toList c)) in (pack x, y)@@ -282,6 +282,8 @@ describe "mapM_" $ do describe "list" $ mapM_Props (undefined :: [Int]) describe "Data.Vector" $ mapM_Props (undefined :: Vector Int)+ describe "Set" $ mapM_Props (undefined :: Set Int)+ describe "HashSet" $ mapM_Props (undefined :: HashSet Int) describe "fold" $ do let f = flip (:) describe "list" $ foldProps (undefined :: [Int]) f []