packages feed

bcp47 0.2.0.4 → 0.2.0.5

raw patch · 4 files changed

+16/−3 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,6 +1,10 @@-## [*Unreleased*](https://github.com/freckle/bcp47/compare/bcp47-v0.2.0.4...main)+## [*Unreleased*](https://github.com/freckle/bcp47/compare/bcp47-v0.2.0.5...main)  None++## [v0.2.0.5](https://github.com/freckle/bcp47/compare/bcp47-v0.2.0.4...bcp47-v0.2.0.5)++- Fix `Semigroup` instance of `Trie` ([PR #29](https://github.com/freckle/bcp47/pull/29))  ## [v0.2.0.4](https://github.com/freckle/bcp47/compare/bcp47-v0.2.0.3...bcp47-v0.2.0.4) 
bcp47.cabal view
@@ -1,6 +1,6 @@ cabal-version:      1.12 name:               bcp47-version:            0.2.0.4+version:            0.2.0.5 license:            MIT license-file:       LICENSE copyright:          2019 Freckle Education
library/Data/BCP47/Trie/Internal.hs view
@@ -122,4 +122,4 @@  union2Using :: (Maybe a -> Maybe a -> Maybe a) -> Trie2 a -> Trie2 a -> Trie2 a union2Using f (Trie2 x xs) (Trie2 y ys) =-  Trie2 (f x y) (Map.unionWith union2 xs ys)+  Trie2 (f x y) (Map.unionWith (union2Using f) xs ys)
tests/Data/BCP47/TrieSpec.hs view
@@ -28,6 +28,15 @@       < singleton es "color"       `shouldBe` True +    describe "Semigroup instance" $ do+      it "unions top-level conflicts" $ property $ \l r ->+        lookup en (singleton en [l] <> singleton en [r])+          `shouldBe` Just ([l, r] :: [Int])++      it "unions leaf-level conflicts" $ property $ \v1 v2 -> do+        lookup enGB (singleton enGB [v1] <> singleton enGB [v2])+          `shouldBe` Just ([v1, v2] :: [Int])+     describe "mapMaybe" $ do       it "Justs are constant" $ property $ \xs ->         let