data-diverse-lens: Isos & Lens for Data.Diverse.Many and Prisms for Data.Diverse.Which

[ bsd3, data, library, records ] [ Propose Tags ]

Isos & Lens for Data.Diverse.Many and Prisms for Data.Diverse.Which Refer to ManySpec.hs and WhichSpec.hs for example usages.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,,,,,,,,,,,,,,,,,,,, (info)
Dependencies base (>=4.7 && <5), data-diverse (>=4.0), data-has (>=0.3), lens (>=4), profunctors (>=5.2), tagged (>=0.8) [details]
License BSD-3-Clause
Copyright 2017 Louis Pan
Author Louis Pan
Category Data, Records
Home page
Source repo head: git clone
Uploaded by louispan at 2018-06-30T14:09:33Z
Reverse Dependencies 3 direct, 2 indirect [details]
Downloads 9971 total (64 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-06-30 [all 1 reports]

Readme for data-diverse-lens-

[back to package description]

Hackage Build Status

Provides "Iso"s & 'Len's for "Data.Diverse.Many" and 'Prism's for "Data.Diverse.Which".

Refer to ManySpec.hs and WhichSpec.hs for example usages.



    • Replaced piece' with hasLens, piece with hadLens
    • Replaced pieceX' with hasX, pieceX hadX

    • Missed removing Semigroup constraint from chooseWith

    • Replaced also and alternatively with chooseWith

    • Removed generic-lens dependency - didn't really use it.

    • Renamed itemXXX to pieceXXX, Itemized to Pieced, itemizedXXX to piecedXXX.

    • itemTag only requires Has and likewise facetTag only requires AsFacet.

    • Replaced HasItem with Data.Has.

    • Fixed haddock.

    • Fixed GHC 8.2.2 "Type indexes must match class instance head" compile error.

    • Renamed SelectWith to MakeFrom, split ChooseBtween to ChooseBoth and ChooseFrom.
    • Removed hard to remember operators ``>&&> && +||+ >||>`
    • Removed faceted'
    • Added instance AsFacet Void (Which '[]) and instance AsFacet (Which '[]) Void
    • Polymorphic HasItemX now only requires two to three type args.

    • Removed profunctor variable w from the constraint synonyms for Projected/Injected.

    • Forgot to expose constraint synonyms for Projected/Injected.

    • Breaking change: Removed HasProject and AsInject typeclasses and changed them back to functions.
    • Added MatchingFacet typeclasses for polymorphic matching of prisms.
    • Added constraint synonyms for Project/Inject/Projected/Injected.

    • Fixed missing exports of the new lens classes.

    • Removed overlapping instances of Data.Generics lens
    • Using typeclass instead of plain functions so that lens can be used for other data types
      • Added default implementations for some of these typeclasses using Data.Generic typeclasses.
    • Breaking change: the xxx' version of functions are now consistently the simpler or non-polymorphic version - This is more consistent with 'Control.Lens' as well.
      • This means the following are swapped:
        • item, item'
        • itemL, itemL'
        • itemTag, itemTag'
        • itemN, itemN'
        • project, project'
        • projectL, projectL'
        • projectN, projectN'

    • Added itemTag and facetTag that also tag/untags the field.
    • Added overlapping instances of Data.Generics lens

    • Added faceted, injected, itemized, projected, which is analogous to Profunctor Choice and Strong but using Which and Many
    • Added +||+ (analogous to +++ and |||), >||>; and *&&* (analogous to *** and &&&), and >&&>.

    • min bounds: data-diverse >=1.2.1
    • Rerranged type variable for xxxL and xxxN functions so that the @x@ inferrred from label @l@ or index @n@ is after @proxy@.
      • This affects item[L|N], item[L|N]', replace[L|N]', facet[L|N]
      • Same change was made in data-diverse-

    • included data-diverse 1.0 in the upper bounds

    • Changed type variable ordering of itemL and itemL, so it's consistently x, y, then xs

    • Changed type variable ordering of facetL and facetN, so it's consistently x then xs
  • pre

    • Initial version.