Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-lens-aeson for openSUSE:Factory 
checked in at 2021-11-11 21:36:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-lens-aeson (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-lens-aeson.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-lens-aeson"

Thu Nov 11 21:36:39 2021 rev:5 rq:930340 version:1.1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-lens-aeson/ghc-lens-aeson.changes    
2021-03-28 11:57:49.396301570 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-lens-aeson.new.1890/ghc-lens-aeson.changes  
2021-11-11 21:36:56.948911719 +0100
@@ -1,0 +2,10 @@
+Sun Oct 10 14:49:32 UTC 2021 - [email protected]
+
+- Update lens-aeson to version 1.1.2.
+  1.1.2 [2021.10.09]
+  ------------------
+  * Allow building with `aeson-2.0.0.0`.
+  * Add `Index`, `IxValue`, `Ixed`, `At`, and `Each` instances for `KeyMap` if
+    building with `aeson-2.0.0.0` or later.
+
+-------------------------------------------------------------------

Old:
----
  lens-aeson-1.1.1.tar.gz
  lens-aeson.cabal

New:
----
  lens-aeson-1.1.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-lens-aeson.spec ++++++
--- /var/tmp/diff_new_pack.YJxhNu/_old  2021-11-11 21:36:57.376912031 +0100
+++ /var/tmp/diff_new_pack.YJxhNu/_new  2021-11-11 21:36:57.376912031 +0100
@@ -18,13 +18,12 @@
 
 %global pkg_name lens-aeson
 Name:           ghc-%{pkg_name}
-Version:        1.1.1
+Version:        1.1.2
 Release:        0
 Summary:        Law-abiding lenses for aeson
 License:        MIT
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
 BuildRequires:  ghc-attoparsec-devel
@@ -52,7 +51,6 @@
 
 %prep
 %autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ lens-aeson-1.1.1.tar.gz -> lens-aeson-1.1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lens-aeson-1.1.1/CHANGELOG.markdown 
new/lens-aeson-1.1.2/CHANGELOG.markdown
--- old/lens-aeson-1.1.1/CHANGELOG.markdown     2001-09-09 03:46:40.000000000 
+0200
+++ new/lens-aeson-1.1.2/CHANGELOG.markdown     2001-09-09 03:46:40.000000000 
+0200
@@ -1,3 +1,9 @@
+1.1.2 [2021.10.09]
+------------------
+* Allow building with `aeson-2.0.0.0`.
+* Add `Index`, `IxValue`, `Ixed`, `At`, and `Each` instances for `KeyMap` if
+  building with `aeson-2.0.0.0` or later.
+
 1.1.1 [2021.02.17]
 ------------------
 * Allow building with `lens-5.*`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lens-aeson-1.1.1/lens-aeson.cabal 
new/lens-aeson-1.1.2/lens-aeson.cabal
--- old/lens-aeson-1.1.1/lens-aeson.cabal       2001-09-09 03:46:40.000000000 
+0200
+++ new/lens-aeson-1.1.2/lens-aeson.cabal       2001-09-09 03:46:40.000000000 
+0200
@@ -1,6 +1,6 @@
 name:          lens-aeson
 category:      Numeric
-version:       1.1.1
+version:       1.1.2
 license:       MIT
 cabal-version: >= 1.10
 license-file:  LICENSE
@@ -21,8 +21,9 @@
              , GHC == 8.2.2
              , GHC == 8.4.4
              , GHC == 8.6.5
-             , GHC == 8.8.3
-             , GHC == 8.10.1
+             , GHC == 8.8.4
+             , GHC == 8.10.4
+             , GHC == 9.0.1
 synopsis:      Law-abiding lenses for aeson
 description:   Law-abiding lenses for aeson.
 
@@ -45,9 +46,11 @@
     text                 >= 0.11.1.10 && < 1.3,
     vector               >= 0.9       && < 0.13,
     unordered-containers >= 0.2.3     && < 0.3,
-    attoparsec           >= 0.10      && < 0.14,
+    attoparsec           >= 0.10      && < 0.15,
     bytestring           >= 0.9       && < 0.12,
-    aeson                >= 0.7.0.5   && < 1.6,
+    -- TODO: Eventually, we should bump the lower version bounds to >=2 so that
+    -- we can remove some CPP in Data.Aeson.Lens. See #38.
+    aeson                >= 0.7.0.5   && < 2.1,
     scientific           >= 0.3.2     && < 0.4
 
   exposed-modules:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lens-aeson-1.1.1/src/Data/Aeson/Lens.hs 
new/lens-aeson-1.1.2/src/Data/Aeson/Lens.hs
--- old/lens-aeson-1.1.1/src/Data/Aeson/Lens.hs 2001-09-09 03:46:40.000000000 
+0200
+++ new/lens-aeson-1.1.2/src/Data/Aeson/Lens.hs 2001-09-09 03:46:40.000000000 
+0200
@@ -73,6 +73,11 @@
 import Data.Vector (Vector)
 import Prelude hiding (null)
 
+#if MIN_VERSION_aeson(2,0,0)
+import qualified Data.Aeson.Key    as Key
+import qualified Data.Aeson.KeyMap as KM
+#endif
+
 -- $setup
 -- >>> import Control.Lens
 -- >>> import Data.Aeson
@@ -296,7 +301,15 @@
   -- >>> _Object._Wrapped # [("key" :: Text, _String # "value")] :: String
   -- "{\"key\":\"value\"}"
   _Object :: Prism' t (HashMap Text Value)
-  _Object = _Value.prism Object (\v -> case v of Object o -> Right o; _ -> 
Left v)
+  _Object = _Value.prism (Object . fwd) (\v -> case v of Object o -> Right 
(bwd o); _ -> Left v)
+    where
+#if MIN_VERSION_aeson(2,0,0)
+      fwd = KM.fromHashMapText
+      bwd = KM.toHashMapText
+#else
+      fwd = id
+      bwd = id
+#endif
   {-# INLINE _Object #-}
 
   -- |
@@ -472,7 +485,14 @@
 
 type instance IxValue Value = Value
 instance Ixed Value where
-  ix i f (Object o) = Object <$> ix i f o
+  ix i f (Object o) = Object <$> ix (toKey i) f o
+    where
+#if MIN_VERSION_aeson(2,0,0)
+      toKey :: Text -> Key.Key
+      toKey = Key.fromText
+#else
+      toKey = id
+#endif
   ix _ _ v          = pure v
   {-# INLINE ix #-}
 
@@ -482,6 +502,21 @@
   plate _ xs = pure xs
   {-# INLINE plate #-}
 
+#if MIN_VERSION_aeson(2,0,0)
+type instance Index (KM.KeyMap v) = Key.Key
+type instance IxValue (KM.KeyMap v) = v
+
+instance Ixed (KM.KeyMap v)
+
+instance At (KM.KeyMap v) where
+  at k f = KM.alterF f k
+  {-# INLINE at #-}
+
+instance Each (KM.KeyMap a) (KM.KeyMap b) a b where
+  each = traversed
+  {-# INLINE each #-}
+#endif
+
 ------------------------------------------------------------------------------
 -- Pattern Synonyms
 ------------------------------------------------------------------------------

Reply via email to