14.19.2 [2020.04.15] 2------------------- 3* Remove the test suite's dependency on `test-framework-th`. 4 54.19.1 [2020.02.13] 6------------------- 7* Fix a bug introduced in 4.19 where using `_TupE` to `preview` a value would 8 always fail. 9 104.19 [2020.02.03] 11----------------- 12* Support building with GHC 8.10. 13* The types of `_TupE` and `_UnboxedTupE` are now `Prism' Exp [Maybe Exp]` 14 when built against `template-haskell-2.16` or later to reflect the new 15 types of `TupE` and `UnboxedTupE`. 16* Add `_ForallVisT` and `_BytesPrimL` prisms when building against 17 `template-haskell-2.16` or later. 18* Make `<>~` and `<>=` and their `<op` and `<<op` state variants require only 19 `Semigroup`, not `Monoid`. 20* Add `{Functor,Foldable,Traversable}WithIndex` instances for 21 `Control.Applicative.Const` and `Data.Functor.Constant.Constant`. 22 234.18.1 [2019.09.13] 24------------------- 25* Remove the use of `cpp-options: -traditional`. This should be unnecessary 26 on all versions of GHC that `lens` supports, as modern GHCs already use 27 `-traditional` internally during preprocessing. More critically, the use 28 of `cpp-options: -traditional` breaks profiling builds on GHC 8.8 29 (see https://gitlab.haskell.org/ghc/ghc/issues/17185). 30 314.18 [2019.09.06] 32----------------- 33* Support building with GHC 8.8. 34* Add `xplat` and `xplatf`. 35* Flip `auf` to take the `Iso` in the same direction as `au`. 36 Use the new `xplatf` or just call `coerce` for the old form. 37* Weaken `holeInOne`'s `Category p` constraint to `Comonad (Corep p)`. 38* Generalize the type of `GHC.Generics.Lens.generic1` from 39 `Iso' (f a) (Rep1 f a)` to `Iso (f a) (f b) (Rep1 f a) (Rep1 f b)`. 40* `makeClassyPrisms` now supports generating prisms for data types that share 41 a name with one of its constructors. In such a scenario, the name of the 42 classy prism for the data type will be prefixed with an extra `_` (for 43 prefix names) or `.` (for infix names) to disambiguate it from the prism 44 for the constructor. 45* Several type classes in `Control.Exception.Lens` now have additional 46 prisms corresponding to the data type that they focus on, in accordance 47 with the new convention established in the bullet point above. For example, 48 `AsNonTermination` now has an additional 49 `__NonTermination :: Prism' t NonTermination` method, and the existing 50 `_NonTermination :: Prism' t ()` method now has a default implementation in 51 terms of `__NonTermination`. 52 53 As a consequence of this change, you may need to update instances of these 54 classes to implement the new prisms. 55* Add additional bifunctor instances for `Swapped`. 56* New lenses `head1` and `last1`, to access the first/last elements of 57 a `Traversable1` container. 58* Add `filteredBy`. 59* Add `adjoin` to `Control.Lens.Unsound`. 60* Add `Each (Either a a) (Either b b) a b` instance. 61* Make `magnify` offer its getter argument the `Contravariant` and `Functor` 62 instances it will require. This allows `magnify` to be used without 63 knowing the concrete monad being magnified. 64* Add `equality`, `equality'`, `withEquality`, `underEquality`, `overEquality`, 65 `fromLeibniz`, `fromLeibniz'` and `cloneEquality` to `Control.Lens.Equality`. 66* Add `withLens` to `Control.Lens.Lens`. 67* Make `substEq` and `simply` in `Control.Lens.Equality` 68 and `withIso` in `Control.Lens.Iso` levity polymorphic. 69 704.17.1 [2019.04.26] 71------------------- 72* Support `th-abstraction-0.3.0.0` or later. 73* Only incur `semigroups` and `void` dependencies on old GHCs. 74* Add `holes1Of` 75* Add `locally` https://github.com/ekmett/lens/pull/829 76* Add `ilocally` https://github.com/ekmett/lens/pull/836 77* Add third `Prism` law. 78* Add `gplate1` 79* Add `Wrapped`/`Rewrapped` instances for `Data.Monoid.Ap`. 80 814.17 [2018.07.03] 82----------------- 83* Allow building with GHC 8.6. 84* Make the instances for `Product` and `(:*:)` in `Control.Lens.Tuple` 85 poly-kinded. 86* Make the definitions in `GHC.Generics.Lens` poly-kinded. 87* Make `(%%@~)`, `(%%@=)`, `(<%@=)`, and `(<<%@=)` consume an 88 `Over (Indexed i)` instead of an `IndexedLensLike i` to improve type 89 inference. 90* Add an `AsEmpty` instance for `ZipList`. 91 924.16.1 [2018.03.23] 93------------------- 94* Re-export `(<&>)` from `Data.Functor` on `base-4.11` and later. 95* Added `Cons` and `Snoc` instances for `Control.Applicative.ZipList` 96* Fix a bug in which `makeFields` would generate equality constraints for 97 field types involving data families, which are unnecessary. 98* Improve the performance of `holesOf`. 99 1004.16 [2018.01.28] 101----------------- 102* The `Semigroup` instances for `Traversed` and `Sequenced` are now more 103 constrained (going from `Apply` to `Applicative` and `Monad`, respectively). 104 In GHC 8.4, `Semigroup` is a superclass of `Monoid`, therefore we'd need to 105 have `Apply` constraint in the `Monoid` instances. We opted to weaken our 106 ability to use `Apply` than to lose compatibility with third-party packages 107 that don't supply instances for `Apply`. 108 109 In practice this changes the (specialised) type signature of `traverseOf_` 110 ```diff+ 111 - traverseOf_ :: Apply f => Fold1 s a -> (a -> f r) -> s -> f () 112 + traverseOf_ :: Applicative f => Fold1 s a -> (a -> f r) -> s -> f () 113 ``` 114 and similarly for `forOf_` and `sequenceOf_`. 115 116 As part of this change, new combinators `traverse1Of_`, `for1Of_` and 117 `sequence1Of_` were added for `Apply`-only effects. 118 119 Similar instance context changes were made for `Folding` and `Effect`, 120 but these changes aren't publicly visible. 121 122* Add `Control.Lens.Unsound`, which exports unsound functionality for forming 123 products of lenses and sums of prisms. 124 125* Add `Numeric.Natural.Lens`, which export convenient isomorphisms for 126 natural numbers. 127 128* Add `Strict` instances for strict and lazy `ST`. 129 130* Adapt `Language.Haskell.TH.Lens` for `template-haskell-2.13` (bundled 131 with GHC 8.4). 132 133* Add `Semigroup` and `Monoid` instances for `Indexing`. 134 1354.15.4 136---- 137* `makeFields` and `declareFields` are now smarter with respect to type 138 families. Because GHC does not allow mentioning type families in instance 139 heads, the Template Haskell machinery works around this restriction by 140 instead generating instances of the form: 141 142 ```haskell 143 type family Fam a 144 data Rec a = Rec { _recFam :: Fam a } 145 makeFields ''Rec 146 147 ===> 148 149 instance (b ~ Fam a) => HasFam (Rec a) b where ... 150 ``` 151 152 This requires enabling the `UndecidableInstances` extension, so this trick is 153 only employed when a field's type contains a type family application. 154* `declareFields` now avoids creating duplicate field classes that are shared 155 among multiple datatypes within the same invocation. 156* The Template Haskell machinery will no longer generate optics for fields 157 whose types mention existentially quantified type variables. 158* Add `HasCallStack` constraints to partial operations 159* Reexport `(.@~)` and `(.@=)` from `Control.Lens.Operators` 160* Support `doctest-0.13` 161 1624.15.3 163---- 164* Generalized types of `transformMOf`, `transformOf`, `transformMOnOf`, 165 `transformOnOf`, `rewriteMOf`, `rewriteOf`, `rewriteMOnOf` and `rewriteOnOf`. 166* Depend on `th-abstraction` package for normalizing differences across 167 `template-haskell` versions 168 1694.15.2 170---- 171* Build with GHC 8.2 172* Expand tuple accessors to support up to 19-tuples 173* Add more `Rewrapped` and `Wrapped` instances for data types from the `base`, 174 `bifunctors`, `exceptions`, `free`, `profunctors`, and `semigroupoids` 175 libraries 176* Add a `Generic` default implementation for `Wrapped` 177* Add `Wrapped` instances for data types introduced in `Foreign.C.Types` and 178 `System.Posix.Types` in `base-4.10.0.0` 179* Add prisms for recently introduced data types in `Control.Exception` 180* Revamp `Setup.hs` to use `cabal-doctest`. This makes it build 181 with `Cabal-1.25`, and makes the `doctest`s work with `cabal new-build` and 182 sandboxes. 183* Add `makeFieldsNoPrefix`, a variant of `makeFields` which gives the desired 184 behavior in the presence of `DuplicateRecordFields`. Also add 185 `classUnderscoreNoPrefixFields` and `classUnderscoreNoPrefixNamer`, the 186 corresponding `LensRules` and `FieldNamer`, respectively. 187* Add `toNonEmptyOf`, `first1Of`, `last1Of`, `minimum1Of`, and `maximum1Of` 188 to `Control.Lens.Fold` 189* Add `both1` to `Control.Lens.Traversal` 190* Generalize the type of `levels` and `ilevels` in `Control.Lens.Level` to work 191 on `Fold`s 192* Generalize the type of `getting` in `Control.Lens.Getter` to work with any 193 `Optical` 194* Add `throwing_` to `Control.Monad.Error.Lens` and `Control.Exception.Lens` 195* Fix the meta-data in the .cabal file to properly indicate that this project 196 has a BSD2 license 197 1984.15.1 199---- 200* Restore the `generic` and `generic1` functions in `GHC.Generics.Lens` 201 2024.15 203---- 204* Remove `Generics.Deriving.Lens` module. 205* Incorporate `URec`, which was introduced in `GHC.Generics` in `base-4.9`. For compatibility with older versions of `base`, `lens` now conditionally depends on `generic-deriving` 206* Add `Rewrapped` instance for `ExceptT` 207* Add `FunctorWithIndex`, `FoldableWithIndex`, and `TraversableWithIndex` instances for `Sum`, `Proxy`, `Tagged` and data types in `GHC.Generics` 208* Remove unneeded context from `*WithIndex HashMap` instances 209* Add `Data.Map.Lens.toMapOf` 210* Add moral `Functor` constraint for `to` `ito` `ilike` `ilike` to allow the 211 "indented" type signature using Getter with redundant warnings turned on. 212 2134.14 214---- 215* Remove `Cons` and `Snoc` instances for `NonEmpty`. 216 2174.13.2.1 218------ 219* Fixed `itraverse_` and `imapM_` returning bottom 220 2214.13.2 222------ 223* Restore default signature for `Control.Lens.At.at` 224* Improve operations for `Data.Sequence.Seq` 225* Fix `declarePrisms` behavior on GHC 8 using GADT record syntax 226 2274.13.1 228------ 229* Modified to enable the `doctests` to build with `stack`. 230* Removed `.ghci`. 231* Added `lookupOf` 232* Support GHC 8 233* Support `transformers` 0.5 234* Support `kan-extensions` 5 235* Support `comonad` 5 236* Better support for `Closed` from `profunctors`. 237 2384.13 239---- 240* Pattern synonyms 241* Moved `foldMapBy` and `foldBy` into `reflection` 2.1 242* Added `traverseByOf`, `sequenceByOf`. 243* Reexported `traverseBy` and `sequenceBy` from `reflection` 2.1. 244* Modified the signatures of `alaf` and `auf` to work with a `Functor` rather than a `Profunctor` and rather drastically generalized them. 245* Removed `Control.Lens.Internal.Getter.coerce` in favor of the upstream `phantom` combinator in `contravariant` 1.3+ 246* Renamed `coerced` to `phantasm` to get it out of the way. 247* Added `Wrapped` instance for `Down` 248 2494.12.3 250------ 251* Move `Review` and `AReview` to `Control.Lens.Type` fixing a bug in `makePrisms` 252* Expose `HasTypes` class in `Language.Haskell.TH.Lens` 253* Make types of `foldByOf` and `foldMapByOf` more specific to hide implementation details 254* Add Prisms to `Language.Haskell.TH` for new constructors in `template-haskell-2.10` 255* Generalize type of `_FunDep` to an `Iso` 256 2574.12.2 258------ 259* Incorporated a bug fix for `foldByOf` and `foldMapByOf` to actually let them work on folds. 260* Added a `Plated` instance for `CofreeT` 261 2624.12.1 263------ 264* The `Simple` type alias is now poly-kinded. This lets you use `Simple Field1 s a` and the like in constraints. 265* Added `HasTypes` to `Language.Haskell.TH.Lens`. 266* Support for `vector-0.11.0` which changes `Stream` to `Bundle` 267 2684.12 269---- 270* `reflection 2` support. 271 2724.11.2 273------ 274* Give `cosmosOn` a more general type. 275 2764.11.1 277------ 278* Added `cosmos`, `cosmosOf`, `cosmosOn`, `cosmosOnOf` to `Control.Lens.Plated`. 279* Added `icontains`, `iat`, `iix`. 280* Made various documentation improvements. 281* Added a `test-templates` flag. 282 2834.11 284---- 285* Proper `profunctors` 5.1 support. This extended the superclass constraints for `Conjoined`, so it resulted in a major version bump. 286 2874.10 288---- 289* Added `elemIndexOf`, `elemIndicesOf`, `findIndexOf`, and `findIndicesOf`. 290* Fixed `Ixed` instance for `Tree`. It no longer drops nodes prior to the traversed node. 291* `bifunctors` 5, `profunctors` 5 and `semigroupoids` 5 support. 292 2934.9.1 294----- 295* Added `_Wrapped` support for `NonEmpty`. 296* Added `_Wrapped` support for `Alt`. 297* Fixed `Rewrapped` instance for `Last`. 298 2994.9 300------- 301* `filepath` 1.4 support 302* Removed `Control.Monad.Primitive.Lens` and shed the `primitive` dependency. 303* Add missing `_WithIndex` instances from `keys` package 304* Much more code is inferred `Safe` rather than `Trustworthy`. 305* Documented the difference between `unsafeSingular` and `singular`. 306* `folding` now produces an actual `Fold`. 307* Cleaned up builds for GHC 7.10 to get rid of redundant import warnings. 308 3094.8 310--- 311* When built with `profunctors` 4.4 on GHC 7.8+ we no longer need to use `unsafeCoerce` at all! 312 This drastically reduces the level of trust involved in the way we have optimized `lens`. 313* Added `fusing`. This optimizes long `Lens` chains, by enfocing a form of `fmap` fusion based on the Yoneda lemma. This is particularly effective at making faster lenses the definition is recursive or complex enough that it cannot be inlined. 314* Added `confusing`. This optimizes long `Traversal` chains. As with `fusing` it is best used when the definition for the `Traversal` chain in question is recursive or complex enough that it cannot be inlined, but the implementation is much more confusing. 315* Remove deprecated stuff: `Control.Lens.Loupe`, `headOf`, `makeFieldsWith`, 316 `strippingPrefix`, `strippingSuffix` 317* Added `Cons` and `Snoc` instances for `NonEmpty` 318* Removed `Data.List.Split.Lens` module 319* Reimplemented `bytestring` traversals to avoid internal modules 320* Added `gplate`, an implementation of `plate` for any type implementing `Generic` 321* Strictness revisited 322 * Add `generateLazyPatterns` configuration flag to `makeLenses` rules. 323 * Make the default `makeLenses` behavior to generate STRICT optics 324 * Add strict variants of `_1` .. `_9` named `_1'` .. `_9'` 325* Generalized some combinators in `Data.Vector.Generic.Lens` and added `converted` 326 3274.7 328--- 329* Migrated `Control.Lens.Action` to `lens-action`. 330* Added `Data.Vector.Generic.Lens.vectorIx` function for indexing vectors with only `Vector` constraint. 331* Added `Field1` and `Field2` instances for `Data.Functor.Product.Product`. 332* Removed the "typeclass synonym" `Gettable`. 333* Added new flag to `makeLenses`, `generateUpdateableOptics`, which allows 334 the generation of only `Getter`s and `Fold`s. This feature is intended 335 to be used when the constructors are hidden behind validating, "smart" 336 constructors. 337* Fixed Template Haskell name generation when using GHC 7.10 338* Fixed Template Haskell generation of classes methods where field types used 339 existential quantification 340 3414.6.0.1 [maintenance release] 342------- 343* Compatibility with `base` 4.8 [Edit: this turned out to not work for the final release of GHC 7.10] 344 3454.6 346--- 347* Reduced `Review` to two arguments, like `Getter`. 348* Added `abbreviatedFields` to permit `makeFieldsWith` to be invoked with an argument that lets it act like it did pre-4.5 and accept arbitrary common prefixes. 349 3504.5 351--- 352* Provide access to the typename in `lensRules` naming function. 353* `makeFields` camelcasing rules now properly support types with camelcasing. `MyType` with field `myTypeFieldA` generates `fieldA` now. Previously the prefix ignore capitalization and the field would need to be named `mytypeFieldA`. 354* `makeClassy` works on types even when none of the fields would generate optics. 355* Added `Monad`, `MonadReader`, `MonadPlus` and `Bind` instances for `ReifiedMonadicFold` 356* Added missing fixity declarations on many operators. 357* Migrated `Codec.Compression.Zlib.Lens` to `zlib-lens` package. 358 3594.4.0.2 360--- 361* `text` 1.2.0.0 support 362* Remove the use of the TemplateHaskell extension from the library to enable lens to be used on stage1 cross-compilers 363 3644.4.0.1 365---- 366* Restore previous default of `makeFields` using the camel case field namer. 367 3684.4 369---- 370* Internals of Template Haskell code generation rewritten. makeLenses, 371 makeClassy, and makeFields have been unified into the same generator. 372* TH generated single constructor Lens use irrefutable pattern matching to 373 enable construction starting with undefined. 374* TH generated traverals unify their field arguments (type synonyms not 375 currently expanded) enabling exotic traversals to be generated. 376* Added instances for `Text` to `Data.Aeson.Lens` 377* Reimplemented `makePrisms`, adding support for `makeClassyPrisms`, infix constructrs generate periods (.) prefixed prisms. 378* Added `Choice` to `Review` so that `Prism` is a proper subtype of `Review` 379* Migrated `Data.Aeson.Lens` to `lens-aeson` package. 380* Fixed `GHC.Generics.Lens.tinplate` behavior on single-field data types and empty data types. 381 3824.3.3 383----- 384* `semigroupoids` 4.2 support 385 3864.3.2 387----- 388* `contravariant` 1.0 support 389 3904.3.1 391----- 392* Added `bytewise` to `Data.Bits` 393 3944.3 395--- 396* Switched the "direction" of the `Iso` argument to `au` to match the order generated by `makePrisms` and `makeLenses`. 397* Removed `makeIsos` in favor of `makePrisms` and `makeLenses`. Each of these functions will construct `Iso`s when appropriate. 398* Removed `declareIsos` in favor of `declarePrisms` and `declareLenses`. Each of these functions will construct `Iso`s when appropriate. 399* Added `matching` for type-changing matches with `Prism`s. 400* Added `withPrism` for recovering the functions passed to `prism`. 401* Added `negated`, the isomorphism for the `negate` function. 402 4034.2 404--- 405* Added `_Text` isomorphisms to make the proper use with `(#)` more obvious and fit newer convention. 406* Added `Wrapped` instances for `Vector` types 407* Resolved issue #439. The various `Prism`s for string-like types in `Data.Aeson.Lens` are now law-abiding `Prism`s "up to quotient." 408* Added `selfIndex`. 409* Support `attoparsec` 0.12. 410 4114.1.2 412----- 413* When used with `exceptions` 0.4, `throwingM` will permit use with a mere `MonadThrow`. 414 4154.1.1 416---- 417* Generalized the types of `mapping`, `bimapping`, `contramapping`, `dimapping`, `lmapping`, `rmapping` to support changing the `Functor`, `Bifunctor`, `Contravariant`, and `Profunctor` respectively. 418* Compatibility with `free` 4.6 419 4204.1 421--- 422* Added `Plated` instances for various free monad variants. 423* Compatibility with GHC HEAD (7.9+) 424 4254.0.7 426----- 427* Removed dependency on `constraints`. It was used in a pre-release version of 4.0 but never made it into 4.0, but the dependency had remained around complicating builds for GHC 7.4. 428 4294.0.6 430----- 431* `makeLenses` attempt to make the accessors it can under existential quantification. 432* Added `(&~)`. 433* _Experimental_ support for parallel builds on GHC 7.8 with `cabal install lens -fj`. Due to at last one known issue with GHC, it isn't recommended to use this option when rebuilding lens, as a race condition on at least one platform has been seen in the wild. 434* Added `RoleAnnotations` for GHC 7.8.1. These rule out a few user-accessible bottoms that could be caused by creative abuse of the new `Coercible` machinery. However, there was no `unsafeCoerce` exposed. 435* Removed some impossible cases that required unwritable instances from the example doctypes. 436 4374.0.5 438----- 439* Added `bimapping` to `Control.Lens.Iso` 440* Restored correct behavior of `makePrism` on types with a single constructor. 441* `makeLenses` now generates `Getter`s and `Fold`s on universally quantified fields. 442 4434.0.4 444----- 445* Made `declareFields` work again. 446 4474.0.3 448----- 449* Fixed random segfaulting when using `foldMapBy`. 450 4514.0.2 452----- 453* Properly bundled the modules needed for the properties test suite into the tarball for hackage. 454 4554.0.1 456----- 457* Typo fixes 458* Exporting `Rewrapping` from `Control.Lens.Wrapped`. 459* Removed the dependency on `cpphs`. 460 4614.0 462---- 463* Added `nearly` to `Control.Lens.Prism`. 464* Added `Control.Lens.Empty`, exporting `_Empty`. 465* We now require `DefaultSignatures`. 466* Added `failing` and `ifailing` to `Control.Lens.Traversal`. 467* Changed the signature of `Data.List.Split.Lens.condensing` due to the addition of `DropBlankFields` to `Data.List.Split.CondensePolicy` in `split`. 468* Simplified `Each`, `Ixed`, and `Contains`. They are no longer indexed. The previous design was actively getting in the way of user-defined instances. 469* Replaced more of our home-grown types with standard ones. They had previously been defined to help make more intelligible error messages, but when we switched to using `(Contravariant f, Functor f)` instead of `(Gettable f)`, these ceased to really help. Now you can define even more `lens`-compatible types (e.g. `Getter` and `Fold`) without depending on `lens`. 470 * Replaced the use of `Accessor` with `Const`. 471 * Replaced the use of `Mutator` with `Identity`. 472 * Replaced the use of `Reviewed` with `Tagged`. 473* Removed the deprecated `Control.Lens.Simple` module. 474* Repurposed `Control.Lens.Combinators` to re-export `Control.Lens` sans any operators; previous residents rehomed to `Control.Lens.Lens`. 475* Added `Control.Lens.Operators` to export just the operators. Varying your import styles between these supports many qualified usage scenarios. 476* Simplified `Cons` and `Snoc`. Now they must be a `Prism`. 477* Simplified `Contains`. This necessitated losing many instancs of `Contains`, but makes it much easier and more consistent to use and instantiate. 478* Simplified the various `AsFoo` types in `Control.Exception.Lens` 479* Simplified the types in `System.IO.Error.Lens`. 480* Merged `lens-aeson` into `lens`. 481* We're exiling `Control.Lens.Zipper` to a separate package. This will let the design for it iterate faster and let us explore the trade-offs between the 3.8 style and the 3.9 style of zippers. 482* Generalized `alongside`, `inside`, `both`. 483* Switched to a new `Typeable` version of `reflection` for the harder combinators in `Control.Exception.Lens`. This enables us to comply with GHC 7.7's ban on hand-written `Typeable` instances. 484* Added a `_Show` `Prism`. 485* Added `Control.Lens.Extras` for the combinator names we don't have the gall to claim outright, but which are consistent with the rest. 486* Renamed the constructors for `ReifiedLens`, etc. to just be the name of their base type. 487* Added many many missing instances for `ReifiedFold` and `ReifiedGetter`. This permits things like `runFold ((,) <$> Fold (traverse._1) <*> Fold (traverse._2))` to be a `Fold` 488 and `ReifiedFold` can be used as a `Monad`, `Profunctor`, etc. 489* Many performance optimizations. 490* Switched to `exceptions` from `MonadCatchIO-transformers` 491* Added types for working with `RelevantFold` and `RelevantTraversal`. These are a `Fold` or `Traversal` that always has at least one target. Since `Apply` isn't a superclass of `Applicative`, you occasionally need to convert between them, but it lets you more readily work with less unsafety. 492* Changed `unwrapping` and `wrapping` to have the same constructor-oriented order as a `Prism` and renamed them t `_Wrapping` and `_Unwrapping` respectively. 493* Drastically changed the way `_Wrapping` and `_Unwrapping` are built to get much better inference. 494* There are about 15,000 lines of patches over the last year, so I'm sure we missed a few big changes. 495 4963.10.1 [maintenance release] 497------ 498* Compatibility with `base` 4.7 499 5003.10.0.1 [maintenance release] 501-------- 502* Compatibility with `text` 1.0 503 5043.10 505---- 506* Switched to `bifunctors`, `comonad`, `profunctors`, and `semigroupoids` 4.0. 507 5083.9.2 509----- 510* Generalized signatures for `throwing` and `throwingM`. 511 5123.9.1 513----- 514* 'condensingPolicy' was updated to work with 'split' 0.2.2 515 5163.9.0.3 517------- 518* Bumped dependency on `generic-deriving` again. 519 5203.9.0.2 521------- 522* Bumped dependency on `generic-deriving` to enable building on GHC HEAD. 523 5243.9.0.1 525------- 526* Updated the field guide image to link to imgur. Sadly the overview haddock and the haddocks are not generated in the same directory, so the haddock hook for copying the image only works locally. 527 5283.9 529----- 530* Changed `Getting` to take 3 arguments instead of 5. If you need the old behavior for portability you can use 531 `Overloaded (Accessor r) s t a b` instead of `Getting r s t a b` and it'll work consistently back through the last few releases. 532* Added `involuted` to `Control.Lens.Iso`. 533* Factored out a common `reversed` definition from all the various forms of it around the library and placed it in `Control.Lens.Iso`. 534* Added `binary`, `octal`, `decimal` and `hex` to `Numeric.Lens`. 535* Added `sans` to `Control.Lens.At`. 536* Improved interoperability: 537 * Reimplemented `Gettable` as an alias for `Contravariant` and `Functor` together to derive `Getter` and `Fold`. This means you can now 538 implement a `Getter` or `Fold` with only a Haskell 98 dependency (`contravariant`). 539 * Removed `Reviewable`. We now use `Bifunctor` and `Profunctor` together to derive `Review`. This means you can now implement a `Review` 540 with Haskell 98 dependencies (`profunctors` and `bifunctors`). 541 * These changes enables more types to be defined without incurring a dependency on the `lens` package. 542 5433.8.7.0-3.8.7.3 [maintenance releases] 544----- 545* Fixes to dependencies and pragmas. 546 5473.8.6 [maintenance release] 548----- 549* Fixed an issue with `DefaultSignatures` being used outside of the appropriate `#ifdef` that caused compilation issues on GHC 7.0.2. 550* Generalized the signature of `prism'` 551* Added `\_Void` and `only` to `Control.Lens.Prism` and `devoid` to `Control.Lens.Lens`. 552* Added `\_Nothing` to `Control.Lens.Prism`. 553* Added `devoid` and `united` to `Control.Lens.Lens`. 554 5553.8.5 556----- 557* Fixed more sporadic issues in doctests, caused by carrying flags from `$setup` between modules. 558 5593.8.4 560----- 561* Renamed `strippingPrefix` to `prefixed`, `strippingSuffix` to `suffixed`. Left the old names as deprecated aliases. 562* Fixed issues with the test suite caused by `doctests` carrying flags from the `$setup` block between modules. 563* Benchmarks now use `generic-deriving` rather than `ghc-prim` directly, like the rest of the package. 564* Added `Generics.Deriving.Lens`, which is now simply re-exported from `GHC.Generics.Lens`. 565 5663.8.3 567----- 568* Added `strippingSuffix` and `stripSuffix` to `Data.Data.Lens` 569* Added `unpackedBytes` and `unpackedChars` to `Data.ByteString.*.Lens` 570* Added `unpacked` to `Data.Text.*.Lens` 571* Added `(#)` as an infix form of `review` to ease using a `Prism` like a smart constructor in `Control.Lens.Review`. 572 5733.8.2 574----- 575* Added a notion of `Handleable(handler, handler_)` to `Control.Exception.Lens` to facilitate constructing a `Handler` from an arbitrary `Fold` or `Prism`. 576* Added a notion of `Handler` and `catches` to and `Control.Monad.Error.Lens` to mirror the `Control.Exception` and `Control.Monad.CatchIO` constructions. 577* Added additional doctests and documentation. 578* Improved error messages and support for types with arguments in `makeFields`. 579 5803.8.1 581----- 582* Fixed a bug in `makeFields` in hierarchical modules. 583 5843.8.0.2 585------- 586* Fixed an issue with running the `doctests` test suite when an older version of `semigroups` is installed. 587 5883.8 589--- 590* Overall: 591 * Replaced each of the different `SimpleFoo` type aliases with `Foo'` throughout. The various `Simple` aliases can still be found in `Control.Lens.Simple` but are now deprecated. 592 * Made sweeping changes to `Iso` and `Prism` and `Indexed` lenses internally. They are now based on `profunctors`. This affects how you use `indexed` in the resulting code and dramatically changed the meaning of `Overloaded`. 593 * Generalized combinators to pass through indices unmodified wherever possible and added indexed variants to existing combinators. There are hundreds of these changes and they would swamp this list. 594* `Control.Exception.Lens` 595 * This module was created to add combinators and prisms that make it possible to work with GHC's extensible exceptions and monad transformer stacks more easily. There are knock-on changes in `Data.Dynamic.Lens`, `System.Exit.Lens`, and `System.IO.Error.Lens`. 596* `Control.Lens.At` 597 * Moved `At(at)` and `Contains(contains)` and factored out `Ixed(ix)`. 598 * Deprecated `_at` and `resultAt`. 599 * Removed various `ordinal` and `ix` combinators, which are subsumed by `Ixed(ix)`. 600* `Control.Lens.Cons` 601 * Consoldiated the various `_head`, `_tail`, `_init` and `_last` traversals that were scattered around the place into a pair of `Cons` and `Snoc` classes that provide `_Cons` and `_Snoc` prisms respectively, and combinators that build on top. 602* `Control.Lens.Each` 603 * Generalized the signature of `Each` to permit it to provide an `IndexedSetter` for `((->) e)`. 604 * `Each` now uses an `Index` type family that is shared with `At`, `Ixed` and `Contains` to indicate these operations are related. 605* `Control.Lens.Equality` 606 * Added as a stronger form of `Iso` that can be used to safely cast. 607 * Added the adverb `simply`, which can be used to simplify the types of most combinators in the library so they only take a simple lens, simple traversal, etc as their first argument instead. e.g. `simply view` forces `a ~ b`, `s ~ t` in the argument to `view`. 608* `Control.Lens.Fold` 609 * Added `foldr1Of'` and `foldl1Of'`. 610 * Added `has` and `hasn't`. 611* `Control.Lens.Indexed` 612 * The various indexed combinators for each type were distributed to their respective modules. This module grew to encompass the remaining index-specifics. 613 * Added `index` and `indices`, and removed `iwhere` and `iwhereOf`. Use `itraversed.indices even` and `bar.indices (>3)` instead. 614* `Control.Lens.Internal` 615 * This module was exploded into more manageable component modules. 616* `Control.Lens.Iso` 617 * `Strict(strict)` is now a `Simple Iso`. 618 * Added `magma` and `imagma` which can be used to provide a 'debugging view' of a `Traversal`. 619* `Control.Lens.Lens` 620 * Restructuring split this module out from `Control.Lens.Type` and merged the contents `Control.Lens.IndexedLens`. 621* `Control.Lens.Level` 622 * This module was created to provide the breadth-first-search Traversals `levels` and `ilevels` which can be used to do (optionally depth-limited) breadth-first searches through arbitrary traversals reaching all leaves at finite depth in finite time. To use these in full accordance with the laws you should restrict yourself to commutative operations and finite containers, but they are useful even in the absence of these properties. 623* `Control.Lens.Loupe` 624 * In the interest of consistency, the `Loupe` alias has been deprecated in favor of `ALens`. 625 * `Loupe` (and `ALens`) are now defined in terms of `Pretext` rather than `Context`. This permits them to be cloned at a reduced cost reducing the call for `ReifiedLens`. 626* `Control.Lens.Operators` 627 * Added this module for users who insist on qualified use, but want access to the operators. They can `import qualified Control.Lens as Lens` and `import Control.Lens.Operators` unqualified. 628* `Control.Lens.Prism` 629 * Added `prism'` to construct `SimplePrism`s. 630* `Control.Lens.Reified` 631 * Consolidated the various `ReifiedFoo` definitions into one module. 632* `Control.Lens.Representable` 633 * This module was removed. Its functionality may be split out into a separate package, but currently the `linear` package exports is own `Linear.Core` module to provide this functionality. It was taking lots of useful names for little functionality and didn't feel like the rest of the API. 634* `Control.Lens.Review` 635 * This module now factors the `review` functionality out of `Prism` and exposes `unto`, which is to `review` what `to` is to `view`. 636* `Control.Lens.Setter` 637 * Added `contramapped` and `argument` for mapping over inputs. 638* `Control.Lens.Simple` 639 * Removed the infix lens aliases and repurposed the module to house the now deprecated `SimpleFoo` type aliases, which were replaced universally with `Foo'`. 640* `Control.Lens.TH` 641 * `makeLenses` now generates `Lens'` and `Traversal'` where appropriate 642 * Added `makePrisms` as a generalized `makeIso` that automatically generates a `Prism` for each constructor. `makePrisms` generates names with an `_Foo` convention. This was consolidated upon throughout the library to reduce namespace conflicts between prisms and lenses. 643 * Added `makeFields`, which generates classes for each individual field in a data type. 644 * Added `makeWrapped`, which automatically generates a `Wrapped` instance for a newtype. 645* `Control.Lens.Type` 646 * This module was repurposed to provide a single home for all the standard lens-like type aliases used when producing lenses. You still need to go to their respective modules to find the types for consuming lens-likes if you want to generate your own lens combinators 647* `Control.Lens.Wrapped` 648 * Added `wrapped'` and `unwrapped'` for scenarios where you need the help with type inference. 649* `Control.Lens.Zipper` 650 * Converted `Zipper` to walk a magma based on the original structure and to use indices from indexed traversals when restoring from tape. This also means that when zipping around within a balanced structure with ascending keys `moveTo` can operate in logarithmic time, but required changing the `Zipper` type to add the index type. 651* `Data.Bits.Lens` 652 * Added `byteAt`. 653* `Data.ByteString.Lens` 654 * `Data.ByteString.Lazy.Lens` now uses `Int64`-based indexing. 655 * The `Traversal` for strict `ByteStrings` now construct a balanced tree up to a given grain size. This permits zipper based seeking to operate in logarithmic time and speeds up many traversals. 656* `Numeric.Lens` 657 * Created. `base` shows and reads integers at base-2 through base-36. `integral` can be used as a safe `fromInteger`/`toInteger`. 658 6593.7.6 [maintenance release] 660----- 661* Fixed an issue with the `Complex` `Each` instance. 662 6633.7.5 [maintenance release] 664----- 665* Fixed an errant `LANGUAGE` pragma 666 6673.7.4 [maintenance release] 668----- 669* Backported the API for `ALens` and `ALens'` to support `snap` builds on old platforms. 670 6713.7.3 [maintenance release] 672----- 673* Removed my intra-package dependency upper bounds for my own packages. In particular this enables us to work with `semigroups` 0.9. 674* Switched to `transformers-compat` to avoid having unbuilding modules at the top of the documentation, and to ease 3rd party compatibility. 675* Updated `Setup.lhs` to be compatible with Cabal 1.17 676 6773.7.2 [maintenance release] 678----- 679* Bug fix for `Magnify`. It was missing functional dependencies to determine its `k` parameter from `m` or `n`. 680 6813.7.1.2 [maintenance release] 682------- 683* Made the doctest test suite hide all but the exact versions of packages used to build this package to avoid problems with complicated user environments. 684* Removed doctests based on `:t` as they are fragile and break across GHC versions. 685* Fixed GHC 7.0.4 compatibility by guarding `DefaultSignatures` in `Control.Lens.Each`. 686 6873.7.1.1 [maintenance release] 688------- 689* Removed tests that will (likely) fail in the presence of `hashable` 1.2 690 6913.7.1 692----- 693* Added `preuse`, `preuses` to `Control.Lens.Fold` 694* Added `Each(each)` to `Control.Lens.Each` for indexed traversal of potentially monomorphic containers. 695* Added `indexing64` and `traversed64` for help with large containers. 696* Generalized the type signature of `choosing`. 697* Exported `unwrapped` from `Control.Lens.Wrapped`. 698* Support for `hashable` 1.2 699* Added `(??)` to `Control.Lens.Combinators`. 700 7013.7.0.2 702------- 703* Fixed flagging for Safe Haskell. 704* Fixed examples. 705* Cleaned up the statement of the Prism laws. 706 7073.7.0.1 708------- 709* Corrected bounds for hashable. 710* Fixed compatibility with Haskell Platform 2011.4.0.0 -- you may have to install with --constraint="transformers = 0.2.2.0" to avoid getting new mtl and transformer versions installed. 711 712[3.7](https://github.com/ekmett/lens/issues?milestone=11&page=1&state=closed) 713----- 714* Renamed `Projection` to `Prism`. 715* Implemented a complete redesign of the way `Iso` and `Prism` are handled internally. Any `Iso` can now be used as a `Prism`. 716* The `isos` combinator is no longer required. `iso` can now be used to construct an `Iso`. 717* Changes to the signature of `from` and `under` were necessitated by the new design. 718* Added `Control.Lens.Wrapped` providing a canonical isomorphism for newtypes. 719* Repurposed `ala` to be closer to the original design in `newtype`, but added `au` and `alaf`. 720* Added `_magnitude`, `_phase` and `_conjugate` to `Data.Complex.Lens`. Renamed other lenses for consistency: `_realPart`, `_imagPart`, `_polar`. 721* Promoted `_left` and `_right` to prisms and moved them to `Control.Lens.Prism`. 722* Generalized `view` and `views` to subsume the old functionality of `peruse` and `peruses`. 723* Generalized `review` and `reviews` to both return a `MonadReader` and to work on a `Projection`. 724* Added `view'`/`views'` and `use'`/`uses'` for `Simple` access to the environment/state. 725* Added `set'`, a `Simple` version of `set`. 726* Added `reuse` : `use` :: `review` : `view` and `reuses` : `uses` :: `reviews` : `views` for working a `Projection` from the current `MonadState`. 727* Removed many isomorphisms for various newtypes. `_const`, `identity`, `_sum`, etc. Use `wrapping Const`, `wrapping Identity`, etc. 728* Removed `Data.Monoid.Lens` now that its newtypes are instances of `Wrapped`, exporting the (`<>=`)-variants from `Control.Lens.*`. 729* Renamed `via` to `cloneIso` for consistency. 730* Moved `Indexed(..)` to `Control.Lens.Classes`. 731* Renamed `index` to `indexed` to reduce conflicts with third-party libraries. 732* Added `curried` and `uncurried` to `Control.Lens.Iso`. 733* Added `Strict(strict)` for ad hoc overloading of conversions between strict and lazy variants of `ByteString` and `Text`. 734* Bug fixes for `tugTo` and `jerkTo`. 735* These no longer traverse in the wrong direction: `scanl1Of`, `scanr1Of`, `mapAccumLOf`, and `mapAccumROf`. 736* Added `anon` to `Control.Lens.Iso`. 737* Generalized the types of the `Control.Lens.Zipper` combinators to work with other MonadPlus instances. 738* Added `withins` to `Control.Lens.Zipper` now that they can work better with []. 739* Added `singular` and `unsafeSingular` to `Control.Lens.Traversal` to assert a `Traversal` is a `Lens`, a `Fold` is a `Getter` or a `MonadicFold` is an `Action`. 740* Generalized `sequenceAOf_`'s type to match `sequenceA_`. 741* Renamed `up`/`down`/`left`/`right` to `upward`/`downward`/`leftward`/`rightward` to reduce conflicts -- in particular with `Control.Arrow`. 742* Readded `leftmost` and `rightmost` due to the verbosity of `farthest leftward`/`farthest rightward`. 743* Added `preview`/`previews`/`firstOf` and deprecated `headOf`. 744* Added `iview`/`iviews`/`iuse`/`iuses` to `Control.Lens.IndexedGetter`. 745* We've generalized the type of Bazaar and provided generalized variants of `partsOf`, etc. that used it. 746 7473.6.0.4 [maintenance release] 748------- 749* Added support for `test-framework` 0.8 750 7513.6.0.3 [maintenance release] 752------- 753* Added support for `test-framework` 0.7 754 7553.6.0.2 [maintenance release] 756------- 757* Added more explicit dependencies to the doctest suite. 758* Disabled the 'expected failure' quickcheck tests that occasionally would fail with internal QuickCheck errors. 759 7603.6.0.1 [maintenance release] 761------- 762* Added explicit dependency on containers and unordered-containers to the doctest suite 763 764[3.6](https://github.com/ekmett/lens/issues?milestone=9&state=closed) 765--- 766* Added `upon` (along with variants of it) to `Data.Data.Lens`, which can be used to generate a `Traversal` from a field accessor or any function that returns, unmodified, 767 a single field that would be visited by `template`. 768* Added some missing `examples/` files to the distribution. 769* Renamed `Data.Bits.Lens.traverseBits` to `bits`. 770* Removed `(^!?)`, which was an alias for `(^?!)`. 771* Removed the need for `Trustworthy` by changing the implementation of `coerce` for `BazaarT`. 772* Moved BazaarT to `Control.Lens.Internal`. 773* Added `(<&>)` to `Control.Lens.Combinators`. 774* `element` and `elementOf` are now indexed traversals rather than lenses and have moved to `Control.Lens.IndexedTraversal`. This both fixes their former partiality and lets you use chain indexed combinators with them. 775* Added `elements` and `elementsOf` as indexed traversals for ordinal indexing into regular traversals that generalize `element` and `elementOf`. 776* Renamed `Data.Complex.Lens.traverseComplex` to `complex`. 777* Changed `Data.Complex.Lens.polarize` to a `Simple Iso`, due to the `RealFloat` constraint causing inference problems. 778* Renamed `traverseLeft` and `traverseRight` to `_left` and `_right` respectively. 779* Renamed `traverseSlice`, `traverseFrom`, and `traverseTo` in `Data.Sequence.Lens` to `sliced`, `slicedFrom`, and `slicedTo` respectively. 780* Renamed `traverseAt` to `_at` in `Control.Lens.IndexedTraversal`. 781* Renamed `traverseArray` to `_array` in `Data.Array.Lens`. 782* Renamed and made the combinators in `Control.Lens.Zipper` more compositional to reduce third-party naming conflicts down to just `left` and `right`. 783* Renamed `&=` and `|=` to `.&.=` and `.|.=` for consistency, mutatis mutandis their related operations. 784* Added a `Plated` instances for `Language.Haskell.TH` types. 785* Renamed `atIndex` and `atIndices` in `Data.Vector.Lens` and `Data.Vector.Generic.Lens` to `ordinal` and `ordinals` to match `Data.Sequence.Lens` 786 7873.5.1 788----- 789* Improved SafeHaskell inference. 790 791[3.5](https://github.com/ekmett/lens/issues?milestone=8&state=closed) 792--- 793* Fixed a potential SafeHaskell issue where a user could use `undefined` to derive `unsafeCoerce`. You now have to import an explicitly 794 Unsafe module and create an instance of `Trustworthy` for your type to cause this behavior, so if you do, it's on your head, not mine. :) 795* Renamed `EvilBazaar` to `BazaarT`. 796* Moved a lot of internals around. Most notably, `Gettable`, `Settable` and `Effective` have moved to `Control.Lens.Classes`. 797* Exposed `partsOf'` and `unsafePartsOf'` in `Control.Lens.Traversal` to reduce reliance on `BazaarT` in `Control.Lens.Zipper` 798 799[3.4](https://github.com/ekmett/lens/issues?milestone=7&state=closed) 800--- 801* Renamed `(%)` to `(&)` and `(^%)` to `(^&)`. This avoids the conflict with `Data.Ratio`, which was our highest priority conflict with a third party library. 802* Switched to a more liberal type for `ignored` 803* Removed some "`isplitting`" bad combinators from `Control.Lens.IndexedFold`. 804* Made `indexed`, `taking`, and `dropping` and `elementOf` lazier and capable of dealing with infinite traversals and infinite folds. 805* Improved `Indexing` to support infinite traversals and folds. 806* Removed some of the more redundant combinators from `Control.Lens.Plated`, which already had existing aliases in the rest of the traversal API. 807* Moved `partsOf`, `holesOf`, and `elementOf` into `Control.Lens.Traversal`. 808* Renamed `query` to `peruse` and `queries` to `peruses`. These are much less contentious names, 809 both contain `use` in their name for analogy to `use` and `uses` and the word is about reading. 810* Simpler `simple`. 811* Added `enum` and `non` to `Control.Lens.Iso`. 812* Added `(^?!)` to `Control.Lens.Fold` for unsafe access to the head of a `Fold`. 813* Changed `_head`, `_tail`, `_init` and `_last` to traversals in `Data.List.Lens` and `Data.Sequence.Lens`. 814* Eliminated `traverseHead`, `traverseTail`, `traverseInit` and `traverseLast`. 815* `partsOf` and `unsafePartsOf` can now also be applied to a `Fold` yielding a `Getter` or to a `MonadicFold` yielding an `Action`. 816 8173.3 818--- 819* Redefined `simple` and moved it to `Control.Lens.Iso`. Instead of using `simple l` you can now compose `l.simple` or `simple.l` providing more nuanced control and a more compositional API. 820* Moved the various `foo#` combinators used to emit cleaner core into an unexported module, `Control.Lens.Unsafe`. This removes `MagicHash` from the public API. 821* Removed the `bazaar#` and `runBazaar#` coercions that caused issues on GHC HEAD. 822* Changed the default definition of `plate` to `uniplate` from `ignored`. 823* Added `Data.Vector.Lens` and instances for `Data.Vector`. 824* Added support for the `split` package, which is now part of the Haskell platform. 825* Removed redundant `Data.List.traverseList`. Use `itraversed` or `traverse` instead. 826* Moved `(:<->)` to `Control.Lens.Simple`. 827* Fixed a bug in `Control.Lens.TH` that was causing `makeIso` not to work. 828* Added `lifted` to `Control.Lens.Setter` for mapping over monads. 829* Added `beside` to `Control.Lens.Traversal`. 830* Removed the operators from `Data.List.Lens`, they broke the overall pattern of the rest of the API, and were terrible clutter. 831* Fixed a bug that caused `resultAt` to give wrong answers most of the time. 832* Changed `resultAt` to an `IndexedLens` and moved it to `Control.Lens.IndexedLens` 833* Changed `ignored` to an `IndexedTraversal` and moved it to `Control.Lens.IndexedTraversal` 834* We've relinquished the name `value`. 835 8363.2 837--- 838* Made `elementOf` lazier and moved it from `Control.Lens.Traversal` to `Control.Lens.Plated`. 839* Made `holesOf` and `partsOf` lazier to deal with infinite structures. 840* Resolved issue #75. We now generate nicer core for most `Setter` and `Fold` operations, and some others. 841* Made lenses for field access like `_1`, `_2`, etc. lazier. 842* Added `Control.Lens.Loupe`, which provides a limited form of `Lens` that can be read from and written to and which can compose 843 with other lenses, but can also be returned in a list or as a monadic result, but cannot be used directly for most combinators 844 without cloning it first. It is easier to compose than a `ReifiedLens`, but slightly slower. 845* Moved (`:=>`) and (`:->`) into `Control.Lens.Simple`, which is not exported by `Control.Lens` by default to reduce name conflicts with third party libraries. 846 8473.1 848--- 849* Simplified the type of `filtered`, so that it can be composed with other folds rather than be parameterized on one. Included the caveat that the new `filtered` is still not a legal `Traversal`, despite seeming to compose like one. 850* Renamed `ifiltered` to `ifiltering`, and while it still must take an indexed lens-like as an argument, I included a similar caveat about the result not being a legal `IndexedLens` when given an `IndexedLens`. The function was renamed because its signature no longer lined up with the new `filtered` and the gerundive '-ing' suffix has come to indicate an operator that transformers another lens/traversal/etc. into a new one. 851* Added `taking` and `dropping` to `Control.Lens.Traversal`. 852 8533.0.6 854----- 855* Alpha-renamed all combinators to a new scheme. Instead of `Foo a b c d`, they now follow `Foo s t a b`. This means that you don't need to alpha rename everything in your head to work through the examples, simplifies exposition, and uses s and t for common state monad parameters. Thanks go to Shachaf Ben-Kiki for the grunt work of slogging through hundreds of definitions by hand and with regular expressions! 856* Restored lenses to `Trustworthy` status so they can be used with Safe Haskell once more. 857 8583.0.5 859----- 860* Fixed a bug in `rights1` and `lefts1` in `Control.Lens.Zipper` which would cause them to loop forever when given a 0 offset. 861 8623.0.4 863----- 864* Added `?~`, `<?~`, `?=` and `<?=` to `Control.Lens.Setter` for setting the target(s) of a Lens to `Just` a value. They are particularly useful when combined with `at`. 865 8663.0.3 867----- 868* Refined the behavior of `substType` in `Control.Lens.TH` to match the behavior of `typeVarsEx` when moving under binders. 869 870 8713.0.2 872----- 873* Added `generateSignatures` option to `Control.Lens.TH` to allow the end user to disable the generation of type signatures for the 874 template-haskell generated lenses. This lets the user supply hand-written haddocks and more restricted signatures. 875 8763.0.1 877----- 878* Added `Control.Lens.Type.simple`. 879 880[3.0](https://github.com/ekmett/lens/issues?milestone=6&state=closed) 881--- 882* Added `Control.Lens.Zipper`. 883* Added `<<~`, a version of `<~` that supports chaining assignment. 884* Added `:->`, `:=>`, and `:<->` as type operator aliases for `Simple Lens`, `Simple Traversal`, and `Simple Iso` respectively. 885 886[2.9](https://github.com/ekmett/lens/issues?milestone=5&state=closed) 887--- 888* Added `<<%~`, `<<.~`, `<<%=` and `<<.=` for accessing the old values targeted by a `Lens` (or a summary of those targeted by a `Traversal`) 889* Renamed `|>` to `%`, as `%~` is the lensed version of `%`, and moved it to `Control.Lens.Getter` along with a version `^%` with tighter 890 precedence that can be interleaved with `^.` 891* Upgraded to `doctest` 0.9, which lets us factor out common `$setup` for our doctests 892* Renamed `merged` to `choosing`. Added a simpler `chosen` operation to mirror `both`. 893* Added `Control.Lens.Projection` 894* Renamed `traverseException` to `exception` and `traverseDynamic` to `dynamic`, upgrading them to use `Projection`. 895* `makeClassy` now places each generated `Lens` or `Traversal` inside the class it constructs when possible. 896 This makes it possible for users to just export `HasFoo(..)`, rather than have to enumerate each lens in 897 the export list. It can only do that if it creates the class. If the `createClass` flag is disabled, then 898 it will default to the old behavior. 899* Added `performs` to `Control.Lens.Action` to mirror `views` in `Control.Lens.Getter`. 900 901[2.8](https://github.com/ekmett/lens/issues?milestone=4&state=closed) 902--- 903* Restored compatibility with GHC 7.2. This required a major version bump due to making some MPTC-based default signatures conditional. 904 9052.7.0.1 906------- 907* Added the missing `Control.Lens.Combinators` to exported-modules! Its absence was causing it not to be included on hackage. 908 909[2.7](https://github.com/ekmett/lens/issues?milestone=3&state=closed) 910--- 911* Generalized the signature of `Getting`, `Acting` and `IndexedGetting` to help out with the common user code scenario of needing to read 912 and then write to change types. 913* Documentation cleanup and additional examples. 914* Renamed `au` to `ala`, introducing further incompatibility with the `newtype` package, but reducing confusion. 915* Removed need for `Data.Map.Lens` and `Data.IntMap.Lens` by adding `TraverseMin` and `TraverseMax` to `Control.Lens.IndexedTraversal`. 916* Flipped fixity of `~:` and `<~:` 917* Added `++~`, `++=`, `<++~` and `<++=` to Data.List.Lens in response to popular demand. 918* Added `|>`, `<$!>` and `<$!` to `Control.Lens.Combinators`, which exports combinators that are often useful in lens-based code, but that 919 don't strictly involve lenses. 920* Added an HUnit-based test suite by @orenbenkiki 921 9222.6.1 923----- 924* Fixed bugs in `Traversal` code-generation. 925 926[2.6](https://github.com/ekmett/lens/issues?milestone=2&state=closed) 927--- 928* Added build option `-f-inlining` to facilitate building with the various TH 2.8 versions used by GHC 7.6 and HEAD. 929* Added build option `-f-template-haskell` for testing without template haskell. (Users should be able to assume TH is enabled; use this only for testing!) 930* Added support for generating a `Traversal` rather than a `Lens` when multiple fields map to the same name or some constructors are missing a field. 931* Removed `_` from the lens names in `System.FilePath.Lens`. 932* Added `iwhere`, `withIndices`, `withIndicesOf`, `indices` and `indicesOf` to ease work with indexed traversals 933* Added `assign` as an alias for `(.=)` in `Control.Lens.Setter`. 934* Added `~:`, `=:`, `<~:` and `<=:` to `Data.List.Lens` 935 936[2.5](https://github.com/ekmett/lens/issues?milestone=1&state=closed) 937--- 938* Added `Control.Lens.Plated`, a port of Neil Mitchell's `uniplate` that can be used on any `Traversal`. 939* Added `Data.Data.Lens` with smart traversals that know how to avoid traversing parts of a structure that can't contain a given type. 940* Added `Data.Typeable.Lens` with `_cast` and `_gcast` like `traverseData` 941* Renamed `IndexedStore` to `Context` now that it is used in user-visible locations, and since I also use it as `uniplate`'s notion of a context. 942* Renamed `Kleene` to `Bazaar` -- "a bazaar contains a bunch of stores." 943* Added `Comonad` instances for `Context` and `Bazaar`, so we can use stores directly as the notion of an editable context in uniplate 944* Compatibility with both sets of template haskell quirks for GHC 7.6.1-rc1 and the GHC 7.6.1 development head. 945* Renamed `children` to `branches` in `Data.Tree.Lens`. 946* Added `At` and `Contains` to `Control.Lens.IndexedLens`. 947* Added `FunctorWithIndex`, `FoldableWithIndex`, and `TraversableWithIndex` under `Control.Lens.WithIndex` 948* Added support for `unordered-containers`. 949 9502.4.0.2 951------- 952* GHC 7.6.1 development HEAD compatibility (but broke 7.6.1-rc1) 953 9542.4.0.1 955------- 956* Haddock cleanup 957 9582.4 959----- 960* Added the indexed `Kleene` store to `Control.Lens.Internal` 961* Moved `Gettable`, `Accessor`, `Settable` and `Mutator` to `Control.Lens.Internal` 962* Added `cloneTraversal` to `Control.Lens.Traversal` 963* Renamed `clone` to `cloneLens` in `Control.Lens.Type` 964* Generalized the type of `zoom` to subsume `focus`. 965* Removed `Focus(..)` from `Control.Lens.Type`. 966* Factored out `Control.Lens.Isomorphic`. 967* Moved many private types to `Control.Lens.Internal` 968* Added `conFields` to `Language.Haskell.TH.Lens`. 969* Added `System.FilePath.Lens`. 970 9712.3 972--- 973* Added missing `{-# INLINE #-}` pragmas 974* Renamed `meanwhile` to `throughout` in `Control.Parallel.Strategies.Lens` 975* Added `Magnify` to `Control.Lens.Getter`. 976* Added `Zoom` to `Control.Lens.Type`. 977 9782.2 979--- 980* Added `<&=`, `<&~`, `<|=`, and `<|~` 981* Moved `<>~`, `<<>~`, `<>=`, and `<<>=` to `Data.Monoid.Lens` 982* Template Haskell now uses eager binding to avoid adding dependencies. 983 9842.1 985--- 986* Renamed `adjust` to `over` 987* Added `au`, `auf` and `under` 988* Added `Data.Monoid.Lens` 989* Increased lower dependency bound on `mtl` for cleaner installation. 990