Index index by Group index by Distribution index by Vendor index by creation date index by Name Mirrors Help Search

ghc-lens-5.2.3-3.2 RPM for s390x

From OpenSuSE Ports Tumbleweed for s390x

Name: ghc-lens Distribution: openSUSE:Factory:zSystems
Version: 5.2.3 Vendor: openSUSE
Release: 3.2 Build date: Sun Mar 17 17:04:56 2024
Group: Unspecified Build host: reproducible
Size: 10064212 Source RPM: ghc-lens-5.2.3-3.2.src.rpm
Packager: https://bugs.opensuse.org
Url: https://hackage.haskell.org/package/lens
Summary: Lenses, Folds and Traversals
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
<https://github.com/ekmett/lens#lens-lenses-folds-and-traversals README>.

An introductory video on the style of code used in this library by Simon Peyton
Jones is available from
<http://skillsmatter.com/podcast/scala/lenses-compositional-data-access-and-manipulation
Skills Matter>.

A video on how to use lenses and how they are constructed is available on
<http://youtu.be/cefnmjtAolY?hd=1 youtube>.

Slides for that second talk can be obtained from
<http://comonad.com/haskell/Lenses-Folds-and-Traversals-NYC.pdf comonad.com>.

More information on the care and feeding of lenses, including a brief tutorial
and motivation for their types can be found on the
<https://github.com/ekmett/lens/wiki lens wiki>.

A small game of 'pong' and other more complex examples that manage their state
using lenses can be found in the
<https://github.com/ekmett/lens/blob/master/examples/ example folder>.

/Lenses, Folds and Traversals/

With some signatures simplified, the core of the hierarchy of lens-like
constructions looks like:

<<http://i.imgur.com/ALlbPRa.png>>

<https://raw.githubusercontent.com/ekmett/lens/master/images/Hierarchy.png
(Local Copy)>

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).

Provides

Requires

License

BSD-2-Clause

Changelog

* Sun Mar 17 2024 Peter Simons <psimons@suse.com>
  - Update lens to version 5.2.3 revision 3.
    Upstream has revised the Cabal build instructions on Hackage.
* Sat Sep 30 2023 Peter Simons <psimons@suse.com>
  - Update lens to version 5.2.3 revision 2.
    Upstream has revised the Cabal build instructions on Hackage.
* Sun Aug 27 2023 Peter Simons <psimons@suse.com>
  - 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 2023 Peter Simons <psimons@suse.com>
  - Update lens to version 5.2.2 revision 1.
    Upstream has revised the Cabal build instructions on Hackage.
* Thu Mar 30 2023 Peter Simons <psimons@suse.com>
  - Updated spec file to conform with ghc-rpm-macros-2.5.2.
* Sat Mar 18 2023 Peter Simons <psimons@suse.com>
  - 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 2023 Peter Simons <psimons@suse.com>
  - Update lens to version 5.2.1 revision 3.
    Upstream has revised the Cabal build instructions on Hackage.
* Sun Mar 12 2023 Peter Simons <psimons@suse.com>
  - Update lens to version 5.2.1 revision 2.
    Upstream has revised the Cabal build instructions on Hackage.
* Tue Feb 28 2023 Peter Simons <psimons@suse.com>
  - 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 2022 Peter Simons <psimons@suse.com>
  - 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 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 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`.
* Sun Dec 26 2021 Peter Simons <psimons@suse.com>
  - Update lens to version 5.1 revision 1.
    Upstream has revised the Cabal build instructions on Hackage.
* Tue Nov 16 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 02 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 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 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 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 08 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 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 2021 psimons@suse.com
  - Update lens to version 4.19.2 revision 3.
    Upstream has revised the Cabal build instructions on Hackage.

Files

/usr/lib64/ghc-9.8.2/lib/libHSlens-5.2.3-GWnimE2XnxbK99HMKsXM14-ghc9.8.2.so
/usr/share/licenses/ghc-lens
/usr/share/licenses/ghc-lens/LICENSE


Generated by rpm2html 1.8.1

Fabrice Bellet, Tue Apr 9 12:53:36 2024