hw-aeson 0.1.5.0 → 0.1.6.0
raw patch · 2 files changed
+22/−3 lines, 2 filesdep ~text-shortPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: text-short
API changes (from Hackage documentation)
+ HaskellWorks.Data.Aeson.Compat.Map: fromHashMapText :: HashMap Text a -> KeyMap a
+ HaskellWorks.Data.Aeson.Compat.Map: toHashMapText :: KeyMap a -> HashMap Text a
Files
hw-aeson.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.2 name: hw-aeson-version: 0.1.5.0+version: 0.1.6.0 synopsis: Convenience functions for Aeson description: Convenience functions for Aeson. category: Data, JSON@@ -29,7 +29,7 @@ common hedgehog { build-depends: hedgehog >= 0.6 && < 1.3 } common hspec { build-depends: hspec >= 2.4 && < 3 } common text { build-depends: text >= 1.2 && < 1.3 }-common text-short { build-depends: text-short >= 0.1.5 && < 0.2 }+common text-short { build-depends: text-short >= 0.1.3 && < 0.2 } common unordered-containers { build-depends: unordered-containers >= 0.2 && < 0.3 } common config
src/HaskellWorks/Data/Aeson/Compat/Map.hs view
@@ -4,15 +4,19 @@ ( module JM , KeyMap(..) , foldlWithKey'+ , fromHashMapText+ , toHashMapText ) where import qualified Data.Map as M import qualified HaskellWorks.Data.Aeson.Compat as J +import Data.HashMap.Strict (HashMap) import Data.Text (Text) #if MIN_VERSION_aeson(2,0,0)-import Data.Aeson.KeyMap as JM+import qualified Data.Aeson.KeyMap as JM+import Data.Aeson.KeyMap (KeyMap) #else import qualified Data.HashMap.Strict as JM import Data.HashMap.Strict hiding (foldlWithKey')@@ -29,3 +33,18 @@ foldlWithKey'= JM.foldlWithKey' #endif +#if MIN_VERSION_aeson(2,0,0)+fromHashMapText :: HashMap Text a -> KeyMap a+fromHashMapText = JM.fromHashMapText+#else+fromHashMapText :: HashMap Text a -> HashMap Text a+fromHashMapText = id+#endif++#if MIN_VERSION_aeson(2,0,0)+toHashMapText :: KeyMap a -> HashMap Text a+toHashMapText = JM.toHashMapText+#else+toHashMapText :: HashMap Text a -> HashMap Text a+toHashMapText = id+#endif