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 2025-03-17 22:19:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-lens (Old) and /work/SRC/openSUSE:Factory/.ghc-lens.new.19136 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-lens" Mon Mar 17 22:19:00 2025 rev:31 rq:1253817 version:5.3.4 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-lens/ghc-lens.changes 2025-01-05 15:32:26.640693210 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-lens.new.19136/ghc-lens.changes 2025-03-17 22:22:59.808026338 +0100 @@ -1,0 +2,14 @@ +Mon Mar 3 12:24:55 UTC 2025 - Peter Simons <[email protected]> + +- Update lens to version 5.3.4. + 5.3.4 [2025.03.03] + ------------------ + * Reduce the arity of `foldr1Of`, `foldl1Of`, `foldrOf'`, `foldlOf'`, + `foldr1Of'`, `foldl1Of'`, `foldrMOf`, and `foldlMOf` so that GHC is more + eager to inline them. On a simple benchmark involving `sumOf` (defined in + terms of `foldlOf'`), this improves performance by 8x. + * Add `Ixed`, `Cons`, `Each`, `AsEmpty`, `Reversing`, and `Rewrapped` instances + for strict boxed vectors when building with `vector-0.13.2` or later. + * Add an `AsEmpty` instance for primitive `Vector`s. + +------------------------------------------------------------------- Old: ---- lens-5.3.3.tar.gz New: ---- lens-5.3.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-lens.spec ++++++ --- /var/tmp/diff_new_pack.v2Bgxy/_old 2025-03-17 22:23:00.248044752 +0100 +++ /var/tmp/diff_new_pack.v2Bgxy/_new 2025-03-17 22:23:00.252044919 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-lens # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 5.3.3 +Version: 5.3.4 Release: 0 Summary: Lenses, Folds and Traversals License: BSD-2-Clause ++++++ lens-5.3.3.tar.gz -> lens-5.3.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/CHANGELOG.markdown new/lens-5.3.4/CHANGELOG.markdown --- old/lens-5.3.3/CHANGELOG.markdown 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/CHANGELOG.markdown 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,13 @@ +5.3.4 [2025.03.03] +------------------ +* Reduce the arity of `foldr1Of`, `foldl1Of`, `foldrOf'`, `foldlOf'`, + `foldr1Of'`, `foldl1Of'`, `foldrMOf`, and `foldlMOf` so that GHC is more + eager to inline them. On a simple benchmark involving `sumOf` (defined in + terms of `foldlOf'`), this improves performance by 8x. +* Add `Ixed`, `Cons`, `Each`, `AsEmpty`, `Reversing`, and `Rewrapped` instances + for strict boxed vectors when building with `vector-0.13.2` or later. +* Add an `AsEmpty` instance for primitive `Vector`s. + 5.3.3 [2024.12.28] ------------------ * Add `makeFieldsId`, which generates overloaded field accessors using the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/benchmarks/folds.hs new/lens-5.3.4/benchmarks/folds.hs --- old/lens-5.3.3/benchmarks/folds.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/benchmarks/folds.hs 2001-09-09 03:46:40.000000000 +0200 @@ -31,6 +31,10 @@ [ bench "native" $ nf (V.toList . V.indexed) v , bench "itraversed" $ nf (itoListOf itraversed) v ] + , bgroup "sum" + [ bench "native" $ whnf V.sum v + , bench "each" $ whnf (sumOf each) v + ] ] , bgroup "unboxed-vector" [ bgroup "toList" @@ -41,6 +45,10 @@ [ bench "native" $ nf (U.toList . U.indexed) u , bench "vTraverse" $ nf (itoListOf vectorTraverse) u ] + , bgroup "sum" + [ bench "native" $ whnf U.sum u + , bench "each" $ whnf (sumOf each) u + ] ] , bgroup "sequence" [ bgroup "toList" @@ -72,6 +80,10 @@ [ bench "native" $ nf (zip [(0::Int)..]) l , bench "itraversed" $ nf (itoListOf itraversed) l ] + , bgroup "sum" + [ bench "native" $ whnf sum l + , bench "each" $ whnf (sumOf each) l + ] ] , bgroup "map" [ bgroup "toList" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/cabal.project new/lens-5.3.4/cabal.project --- old/lens-5.3.3/cabal.project 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/cabal.project 2001-09-09 03:46:40.000000000 +0200 @@ -1,17 +1,3 @@ packages: . ./examples ./lens-properties - --- TODO: Remove this once the ecosystem has caught up with GHC 9.12 -allow-newer: - aeson:ghc-prim, - aeson:template-haskell, - binary-orphans:base, - boring:base, - indexed-traversable:base, - indexed-traversable-instances:base, - integer-conversion:base, - microstache:base, - semialign:base, - these:base, - uuid-types:template-haskell diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/examples/lens-examples.cabal new/lens-5.3.4/examples/lens-examples.cabal --- old/lens-5.3.3/examples/lens-examples.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/examples/lens-examples.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -26,7 +26,7 @@ , GHC == 9.2.8 , GHC == 9.4.8 , GHC == 9.6.6 - , GHC == 9.8.2 + , GHC == 9.8.4 , GHC == 9.10.1 , GHC == 9.12.1 @@ -58,11 +58,11 @@ build-depends: base >= 4.5 && < 5, - containers >= 0.4 && < 0.8, + containers >= 0.4 && < 0.9, gloss >= 1.12 && < 1.14, lens, mtl >= 2.0.1 && < 2.4, - random >= 1.0 && < 1.3, + random >= 1.0 && < 1.4, streams >= 3.3 && < 4 main-is: Pong.hs default-language: Haskell2010 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/lens-properties/lens-properties.cabal new/lens-5.3.4/lens-properties/lens-properties.cabal --- old/lens-5.3.3/lens-properties/lens-properties.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/lens-properties/lens-properties.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -23,7 +23,7 @@ , GHC == 9.2.8 , GHC == 9.4.8 , GHC == 9.6.6 - , GHC == 9.8.2 + , GHC == 9.8.4 , GHC == 9.10.1 , GHC == 9.12.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/lens.cabal new/lens-5.3.4/lens.cabal --- old/lens-5.3.3/lens.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/lens.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ name: lens category: Data, Lenses, Generics -version: 5.3.3 +version: 5.3.4 license: BSD2 cabal-version: 1.18 license-file: LICENSE @@ -22,7 +22,7 @@ , GHC == 9.2.8 , GHC == 9.4.8 , GHC == 9.6.6 - , GHC == 9.8.2 + , GHC == 9.8.4 , GHC == 9.10.1 , GHC == 9.12.1 synopsis: Lenses, Folds and Traversals @@ -183,7 +183,7 @@ bytestring >= 0.10.4.0 && < 0.13, call-stack >= 0.1 && < 0.5, comonad >= 5.0.7 && < 6, - containers >= 0.5.5.1 && < 0.8, + containers >= 0.5.5.1 && < 0.9, contravariant >= 1.4 && < 2, distributive >= 0.5.1 && < 1, exceptions >= 0.8.2.1 && < 1, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/src/Control/Exception/Lens.hs new/lens-5.3.4/src/Control/Exception/Lens.hs --- old/lens-5.3.3/src/Control/Exception/Lens.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/src/Control/Exception/Lens.hs 2001-09-09 03:46:40.000000000 +0200 @@ -166,11 +166,17 @@ , Bool(..) ) --- $setup --- >>> :set -XNoOverloadedStrings --- >>> import Control.Lens --- >>> import Control.Applicative --- >>> :m + Control.Exception Control.Monad Data.List Prelude +{- +$setup +>>> :set -XNoOverloadedStrings +>>> :set -XScopedTypeVariables +>>> import Control.Lens +>>> import Control.Applicative +>>> :m + Control.Exception Control.Monad Data.List Prelude +#if MIN_VERSION_base(4,20,0) +>>> :m + Control.Exception.Context +#endif +-} ------------------------------------------------------------------------------ -- Exceptions as Prisms @@ -674,19 +680,20 @@ -- @ __AssertionFailed :: Prism' t AssertionFailed - -- | This t'Exception' contains provides information about what assertion failed in the 'String'. - -- - -- @ - -- '_AssertionFailed' :: 'Prism'' 'AssertionFailed' 'String' - -- '_AssertionFailed' :: 'Prism'' 'SomeException' 'String' - -- @ - - {- - TODO: This doctest is temporarily disabled, as it does not work properly on - GHC 9.12. See https://gitlab.haskell.org/ghc/ghc/-/issues/25610. + {- | This t'Exception' contains provides information about what assertion failed in the 'String'. + @ + '_AssertionFailed' :: 'Prism'' 'AssertionFailed' 'String' + '_AssertionFailed' :: 'Prism'' 'SomeException' 'String' + @ + +#if MIN_VERSION_base(4,20,0) + >>> handling exception (\ (ExceptionWithContext ctxt (_ :: AssertionFailed)) -> "caught" <$ guard ("<interactive>" `isInfixOf` displayExceptionContext ctxt) ) $ assert False (return "uncaught") + "caught" +#else -- >>> handling _AssertionFailed (\ xs -> "caught" <$ guard ("<interactive>" `isInfixOf` xs) ) $ assert False (return "uncaught") -- "caught" +#endif -} _AssertionFailed :: Prism' t String _AssertionFailed = __AssertionFailed._AssertionFailed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/src/Control/Lens/At.hs new/lens-5.3.4/src/Control/Lens/At.hs --- old/lens-5.3.3/src/Control/Lens/At.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/src/Control/Lens/At.hs 2001-09-09 03:46:40.000000000 +0200 @@ -85,6 +85,9 @@ import qualified Data.Vector.Storable as Storable import qualified Data.Vector.Unboxed as Unboxed import Data.Vector.Unboxed (Unbox) +#if MIN_VERSION_vector(0,13,2) +import qualified Data.Vector.Strict as VectorStrict +#endif import Data.Word import Foreign.Storable (Storable) @@ -113,6 +116,9 @@ type instance Index (Prim.Vector a) = Int type instance Index (Storable.Vector a) = Int type instance Index (Unboxed.Vector a) = Int +#if MIN_VERSION_vector(0,13,2) +type instance Index (VectorStrict.Vector a) = Int +#endif type instance Index (Complex a) = Int type instance Index (Identity a) = () type instance Index (Maybe a) = () @@ -396,6 +402,15 @@ | otherwise = pure v {-# INLINE ix #-} +#if MIN_VERSION_vector(0,13,2) +type instance IxValue (VectorStrict.Vector a) = a +instance Ixed (VectorStrict.Vector a) where + ix i f v + | 0 <= i && i < VectorStrict.length v = f (v VectorStrict.! i) <&> \a -> v VectorStrict.// [(i, a)] + | otherwise = pure v + {-# INLINE ix #-} +#endif + type instance IxValue StrictT.Text = Char instance Ixed StrictT.Text where ix e f s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/src/Control/Lens/Cons.hs new/lens-5.3.4/src/Control/Lens/Cons.hs --- old/lens-5.3.3/src/Control/Lens/Cons.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/src/Control/Lens/Cons.hs 2001-09-09 03:46:40.000000000 +0200 @@ -64,6 +64,9 @@ import qualified Data.Vector.Primitive as Prim import Data.Vector.Unboxed (Unbox) import qualified Data.Vector.Unboxed as Unbox +#if MIN_VERSION_vector(0,13,2) +import qualified Data.Vector.Strict as VectorStrict +#endif import Data.Word import Control.Applicative (ZipList(..)) import Control.Monad.State.Class as State @@ -180,6 +183,15 @@ else Right (Unbox.unsafeHead v, Unbox.unsafeTail v) {-# INLINE _Cons #-} +#if MIN_VERSION_vector(0,13,2) +instance Cons (VectorStrict.Vector a) (VectorStrict.Vector b) a b where + _Cons = prism (uncurry VectorStrict.cons) $ \v -> + if VectorStrict.null v + then Left VectorStrict.empty + else Right (VectorStrict.unsafeHead v, VectorStrict.unsafeTail v) + {-# INLINE _Cons #-} +#endif + -- | 'cons' an element onto a container. -- -- This is an infix alias for 'cons'. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/src/Control/Lens/Each.hs new/lens-5.3.4/src/Control/Lens/Each.hs --- old/lens-5.3.3/src/Control/Lens/Each.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/src/Control/Lens/Each.hs 2001-09-09 03:46:40.000000000 +0200 @@ -54,6 +54,9 @@ import qualified Data.Vector.Storable as Storable import Data.Vector.Storable (Storable) import qualified Data.Vector.Unboxed as Unboxed +#if MIN_VERSION_vector(0,13,2) +import qualified Data.Vector.Strict as VectorStrict +#endif import Data.Vector.Unboxed (Unbox) import Data.Word import qualified Data.Strict as S @@ -195,6 +198,13 @@ each = vectorTraverse {-# INLINE each #-} +#if MIN_VERSION_vector(0,13,2) +-- | @'each' :: 'Traversal' ('Vector.Vector' a) ('Vector.Vector' b) a b@ +instance Each (VectorStrict.Vector a) (VectorStrict.Vector b) a b where + each = vectorTraverse + {-# INLINE each #-} +#endif + -- | @'each' :: 'Traversal' 'StrictT.Text' 'StrictT.Text' 'Char' 'Char'@ instance (a ~ Char, b ~ Char) => Each StrictT.Text StrictT.Text a b where each = text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/src/Control/Lens/Empty.hs new/lens-5.3.4/src/Control/Lens/Empty.hs --- old/lens-5.3.3/src/Control/Lens/Empty.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/src/Control/Lens/Empty.hs 2001-09-09 03:46:40.000000000 +0200 @@ -53,6 +53,10 @@ import qualified Data.Vector.Unboxed as Unboxed import Data.Vector.Unboxed (Unbox) import qualified Data.Vector.Storable as Storable +import qualified Data.Vector.Primitive as Prim +#if MIN_VERSION_vector(0,13,2) +import qualified Data.Vector.Strict as VectorStrict +#endif import Foreign.Storable (Storable) #if !defined(mingw32_HOST_OS) && !defined(ghcjs_HOST_OS) @@ -161,10 +165,20 @@ _Empty = nearly Unboxed.empty Unboxed.null {-# INLINE _Empty #-} +instance Prim.Prim a => AsEmpty (Prim.Vector a) where + _Empty = nearly Prim.empty Prim.null + {-# INLINE _Empty #-} + instance Storable a => AsEmpty (Storable.Vector a) where _Empty = nearly Storable.empty Storable.null {-# INLINE _Empty #-} +#if MIN_VERSION_vector(0,13,2) +instance AsEmpty (VectorStrict.Vector a) where + _Empty = nearly VectorStrict.empty VectorStrict.null + {-# INLINE _Empty #-} +#endif + instance AsEmpty (Seq.Seq a) where _Empty = nearly Seq.empty Seq.null {-# INLINE _Empty #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/src/Control/Lens/Fold.hs new/lens-5.3.4/src/Control/Lens/Fold.hs --- old/lens-5.3.3/src/Control/Lens/Fold.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/src/Control/Lens/Fold.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1754,8 +1754,9 @@ -- 'foldr1Of' :: 'Traversal'' s a -> (a -> a -> a) -> s -> a -- @ foldr1Of :: HasCallStack => Getting (Endo (Maybe a)) s a -> (a -> a -> a) -> s -> a -foldr1Of l f xs = fromMaybe (error "foldr1Of: empty structure") - (foldrOf l mf Nothing xs) where +-- See: NOTE: [Inlining and arity] +foldr1Of l f = fromMaybe (error "foldr1Of: empty structure") + . foldrOf l mf Nothing where mf x my = Just $ case my of Nothing -> x Just y -> f x y @@ -1780,7 +1781,8 @@ -- 'foldl1Of' :: 'Traversal'' s a -> (a -> a -> a) -> s -> a -- @ foldl1Of :: HasCallStack => Getting (Dual (Endo (Maybe a))) s a -> (a -> a -> a) -> s -> a -foldl1Of l f xs = fromMaybe (error "foldl1Of: empty structure") (foldlOf l mf Nothing xs) where +-- See: NOTE: [Inlining and arity] +foldl1Of l f = fromMaybe (error "foldl1Of: empty structure") . foldlOf l mf Nothing where mf mx y = Just $ case mx of Nothing -> y Just x -> f x y @@ -1800,7 +1802,8 @@ -- 'foldrOf'' :: 'Traversal'' s a -> (a -> r -> r) -> r -> s -> r -- @ foldrOf' :: Getting (Dual (Endo (Endo r))) s a -> (a -> r -> r) -> r -> s -> r -foldrOf' l f z0 xs = foldlOf l f' (Endo id) xs `appEndo` z0 +-- See: NOTE: [Inlining and arity] +foldrOf' l f z0 = \xs -> foldlOf l f' (Endo id) xs `appEndo` z0 where f' (Endo k) x = Endo $ \ z -> k $! f x z {-# INLINE foldrOf' #-} @@ -1818,7 +1821,8 @@ -- 'foldlOf'' :: 'Traversal'' s a -> (r -> a -> r) -> r -> s -> r -- @ foldlOf' :: Getting (Endo (Endo r)) s a -> (r -> a -> r) -> r -> s -> r -foldlOf' l f z0 xs = foldrOf l f' (Endo id) xs `appEndo` z0 +-- See: NOTE: [Inlining and arity] +foldlOf' l f z0 = \xs -> foldrOf l f' (Endo id) xs `appEndo` z0 where f' x (Endo k) = Endo $ \z -> k $! f z x {-# INLINE foldlOf' #-} @@ -1838,7 +1842,8 @@ -- 'foldr1Of'' :: 'Traversal'' s a -> (a -> a -> a) -> s -> a -- @ foldr1Of' :: HasCallStack => Getting (Dual (Endo (Endo (Maybe a)))) s a -> (a -> a -> a) -> s -> a -foldr1Of' l f xs = fromMaybe (error "foldr1Of': empty structure") (foldrOf' l mf Nothing xs) where +-- See: NOTE: [Inlining and arity] +foldr1Of' l f = fromMaybe (error "foldr1Of': empty structure") . foldrOf' l mf Nothing where mf x Nothing = Just $! x mf x (Just y) = Just $! f x y {-# INLINE foldr1Of' #-} @@ -1859,7 +1864,8 @@ -- 'foldl1Of'' :: 'Traversal'' s a -> (a -> a -> a) -> s -> a -- @ foldl1Of' :: HasCallStack => Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> a) -> s -> a -foldl1Of' l f xs = fromMaybe (error "foldl1Of': empty structure") (foldlOf' l mf Nothing xs) where +-- See: NOTE: [Inlining and arity] +foldl1Of' l f = fromMaybe (error "foldl1Of': empty structure") . foldlOf' l mf Nothing where mf Nothing y = Just $! y mf (Just x) y = Just $! f x y {-# INLINE foldl1Of' #-} @@ -1881,7 +1887,8 @@ foldrMOf :: Monad m => Getting (Dual (Endo (r -> m r))) s a -> (a -> r -> m r) -> r -> s -> m r -foldrMOf l f z0 xs = foldlOf l f' return xs z0 +-- See: NOTE: [Inlining and arity] +foldrMOf l f z0 = \xs -> foldlOf l f' return xs z0 where f' k x z = f x z >>= k {-# INLINE foldrMOf #-} @@ -1902,10 +1909,26 @@ foldlMOf :: Monad m => Getting (Endo (r -> m r)) s a -> (r -> a -> m r) -> r -> s -> m r -foldlMOf l f z0 xs = foldrOf l f' return xs z0 +-- See: NOTE: [Inlining and arity] +foldlMOf l f z0 = \xs -> foldrOf l f' return xs z0 where f' x k z = f z x >>= k {-# INLINE foldlMOf #-} +-- NOTE: [Inlining and arity] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- +-- GHC uses the following inlining heuristic: a function body is inlined if +-- all its arguments on the LHS are applied. So the following two definitions +-- are not equivalent from the inliner's PoV: +-- +-- > foldlOf' l f z0 xs = ... +-- > foldlOf' l f z0 = \xs -> ... +-- +-- GHC will be less eager to inline the first one and this results in +-- worse code. For example, a simple list summation using `sumOf` will be 8x slower +-- with the first version. + + -- | Check to see if this 'Fold' or 'Traversal' matches 1 or more entries. -- -- >>> has (element 0) [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/src/Control/Lens/Internal/Iso.hs new/lens-5.3.4/src/Control/Lens/Internal/Iso.hs --- old/lens-5.3.3/src/Control/Lens/Internal/Iso.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/src/Control/Lens/Internal/Iso.hs 2001-09-09 03:46:40.000000000 +0200 @@ -33,6 +33,9 @@ import qualified Data.Vector.Storable as Storable import qualified Data.Vector.Unboxed as Unbox import Data.Vector.Unboxed (Unbox) +#if MIN_VERSION_vector(0,13,2) +import qualified Data.Vector.Strict as VectorStrict +#endif import qualified Data.Sequence as Seq import Data.Sequence (Seq) import Foreign.Storable (Storable) @@ -100,3 +103,8 @@ instance Storable a => Reversing (Storable.Vector a) where reversing = Storable.reverse + +#if MIN_VERSION_vector(0,13,2) +instance Reversing (VectorStrict.Vector a) where + reversing = VectorStrict.reverse +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lens-5.3.3/src/Control/Lens/Wrapped.hs new/lens-5.3.4/src/Control/Lens/Wrapped.hs --- old/lens-5.3.3/src/Control/Lens/Wrapped.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/lens-5.3.4/src/Control/Lens/Wrapped.hs 2001-09-09 03:46:40.000000000 +0200 @@ -150,6 +150,9 @@ import Data.Set (Set) import Data.Tagged import qualified Data.Vector as Vector +#if MIN_VERSION_vector(0,13,2) +import qualified Data.Vector.Strict as VectorStrict +#endif import qualified Data.Vector.Primitive as Prim import Data.Vector.Primitive (Prim) import qualified Data.Vector.Unboxed as Unboxed @@ -676,6 +679,14 @@ _Wrapped' = iso Storable.toList Storable.fromList {-# INLINE _Wrapped' #-} +#if MIN_VERSION_vector(0,13,2) +instance (t ~ Vector.Vector a') => Rewrapped (VectorStrict.Vector a) t +instance Wrapped (VectorStrict.Vector a) where + type Unwrapped (VectorStrict.Vector a) = [a] + _Wrapped' = iso VectorStrict.toList VectorStrict.fromList + {-# INLINE _Wrapped' #-} +#endif + -- * semigroupoids instance (t ~ WrappedApplicative f' a') => Rewrapped (WrappedApplicative f a) t @@ -873,7 +884,11 @@ #endif getErrorCall :: ErrorCall -> String +#if MIN_VERSION_base(4,21,0) +getErrorCall (ErrorCall x) = x +#else getErrorCall (ErrorCallWithLocation x _) = x +#endif {-# INLINE getErrorCall #-} getRecUpdError :: RecUpdError -> String
