data-diverse-lens 3.0.0.0 → 3.0.0.1
raw patch · 3 files changed
+7/−4 lines, 3 files
Files
- README.md +3/−0
- data-diverse-lens.cabal +1/−1
- src/Data/Diverse/Lens/Many.hs +3/−3
README.md view
@@ -7,6 +7,9 @@ # Changelog +* 3.0.0.1+ - Fixed GHC 8.2.2 "Type indexes must match class instance head" compile error.+ * 3.0.0.0 - Renamed `SelectWith` to `MakeFrom`, split `ChooseBtween` to `ChooseBoth` and `ChooseFrom`. - Removed hard to remember operators ``>&&>` `*&&*` `+||+` `>||>`
data-diverse-lens.cabal view
@@ -1,5 +1,5 @@ name: data-diverse-lens-version: 3.0.0.0+version: 3.0.0.1 synopsis: Isos & Lens for Data.Diverse.Many and Prisms for Data.Diverse.Which description: Isos & Lens for Data.Diverse.Many and Prisms 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-lens/blob/master/test/Data/Diverse/Lens/WhichSpec.hs) for example usages.
src/Data/Diverse/Lens/Many.hs view
@@ -88,7 +88,7 @@ item :: Lens s (Replaced a b s) a b instance (UniqueMember x xs) => HasItem x (Many xs) where- type Replaced a b (Many xs) = Many (Replace a b xs)+ type Replaced x b (Many xs) = Many (Replace x b xs) item = lens grab (replace @x) -- | 'grabL' ('view' 'itemL') and 'replaceL' ('set' 'itemL') in 'Lens'' form.@@ -124,7 +124,7 @@ itemL :: Lens s (ReplacedL l a b s) a b instance (UniqueLabelMember l xs, x ~ KindAtLabel l xs) => HasItemL l x (Many xs) where- type ReplacedL l _ b (Many xs) = Many (Replace (KindAtLabel l xs) b xs)+ type ReplacedL l x b (Many xs) = Many (Replace (KindAtLabel l xs) b xs) itemL = lens (grabL @l) (replaceL @l) -- | Variation of 'itemL'' that automatically tags and untags a Tagged field.@@ -167,7 +167,7 @@ instance (MemberAt n x xs) => HasItemN n x (Many xs) where- type ReplacedN n a b (Many xs) = Many (ReplaceIndex n a b xs)+ type ReplacedN n x b (Many xs) = Many (ReplaceIndex n x b xs) itemN = lens (grabN @n) (replaceN @n) -----------------------------------------------------------------------