From a9834edddb5f3518334f69480ec622a545c2fba35650ed92027f0e81dac47be2 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 2 Feb 2023 13:42:06 +0000 Subject: [PATCH] osc copypac from project:devel:languages:haskell:ghc-9.4.x package:ghc-lens revision:3, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-lens?expand=0&rev=52 --- ghc-lens.changes | 25 +++ ghc-lens.spec | 4 +- lens-5.1.1.tar.gz | 3 - lens-5.2.tar.gz | 3 + lens.cabal | 480 ---------------------------------------------- 5 files changed, 29 insertions(+), 486 deletions(-) delete mode 100644 lens-5.1.1.tar.gz create mode 100644 lens-5.2.tar.gz delete mode 100644 lens.cabal diff --git a/ghc-lens.changes b/ghc-lens.changes index b61d3dc..46bd3f5 100644 --- a/ghc-lens.changes +++ b/ghc-lens.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Thu Aug 11 23:16:59 UTC 2022 - Peter Simons + +- Update lens to version 5.2. + 5.2 [2022.08.11] + ---------------- + * Allow building with GHC 9.4. + * The type of `universeOf` has changed: + + ```diff + -universeOf :: Getting [a] a a -> a -> [a] + +universeOf :: Getting (Endo [a]) a a -> a -> [a] + ``` + + In many cases, using `Endo [a]` over `[a]` improves performance. Most call + sites to `universeOf` will not be affected by this change, although you may + need to update your code if you define your own combinators in terms of + `universeOf`. + * Allow `makeWrapped` to accept the names of data constructors. This way, + `makeWrapped` can be used with data family instances, much like other + functions in `Control.Lens.TH`. + * Define `_OpaqueP`, `_DefaultD`, `_LamCasesE`, `_PromotedInfixT`, and + `_PromotedUInfixT` in `Language.Haskell.TH.Lens` when building with + `template-haskell-2.19.0.0` (GHC 9.4) or later. + ------------------------------------------------------------------- Tue Jun 21 10:42:49 UTC 2022 - Peter Simons diff --git a/ghc-lens.spec b/ghc-lens.spec index e40c4e5..bf1089a 100644 --- a/ghc-lens.spec +++ b/ghc-lens.spec @@ -19,13 +19,12 @@ %global pkg_name lens %bcond_with tests Name: ghc-%{pkg_name} -Version: 5.1.1 +Version: 5.2 Release: 0 Summary: Lenses, Folds and Traversals License: BSD-2-Clause 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-array-devel BuildRequires: ghc-assoc-devel @@ -167,7 +166,6 @@ This package provides the Haskell %{pkg_name} library development files. %prep %autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build diff --git a/lens-5.1.1.tar.gz b/lens-5.1.1.tar.gz deleted file mode 100644 index 8807897..0000000 --- a/lens-5.1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc4e99fc5d989e98ab0df7577183fe9ad5d74c63a44dc2607abcc22daba8b322 -size 697888 diff --git a/lens-5.2.tar.gz b/lens-5.2.tar.gz new file mode 100644 index 0000000..6212ad8 --- /dev/null +++ b/lens-5.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b33e2ebede468d9e8acb79d20bb5a5947fc3bec13cc39b122aa131c5e6dcd188 +size 698333 diff --git a/lens.cabal b/lens.cabal deleted file mode 100644 index 7556e8e..0000000 --- a/lens.cabal +++ /dev/null @@ -1,480 +0,0 @@ -name: lens -category: Data, Lenses, Generics -version: 5.1.1 -x-revision: 1 -license: BSD2 -cabal-version: 1.18 -license-file: LICENSE -author: Edward A. Kmett -maintainer: Edward A. Kmett -stability: provisional -homepage: http://github.com/ekmett/lens/ -bug-reports: http://github.com/ekmett/lens/issues -copyright: Copyright (C) 2012-2016 Edward A. Kmett -build-type: Simple --- build-tools: cpphs -tested-with: GHC == 8.0.2 - , GHC == 8.2.2 - , GHC == 8.4.4 - , GHC == 8.6.5 - , GHC == 8.8.4 - , GHC == 8.10.7 - , 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 - commonly used from the Haskell Platform, and with tools for automatically - generating lenses and isomorphisms for user-supplied data types. - . - The combinators in @Control.Lens@ provide a highly generic toolbox for composing - families of getters, folds, isomorphisms, traversals, setters and lenses and their - indexed variants. - . - An overview, with a large number of examples can be found in the . - . - An introductory video on the style of code used in this library by Simon Peyton Jones is available from . - . - A video on how to use lenses and how they are constructed is available on . - . - Slides for that second talk can be obtained from . - . - More information on the care and feeding of lenses, including a brief tutorial and motivation - for their types can be found on the . - . - A small game of @pong@ and other more complex examples that manage their state using lenses can be found in the . - . - /Lenses, Folds and Traversals/ - . - With some signatures simplified, the core of the hierarchy of lens-like constructions looks like: - . - . - <> - . - - . - You can compose any two elements of the hierarchy above using @(.)@ from the @Prelude@, and you can - use any element of the hierarchy as any type it linked to above it. - . - The result is their lowest upper bound in the hierarchy (or an error if that bound doesn't exist). - . - For instance: - . - * You can use any 'Traversal' as a 'Fold' or as a 'Setter'. - . - * The composition of a 'Traversal' and a 'Getter' yields a 'Fold'. - . - /Minimizing Dependencies/ - . - If you want to provide lenses and traversals for your own types in your own libraries, then you - can do so without incurring a dependency on this (or any other) lens package at all. - . - /e.g./ for a data type: - . - > data Foo a = Foo Int Int a - . - You can define lenses such as - . - > -- bar :: Lens' (Foo a) Int - > bar :: Functor f => (Int -> f Int) -> Foo a -> f (Foo a) - > bar f (Foo a b c) = fmap (\a' -> Foo a' b c) (f a) - . - > -- quux :: Lens (Foo a) (Foo b) a b - > quux :: Functor f => (a -> f b) -> Foo a -> f (Foo b) - > quux f (Foo a b c) = fmap (Foo a b) (f c) - . - without the need to use any type that isn't already defined in the @Prelude@. - . - And you can define a traversal of multiple fields with 'Control.Applicative.Applicative': - . - > -- traverseBarAndBaz :: Traversal' (Foo a) Int - > traverseBarAndBaz :: Applicative f => (Int -> f Int) -> Foo a -> f (Foo a) - > traverseBarAndBaz f (Foo a b c) = Foo <$> f a <*> f b <*> pure c - . - What is provided in this library is a number of stock lenses and traversals for - common haskell types, a wide array of combinators for working them, and more - exotic functionality, (/e.g./ getters, setters, indexed folds, isomorphisms). - -extra-source-files: - .gitignore - .hlint.yaml - .vim.custom - cabal.project - examples/LICENSE - examples/lens-examples.cabal - examples/*.hs - examples/*.lhs - examples/.hlint.yaml - include/*.h - lens-properties/.hlint.yaml - lens-properties/CHANGELOG.markdown - lens-properties/LICENSE - lens-properties/Setup.hs - lens-properties/lens-properties.cabal - AUTHORS.markdown - CHANGELOG.markdown - README.markdown - SUPPORT.markdown -extra-doc-files: - images/*.png - -source-repository head - type: git - location: https://github.com/ekmett/lens.git - --- Enable benchmarking against Neil Mitchell's uniplate library for comparative performance analysis. Defaults to being turned off to avoid --- the extra dependency. --- --- > cabal configure --enable-benchmarks -fbenchmark-uniplate && cabal build && cabal bench -flag benchmark-uniplate - default: False - manual: True - --- Generate inline pragmas when using template-haskell. This defaults to enabled, but you can --- --- > cabal install lens -f-inlining --- --- to shut it off to benchmark the relative performance impact, or as last ditch effort to address compile --- errors resulting from the myriad versions of template-haskell that all purport to be 2.8. -flag inlining - manual: True - default: True - --- Make the test suites dump their template-haskell splices. -flag dump-splices - default: False - manual: True - --- You can disable the hunit test suite with -f-test-hunit -flag test-hunit - default: True - manual: True - --- Build the properties test if we're building tests -flag test-properties - default: True - manual: True - -flag test-templates - default: True - manual: True - --- Assert that we are trustworthy when we can -flag trustworthy - default: True - manual: True - --- Attempt a parallel build with GHC 7.8 -flag j - default: False - manual: True - -library - build-depends: - array >= 0.5.0.0 && < 0.6, - assoc >= 1.0.2 && < 1.1, - base >= 4.9 && < 5, - base-orphans >= 0.5.2 && < 1, - bifunctors >= 5.5.7 && < 6, - bytestring >= 0.10.4.0 && < 0.12, - call-stack >= 0.1 && < 0.5, - comonad >= 5.0.7 && < 6, - containers >= 0.5.5.1 && < 0.7, - contravariant >= 1.4 && < 2, - distributive >= 0.5.1 && < 1, - exceptions >= 0.8.2.1 && < 1, - filepath >= 1.2.0.0 && < 1.5, - free >= 5.1.5 && < 6, - ghc-prim, - hashable >= 1.2.7.0 && < 1.5, - indexed-traversable >= 0.1 && < 0.2, - indexed-traversable-instances >= 0.1 && < 0.2, - kan-extensions >= 5 && < 6, - mtl >= 2.2.1 && < 2.4, - parallel >= 3.2.1.0 && < 3.3, - profunctors >= 5.5.2 && < 6, - reflection >= 2.1 && < 3, - semigroupoids >= 5.0.1 && < 6, - strict >= 0.4 && < 0.5, - tagged >= 0.8.6 && < 1, - template-haskell >= 2.11.1.0 && < 2.19, - 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.7, - transformers-compat >= 0.5.0.4 && < 1, - unordered-containers >= 0.2.10 && < 0.3, - vector >= 0.12.1.2 && < 0.14 - - -- Control.Lens as the first module, so cabal repl loads it. - exposed-modules: - Control.Lens - - exposed-modules: - Control.Exception.Lens - Control.Lens.At - Control.Lens.Combinators - Control.Lens.Cons - Control.Lens.Each - Control.Lens.Empty - Control.Lens.Equality - Control.Lens.Extras - Control.Lens.Fold - Control.Lens.Getter - Control.Lens.Indexed - Control.Lens.Internal - Control.Lens.Internal.Bazaar - Control.Lens.Internal.ByteString - Control.Lens.Internal.Context - Control.Lens.Internal.CTypes - Control.Lens.Internal.Deque - Control.Lens.Internal.Exception - Control.Lens.Internal.FieldTH - Control.Lens.Internal.PrismTH - Control.Lens.Internal.Fold - Control.Lens.Internal.Getter - Control.Lens.Internal.Indexed - Control.Lens.Internal.Instances - Control.Lens.Internal.Iso - Control.Lens.Internal.Level - Control.Lens.Internal.List - Control.Lens.Internal.Magma - Control.Lens.Internal.Prism - Control.Lens.Internal.Profunctor - Control.Lens.Internal.Review - Control.Lens.Internal.Setter - Control.Lens.Internal.TH - Control.Lens.Internal.Zoom - Control.Lens.Iso - Control.Lens.Lens - Control.Lens.Level - Control.Lens.Operators - Control.Lens.Plated - Control.Lens.Prism - Control.Lens.Profunctor - Control.Lens.Reified - Control.Lens.Review - Control.Lens.Setter - Control.Lens.TH - Control.Lens.Traversal - Control.Lens.Tuple - Control.Lens.Type - Control.Lens.Unsound - Control.Lens.Wrapped - Control.Lens.Zoom - Control.Monad.Error.Lens - Control.Parallel.Strategies.Lens - Control.Seq.Lens - Data.Array.Lens - Data.Bits.Lens - Data.ByteString.Lens - Data.ByteString.Strict.Lens - Data.ByteString.Lazy.Lens - Data.Complex.Lens - Data.Data.Lens - Data.Dynamic.Lens - Data.HashSet.Lens - Data.IntSet.Lens - Data.List.Lens - Data.Map.Lens - Data.Sequence.Lens - Data.Set.Lens - Data.Text.Lens - Data.Text.Strict.Lens - Data.Text.Lazy.Lens - Data.Tree.Lens - Data.Typeable.Lens - Data.Vector.Lens - Data.Vector.Generic.Lens - GHC.Generics.Lens - System.Exit.Lens - System.FilePath.Lens - System.IO.Error.Lens - Language.Haskell.TH.Lens - Numeric.Lens - Numeric.Natural.Lens - - other-modules: - Control.Lens.Internal.Prelude - - if flag(trustworthy) && impl(ghc) - other-extensions: Trustworthy - cpp-options: -DTRUSTWORTHY=1 - - if flag(inlining) - cpp-options: -DINLINING - - if flag(j) - ghc-options: -j4 - - ghc-options: -Wall -Wtabs -O2 -fdicts-cheap -funbox-strict-fields -fmax-simplifier-iterations=10 - -Wno-trustworthy-safe -Wmissing-pattern-synonym-signatures -Wno-redundant-constraints - - hs-source-dirs: src - - include-dirs: include - - default-language: Haskell2010 - - -- future proof, whether the field will be comma separated or not. - x-docspec-extra-packages: simple-reflect - x-docspec-extra-packages: deepseq - --- Verify that Template Haskell expansion works -test-suite templates - type: exitcode-stdio-1.0 - main-is: templates.hs - other-modules: - T799 - T917 - T972 - ghc-options: -Wall -threaded - hs-source-dirs: tests - default-language: Haskell2010 - - if flag(dump-splices) - ghc-options: -ddump-splices - - if !flag(test-templates) - buildable: False - else - build-depends: base, lens - --- Verify the properties of lenses with QuickCheck -test-suite properties - type: exitcode-stdio-1.0 - main-is: properties.hs - other-modules: - Control.Lens.Properties - ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N - hs-source-dirs: - tests - lens-properties/src - include-dirs: include - default-language: Haskell2010 - if !flag(test-properties) - buildable: False - else - build-depends: - base, - lens, - QuickCheck >= 2.4, - test-framework >= 0.6, - test-framework-quickcheck2 >= 0.2, - transformers - -test-suite hunit - type: exitcode-stdio-1.0 - main-is: hunit.hs - ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N - hs-source-dirs: tests - default-language: Haskell2010 - - if !flag(test-hunit) - buildable: False - else - build-depends: - base, - containers, - HUnit >= 1.2, - lens, - mtl, - test-framework >= 0.6, - test-framework-hunit >= 0.2 - --- We need this dummy test-suite to add simple-reflect to the install plan --- --- When cabal-install's extra-packages support becomes widely available --- (i.e. after 3.4 release), we can remove this test-suite. -test-suite doctests - type: exitcode-stdio-1.0 - main-is: doctests.hs - hs-source-dirs: tests - default-language: Haskell2010 - - build-depends: base, deepseq, simple-reflect >= 0.3.1 - --- Basic benchmarks for the uniplate-style combinators -benchmark plated - type: exitcode-stdio-1.0 - main-is: plated.hs - ghc-options: -Wall -O2 -threaded -fdicts-cheap -funbox-strict-fields - hs-source-dirs: benchmarks - default-language: Haskell2010 - build-depends: - base, - base-compat >=0.11.0 && <0.13, - comonad, - criterion, - deepseq, - generic-deriving, - lens, - transformers - - if flag(benchmark-uniplate) - build-depends: uniplate >= 1.6.7 && < 1.7 - cpp-options: -DBENCHMARK_UNIPLATE - --- Benchmarking alongside variants -benchmark alongside - type: exitcode-stdio-1.0 - main-is: alongside.hs - ghc-options: -Wall -O2 -threaded -fdicts-cheap -funbox-strict-fields - hs-source-dirs: benchmarks - default-language: Haskell2010 - build-depends: - base, - comonad >= 4, - criterion, - deepseq, - lens, - transformers - --- Benchmarking folds -benchmark folds - type: exitcode-stdio-1.0 - main-is: folds.hs - ghc-options: -Wall -O2 -threaded -fdicts-cheap -funbox-strict-fields - hs-source-dirs: benchmarks - default-language: Haskell2010 - build-depends: - base, - criterion, - containers, - bytestring, - unordered-containers, - vector, - lens - --- Benchmarking traversals -benchmark traversals - type: exitcode-stdio-1.0 - main-is: traversals.hs - ghc-options: -Wall -O2 -threaded -fdicts-cheap -funbox-strict-fields - hs-source-dirs: benchmarks - default-language: Haskell2010 - build-depends: - base, - criterion, - containers, - deepseq, - bytestring, - unordered-containers, - vector, - lens - --- Benchmarking unsafe implementation strategies -benchmark unsafe - type: exitcode-stdio-1.0 - main-is: unsafe.hs - ghc-options: -Wall -O2 -threaded -fdicts-cheap -funbox-strict-fields - hs-source-dirs: benchmarks - default-language: Haskell2010 - build-depends: - base, - comonad >= 4, - criterion >= 1, - deepseq, - generic-deriving, - lens, - transformers