summaryrefslogtreecommitdiff
path: root/README.md
blob: ae441b64b7e9020f864494944ab06c39f8e02a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[![Hackage](https://img.shields.io/hackage/v/data-diverse-lens.svg)](https://hackage.haskell.org/package/data-diverse-lens)
[![Build Status](https://secure.travis-ci.org/louispan/data-diverse-lens.png?branch=master)](http://travis-ci.org/louispan/data-diverse-lens)

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

Refer to [ManySpec.hs](https://github.com/louispan/data-diverse-lens/blob/master/test/Data/Diverse/Lens/ManySpec.hs) and [WhichSpec.hs](https://github.com/louispan/data-diverse/blob/master/test/Data/Diverse/Lens/WhichSpec.hs) for example usages.


# Changelog

* 2.1.0.0
  - Removed profunctor variable @w@ from the constraint synonyms for Projected/Injected.

* 2.0.0.1
  - Forgot to expose constraint synonyms for Projected/Injected.

* 2.0.0.0
  - 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.

* 1.0.0.1
  - Fixed missing exports of the new lens classes.

* 1.0.0.0
  - 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'`

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

* 0.5.1.0
  - 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 >&&>.

* 0.5.0.0
  - 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-1.2.0.0

* 0.4.0.1
  - included data-diverse 1.0 in the upper bounds

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

* 0.3.0.0
  - Changed type variable ordering of 'facetL' and 'facetN', so it's consistently 'x' then 'xs'

* pre 0.3.0.0
  - Initial version represented as (Int, Data.Map Int Any)