packages feed

microlens-th 0.2.1.3 → 0.2.2.0

raw patch · 3 files changed

+14/−8 lines, 3 filesdep ~microlensPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: microlens

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,11 @@+# 0.2.2.0++* Moved `Getter` and `Fold` from this package to microlens (they're in `Lens.Micro.Extras`).++# 0.2.1.3++* Bumped template-haskell (so that the package would compile with GHC HEAD).+ # 0.2.1.2  * Bumped microlens version to be able to use phantom.
microlens-th.cabal view
@@ -1,5 +1,5 @@ name:                microlens-th-version:             0.2.1.3+version:             0.2.2.0 synopsis:            Automatic generation of record lenses for microlens description:   This package lets you automatically generate lenses for data types; code was extracted from the lens package, and therefore generated lenses are fully compatible with ones generated by lens (and can be used both from lens and microlens).@@ -31,7 +31,7 @@   -- other-modules:   -- other-extensions:   build-depends:       base >=4.5 && <5-                     , microlens >=0.3.2 && <0.4+                     , microlens >=0.3.5 && <0.4                      , containers >=0.4.0 && <0.6                      -- lens has >=2.4, but GHC 7.4 shipped with 2.7                      , template-haskell >=2.7 && <2.12
src/Lens/Micro/TH.hs view
@@ -21,8 +21,8 @@    -- * Using this module in GHCi   -- $ghci-note-  -  -- * Types for compatibility++  -- * Exports of @Getter@ and @Fold@   -- $compat-note   Getter,   Fold,@@ -64,6 +64,7 @@ import           Data.List (nub, findIndices, stripPrefix, isPrefixOf) import           Data.Maybe import           Lens.Micro+import           Lens.Micro.Extras (Getter, Fold) import           Lens.Micro.Internal (phantom) import           Language.Haskell.TH @@ -134,11 +135,8 @@  {- $compat-note -When updates aren't allowed, or when a field simply can't be updated (for instance, in the presence of @forall@), instead of 'Lens' and 'Traversal' we generate 'Getter' and 'Fold'. These aren't true @Getter@ and @Fold@ from lens – they're not sufficiently polymorphic. Beware. (Still, they're compatible, it's just that you can't do some things with them that you can do with original ones.)+When updates aren't allowed, or when a field simply can't be updated (for instance, in the presence of @forall@), instead of 'Lens' and 'Traversal' we generate 'Getter' and 'Fold', which come from "Lens.Micro.Extras" and are reexported here. These aren't true @Getter@ and @Fold@ from lens – they're not sufficiently polymorphic. Beware. (Still, they're compatible, it's just that you can't do some things with them that you can do with original ones.) -}--type Getter s a = forall r. Getting r s a-type Fold s a = forall r. Applicative (Const r) => Getting r s a  -- Lens functions which would've been in Lens.Micro if it wasn't “micro”