From 2726e4be54289bae018c130e51edb48b919c0ec92f0ab62c004efdc3e2558b7e Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 29 Dec 2024 22:00:45 +0000 Subject: [PATCH] osc copypac from project:devel:languages:haskell:ghc-9.10.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=74 --- .gitattributes | 23 +++ .gitignore | 1 + ghc-lens.changes | 494 ++++++++++++++++++++++++++++++++++++++++++++++ ghc-lens.spec | 255 ++++++++++++++++++++++++ lens-5.2.3.tar.gz | 3 + lens-5.3.2.tar.gz | 3 + lens-5.3.3.tar.gz | 3 + lens.cabal | 487 +++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 1269 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ghc-lens.changes create mode 100644 ghc-lens.spec create mode 100644 lens-5.2.3.tar.gz create mode 100644 lens-5.3.2.tar.gz create mode 100644 lens-5.3.3.tar.gz create mode 100644 lens.cabal diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ghc-lens.changes b/ghc-lens.changes new file mode 100644 index 0000000..bf3b126 --- /dev/null +++ b/ghc-lens.changes @@ -0,0 +1,494 @@ +------------------------------------------------------------------- +Sat Dec 28 16:38:55 UTC 2024 - Peter Simons + +- Update lens to version 5.3.3. + 5.3.3 [2024.12.28] + ------------------ + * Add `makeFieldsId`, which generates overloaded field accessors using the + same names as the underlying fields. This is intended for use with the + `NoFieldSelectors` and `DuplicateRecordFields` language extensions. + + Also add `classIdFields :: LensRules` and `classIdNamer :: FieldNamer`, both + of which use the same naming rules as `makeFieldsId`. + * Update the `Prism`s in `Language.Haskell.TH.Lens` to reflect additions to + `template-haskell-2.23.0.0`: + * Add an `_OrP` `Prism` for the `Pat` data type. + * Add `_ForallE`, `_ForallVisE`, and `_ConstrainedE` `Prism`s for the `Exp` + data type. + +------------------------------------------------------------------- +Fri Jul 5 15:12:02 UTC 2024 - Peter Simons + +- Update lens to version 5.3.2 revision 2. + 5.3.2 [2024.05.12] + ------------------ + * Define the following lenses that perform an operation and result the old + result: + * `(<<<>:~)` (prepend to the front via `(<>)` and return the old result) + * `(<<<|~)` (prepend to the front via `(<|)` and return the old result) + * `(<<|>~)` (append to the back via `(|>)` and return the old result) + + Each of these also has a variant that end with `=` instead of `~` (e.g., + `(<<<>:=)`) for working in a `MonadState` setting. + * Re-export `(<>:~)`, `(<<>:~)`, `(<|~)`, `(<<|~)`, `(|>~)`, and `(<|>~)` (as + well as their variants which end with `=` instead of `~`, and their variants + which return the old result) from `Control.Lens.Operators`. + + 5.3.1 [2024.05.05] + ------------------ + * Add a `Magnify` instance for the CPS variant of `RWST` when building with + `mtl-2.3` or later. + + 5.3 [2024.05.04] + ---------------- + * Allow building with GHC 9.10. + * Update the `Prism`s in `Language.Haskell.TH.Lens` to reflect additions to + `template-haskell-2.22.0.0`: + * The `_InfixD` `Prism` now focuses on `(Fixity, NamespaceSpecifier, Name)` + when building with `template-haskell-2.22.0.0` or later. + * Add `Prism`s for the newly introduced `NamespaceSpecifier` data type. + * Add `_TypeP` and `_InvisP` `Prism`s for the `Pat` data type. + * Add a `_TypeE` `Prism` for the `Exp` data type. + * Add a `_SCCP` `Prism` for the `Pragma` data type. + * Add the following `Setter`s for prepending and appending elements: + * `(<>:~)`: prepend an element to the front via `(<>)`. + * `(<<>:~)`: prepend an element to the front via `(<>)` and return the result. + * `(<|~)`: cons an element to the front via `(<|)`. + * `(<<|~)`: cons an element to the front via `(<|)` and return the result. + * `(|>~)`: snoc an element to the back via `(|>)`. + * `(<|>~)`: snoc an element to the back via `(|>)` and return the result. + + Each of these also has a variant that end with `=` instead of `~` (e.g., + `(<>:=)`) for working in a `MonadState` setting. + +------------------------------------------------------------------- +Tue Apr 30 16:00:18 UTC 2024 - Peter Simons + +- Update lens to version 5.2.3 revision 5. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Fri Apr 5 20:10:48 UTC 2024 - Peter Simons + +- Update lens to version 5.2.3 revision 4. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Sun Mar 17 16:04:56 UTC 2024 - Peter Simons + +- Update lens to version 5.2.3 revision 3. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Sat Sep 30 13:35:57 UTC 2023 - Peter Simons + +- Update lens to version 5.2.3 revision 2. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Sun Aug 27 15:30:05 UTC 2023 - Peter Simons + +- Update lens to version 5.2.3 revision 1. + 5.2.3 [2023.08.24] + ------------------ + * Allow building with GHC 9.8. + * Add new `Prism`s to `Language.Haskell.TH.Lens` to reflect recent additions to + `template-haskell`: + * `_GetFieldE` and `_ProjectionE` `Prism`s for the `Exp` data type, whose + corresponding data constructors were introduced in + `template-haskell-2.18.*`. + * `_TypedBracketE` and `_TypedSpliceE` `Prism`s for the `Exp` data type, whose + corresponding data constructors were introduced in + `template-haskell-2.21.*`. + * `_BndrReq` and `_BndrInvis` `Prism`s for the `BndrVis` data type, which was + added in `template-haskell-2.21.*`. + * Add a `generateRecordSyntax` option to `Control.Lens.TH`, which controls + whether to generate lenses using record update syntax or not. By default, this + option is disabled. + * Fix a bug in which the `declare*` Template Haskell functions would fail if a + data type's field has a type that is defined in the same Template Haskell + quotation. + * Add `altOf`, which collects targets into any `Alternative`. + +------------------------------------------------------------------- +Mon Jul 10 00:43:25 UTC 2023 - Peter Simons + +- Update lens to version 5.2.2 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Thu Mar 30 17:07:22 UTC 2023 - Peter Simons + +- Updated spec file to conform with ghc-rpm-macros-2.5.2. + +------------------------------------------------------------------- +Sat Mar 18 16:40:25 UTC 2023 - Peter Simons + +- Update lens to version 5.2.2. + 5.2.2 [2023.03.18] + ------------------ + * Fix a bug in which calling `ix i` (where `i` is a negative number) on `Text` + or `ByteString` would return the `Just` the first character instead of + returning `Nothing`. + +------------------------------------------------------------------- +Wed Mar 15 16:36:03 UTC 2023 - Peter Simons + +- Update lens to version 5.2.1 revision 3. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Sun Mar 12 19:45:18 UTC 2023 - Peter Simons + +- Update lens to version 5.2.1 revision 2. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Tue Feb 28 02:17:24 UTC 2023 - Peter Simons + +- Update lens to version 5.2.1. + 5.2.1 [2023.02.27] + ------------------ + * Allow building with GHC 9.6. + * Allow building with GHC backends where `HTYPE_SIG_ATOMIC_T` is not defined, + such as the WASM backend. + * Support building with `th-abstraction-0.5.*`. + * Define `_TypeDataD` in `Language.Haskell.TH.Lens` when building with + `template-haskell-2.20.0.0` (GHC 9.6) or later. + +------------------------------------------------------------------- +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 + +- 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 + +- 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`. + +------------------------------------------------------------------- +Sun Dec 26 22:30:17 UTC 2021 - Peter Simons + +- Update lens to version 5.1 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Tue Nov 16 19:51:10 UTC 2021 - psimons@suse.com + +- Update lens to version 5.1. + 5.1 [2021.11.15] + ---------------- + * Allow building with GHC 9.2. + * Drop support for GHC 7.10 and older. + * The type of `_ConP` in `Language.Haskell.TH.Lens` is now + `Prism' Pat (Name, [Type], [Pat])` instead of `Prism' Pat (Name, [Pat])` + when building with `template-haskell-2.18` or later. + * Define `_CharTyLit` in `Language.Haskell.TH.Lens` when building with + `template-haskell-2.18` or later. + * Add `Prefixed` and `Suffixed` classes to `Control.Lens.Prism`, which provide + `prefixed` and `suffixed` prisms for prefixes and suffixes of sequence types. + These classes generalize the `prefixed` and `suffixed` functions in + `Data.List.Lens`, which were previously top-level functions. In addition to + providing `Prefixed` and `Suffixed` instances for lists, instances for `Text` + and `ByteString` types are also provided. + + At present, `Prefixed` and `Suffixed` are re-exported from `Data.List.Lens` + for backwards compatibility. This may change in a future version of `lens`, + however. + * Add a `traversal` function to `Control.Lens.Traversal`. This function, aside + from acting as a `Traversal` counterpart to the `lens` and `prism` functions, + provides documentation on how to define `Traversal`s. + * Add a `matching'` function to `Control.Lens.Prism`. `matching'` is like + `matching`, but with a slightly more general type signature that allows it to + work with combinations of `Lens`es, `Prism`s, and `Traversal`s. + +------------------------------------------------------------------- +Thu Sep 2 08:32:21 UTC 2021 - psimons@suse.com + +- Update lens to version 5.0.1 revision 2. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Mon May 17 12:25:17 UTC 2021 - psimons@suse.com + +- Update lens to version 5.0.1 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Wed Feb 24 18:57:20 UTC 2021 - psimons@suse.com + +- Update lens to version 5.0.1. + 5.0.1 [2021.02.24] + ------------------ + * Fix a bug in which `makeLenses` could produce ill kinded optics for + poly-kinded datatypes in certain situations. + +------------------------------------------------------------------- +Fri Feb 19 23:03:14 UTC 2021 - psimons@suse.com + +- Update lens to version 5. + 5 [2021.02.17] + -------------- + * Support building with GHC 9.0. + * Remove the `Swapped` type class in favor of `Swap` from the `assoc` package. + * Remove the `Strict` type class in favor of `Strict` from the `strict` package. + + The `swapped`, `strict` and `lazy` isomorphisms are now defined using "new" type classes. + + Users which define own instances of old type classes are advised to + define instances of the new ones. + + ```haskell + import qualified Data.Bifunctor.Swap as Swap + import qualified Control.Lens as Lens + + instance Swap.Swap MyType where + swap = ... + + #if !MIN_VERSION_lens(4,20,0) + instance Lens.Swapped MyType where + swapped = iso Swap.swap Swap.swap + #endif + ``` + * The `FunctorWithIndex`, `FoldableWithIndex` and `TraversableWithIndex` type classes + have been migrated to a new package, + [`indexed-traversable`](https://hackage.haskell.org/package/indexed-traversable). + + The `imapped`, `ifolded` and `itraversed` methods are now top-level functions. + If you are not defining these methods in your instances, + you don't need to change your definitions. + + Beware: the `optics-core` package (versions <0.4) defines similar classes, + and will also migrate to use `indexed-traversable` classes. Therefore, you + might get duplicate instance errors if your package defines both. + + If you define your own `FunctorWithIndex` etc. instances, + we recommend that you depend directly on the `indexed-traversable` package. + If you want to continue support `lens-4` users, you may write + + ```haskell + -- from indexed-traversable + import Data.Functor.WithIndex + + -- from lens + import qualified Control.Lens as L + + -- your (indexed) container + data MySeq a = ... + + -- indexed-traversable instance + instance FunctorWithIndex Int MySeq where imap = ... + instance FoldableWithIndex Int MySeq where ifoldMap = ... + instance TraversableWithIndex Int MySeq where itraverse = ... + + -- lens <5 instance, note the ! + #if !MIN_VERSION_lens(5,0,0) + instance L.FunctorWithIndex Int MySeq where imap = imap + instance L.FoldableWithIndex Int MySeq where ifoldMap = ifoldMap + instance L.TraversableWithIndex Int MySeq where itraverse = itraverse + #endif + ``` + + In other words, always provide `indexed-traversable` instances. + If your package depends on `lens` and allows `lens-4`, + you should additionally provide instances for `lens-4` type classes + that can reuse the `indexed-traversable` instances. + + * Make the functions in `Control.Lens.TH` work more robustly with poly-kinded + data types. This can cause a breaking change under certain situations: + * TH-generated optics for poly-kinded data types are now much more likely to + mention kind variables in their definitions, which will require enabling + the `PolyKinds` extension at use sites in order to typecheck. + * Because TH-generated optics now quantify more kind variables than they did + previously, this can affect the order of visible type applications. + * Generalize the types of `generic` and `generic1` to allow type-changing + updates. If you wish to use the old, more restricted types of these + functions, use `simple . generic` or `simple . generic1` instead. + * Add `Control.Lens.Profunctor` with conversion functions to and from + profunctor optic representation. + * Add `Control.Lens.Review.reviewing`, which is like `review` but with a more + polymorphic type. + * Mark `Control.Lens.Equality` as Trustworthy. + * The build-type has been changed from `Custom` to `Simple`. + To achieve this, the `doctests` test suite has been removed in favor of using [`cabal-docspec`](https://github.com/phadej/cabal-extras/tree/master/cabal-docspec) to run the doctests. + * Use `alterF` in `At (HashMap k)` instance implementation. + * Use `alterF` in `At` and `Contains` instances for `Set`, `IntSet`, and + `HashSet`. + * Avoid re-inserting keys already present in `ix` for `Set`, `IntSet`, + and `HashSet`. For `Set` and `HashSet`, this changes the semantics + slightly; if the user-supplied key is `==` to one already present in + the set, then the latter will not be replaced in the result. + * Consume `()` values lazily in `Control.Lens.At`. + +------------------------------------------------------------------- +Mon Feb 8 19:13:43 UTC 2021 - psimons@suse.com + +- Update lens to version 4.19.2 revision 5. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Sun Jan 31 13:49:07 UTC 2021 - psimons@suse.com + +- Update lens to version 4.19.2 revision 4. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Wed Jan 20 08:35:33 UTC 2021 - psimons@suse.com + +- Update lens to version 4.19.2 revision 3. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Thu Dec 17 12:20:00 UTC 2020 - Ondřej Súkup + +- disable %{ix86} build + +------------------------------------------------------------------- +Tue Oct 6 08:56:30 UTC 2020 - psimons@suse.com + +- Update lens to version 4.19.2 revision 2. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Mon Aug 31 09:34:39 UTC 2020 - psimons@suse.com + +- Update lens to version 4.19.2 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Tue Aug 18 10:45:18 UTC 2020 - Peter Simons + +- Replace %setup -q with the more modern %autosetup macro. + +------------------------------------------------------------------- +Tue Jun 16 11:14:19 UTC 2020 - Peter Simons + +- Re-generate file with latest version of spec-cleaner. + +------------------------------------------------------------------- +Wed May 6 06:54:11 UTC 2020 - psimons@suse.com + +- Update lens to version 4.19.2. + 4.19.2 [2020.04.15] + ------------------- + * Remove the test suite's dependency on `test-framework-th`. + +------------------------------------------------------------------- +Thu Feb 27 14:17:53 UTC 2020 - psimons@suse.com + +- Update lens to version 4.19.1. + 4.19.1 [2020.02.13] + ------------------- + * Fix a bug introduced in 4.19 where using `_TupE` to `preview` a value would + always fail. + +------------------------------------------------------------------- +Fri Feb 7 08:04:19 UTC 2020 - psimons@suse.com + +- Update lens to version 4.19. + 4.19 [2020.02.03] + ----------------- + * Support building with GHC 8.10. + * The types of `_TupE` and `_UnboxedTupE` are now `Prism' Exp [Maybe Exp]` + when built against `template-haskell-2.16` or later to reflect the new + types of `TupE` and `UnboxedTupE`. + * Add `_ForallVisT` and `_BytesPrimL` prisms when building against + `template-haskell-2.16` or later. + * Make `<>~` and `<>=` and their ` + +- Drop obsolete group attributes. + +------------------------------------------------------------------- +Sat Sep 14 02:03:25 UTC 2019 - psimons@suse.com + +- Update lens to version 4.18.1. + 4.18.1 [2019.09.13] + ------------------- + * Remove the use of `cpp-options: -traditional`. This should be unnecessary + on all versions of GHC that `lens` supports, as modern GHCs already use + `-traditional` internally during preprocessing. More critically, the use + of `cpp-options: -traditional` breaks profiling builds on GHC 8.8 + (see https://gitlab.haskell.org/ghc/ghc/issues/17185). + +------------------------------------------------------------------- +Sat Sep 7 02:01:29 UTC 2019 - psimons@suse.com + +- Update lens to version 4.18. + Upstream has edited the change log file since the last release in + a non-trivial way, i.e. they did more than just add a new entry + at the top. You can review the file at: + http://hackage.haskell.org/package/lens-4.18/src/CHANGELOG.markdown + +------------------------------------------------------------------- +Thu Aug 8 10:13:34 UTC 2019 - Peter Simons + +- Update Cabal file to allow building with call-stack 0.2.x. + +------------------------------------------------------------------- +Tue Jun 11 14:29:12 UTC 2019 - Peter Simons + +- Update Cabal file for more accurate build dependencies. + +------------------------------------------------------------------- +Tue Apr 30 09:23:06 UTC 2019 - psimons@suse.com + +- Update lens to version 4.17.1. + 4.17.1 [2019.04.26] + ------------------- + * Support `th-abstraction-0.3.0.0` or later. + * Only incur `semigroups` and `void` dependencies on old GHCs. + * Add `holes1Of`. + * Add `locally` (https://github.com/ekmett/lens/pull/829). + * Add `ilocally` (https://github.com/ekmett/lens/pull/836). + * Add a third `Prism` law. + * Add `gplate1`. + * Add `Wrapped`/`Rewrapped` instances for `Data.Monoid.Ap`. + +------------------------------------------------------------------- +Thu Aug 2 16:29:51 UTC 2018 - psimons@suse.com + +- Add lens at version 4.17. diff --git a/ghc-lens.spec b/ghc-lens.spec new file mode 100644 index 0000000..60a8694 --- /dev/null +++ b/ghc-lens.spec @@ -0,0 +1,255 @@ +# +# spec file for package ghc-lens +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global pkg_name lens +%global pkgver %{pkg_name}-%{version} +%bcond_with tests +Name: ghc-%{pkg_name} +Version: 5.3.3 +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 +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-array-devel +BuildRequires: ghc-array-prof +BuildRequires: ghc-assoc-devel +BuildRequires: ghc-assoc-prof +BuildRequires: ghc-base-devel +BuildRequires: ghc-base-orphans-devel +BuildRequires: ghc-base-orphans-prof +BuildRequires: ghc-base-prof +BuildRequires: ghc-bifunctors-devel +BuildRequires: ghc-bifunctors-prof +BuildRequires: ghc-bytestring-devel +BuildRequires: ghc-bytestring-prof +BuildRequires: ghc-call-stack-devel +BuildRequires: ghc-call-stack-prof +BuildRequires: ghc-comonad-devel +BuildRequires: ghc-comonad-prof +BuildRequires: ghc-containers-devel +BuildRequires: ghc-containers-prof +BuildRequires: ghc-contravariant-devel +BuildRequires: ghc-contravariant-prof +BuildRequires: ghc-distributive-devel +BuildRequires: ghc-distributive-prof +BuildRequires: ghc-exceptions-devel +BuildRequires: ghc-exceptions-prof +BuildRequires: ghc-filepath-devel +BuildRequires: ghc-filepath-prof +BuildRequires: ghc-free-devel +BuildRequires: ghc-free-prof +BuildRequires: ghc-hashable-devel +BuildRequires: ghc-hashable-prof +BuildRequires: ghc-indexed-traversable-devel +BuildRequires: ghc-indexed-traversable-instances-devel +BuildRequires: ghc-indexed-traversable-instances-prof +BuildRequires: ghc-indexed-traversable-prof +BuildRequires: ghc-kan-extensions-devel +BuildRequires: ghc-kan-extensions-prof +BuildRequires: ghc-mtl-devel +BuildRequires: ghc-mtl-prof +BuildRequires: ghc-parallel-devel +BuildRequires: ghc-parallel-prof +BuildRequires: ghc-profunctors-devel +BuildRequires: ghc-profunctors-prof +BuildRequires: ghc-reflection-devel +BuildRequires: ghc-reflection-prof +BuildRequires: ghc-rpm-macros +BuildRequires: ghc-semigroupoids-devel +BuildRequires: ghc-semigroupoids-prof +BuildRequires: ghc-strict-devel +BuildRequires: ghc-strict-prof +BuildRequires: ghc-tagged-devel +BuildRequires: ghc-tagged-prof +BuildRequires: ghc-template-haskell-devel +BuildRequires: ghc-template-haskell-prof +BuildRequires: ghc-text-devel +BuildRequires: ghc-text-prof +BuildRequires: ghc-th-abstraction-devel +BuildRequires: ghc-th-abstraction-prof +BuildRequires: ghc-these-devel +BuildRequires: ghc-these-prof +BuildRequires: ghc-transformers-compat-devel +BuildRequires: ghc-transformers-compat-prof +BuildRequires: ghc-transformers-devel +BuildRequires: ghc-transformers-prof +BuildRequires: ghc-unordered-containers-devel +BuildRequires: ghc-unordered-containers-prof +BuildRequires: ghc-vector-devel +BuildRequires: ghc-vector-prof +ExcludeArch: %{ix86} +%if %{with tests} +BuildRequires: ghc-HUnit-devel +BuildRequires: ghc-HUnit-prof +BuildRequires: ghc-QuickCheck-devel +BuildRequires: ghc-QuickCheck-prof +BuildRequires: ghc-deepseq-devel +BuildRequires: ghc-deepseq-prof +BuildRequires: ghc-simple-reflect-devel +BuildRequires: ghc-simple-reflect-prof +BuildRequires: ghc-test-framework-devel +BuildRequires: ghc-test-framework-hunit-devel +BuildRequires: ghc-test-framework-hunit-prof +BuildRequires: ghc-test-framework-prof +BuildRequires: ghc-test-framework-quickcheck2-devel +BuildRequires: ghc-test-framework-quickcheck2-prof +%endif + +%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). + +%package devel +Summary: Haskell %{pkg_name} library development files +Requires: %{name} = %{version}-%{release} +Requires: ghc-compiler = %{ghc_version} +Requires(post): ghc-compiler = %{ghc_version} +Requires(postun): ghc-compiler = %{ghc_version} + +%description devel +This package provides the Haskell %{pkg_name} library development files. + +%package -n ghc-%{pkg_name}-doc +Summary: Haskell %{pkg_name} library documentation +Requires: ghc-filesystem +BuildArch: noarch + +%description -n ghc-%{pkg_name}-doc +This package provides the Haskell %{pkg_name} library documentation. + +%package -n ghc-%{pkg_name}-prof +Summary: Haskell %{pkg_name} profiling library +Requires: ghc-%{pkg_name}-devel = %{version}-%{release} +Supplements: (ghc-%{pkg_name}-devel and ghc-prof) + +%description -n ghc-%{pkg_name}-prof +This package provides the Haskell %{pkg_name} profiling library. + +%prep +%autosetup -n %{pkg_name}-%{version} + +%build +%ghc_lib_build + +%install +%ghc_lib_install + +%check +%cabal_test + +%post devel +%ghc_pkg_recache + +%postun devel +%ghc_pkg_recache + +%files -f %{name}.files +%license LICENSE + +%files devel -f %{name}-devel.files +%doc AUTHORS.markdown CHANGELOG.markdown README.markdown examples + +%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files +%license LICENSE + +%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files + +%changelog diff --git a/lens-5.2.3.tar.gz b/lens-5.2.3.tar.gz new file mode 100644 index 0000000..523249d --- /dev/null +++ b/lens-5.2.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df1e8ca8dd89d884994e0c80761a972088326fa43ed5d47c01b14abb710b994d +size 703220 diff --git a/lens-5.3.2.tar.gz b/lens-5.3.2.tar.gz new file mode 100644 index 0000000..eff5fb3 --- /dev/null +++ b/lens-5.3.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff13bc0666e28b4cb1f8ba34551f66f042f5f3928b764ea18b885034bc7f4998 +size 705371 diff --git a/lens-5.3.3.tar.gz b/lens-5.3.3.tar.gz new file mode 100644 index 0000000..908d978 --- /dev/null +++ b/lens-5.3.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40f1561939a5d5d206c2de19323b2f0a799bc84875cd95a275dae7fb5667a099 +size 706380 diff --git a/lens.cabal b/lens.cabal new file mode 100644 index 0000000..2a323b2 --- /dev/null +++ b/lens.cabal @@ -0,0 +1,487 @@ +name: lens +category: Data, Lenses, Generics +version: 5.3.2 +x-revision: 2 +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.8 + , GHC == 9.4.8 + , GHC == 9.6.4 + , GHC == 9.8.2 + , GHC == 9.10.1 +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.2, + base >= 4.9 && < 5, + base-orphans >= 0.5.2 && < 1, + bifunctors >= 5.5.7 && < 6, + 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, + contravariant >= 1.4 && < 2, + distributive >= 0.5.1 && < 1, + exceptions >= 0.8.2.1 && < 1, + filepath >= 1.2.0.0 && < 1.6, + free >= 5.1.5 && < 6, + ghc-prim, + hashable >= 1.2.7.0 && < 1.6, + 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 && < 7, + strict >= 0.4 && < 0.6, + tagged >= 0.8.6 && < 1, + template-haskell >= 2.11.1.0 && < 2.23, + text >= 1.2.3.0 && < 2.2, + th-abstraction >= 0.4.1 && < 0.8, + these >= 1.1.1.1 && < 1.3, + 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.Doctest + 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: + BigRecord + 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, + text, + bytestring, + 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, + 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