15.0.1 [2021.02.24] 2------------------ 3* Fix a bug in which `makeLenses` could produce ill kinded optics for 4 poly-kinded datatypes in certain situations. 5 65 [2021.02.17] 7-------------- 8* Support building with GHC 9.0. 9* Remove the `Swapped` type class in favor of `Swap` from the `assoc` package. 10* Remove the `Strict` type class in favor of `Strict` from the `strict` package. 11 12 The `swapped`, `strict` and `lazy` isomorphisms are now defined using "new" type classes. 13 14 Users which define own instances of old type classes are advised to 15 define instances of the new ones. 16 17 ```haskell 18 import qualified Data.Bifunctor.Swap as Swap 19 import qualified Control.Lens as Lens 20 21 instance Swap.Swap MyType where 22 swap = ... 23 24 #if !MIN_VERSION_lens(4,20,0) 25 instance Lens.Swapped MyType where 26 swapped = iso Swap.swap Swap.swap 27 #endif 28 ``` 29* The `FunctorWithIndex`, `FoldableWithIndex` and `TraversableWithIndex` type classes 30 have been migrated to a new package, 31 [`indexed-traversable`](https://hackage.haskell.org/package/indexed-traversable). 32 33 The `imapped`, `ifolded` and `itraversed` methods are now top-level functions. 34 If you are not defining these methods in your instances, 35 you don't need to change your definitions. 36 37 Beware: the `optics-core` package (versions <0.4) defines similar classes, 38 and will also migrate to use `indexed-traversable` classes. Therefore, you 39 might get duplicate instance errors if your package defines both. 40 41 If you define your own `FunctorWithIndex` etc. instances, 42 we recommend that you depend directly on the `indexed-traversable` package. 43 If you want to continue support `lens-4` users, you may write 44 45 ```haskell 46 -- from indexed-traversable 47 import Data.Functor.WithIndex 48 49 -- from lens 50 import qualified Control.Lens as L 51 52 -- your (indexed) container 53 data MySeq a = ... 54 55 -- indexed-traversable instance 56 instance FunctorWithIndex Int MySeq where imap = ... 57 instance FoldableWithIndex Int MySeq where ifoldMap = ... 58 instance TraversableWithIndex Int MySeq where itraverse = ... 59 60 -- lens <5 instance, note the ! 61 #if !MIN_VERSION_lens(5,0,0) 62 instance L.FunctorWithIndex Int MySeq where imap = imap 63 instance L.FoldableWithIndex Int MySeq where ifoldMap = ifoldMap 64 instance L.TraversableWithIndex Int MySeq where itraverse = itraverse 65 #endif 66 ``` 67 68 In other words, always provide `indexed-traversable` instances. 69 If your package depends on `lens` and allows `lens-4`, 70 you should additionally provide instances for `lens-4` type classes 71 that can reuse the `indexed-traversable` instances. 72 73* Make the functions in `Control.Lens.TH` work more robustly with poly-kinded 74 data types. This can cause a breaking change under certain situations: 75 * TH-generated optics for poly-kinded data types are now much more likely to 76 mention kind variables in their definitions, which will require enabling 77 the `PolyKinds` extension at use sites in order to typecheck. 78 * Because TH-generated optics now quantify more kind variables than they did 79 previously, this can affect the order of visible type applications. 80* Generalize the types of `generic` and `generic1` to allow type-changing 81 updates. If you wish to use the old, more restricted types of these 82 functions, use `simple . generic` or `simple . generic1` instead. 83* Add `Control.Lens.Profunctor` with conversion functions to and from 84 profunctor optic representation. 85* Add `Control.Lens.Review.reviewing`, which is like `review` but with a more 86 polymorphic type. 87* Mark `Control.Lens.Equality` as Trustworthy. 88* The build-type has been changed from `Custom` to `Simple`. 89 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. 90* Use `alterF` in `At (HashMap k)` instance implementation. 91* Use `alterF` in `At` and `Contains` instances for `Set`, `IntSet`, and 92 `HashSet`. 93* Avoid re-inserting keys already present in `ix` for `Set`, `IntSet`, 94 and `HashSet`. For `Set` and `HashSet`, this changes the semantics 95 slightly; if the user-supplied key is `==` to one already present in 96 the set, then the latter will not be replaced in the result. 97* Consume `()` values lazily in `Control.Lens.At`. 98 994.19.2 [2020.04.15] 100------------------- 101* Remove the test suite's dependency on `test-framework-th`. 102 1034.19.1 [2020.02.13] 104------------------- 105* Fix a bug introduced in 4.19 where using `_TupE` to `preview` a value would 106 always fail. 107 1084.19 [2020.02.03] 109----------------- 110* Support building with GHC 8.10. 111* The types of `_TupE` and `_UnboxedTupE` are now `Prism' Exp [Maybe Exp]` 112 when built against `template-haskell-2.16` or later to reflect the new 113 types of `TupE` and `UnboxedTupE`. 114* Add `_ForallVisT` and `_BytesPrimL` prisms when building against 115 `template-haskell-2.16` or later. 116* Make `<>~` and `<>=` and their `<op` and `<<op` state variants require only 117 `Semigroup`, not `Monoid`. 118* Add `{Functor,Foldable,Traversable}WithIndex` instances for 119 `Control.Applicative.Const` and `Data.Functor.Constant.Constant`. 120 1214.18.1 [2019.09.13] 122------------------- 123* Remove the use of `cpp-options: -traditional`. This should be unnecessary 124 on all versions of GHC that `lens` supports, as modern GHCs already use 125 `-traditional` internally during preprocessing. More critically, the use 126 of `cpp-options: -traditional` breaks profiling builds on GHC 8.8 127 (see https://gitlab.haskell.org/ghc/ghc/issues/17185). 128 1294.18 [2019.09.06] 130----------------- 131* Support building with GHC 8.8. 132* Add `xplat` and `xplatf`. 133* Flip `auf` to take the `Iso` in the same direction as `au`. 134 Use the new `xplatf` or just call `coerce` for the old form. 135* Weaken `holeInOne`'s `Category p` constraint to `Comonad (Corep p)`. 136* Generalize the type of `GHC.Generics.Lens.generic1` from 137 `Iso' (f a) (Rep1 f a)` to `Iso (f a) (f b) (Rep1 f a) (Rep1 f b)`. 138* `makeClassyPrisms` now supports generating prisms for data types that share 139 a name with one of its constructors. In such a scenario, the name of the 140 classy prism for the data type will be prefixed with an extra `_` (for 141 prefix names) or `.` (for infix names) to disambiguate it from the prism 142 for the constructor. 143* Several type classes in `Control.Exception.Lens` now have additional 144 prisms corresponding to the data type that they focus on, in accordance 145 with the new convention established in the bullet point above. For example, 146 `AsNonTermination` now has an additional 147 `__NonTermination :: Prism' t NonTermination` method, and the existing 148 `_NonTermination :: Prism' t ()` method now has a default implementation in 149 terms of `__NonTermination`. 150 151 As a consequence of this change, you may need to update instances of these 152 classes to implement the new prisms. 153* Add additional bifunctor instances for `Swapped`. 154* New lenses `head1` and `last1`, to access the first/last elements of 155 a `Traversable1` container. 156* Add `filteredBy`. 157* Add `adjoin` to `Control.Lens.Unsound`. 158* Add `Each (Either a a) (Either b b) a b` instance. 159* Make `magnify` offer its getter argument the `Contravariant` and `Functor` 160 instances it will require. This allows `magnify` to be used without 161 knowing the concrete monad being magnified. 162* Add `equality`, `equality'`, `withEquality`, `underEquality`, `overEquality`, 163 `fromLeibniz`, `fromLeibniz'` and `cloneEquality` to `Control.Lens.Equality`. 164* Add `withLens` to `Control.Lens.Lens`. 165* Make `substEq` and `simply` in `Control.Lens.Equality` 166 and `withIso` in `Control.Lens.Iso` levity polymorphic. 167 1684.17.1 [2019.04.26] 169------------------- 170* Support `th-abstraction-0.3.0.0` or later. 171* Only incur `semigroups` and `void` dependencies on old GHCs. 172* Add `holes1Of` 173* Add `locally` https://github.com/ekmett/lens/pull/829 174* Add `ilocally` https://github.com/ekmett/lens/pull/836 175* Add third `Prism` law. 176* Add `gplate1` 177* Add `Wrapped`/`Rewrapped` instances for `Data.Monoid.Ap`. 178 1794.17 [2018.07.03] 180----------------- 181* Allow building with GHC 8.6. 182* Make the instances for `Product` and `(:*:)` in `Control.Lens.Tuple` 183 poly-kinded. 184* Make the definitions in `GHC.Generics.Lens` poly-kinded. 185* Make `(%%@~)`, `(%%@=)`, `(<%@=)`, and `(<<%@=)` consume an 186 `Over (Indexed i)` instead of an `IndexedLensLike i` to improve type 187 inference. 188* Add an `AsEmpty` instance for `ZipList`. 189 1904.16.1 [2018.03.23] 191------------------- 192* Re-export `(<&>)` from `Data.Functor` on `base-4.11` and later. 193* Added `Cons` and `Snoc` instances for `Control.Applicative.ZipList` 194* Fix a bug in which `makeFields` would generate equality constraints for 195 field types involving data families, which are unnecessary. 196* Improve the performance of `holesOf`. 197 1984.16 [2018.01.28] 199----------------- 200* The `Semigroup` instances for `Traversed` and `Sequenced` are now more 201 constrained (going from `Apply` to `Applicative` and `Monad`, respectively). 202 In GHC 8.4, `Semigroup` is a superclass of `Monoid`, therefore we'd need to 203 have `Apply` constraint in the `Monoid` instances. We opted to weaken our 204 ability to use `Apply` than to lose compatibility with third-party packages 205 that don't supply instances for `Apply`. 206 207 In practice this changes the (specialised) type signature of `traverseOf_` 208 ```diff+ 209 - traverseOf_ :: Apply f => Fold1 s a -> (a -> f r) -> s -> f () 210 + traverseOf_ :: Applicative f => Fold1 s a -> (a -> f r) -> s -> f () 211 ``` 212 and similarly for `forOf_` and `sequenceOf_`. 213 214 As part of this change, new combinators `traverse1Of_`, `for1Of_` and 215 `sequence1Of_` were added for `Apply`-only effects. 216 217 Similar instance context changes were made for `Folding` and `Effect`, 218 but these changes aren't publicly visible. 219 220* Add `Control.Lens.Unsound`, which exports unsound functionality for forming 221 products of lenses and sums of prisms. 222 223* Add `Numeric.Natural.Lens`, which export convenient isomorphisms for 224 natural numbers. 225 226* Add `Strict` instances for strict and lazy `ST`. 227 228* Adapt `Language.Haskell.TH.Lens` for `template-haskell-2.13` (bundled 229 with GHC 8.4). 230 231* Add `Semigroup` and `Monoid` instances for `Indexing`. 232 2334.15.4 234---- 235* `makeFields` and `declareFields` are now smarter with respect to type 236 families. Because GHC does not allow mentioning type families in instance 237 heads, the Template Haskell machinery works around this restriction by 238 instead generating instances of the form: 239 240 ```haskell 241 type family Fam a 242 data Rec a = Rec { _recFam :: Fam a } 243 makeFields ''Rec 244 245 ===> 246 247 instance (b ~ Fam a) => HasFam (Rec a) b where ... 248 ``` 249 250 This requires enabling the `UndecidableInstances` extension, so this trick is 251 only employed when a field's type contains a type family application. 252* `declareFields` now avoids creating duplicate field classes that are shared 253 among multiple datatypes within the same invocation. 254* The Template Haskell machinery will no longer generate optics for fields 255 whose types mention existentially quantified type variables. 256* Add `HasCallStack` constraints to partial operations 257* Reexport `(.@~)` and `(.@=)` from `Control.Lens.Operators` 258* Support `doctest-0.13` 259 2604.15.3 261---- 262* Generalized types of `transformMOf`, `transformOf`, `transformMOnOf`, 263 `transformOnOf`, `rewriteMOf`, `rewriteOf`, `rewriteMOnOf` and `rewriteOnOf`. 264* Depend on `th-abstraction` package for normalizing differences across 265 `template-haskell` versions 266 2674.15.2 268---- 269* Build with GHC 8.2 270* Expand tuple accessors to support up to 19-tuples 271* Add more `Rewrapped` and `Wrapped` instances for data types from the `base`, 272 `bifunctors`, `exceptions`, `free`, `profunctors`, and `semigroupoids` 273 libraries 274* Add a `Generic` default implementation for `Wrapped` 275* Add `Wrapped` instances for data types introduced in `Foreign.C.Types` and 276 `System.Posix.Types` in `base-4.10.0.0` 277* Add prisms for recently introduced data types in `Control.Exception` 278* Revamp `Setup.hs` to use `cabal-doctest`. This makes it build 279 with `Cabal-1.25`, and makes the `doctest`s work with `cabal new-build` and 280 sandboxes. 281* Add `makeFieldsNoPrefix`, a variant of `makeFields` which gives the desired 282 behavior in the presence of `DuplicateRecordFields`. Also add 283 `classUnderscoreNoPrefixFields` and `classUnderscoreNoPrefixNamer`, the 284 corresponding `LensRules` and `FieldNamer`, respectively. 285* Add `toNonEmptyOf`, `first1Of`, `last1Of`, `minimum1Of`, and `maximum1Of` 286 to `Control.Lens.Fold` 287* Add `both1` to `Control.Lens.Traversal` 288* Generalize the type of `levels` and `ilevels` in `Control.Lens.Level` to work 289 on `Fold`s 290* Generalize the type of `getting` in `Control.Lens.Getter` to work with any 291 `Optical` 292* Add `throwing_` to `Control.Monad.Error.Lens` and `Control.Exception.Lens` 293* Fix the meta-data in the .cabal file to properly indicate that this project 294 has a BSD2 license 295 2964.15.1 297---- 298* Restore the `generic` and `generic1` functions in `GHC.Generics.Lens` 299 3004.15 301---- 302* Remove `Generics.Deriving.Lens` module. 303* 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` 304* Add `Rewrapped` instance for `ExceptT` 305* Add `FunctorWithIndex`, `FoldableWithIndex`, and `TraversableWithIndex` instances for `Sum`, `Proxy`, `Tagged` and data types in `GHC.Generics` 306* Remove unneeded context from `*WithIndex HashMap` instances 307* Add `Data.Map.Lens.toMapOf` 308* Add moral `Functor` constraint for `to` `ito` `ilike` `ilike` to allow the 309 "indented" type signature using Getter with redundant warnings turned on. 310 3114.14 312---- 313* Remove `Cons` and `Snoc` instances for `NonEmpty`. 314 3154.13.2.1 316------ 317* Fixed `itraverse_` and `imapM_` returning bottom 318 3194.13.2 320------ 321* Restore default signature for `Control.Lens.At.at` 322* Improve operations for `Data.Sequence.Seq` 323* Fix `declarePrisms` behavior on GHC 8 using GADT record syntax 324 3254.13.1 326------ 327* Modified to enable the `doctests` to build with `stack`. 328* Removed `.ghci`. 329* Added `lookupOf` 330* Support GHC 8 331* Support `transformers` 0.5 332* Support `kan-extensions` 5 333* Support `comonad` 5 334* Better support for `Closed` from `profunctors`. 335 3364.13 337---- 338* Pattern synonyms 339* Moved `foldMapBy` and `foldBy` into `reflection` 2.1 340* Added `traverseByOf`, `sequenceByOf`. 341* Reexported `traverseBy` and `sequenceBy` from `reflection` 2.1. 342* Modified the signatures of `alaf` and `auf` to work with a `Functor` rather than a `Profunctor` and rather drastically generalized them. 343* Removed `Control.Lens.Internal.Getter.coerce` in favor of the upstream `phantom` combinator in `contravariant` 1.3+ 344* Renamed `coerced` to `phantasm` to get it out of the way. 345* Added `Wrapped` instance for `Down` 346 3474.12.3 348------ 349* Move `Review` and `AReview` to `Control.Lens.Type` fixing a bug in `makePrisms` 350* Expose `HasTypes` class in `Language.Haskell.TH.Lens` 351* Make types of `foldByOf` and `foldMapByOf` more specific to hide implementation details 352* Add Prisms to `Language.Haskell.TH` for new constructors in `template-haskell-2.10` 353* Generalize type of `_FunDep` to an `Iso` 354 3554.12.2 356------ 357* Incorporated a bug fix for `foldByOf` and `foldMapByOf` to actually let them work on folds. 358* Added a `Plated` instance for `CofreeT` 359 3604.12.1 361------ 362* The `Simple` type alias is now poly-kinded. This lets you use `Simple Field1 s a` and the like in constraints. 363* Added `HasTypes` to `Language.Haskell.TH.Lens`. 364* Support for `vector-0.11.0` which changes `Stream` to `Bundle` 365 3664.12 367---- 368* `reflection 2` support. 369 3704.11.2 371------ 372* Give `cosmosOn` a more general type. 373 3744.11.1 375------ 376* Added `cosmos`, `cosmosOf`, `cosmosOn`, `cosmosOnOf` to `Control.Lens.Plated`. 377* Added `icontains`, `iat`, `iix`. 378* Made various documentation improvements. 379* Added a `test-templates` flag. 380 3814.11 382---- 383* Proper `profunctors` 5.1 support. This extended the superclass constraints for `Conjoined`, so it resulted in a major version bump. 384 3854.10 386---- 387* Added `elemIndexOf`, `elemIndicesOf`, `findIndexOf`, and `findIndicesOf`. 388* Fixed `Ixed` instance for `Tree`. It no longer drops nodes prior to the traversed node. 389* `bifunctors` 5, `profunctors` 5 and `semigroupoids` 5 support. 390 3914.9.1 392----- 393* Added `_Wrapped` support for `NonEmpty`. 394* Added `_Wrapped` support for `Alt`. 395* Fixed `Rewrapped` instance for `Last`. 396 3974.9 398------- 399* `filepath` 1.4 support 400* Removed `Control.Monad.Primitive.Lens` and shed the `primitive` dependency. 401* Add missing `_WithIndex` instances from `keys` package 402* Much more code is inferred `Safe` rather than `Trustworthy`. 403* Documented the difference between `unsafeSingular` and `singular`. 404* `folding` now produces an actual `Fold`. 405* Cleaned up builds for GHC 7.10 to get rid of redundant import warnings. 406 4074.8 408--- 409* When built with `profunctors` 4.4 on GHC 7.8+ we no longer need to use `unsafeCoerce` at all! 410 This drastically reduces the level of trust involved in the way we have optimized `lens`. 411* 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. 412* 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. 413* Remove deprecated stuff: `Control.Lens.Loupe`, `headOf`, `makeFieldsWith`, 414 `strippingPrefix`, `strippingSuffix` 415* Added `Cons` and `Snoc` instances for `NonEmpty` 416* Removed `Data.List.Split.Lens` module 417* Reimplemented `bytestring` traversals to avoid internal modules 418* Added `gplate`, an implementation of `plate` for any type implementing `Generic` 419* Strictness revisited 420 * Add `generateLazyPatterns` configuration flag to `makeLenses` rules. 421 * Make the default `makeLenses` behavior to generate STRICT optics 422 * Add strict variants of `_1` .. `_9` named `_1'` .. `_9'` 423* Generalized some combinators in `Data.Vector.Generic.Lens` and added `converted` 424 4254.7 426--- 427* Migrated `Control.Lens.Action` to `lens-action`. 428* Added `Data.Vector.Generic.Lens.vectorIx` function for indexing vectors with only `Vector` constraint. 429* Added `Field1` and `Field2` instances for `Data.Functor.Product.Product`. 430* Removed the "typeclass synonym" `Gettable`. 431* Added new flag to `makeLenses`, `generateUpdateableOptics`, which allows 432 the generation of only `Getter`s and `Fold`s. This feature is intended 433 to be used when the constructors are hidden behind validating, "smart" 434 constructors. 435* Fixed Template Haskell name generation when using GHC 7.10 436* Fixed Template Haskell generation of classes methods where field types used 437 existential quantification 438 4394.6.0.1 [maintenance release] 440------- 441* Compatibility with `base` 4.8 [Edit: this turned out to not work for the final release of GHC 7.10] 442 4434.6 444--- 445* Reduced `Review` to two arguments, like `Getter`. 446* 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. 447 4484.5 449--- 450* Provide access to the typename in `lensRules` naming function. 451* `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`. 452* `makeClassy` works on types even when none of the fields would generate optics. 453* Added `Monad`, `MonadReader`, `MonadPlus` and `Bind` instances for `ReifiedMonadicFold` 454* Added missing fixity declarations on many operators. 455* Migrated `Codec.Compression.Zlib.Lens` to `zlib-lens` package. 456 4574.4.0.2 458--- 459* `text` 1.2.0.0 support 460* Remove the use of the TemplateHaskell extension from the library to enable lens to be used on stage1 cross-compilers 461 4624.4.0.1 463---- 464* Restore previous default of `makeFields` using the camel case field namer. 465 4664.4 467---- 468* Internals of Template Haskell code generation rewritten. makeLenses, 469 makeClassy, and makeFields have been unified into the same generator. 470* TH generated single constructor Lens use irrefutable pattern matching to 471 enable construction starting with undefined. 472* TH generated traverals unify their field arguments (type synonyms not 473 currently expanded) enabling exotic traversals to be generated. 474* Added instances for `Text` to `Data.Aeson.Lens` 475* Reimplemented `makePrisms`, adding support for `makeClassyPrisms`, infix constructrs generate periods (.) prefixed prisms. 476* Added `Choice` to `Review` so that `Prism` is a proper subtype of `Review` 477* Migrated `Data.Aeson.Lens` to `lens-aeson` package. 478* Fixed `GHC.Generics.Lens.tinplate` behavior on single-field data types and empty data types. 479 4804.3.3 481----- 482* `semigroupoids` 4.2 support 483 4844.3.2 485----- 486* `contravariant` 1.0 support 487 4884.3.1 489----- 490* Added `bytewise` to `Data.Bits` 491 4924.3 493--- 494* Switched the "direction" of the `Iso` argument to `au` to match the order generated by `makePrisms` and `makeLenses`. 495* Removed `makeIsos` in favor of `makePrisms` and `makeLenses`. Each of these functions will construct `Iso`s when appropriate. 496* Removed `declareIsos` in favor of `declarePrisms` and `declareLenses`. Each of these functions will construct `Iso`s when appropriate. 497* Added `matching` for type-changing matches with `Prism`s. 498* Added `withPrism` for recovering the functions passed to `prism`. 499* Added `negated`, the isomorphism for the `negate` function. 500 5014.2 502--- 503* Added `_Text` isomorphisms to make the proper use with `(#)` more obvious and fit newer convention. 504* Added `Wrapped` instances for `Vector` types 505* Resolved issue #439. The various `Prism`s for string-like types in `Data.Aeson.Lens` are now law-abiding `Prism`s "up to quotient." 506* Added `selfIndex`. 507* Support `attoparsec` 0.12. 508 5094.1.2 510----- 511* When used with `exceptions` 0.4, `throwingM` will permit use with a mere `MonadThrow`. 512 5134.1.1 514---- 515* Generalized the types of `mapping`, `bimapping`, `contramapping`, `dimapping`, `lmapping`, `rmapping` to support changing the `Functor`, `Bifunctor`, `Contravariant`, and `Profunctor` respectively. 516* Compatibility with `free` 4.6 517 5184.1 519--- 520* Added `Plated` instances for various free monad variants. 521* Compatibility with GHC HEAD (7.9+) 522 5234.0.7 524----- 525* 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. 526 5274.0.6 528----- 529* `makeLenses` attempt to make the accessors it can under existential quantification. 530* Added `(&~)`. 531* _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. 532* 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. 533* Removed some impossible cases that required unwritable instances from the example doctypes. 534 5354.0.5 536----- 537* Added `bimapping` to `Control.Lens.Iso` 538* Restored correct behavior of `makePrism` on types with a single constructor. 539* `makeLenses` now generates `Getter`s and `Fold`s on universally quantified fields. 540 5414.0.4 542----- 543* Made `declareFields` work again. 544 5454.0.3 546----- 547* Fixed random segfaulting when using `foldMapBy`. 548 5494.0.2 550----- 551* Properly bundled the modules needed for the properties test suite into the tarball for hackage. 552 5534.0.1 554----- 555* Typo fixes 556* Exporting `Rewrapping` from `Control.Lens.Wrapped`. 557* Removed the dependency on `cpphs`. 558 5594.0 560---- 561* Added `nearly` to `Control.Lens.Prism`. 562* Added `Control.Lens.Empty`, exporting `_Empty`. 563* We now require `DefaultSignatures`. 564* Added `failing` and `ifailing` to `Control.Lens.Traversal`. 565* Changed the signature of `Data.List.Split.Lens.condensing` due to the addition of `DropBlankFields` to `Data.List.Split.CondensePolicy` in `split`. 566* Simplified `Each`, `Ixed`, and `Contains`. They are no longer indexed. The previous design was actively getting in the way of user-defined instances. 567* 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`. 568 * Replaced the use of `Accessor` with `Const`. 569 * Replaced the use of `Mutator` with `Identity`. 570 * Replaced the use of `Reviewed` with `Tagged`. 571* Removed the deprecated `Control.Lens.Simple` module. 572* Repurposed `Control.Lens.Combinators` to re-export `Control.Lens` sans any operators; previous residents rehomed to `Control.Lens.Lens`. 573* Added `Control.Lens.Operators` to export just the operators. Varying your import styles between these supports many qualified usage scenarios. 574* Simplified `Cons` and `Snoc`. Now they must be a `Prism`. 575* Simplified `Contains`. This necessitated losing many instancs of `Contains`, but makes it much easier and more consistent to use and instantiate. 576* Simplified the various `AsFoo` types in `Control.Exception.Lens` 577* Simplified the types in `System.IO.Error.Lens`. 578* Merged `lens-aeson` into `lens`. 579* 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. 580* Generalized `alongside`, `inside`, `both`. 581* 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. 582* Added a `_Show` `Prism`. 583* Added `Control.Lens.Extras` for the combinator names we don't have the gall to claim outright, but which are consistent with the rest. 584* Renamed the constructors for `ReifiedLens`, etc. to just be the name of their base type. 585* Added many many missing instances for `ReifiedFold` and `ReifiedGetter`. This permits things like `runFold ((,) <$> Fold (traverse._1) <*> Fold (traverse._2))` to be a `Fold` 586 and `ReifiedFold` can be used as a `Monad`, `Profunctor`, etc. 587* Many performance optimizations. 588* Switched to `exceptions` from `MonadCatchIO-transformers` 589* 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. 590* Changed `unwrapping` and `wrapping` to have the same constructor-oriented order as a `Prism` and renamed them t `_Wrapping` and `_Unwrapping` respectively. 591* Drastically changed the way `_Wrapping` and `_Unwrapping` are built to get much better inference. 592* There are about 15,000 lines of patches over the last year, so I'm sure we missed a few big changes. 593 5943.10.1 [maintenance release] 595------ 596* Compatibility with `base` 4.7 597 5983.10.0.1 [maintenance release] 599-------- 600* Compatibility with `text` 1.0 601 6023.10 603---- 604* Switched to `bifunctors`, `comonad`, `profunctors`, and `semigroupoids` 4.0. 605 6063.9.2 607----- 608* Generalized signatures for `throwing` and `throwingM`. 609 6103.9.1 611----- 612* 'condensingPolicy' was updated to work with 'split' 0.2.2 613 6143.9.0.3 615------- 616* Bumped dependency on `generic-deriving` again. 617 6183.9.0.2 619------- 620* Bumped dependency on `generic-deriving` to enable building on GHC HEAD. 621 6223.9.0.1 623------- 624* 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. 625 6263.9 627----- 628* Changed `Getting` to take 3 arguments instead of 5. If you need the old behavior for portability you can use 629 `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. 630* Added `involuted` to `Control.Lens.Iso`. 631* Factored out a common `reversed` definition from all the various forms of it around the library and placed it in `Control.Lens.Iso`. 632* Added `binary`, `octal`, `decimal` and `hex` to `Numeric.Lens`. 633* Added `sans` to `Control.Lens.At`. 634* Improved interoperability: 635 * Reimplemented `Gettable` as an alias for `Contravariant` and `Functor` together to derive `Getter` and `Fold`. This means you can now 636 implement a `Getter` or `Fold` with only a Haskell 98 dependency (`contravariant`). 637 * Removed `Reviewable`. We now use `Bifunctor` and `Profunctor` together to derive `Review`. This means you can now implement a `Review` 638 with Haskell 98 dependencies (`profunctors` and `bifunctors`). 639 * These changes enables more types to be defined without incurring a dependency on the `lens` package. 640 6413.8.7.0-3.8.7.3 [maintenance releases] 642----- 643* Fixes to dependencies and pragmas. 644 6453.8.6 [maintenance release] 646----- 647* Fixed an issue with `DefaultSignatures` being used outside of the appropriate `#ifdef` that caused compilation issues on GHC 7.0.2. 648* Generalized the signature of `prism'` 649* Added `\_Void` and `only` to `Control.Lens.Prism` and `devoid` to `Control.Lens.Lens`. 650* Added `\_Nothing` to `Control.Lens.Prism`. 651* Added `devoid` and `united` to `Control.Lens.Lens`. 652 6533.8.5 654----- 655* Fixed more sporadic issues in doctests, caused by carrying flags from `$setup` between modules. 656 6573.8.4 658----- 659* Renamed `strippingPrefix` to `prefixed`, `strippingSuffix` to `suffixed`. Left the old names as deprecated aliases. 660* Fixed issues with the test suite caused by `doctests` carrying flags from the `$setup` block between modules. 661* Benchmarks now use `generic-deriving` rather than `ghc-prim` directly, like the rest of the package. 662* Added `Generics.Deriving.Lens`, which is now simply re-exported from `GHC.Generics.Lens`. 663 6643.8.3 665----- 666* Added `strippingSuffix` and `stripSuffix` to `Data.Data.Lens` 667* Added `unpackedBytes` and `unpackedChars` to `Data.ByteString.*.Lens` 668* Added `unpacked` to `Data.Text.*.Lens` 669* Added `(#)` as an infix form of `review` to ease using a `Prism` like a smart constructor in `Control.Lens.Review`. 670 6713.8.2 672----- 673* Added a notion of `Handleable(handler, handler_)` to `Control.Exception.Lens` to facilitate constructing a `Handler` from an arbitrary `Fold` or `Prism`. 674* Added a notion of `Handler` and `catches` to and `Control.Monad.Error.Lens` to mirror the `Control.Exception` and `Control.Monad.CatchIO` constructions. 675* Added additional doctests and documentation. 676* Improved error messages and support for types with arguments in `makeFields`. 677 6783.8.1 679----- 680* Fixed a bug in `makeFields` in hierarchical modules. 681 6823.8.0.2 683------- 684* Fixed an issue with running the `doctests` test suite when an older version of `semigroups` is installed. 685 6863.8 687--- 688* Overall: 689 * 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. 690 * 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`. 691 * 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. 692* `Control.Exception.Lens` 693 * 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`. 694* `Control.Lens.At` 695 * Moved `At(at)` and `Contains(contains)` and factored out `Ixed(ix)`. 696 * Deprecated `_at` and `resultAt`. 697 * Removed various `ordinal` and `ix` combinators, which are subsumed by `Ixed(ix)`. 698* `Control.Lens.Cons` 699 * 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. 700* `Control.Lens.Each` 701 * Generalized the signature of `Each` to permit it to provide an `IndexedSetter` for `((->) e)`. 702 * `Each` now uses an `Index` type family that is shared with `At`, `Ixed` and `Contains` to indicate these operations are related. 703* `Control.Lens.Equality` 704 * Added as a stronger form of `Iso` that can be used to safely cast. 705 * 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`. 706* `Control.Lens.Fold` 707 * Added `foldr1Of'` and `foldl1Of'`. 708 * Added `has` and `hasn't`. 709* `Control.Lens.Indexed` 710 * The various indexed combinators for each type were distributed to their respective modules. This module grew to encompass the remaining index-specifics. 711 * Added `index` and `indices`, and removed `iwhere` and `iwhereOf`. Use `itraversed.indices even` and `bar.indices (>3)` instead. 712* `Control.Lens.Internal` 713 * This module was exploded into more manageable component modules. 714* `Control.Lens.Iso` 715 * `Strict(strict)` is now a `Simple Iso`. 716 * Added `magma` and `imagma` which can be used to provide a 'debugging view' of a `Traversal`. 717* `Control.Lens.Lens` 718 * Restructuring split this module out from `Control.Lens.Type` and merged the contents `Control.Lens.IndexedLens`. 719* `Control.Lens.Level` 720 * 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. 721* `Control.Lens.Loupe` 722 * In the interest of consistency, the `Loupe` alias has been deprecated in favor of `ALens`. 723 * `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`. 724* `Control.Lens.Operators` 725 * 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. 726* `Control.Lens.Prism` 727 * Added `prism'` to construct `SimplePrism`s. 728* `Control.Lens.Reified` 729 * Consolidated the various `ReifiedFoo` definitions into one module. 730* `Control.Lens.Representable` 731 * 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. 732* `Control.Lens.Review` 733 * This module now factors the `review` functionality out of `Prism` and exposes `unto`, which is to `review` what `to` is to `view`. 734* `Control.Lens.Setter` 735 * Added `contramapped` and `argument` for mapping over inputs. 736* `Control.Lens.Simple` 737 * Removed the infix lens aliases and repurposed the module to house the now deprecated `SimpleFoo` type aliases, which were replaced universally with `Foo'`. 738* `Control.Lens.TH` 739 * `makeLenses` now generates `Lens'` and `Traversal'` where appropriate 740 * 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. 741 * Added `makeFields`, which generates classes for each individual field in a data type. 742 * Added `makeWrapped`, which automatically generates a `Wrapped` instance for a newtype. 743* `Control.Lens.Type` 744 * 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 745* `Control.Lens.Wrapped` 746 * Added `wrapped'` and `unwrapped'` for scenarios where you need the help with type inference. 747* `Control.Lens.Zipper` 748 * 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. 749* `Data.Bits.Lens` 750 * Added `byteAt`. 751* `Data.ByteString.Lens` 752 * `Data.ByteString.Lazy.Lens` now uses `Int64`-based indexing. 753 * 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. 754* `Numeric.Lens` 755 * Created. `base` shows and reads integers at base-2 through base-36. `integral` can be used as a safe `fromInteger`/`toInteger`. 756 7573.7.6 [maintenance release] 758----- 759* Fixed an issue with the `Complex` `Each` instance. 760 7613.7.5 [maintenance release] 762----- 763* Fixed an errant `LANGUAGE` pragma 764 7653.7.4 [maintenance release] 766----- 767* Backported the API for `ALens` and `ALens'` to support `snap` builds on old platforms. 768 7693.7.3 [maintenance release] 770----- 771* Removed my intra-package dependency upper bounds for my own packages. In particular this enables us to work with `semigroups` 0.9. 772* Switched to `transformers-compat` to avoid having unbuilding modules at the top of the documentation, and to ease 3rd party compatibility. 773* Updated `Setup.lhs` to be compatible with Cabal 1.17 774 7753.7.2 [maintenance release] 776----- 777* Bug fix for `Magnify`. It was missing functional dependencies to determine its `k` parameter from `m` or `n`. 778 7793.7.1.2 [maintenance release] 780------- 781* 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. 782* Removed doctests based on `:t` as they are fragile and break across GHC versions. 783* Fixed GHC 7.0.4 compatibility by guarding `DefaultSignatures` in `Control.Lens.Each`. 784 7853.7.1.1 [maintenance release] 786------- 787* Removed tests that will (likely) fail in the presence of `hashable` 1.2 788 7893.7.1 790----- 791* Added `preuse`, `preuses` to `Control.Lens.Fold` 792* Added `Each(each)` to `Control.Lens.Each` for indexed traversal of potentially monomorphic containers. 793* Added `indexing64` and `traversed64` for help with large containers. 794* Generalized the type signature of `choosing`. 795* Exported `unwrapped` from `Control.Lens.Wrapped`. 796* Support for `hashable` 1.2 797* Added `(??)` to `Control.Lens.Combinators`. 798 7993.7.0.2 800------- 801* Fixed flagging for Safe Haskell. 802* Fixed examples. 803* Cleaned up the statement of the Prism laws. 804 8053.7.0.1 806------- 807* Corrected bounds for hashable. 808* 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. 809 810[3.7](https://github.com/ekmett/lens/issues?milestone=11&page=1&state=closed) 811----- 812* Renamed `Projection` to `Prism`. 813* Implemented a complete redesign of the way `Iso` and `Prism` are handled internally. Any `Iso` can now be used as a `Prism`. 814* The `isos` combinator is no longer required. `iso` can now be used to construct an `Iso`. 815* Changes to the signature of `from` and `under` were necessitated by the new design. 816* Added `Control.Lens.Wrapped` providing a canonical isomorphism for newtypes. 817* Repurposed `ala` to be closer to the original design in `newtype`, but added `au` and `alaf`. 818* Added `_magnitude`, `_phase` and `_conjugate` to `Data.Complex.Lens`. Renamed other lenses for consistency: `_realPart`, `_imagPart`, `_polar`. 819* Promoted `_left` and `_right` to prisms and moved them to `Control.Lens.Prism`. 820* Generalized `view` and `views` to subsume the old functionality of `peruse` and `peruses`. 821* Generalized `review` and `reviews` to both return a `MonadReader` and to work on a `Projection`. 822* Added `view'`/`views'` and `use'`/`uses'` for `Simple` access to the environment/state. 823* Added `set'`, a `Simple` version of `set`. 824* Added `reuse` : `use` :: `review` : `view` and `reuses` : `uses` :: `reviews` : `views` for working a `Projection` from the current `MonadState`. 825* Removed many isomorphisms for various newtypes. `_const`, `identity`, `_sum`, etc. Use `wrapping Const`, `wrapping Identity`, etc. 826* Removed `Data.Monoid.Lens` now that its newtypes are instances of `Wrapped`, exporting the (`<>=`)-variants from `Control.Lens.*`. 827* Renamed `via` to `cloneIso` for consistency. 828* Moved `Indexed(..)` to `Control.Lens.Classes`. 829* Renamed `index` to `indexed` to reduce conflicts with third-party libraries. 830* Added `curried` and `uncurried` to `Control.Lens.Iso`. 831* Added `Strict(strict)` for ad hoc overloading of conversions between strict and lazy variants of `ByteString` and `Text`. 832* Bug fixes for `tugTo` and `jerkTo`. 833* These no longer traverse in the wrong direction: `scanl1Of`, `scanr1Of`, `mapAccumLOf`, and `mapAccumROf`. 834* Added `anon` to `Control.Lens.Iso`. 835* Generalized the types of the `Control.Lens.Zipper` combinators to work with other MonadPlus instances. 836* Added `withins` to `Control.Lens.Zipper` now that they can work better with []. 837* 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`. 838* Generalized `sequenceAOf_`'s type to match `sequenceA_`. 839* Renamed `up`/`down`/`left`/`right` to `upward`/`downward`/`leftward`/`rightward` to reduce conflicts -- in particular with `Control.Arrow`. 840* Readded `leftmost` and `rightmost` due to the verbosity of `farthest leftward`/`farthest rightward`. 841* Added `preview`/`previews`/`firstOf` and deprecated `headOf`. 842* Added `iview`/`iviews`/`iuse`/`iuses` to `Control.Lens.IndexedGetter`. 843* We've generalized the type of Bazaar and provided generalized variants of `partsOf`, etc. that used it. 844 8453.6.0.4 [maintenance release] 846------- 847* Added support for `test-framework` 0.8 848 8493.6.0.3 [maintenance release] 850------- 851* Added support for `test-framework` 0.7 852 8533.6.0.2 [maintenance release] 854------- 855* Added more explicit dependencies to the doctest suite. 856* Disabled the 'expected failure' quickcheck tests that occasionally would fail with internal QuickCheck errors. 857 8583.6.0.1 [maintenance release] 859------- 860* Added explicit dependency on containers and unordered-containers to the doctest suite 861 862[3.6](https://github.com/ekmett/lens/issues?milestone=9&state=closed) 863--- 864* 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, 865 a single field that would be visited by `template`. 866* Added some missing `examples/` files to the distribution. 867* Renamed `Data.Bits.Lens.traverseBits` to `bits`. 868* Removed `(^!?)`, which was an alias for `(^?!)`. 869* Removed the need for `Trustworthy` by changing the implementation of `coerce` for `BazaarT`. 870* Moved BazaarT to `Control.Lens.Internal`. 871* Added `(<&>)` to `Control.Lens.Combinators`. 872* `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. 873* Added `elements` and `elementsOf` as indexed traversals for ordinal indexing into regular traversals that generalize `element` and `elementOf`. 874* Renamed `Data.Complex.Lens.traverseComplex` to `complex`. 875* Changed `Data.Complex.Lens.polarize` to a `Simple Iso`, due to the `RealFloat` constraint causing inference problems. 876* Renamed `traverseLeft` and `traverseRight` to `_left` and `_right` respectively. 877* Renamed `traverseSlice`, `traverseFrom`, and `traverseTo` in `Data.Sequence.Lens` to `sliced`, `slicedFrom`, and `slicedTo` respectively. 878* Renamed `traverseAt` to `_at` in `Control.Lens.IndexedTraversal`. 879* Renamed `traverseArray` to `_array` in `Data.Array.Lens`. 880* Renamed and made the combinators in `Control.Lens.Zipper` more compositional to reduce third-party naming conflicts down to just `left` and `right`. 881* Renamed `&=` and `|=` to `.&.=` and `.|.=` for consistency, mutatis mutandis their related operations. 882* Added a `Plated` instances for `Language.Haskell.TH` types. 883* Renamed `atIndex` and `atIndices` in `Data.Vector.Lens` and `Data.Vector.Generic.Lens` to `ordinal` and `ordinals` to match `Data.Sequence.Lens` 884 8853.5.1 886----- 887* Improved SafeHaskell inference. 888 889[3.5](https://github.com/ekmett/lens/issues?milestone=8&state=closed) 890--- 891* Fixed a potential SafeHaskell issue where a user could use `undefined` to derive `unsafeCoerce`. You now have to import an explicitly 892 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. :) 893* Renamed `EvilBazaar` to `BazaarT`. 894* Moved a lot of internals around. Most notably, `Gettable`, `Settable` and `Effective` have moved to `Control.Lens.Classes`. 895* Exposed `partsOf'` and `unsafePartsOf'` in `Control.Lens.Traversal` to reduce reliance on `BazaarT` in `Control.Lens.Zipper` 896 897[3.4](https://github.com/ekmett/lens/issues?milestone=7&state=closed) 898--- 899* Renamed `(%)` to `(&)` and `(^%)` to `(^&)`. This avoids the conflict with `Data.Ratio`, which was our highest priority conflict with a third party library. 900* Switched to a more liberal type for `ignored` 901* Removed some "`isplitting`" bad combinators from `Control.Lens.IndexedFold`. 902* Made `indexed`, `taking`, and `dropping` and `elementOf` lazier and capable of dealing with infinite traversals and infinite folds. 903* Improved `Indexing` to support infinite traversals and folds. 904* Removed some of the more redundant combinators from `Control.Lens.Plated`, which already had existing aliases in the rest of the traversal API. 905* Moved `partsOf`, `holesOf`, and `elementOf` into `Control.Lens.Traversal`. 906* Renamed `query` to `peruse` and `queries` to `peruses`. These are much less contentious names, 907 both contain `use` in their name for analogy to `use` and `uses` and the word is about reading. 908* Simpler `simple`. 909* Added `enum` and `non` to `Control.Lens.Iso`. 910* Added `(^?!)` to `Control.Lens.Fold` for unsafe access to the head of a `Fold`. 911* Changed `_head`, `_tail`, `_init` and `_last` to traversals in `Data.List.Lens` and `Data.Sequence.Lens`. 912* Eliminated `traverseHead`, `traverseTail`, `traverseInit` and `traverseLast`. 913* `partsOf` and `unsafePartsOf` can now also be applied to a `Fold` yielding a `Getter` or to a `MonadicFold` yielding an `Action`. 914 9153.3 916--- 917* 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. 918* Moved the various `foo#` combinators used to emit cleaner core into an unexported module, `Control.Lens.Unsafe`. This removes `MagicHash` from the public API. 919* Removed the `bazaar#` and `runBazaar#` coercions that caused issues on GHC HEAD. 920* Changed the default definition of `plate` to `uniplate` from `ignored`. 921* Added `Data.Vector.Lens` and instances for `Data.Vector`. 922* Added support for the `split` package, which is now part of the Haskell platform. 923* Removed redundant `Data.List.traverseList`. Use `itraversed` or `traverse` instead. 924* Moved `(:<->)` to `Control.Lens.Simple`. 925* Fixed a bug in `Control.Lens.TH` that was causing `makeIso` not to work. 926* Added `lifted` to `Control.Lens.Setter` for mapping over monads. 927* Added `beside` to `Control.Lens.Traversal`. 928* Removed the operators from `Data.List.Lens`, they broke the overall pattern of the rest of the API, and were terrible clutter. 929* Fixed a bug that caused `resultAt` to give wrong answers most of the time. 930* Changed `resultAt` to an `IndexedLens` and moved it to `Control.Lens.IndexedLens` 931* Changed `ignored` to an `IndexedTraversal` and moved it to `Control.Lens.IndexedTraversal` 932* We've relinquished the name `value`. 933 9343.2 935--- 936* Made `elementOf` lazier and moved it from `Control.Lens.Traversal` to `Control.Lens.Plated`. 937* Made `holesOf` and `partsOf` lazier to deal with infinite structures. 938* Resolved issue #75. We now generate nicer core for most `Setter` and `Fold` operations, and some others. 939* Made lenses for field access like `_1`, `_2`, etc. lazier. 940* Added `Control.Lens.Loupe`, which provides a limited form of `Lens` that can be read from and written to and which can compose 941 with other lenses, but can also be returned in a list or as a monadic result, but cannot be used directly for most combinators 942 without cloning it first. It is easier to compose than a `ReifiedLens`, but slightly slower. 943* Moved (`:=>`) and (`:->`) into `Control.Lens.Simple`, which is not exported by `Control.Lens` by default to reduce name conflicts with third party libraries. 944 9453.1 946--- 947* 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. 948* 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. 949* Added `taking` and `dropping` to `Control.Lens.Traversal`. 950 9513.0.6 952----- 953* 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! 954* Restored lenses to `Trustworthy` status so they can be used with Safe Haskell once more. 955 9563.0.5 957----- 958* Fixed a bug in `rights1` and `lefts1` in `Control.Lens.Zipper` which would cause them to loop forever when given a 0 offset. 959 9603.0.4 961----- 962* 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`. 963 9643.0.3 965----- 966* Refined the behavior of `substType` in `Control.Lens.TH` to match the behavior of `typeVarsEx` when moving under binders. 967 968 9693.0.2 970----- 971* Added `generateSignatures` option to `Control.Lens.TH` to allow the end user to disable the generation of type signatures for the 972 template-haskell generated lenses. This lets the user supply hand-written haddocks and more restricted signatures. 973 9743.0.1 975----- 976* Added `Control.Lens.Type.simple`. 977 978[3.0](https://github.com/ekmett/lens/issues?milestone=6&state=closed) 979--- 980* Added `Control.Lens.Zipper`. 981* Added `<<~`, a version of `<~` that supports chaining assignment. 982* Added `:->`, `:=>`, and `:<->` as type operator aliases for `Simple Lens`, `Simple Traversal`, and `Simple Iso` respectively. 983 984[2.9](https://github.com/ekmett/lens/issues?milestone=5&state=closed) 985--- 986* Added `<<%~`, `<<.~`, `<<%=` and `<<.=` for accessing the old values targeted by a `Lens` (or a summary of those targeted by a `Traversal`) 987* Renamed `|>` to `%`, as `%~` is the lensed version of `%`, and moved it to `Control.Lens.Getter` along with a version `^%` with tighter 988 precedence that can be interleaved with `^.` 989* Upgraded to `doctest` 0.9, which lets us factor out common `$setup` for our doctests 990* Renamed `merged` to `choosing`. Added a simpler `chosen` operation to mirror `both`. 991* Added `Control.Lens.Projection` 992* Renamed `traverseException` to `exception` and `traverseDynamic` to `dynamic`, upgrading them to use `Projection`. 993* `makeClassy` now places each generated `Lens` or `Traversal` inside the class it constructs when possible. 994 This makes it possible for users to just export `HasFoo(..)`, rather than have to enumerate each lens in 995 the export list. It can only do that if it creates the class. If the `createClass` flag is disabled, then 996 it will default to the old behavior. 997* Added `performs` to `Control.Lens.Action` to mirror `views` in `Control.Lens.Getter`. 998 999[2.8](https://github.com/ekmett/lens/issues?milestone=4&state=closed) 1000--- 1001* Restored compatibility with GHC 7.2. This required a major version bump due to making some MPTC-based default signatures conditional. 1002 10032.7.0.1 1004------- 1005* Added the missing `Control.Lens.Combinators` to exported-modules! Its absence was causing it not to be included on hackage. 1006 1007[2.7](https://github.com/ekmett/lens/issues?milestone=3&state=closed) 1008--- 1009* Generalized the signature of `Getting`, `Acting` and `IndexedGetting` to help out with the common user code scenario of needing to read 1010 and then write to change types. 1011* Documentation cleanup and additional examples. 1012* Renamed `au` to `ala`, introducing further incompatibility with the `newtype` package, but reducing confusion. 1013* Removed need for `Data.Map.Lens` and `Data.IntMap.Lens` by adding `TraverseMin` and `TraverseMax` to `Control.Lens.IndexedTraversal`. 1014* Flipped fixity of `~:` and `<~:` 1015* Added `++~`, `++=`, `<++~` and `<++=` to Data.List.Lens in response to popular demand. 1016* Added `|>`, `<$!>` and `<$!` to `Control.Lens.Combinators`, which exports combinators that are often useful in lens-based code, but that 1017 don't strictly involve lenses. 1018* Added an HUnit-based test suite by @orenbenkiki 1019 10202.6.1 1021----- 1022* Fixed bugs in `Traversal` code-generation. 1023 1024[2.6](https://github.com/ekmett/lens/issues?milestone=2&state=closed) 1025--- 1026* Added build option `-f-inlining` to facilitate building with the various TH 2.8 versions used by GHC 7.6 and HEAD. 1027* 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!) 1028* 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. 1029* Removed `_` from the lens names in `System.FilePath.Lens`. 1030* Added `iwhere`, `withIndices`, `withIndicesOf`, `indices` and `indicesOf` to ease work with indexed traversals 1031* Added `assign` as an alias for `(.=)` in `Control.Lens.Setter`. 1032* Added `~:`, `=:`, `<~:` and `<=:` to `Data.List.Lens` 1033 1034[2.5](https://github.com/ekmett/lens/issues?milestone=1&state=closed) 1035--- 1036* Added `Control.Lens.Plated`, a port of Neil Mitchell's `uniplate` that can be used on any `Traversal`. 1037* Added `Data.Data.Lens` with smart traversals that know how to avoid traversing parts of a structure that can't contain a given type. 1038* Added `Data.Typeable.Lens` with `_cast` and `_gcast` like `traverseData` 1039* 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. 1040* Renamed `Kleene` to `Bazaar` -- "a bazaar contains a bunch of stores." 1041* Added `Comonad` instances for `Context` and `Bazaar`, so we can use stores directly as the notion of an editable context in uniplate 1042* Compatibility with both sets of template haskell quirks for GHC 7.6.1-rc1 and the GHC 7.6.1 development head. 1043* Renamed `children` to `branches` in `Data.Tree.Lens`. 1044* Added `At` and `Contains` to `Control.Lens.IndexedLens`. 1045* Added `FunctorWithIndex`, `FoldableWithIndex`, and `TraversableWithIndex` under `Control.Lens.WithIndex` 1046* Added support for `unordered-containers`. 1047 10482.4.0.2 1049------- 1050* GHC 7.6.1 development HEAD compatibility (but broke 7.6.1-rc1) 1051 10522.4.0.1 1053------- 1054* Haddock cleanup 1055 10562.4 1057----- 1058* Added the indexed `Kleene` store to `Control.Lens.Internal` 1059* Moved `Gettable`, `Accessor`, `Settable` and `Mutator` to `Control.Lens.Internal` 1060* Added `cloneTraversal` to `Control.Lens.Traversal` 1061* Renamed `clone` to `cloneLens` in `Control.Lens.Type` 1062* Generalized the type of `zoom` to subsume `focus`. 1063* Removed `Focus(..)` from `Control.Lens.Type`. 1064* Factored out `Control.Lens.Isomorphic`. 1065* Moved many private types to `Control.Lens.Internal` 1066* Added `conFields` to `Language.Haskell.TH.Lens`. 1067* Added `System.FilePath.Lens`. 1068 10692.3 1070--- 1071* Added missing `{-# INLINE #-}` pragmas 1072* Renamed `meanwhile` to `throughout` in `Control.Parallel.Strategies.Lens` 1073* Added `Magnify` to `Control.Lens.Getter`. 1074* Added `Zoom` to `Control.Lens.Type`. 1075 10762.2 1077--- 1078* Added `<&=`, `<&~`, `<|=`, and `<|~` 1079* Moved `<>~`, `<<>~`, `<>=`, and `<<>=` to `Data.Monoid.Lens` 1080* Template Haskell now uses eager binding to avoid adding dependencies. 1081 10822.1 1083--- 1084* Renamed `adjust` to `over` 1085* Added `au`, `auf` and `under` 1086* Added `Data.Monoid.Lens` 1087* Increased lower dependency bound on `mtl` for cleaner installation. 1088