commit ghc-lens for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-lens for openSUSE:Factory checked in at 2022-08-01 21:30:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-lens (Old) and /work/SRC/openSUSE:Factory/.ghc-lens.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-lens" Mon Aug 1 21:30:04 2022 rev:21 rq:987056 version:5.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-lens/ghc-lens.changes 2022-02-11 23:09:50.079019748 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-lens.new.1533/ghc-lens.changes 2022-08-01 21:30:16.741635821 +0200 @@ -1,0 +2,23 @@ +Tue Jun 21 10:42:49 UTC 2022 - Peter Simons <psimons@suse.com> + +- Update lens to version 5.1.1 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Tue May 17 12:16:51 UTC 2022 - Peter Simons <psimons@suse.com> + +- Update lens to version 5.1.1. + 5.1.1 [2022.05.17] + ------------------ + * Add `Data.HashSet.Lens.hashMap`, an `Iso` between a `HashSet a` and a + `HashMap a ()`. + * Allow building with `transformers-0.6.*` and `mtl-2.3.*`. + + Note that `lens` no longer defines `Zoom` instances for `ErrorT` or `ListT` + when building with `mtl-2.3` or later. This is because `MonadState` is a + superclass of `Zoom`, and the `MonadState` instances for `ErrorT` and `ListT` + were removed in `mtl-2.3`. Be watchful of this if you build `lens` with + `mtl-2.3` (or later) combined with an older version of `transformers` + (pre-`0.6`) that defines `ErrorT` or `ListT`. + +------------------------------------------------------------------- Old: ---- lens-5.1.tar.gz New: ---- lens-5.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-lens.spec ++++++ --- /var/tmp/diff_new_pack.Qknrb4/_old 2022-08-01 21:30:17.553638150 +0200 +++ /var/tmp/diff_new_pack.Qknrb4/_new 2022-08-01 21:30:17.561638173 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-lens # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %global pkg_name lens %bcond_with tests Name: ghc-%{pkg_name} -Version: 5.1 +Version: 5.1.1 Release: 0 Summary: Lenses, Folds and Traversals License: BSD-2-Clause ++++++ lens-5.1.tar.gz -> lens-5.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/.hlint.yaml new/lens-5.1.1/.hlint.yaml --- old/lens-5.1/.hlint.yaml 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/.hlint.yaml 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,4 @@ -- arguments: [--cpp-ansi, --cpp-include=include] +- arguments: [-XCPP, --cpp-ansi, --cpp-include=include] - ignore: {name: Reduce duplication} - ignore: {name: Redundant lambda} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/CHANGELOG.markdown new/lens-5.1.1/CHANGELOG.markdown --- old/lens-5.1/CHANGELOG.markdown 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/CHANGELOG.markdown 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,16 @@ +5.1.1 [2022.05.17] +------------------ +* Add `Data.HashSet.Lens.hashMap`, an `Iso` between a `HashSet a` and a + `HashMap a ()`. +* Allow building with `transformers-0.6.*` and `mtl-2.3.*`. + + Note that `lens` no longer defines `Zoom` instances for `ErrorT` or `ListT` + when building with `mtl-2.3` or later. This is because `MonadState` is a + superclass of `Zoom`, and the `MonadState` instances for `ErrorT` and `ListT` + were removed in `mtl-2.3`. Be watchful of this if you build `lens` with + `mtl-2.3` (or later) combined with an older version of `transformers` + (pre-`0.6`) that defines `ErrorT` or `ListT`. + 5.1 [2021.11.15] ---------------- * Allow building with GHC 9.2. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/README.markdown new/lens-5.1.1/README.markdown --- old/lens-5.1/README.markdown 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/README.markdown 2001-09-09 03:46:40.000000000 +0200 @@ -236,6 +236,6 @@ Contributions and bug reports are welcome! -Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net. +Please feel free to contact me through GitHub or on the [#haskell-lens](https://web.libera.chat/#haskell-lens) or [#haskell](https://web.libera.chat/#haskell) IRC channel on Libera Chat. -Edward Kmett diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/benchmarks/alongside.hs new/lens-5.1.1/benchmarks/alongside.hs --- old/lens-5.1/benchmarks/alongside.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/benchmarks/alongside.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,6 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Main (main) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/examples/lens-examples.cabal new/lens-5.1.1/examples/lens-examples.cabal --- old/lens-5.1/examples/lens-examples.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/examples/lens-examples.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -22,8 +22,8 @@ , GHC == 8.6.5 , GHC == 8.8.4 , GHC == 8.10.7 - , GHC == 9.0.1 - , GHC == 9.2.1 + , GHC == 9.0.2 + , GHC == 9.2.2 source-repository head type: git @@ -56,7 +56,7 @@ containers >= 0.4 && < 0.7, gloss >= 1.12 && < 1.14, lens, - mtl >= 2.0.1 && < 2.3, + mtl >= 2.0.1 && < 2.4, random >= 1.0 && < 1.2, streams >= 3.3 && < 4 main-is: Pong.hs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/lens-properties/lens-properties.cabal new/lens-5.1.1/lens-properties/lens-properties.cabal --- old/lens-5.1/lens-properties/lens-properties.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/lens-properties/lens-properties.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -19,8 +19,8 @@ , GHC == 8.6.5 , GHC == 8.8.4 , GHC == 8.10.7 - , GHC == 9.0.1 - , GHC == 9.2.1 + , GHC == 9.0.2 + , GHC == 9.2.2 extra-source-files: .hlint.yaml @@ -35,7 +35,7 @@ base >= 4.9 && < 5, lens >= 4 && < 6, QuickCheck >= 2.4 && < 2.15, - transformers >= 0.2 && < 0.6 + transformers >= 0.2 && < 0.7 exposed-modules: Control.Lens.Properties diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/lens.cabal new/lens-5.1.1/lens.cabal --- old/lens-5.1/lens.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/lens.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ name: lens category: Data, Lenses, Generics -version: 5.1 +version: 5.1.1 license: BSD2 cabal-version: 1.18 license-file: LICENSE @@ -18,8 +18,8 @@ , GHC == 8.6.5 , GHC == 8.8.4 , GHC == 8.10.7 - , GHC == 9.0.1 - , GHC == 9.2.1 + , GHC == 9.0.2 + , GHC == 9.2.2 synopsis: Lenses, Folds and Traversals description: This package comes \"Batteries Included\" with many useful lenses for the types @@ -189,7 +189,7 @@ indexed-traversable >= 0.1 && < 0.2, indexed-traversable-instances >= 0.1 && < 0.2, kan-extensions >= 5 && < 6, - mtl >= 2.2.1 && < 2.3, + mtl >= 2.2.1 && < 2.4, parallel >= 3.2.1.0 && < 3.3, profunctors >= 5.5.2 && < 6, reflection >= 2.1 && < 3, @@ -197,10 +197,10 @@ strict >= 0.4 && < 0.5, tagged >= 0.8.6 && < 1, template-haskell >= 2.11.1.0 && < 2.19, - text >= 1.2.3.0 && < 1.3, + text >= 1.2.3.0 && < 2.1, th-abstraction >= 0.4.1 && < 0.5, these >= 1.1.1.1 && < 1.2, - transformers >= 0.5.0.0 && < 0.6, + transformers >= 0.5.0.0 && < 0.7, transformers-compat >= 0.5.0.4 && < 1, unordered-containers >= 0.2.10 && < 0.3, vector >= 0.12.1.2 && < 0.13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Each.hs new/lens-5.1.1/src/Control/Lens/Each.hs --- old/lens-5.1/src/Control/Lens/Each.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Each.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DefaultSignatures #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Internal/Bazaar.hs new/lens-5.1.1/src/Control/Lens/Internal/Bazaar.hs --- old/lens-5.1/src/Control/Lens/Internal/Bazaar.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Internal/Bazaar.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE RoleAnnotations #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Internal/Context.hs new/lens-5.1.1/src/Control/Lens/Internal/Context.hs --- old/lens-5.1/src/Control/Lens/Internal/Context.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Internal/Context.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,6 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Internal/Indexed.hs new/lens-5.1.1/src/Control/Lens/Internal/Indexed.hs --- old/lens-5.1/src/Control/Lens/Internal/Indexed.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Internal/Indexed.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Internal/Magma.hs new/lens-5.1.1/src/Control/Lens/Internal/Magma.hs --- old/lens-5.1/src/Control/Lens/Internal/Magma.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Internal/Magma.hs 2001-09-09 03:46:40.000000000 +0200 @@ -5,6 +5,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RoleAnnotations #-} ----------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Internal/PrismTH.hs new/lens-5.1.1/src/Control/Lens/Internal/PrismTH.hs --- old/lens-5.1/src/Control/Lens/Internal/PrismTH.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Internal/PrismTH.hs 2001-09-09 03:46:40.000000000 +0200 @@ -513,7 +513,7 @@ -- | Compute a prism's name with a special case for when the type -- constructor matches one of the value constructors. -- --- The overlapping flag wil be 'True' in the event that: +-- The overlapping flag will be 'True' in the event that: -- -- 1. We are generating the name of a classy prism for a -- data type, and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Traversal.hs new/lens-5.1.1/src/Control/Lens/Traversal.hs --- old/lens-5.1/src/Control/Lens/Traversal.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Traversal.hs 2001-09-09 03:46:40.000000000 +0200 @@ -302,8 +302,8 @@ -- Note that the 'traversal' function actually just returns the same function you pass to -- it. The function it accepts is in fact a valid traversal all on its own! The use of -- 'traversal' does nothing except verify that the function it is passed matches the signature --- of a valid traversal. One could remove the @traversal@ cominator from either of the last --- two examples and use the definiton of @go@ directly with no change in behaviour. +-- of a valid traversal. One could remove the @traversal@ combinator from either of the last +-- two examples and use the definition of @go@ directly with no change in behaviour. -- -- This function exists for consistency with the 'lens', 'prism' and 'iso' constructors -- as well as to serve as a touchpoint for beginners who wish to construct their own diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Type.hs new/lens-5.1.1/src/Control/Lens/Type.hs --- old/lens-5.1/src/Control/Lens/Type.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Type.hs 2001-09-09 03:46:40.000000000 +0200 @@ -201,6 +201,11 @@ -- @ type Traversal' s a = Traversal s s a a +-- | A 'Traversal' which targets at least one element. +-- +-- Note that since 'Apply' is not a superclass of 'Applicative', a 'Traversal1' +-- cannot always be used in place of a 'Traversal'. In such circumstances +-- 'Control.Lens.Traversal.cloneTraversal' will convert a 'Traversal1' into a 'Traversal'. type Traversal1 s t a b = forall f. Apply f => (a -> f b) -> s -> f t type Traversal1' s a = Traversal1 s s a a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Wrapped.hs new/lens-5.1.1/src/Control/Lens/Wrapped.hs --- old/lens-5.1/src/Control/Lens/Wrapped.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Wrapped.hs 2001-09-09 03:46:40.000000000 +0200 @@ -15,7 +15,9 @@ {-# LANGUAGE Trustworthy #-} #endif +#if !(MIN_VERSION_base(4,16,0)) || !MIN_VERSION_transformers(0,6,0) {-# OPTIONS_GHC -Wno-warnings-deprecations #-} +#endif #include "lens-common.h" @@ -88,12 +90,10 @@ import Control.Lens.Review import Control.Monad.Catch.Pure import Control.Monad.Trans.Cont -import Control.Monad.Trans.Error import Control.Monad.Trans.Except import Control.Monad.Trans.Free import Control.Monad.Trans.Identity import Control.Monad.Trans.Iter -import Control.Monad.Trans.List import Control.Monad.Trans.Maybe import Control.Monad.Trans.Reader import qualified Control.Monad.Trans.RWS.Lazy as Lazy @@ -102,6 +102,10 @@ import qualified Control.Monad.Trans.State.Strict as Strict import qualified Control.Monad.Trans.Writer.Lazy as Lazy import qualified Control.Monad.Trans.Writer.Strict as Strict +#if !MIN_VERSION_transformers(0,6,0) +import Control.Monad.Trans.Error +import Control.Monad.Trans.List +#endif import Data.Bifunctor.Biff import Data.Bifunctor.Clown import Data.Bifunctor.Fix @@ -372,12 +376,6 @@ type Unwrapped (ContT r m a) = (a -> m r) -> m r _Wrapped' = iso runContT ContT -instance (t ~ ErrorT e' m' a') => Rewrapped (ErrorT e m a) t -instance Wrapped (ErrorT e m a) where - type Unwrapped (ErrorT e m a) = m (Either e a) - _Wrapped' = iso runErrorT ErrorT - {-# INLINE _Wrapped' #-} - instance (t ~ ExceptT e' m' a') => Rewrapped (ExceptT e m a) t instance Wrapped (ExceptT e m a) where type Unwrapped (ExceptT e m a) = m (Either e a) @@ -396,12 +394,6 @@ _Wrapped' = iso runIdentityT IdentityT {-# INLINE _Wrapped' #-} -instance (t ~ ListT n b) => Rewrapped (ListT m a) t -instance Wrapped (ListT m a) where - type Unwrapped (ListT m a) = m [a] - _Wrapped' = iso runListT ListT - {-# INLINE _Wrapped' #-} - instance (t ~ MaybeT n b) => Rewrapped (MaybeT m a) t instance Wrapped (MaybeT m a) where type Unwrapped (MaybeT m a) = m (Maybe a) @@ -456,6 +448,20 @@ _Wrapped' = iso Strict.runWriterT Strict.WriterT {-# INLINE _Wrapped' #-} +#if !MIN_VERSION_transformers(0,6,0) +instance (t ~ ErrorT e' m' a') => Rewrapped (ErrorT e m a) t +instance Wrapped (ErrorT e m a) where + type Unwrapped (ErrorT e m a) = m (Either e a) + _Wrapped' = iso runErrorT ErrorT + {-# INLINE _Wrapped' #-} + +instance (t ~ ListT n b) => Rewrapped (ListT m a) t +instance Wrapped (ListT m a) where + type Unwrapped (ListT m a) = m [a] + _Wrapped' = iso runListT ListT + {-# INLINE _Wrapped' #-} +#endif + -- * bifunctors instance (t ~ Biff p' f' g' a' b') => Rewrapped (Biff p f g a b) t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Control/Lens/Zoom.hs new/lens-5.1.1/src/Control/Lens/Zoom.hs --- old/lens-5.1/src/Control/Lens/Zoom.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Control/Lens/Zoom.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,13 +1,17 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE RankNTypes #-} -{-# OPTIONS_GHC -Wno-warnings-deprecations #-} {-# LANGUAGE Trustworthy #-} +#if !MIN_VERSION_transformers(0,6,0) +{-# OPTIONS_GHC -Wno-warnings-deprecations #-} +#endif + #include "lens-common.h" ------------------------------------------------------------------------------- @@ -42,12 +46,14 @@ import Control.Monad.Trans.Writer.Strict as Strict import Control.Monad.Trans.RWS.Lazy as Lazy import Control.Monad.Trans.RWS.Strict as Strict -import Control.Monad.Trans.Error import Control.Monad.Trans.Except -import Control.Monad.Trans.List import Control.Monad.Trans.Identity import Control.Monad.Trans.Maybe import Control.Monad.Trans.Free +#if !MIN_VERSION_transformers(0,6,0) +import Control.Monad.Trans.Error +import Control.Monad.Trans.List +#endif import Data.Kind -- $setup @@ -78,11 +84,13 @@ type instance Zoomed (Lazy.RWST r w s z) = FocusingWith w z type instance Zoomed (Strict.WriterT w m) = FocusingPlus w (Zoomed m) type instance Zoomed (Lazy.WriterT w m) = FocusingPlus w (Zoomed m) -type instance Zoomed (ListT m) = FocusingOn [] (Zoomed m) type instance Zoomed (MaybeT m) = FocusingMay (Zoomed m) -type instance Zoomed (ErrorT e m) = FocusingErr e (Zoomed m) type instance Zoomed (ExceptT e m) = FocusingErr e (Zoomed m) type instance Zoomed (FreeT f m) = FocusingFree f m (Zoomed m) +#if !MIN_VERSION_transformers(0,6,0) +type instance Zoomed (ErrorT e m) = FocusingErr e (Zoomed m) +type instance Zoomed (ListT m) = FocusingOn [] (Zoomed m) +#endif ------------------------------------------------------------------------------ -- Magnified @@ -174,18 +182,10 @@ zoom l = Lazy.WriterT . zoom (\afb -> unfocusingPlus #. l (FocusingPlus #. afb)) . Lazy.runWriterT {-# INLINE zoom #-} -instance Zoom m n s t => Zoom (ListT m) (ListT n) s t where - zoom l = ListT . zoom (\afb -> unfocusingOn . l (FocusingOn . afb)) . runListT - {-# INLINE zoom #-} - instance Zoom m n s t => Zoom (MaybeT m) (MaybeT n) s t where zoom l = MaybeT . liftM getMay . zoom (\afb -> unfocusingMay #. l (FocusingMay #. afb)) . liftM May . runMaybeT {-# INLINE zoom #-} -instance (Error e, Zoom m n s t) => Zoom (ErrorT e m) (ErrorT e n) s t where - zoom l = ErrorT . liftM getErr . zoom (\afb -> unfocusingErr #. l (FocusingErr #. afb)) . liftM Err . runErrorT - {-# INLINE zoom #-} - instance Zoom m n s t => Zoom (ExceptT e m) (ExceptT e n) s t where zoom l = ExceptT . liftM getErr . zoom (\afb -> unfocusingErr #. l (FocusingErr #. afb)) . liftM Err . runExceptT {-# INLINE zoom #-} @@ -193,6 +193,16 @@ instance (Functor f, Zoom m n s t) => Zoom (FreeT f m) (FreeT f n) s t where zoom l = FreeT . liftM (fmap (zoom l) . getFreed) . zoom (\afb -> unfocusingFree #. l (FocusingFree #. afb)) . liftM Freed . runFreeT +#if !MIN_VERSION_transformers(0,6,0) && !MIN_VERSION_mtl(2,3,0) +instance (Error e, Zoom m n s t) => Zoom (ErrorT e m) (ErrorT e n) s t where + zoom l = ErrorT . liftM getErr . zoom (\afb -> unfocusingErr #. l (FocusingErr #. afb)) . liftM Err . runErrorT + {-# INLINE zoom #-} + +instance Zoom m n s t => Zoom (ListT m) (ListT n) s t where + zoom l = ListT . zoom (\afb -> unfocusingOn . l (FocusingOn . afb)) . runListT + {-# INLINE zoom #-} +#endif + ------------------------------------------------------------------------------ -- Magnify ------------------------------------------------------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/src/Data/HashSet/Lens.hs new/lens-5.1.1/src/Data/HashSet/Lens.hs --- old/lens-5.1/src/Data/HashSet/Lens.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/src/Data/HashSet/Lens.hs 2001-09-09 03:46:40.000000000 +0200 @@ -12,13 +12,16 @@ module Data.HashSet.Lens ( setmapped , setOf + , hashMap ) where import Control.Lens.Getter (Getting, views) +import Control.Lens.Iso (iso) import Control.Lens.Setter (setting) import Control.Lens.Type import qualified Data.HashSet as HashSet -import Data.HashSet (HashSet) +import Data.HashSet (HashSet, fromMap, toMap) +import Data.HashMap.Lazy (HashMap) import Data.Hashable -- $setup @@ -46,3 +49,7 @@ setOf :: Hashable a => Getting (HashSet a) s a -> s -> HashSet a setOf l = views l HashSet.singleton {-# INLINE setOf #-} + +-- | An `Iso` between a `HashSet` and a `HashMap` with unit values. \(\mathcal{O}(1)\). +hashMap :: Iso' (HashSet a) (HashMap a ()) +hashMap = iso toMap fromMap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/tests/T917.hs new/lens-5.1.1/tests/T917.hs --- old/lens-5.1/tests/T917.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/tests/T917.hs 2001-09-09 03:46:40.000000000 +0200 @@ -5,6 +5,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} #if __GLASGOW_HASKELL__ < 806 {-# LANGUAGE TypeInType #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.1/tests/templates.hs new/lens-5.1.1/tests/templates.hs --- old/lens-5.1/tests/templates.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.1.1/tests/templates.hs 2001-09-09 03:46:40.000000000 +0200 @@ -4,6 +4,7 @@ {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE UndecidableInstances #-} ++++++ lens.cabal ++++++ --- /var/tmp/diff_new_pack.Qknrb4/_old 2022-08-01 21:30:17.757638736 +0200 +++ /var/tmp/diff_new_pack.Qknrb4/_new 2022-08-01 21:30:17.761638747 +0200 @@ -1,6 +1,6 @@ name: lens category: Data, Lenses, Generics -version: 5.1 +version: 5.1.1 x-revision: 1 license: BSD2 cabal-version: 1.18 @@ -19,8 +19,8 @@ , GHC == 8.6.5 , GHC == 8.8.4 , GHC == 8.10.7 - , GHC == 9.0.1 - , GHC == 9.2.1 + , GHC == 9.0.2 + , GHC == 9.2.2 synopsis: Lenses, Folds and Traversals description: This package comes \"Batteries Included\" with many useful lenses for the types @@ -190,7 +190,7 @@ indexed-traversable >= 0.1 && < 0.2, indexed-traversable-instances >= 0.1 && < 0.2, kan-extensions >= 5 && < 6, - mtl >= 2.2.1 && < 2.3, + mtl >= 2.2.1 && < 2.4, parallel >= 3.2.1.0 && < 3.3, profunctors >= 5.5.2 && < 6, reflection >= 2.1 && < 3, @@ -201,10 +201,10 @@ text >= 1.2.3.0 && < 2.1, th-abstraction >= 0.4.1 && < 0.5, these >= 1.1.1.1 && < 1.2, - transformers >= 0.5.0.0 && < 0.6, + transformers >= 0.5.0.0 && < 0.7, transformers-compat >= 0.5.0.4 && < 1, unordered-containers >= 0.2.10 && < 0.3, - vector >= 0.12.1.2 && < 0.13 + vector >= 0.12.1.2 && < 0.14 -- Control.Lens as the first module, so cabal repl loads it. exposed-modules:
participants (1)
-
Source-Sync