microlens 0.4.9 → 0.4.9.1
raw patch · 3 files changed
+24/−8 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- microlens.cabal +1/−1
- src/Lens/Micro.hs +19/−7
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.4.9.1++* Reexported `<&>` from `Data.Functor` (on recent versions of `base`).+ # 0.4.9 * Added `<>~`.
microlens.cabal view
@@ -1,5 +1,5 @@ name: microlens-version: 0.4.9+version: 0.4.9.1 synopsis: A tiny lens library with no dependencies. If you're writing an app, you probably want microlens-platform, not this. description: NOTE: If you're writing an app, you probably want <http://hackage.haskell.org/package/microlens-platform microlens-platform> – it has the most features. <http://hackage.haskell.org/package/microlens microlens> is intended more for library writers who want a tiny lens library (after all, lenses are pretty useful for everything, not just for updating records!).
src/Lens/Micro.hs view
@@ -32,6 +32,7 @@ (&), -- $ampersand-note (<&>),+ -- $reverse-fmap-note -- * Setter: modifies something in a structure -- $setters-note@@ -113,10 +114,14 @@ import qualified Data.Foldable as F import Unsafe.Coerce -#if __GLASGOW_HASKELL__ >= 710+#if MIN_VERSION_base(4,8,0) import Data.Function ((&)) #endif +#if MIN_VERSION_base(4,11,0)+import Data.Functor ((<&>))+#endif+ -- This is for the reimplementation of State #if MIN_VERSION_base(4,9,0) import qualified Control.Monad.Fail as Fail@@ -128,7 +133,7 @@ -} -#if __GLASGOW_HASKELL__ < 710+#if !(MIN_VERSION_base(4,8,0)) {- | '&' is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator '$', which allows '&' to be nested in '$'. -}@@ -162,7 +167,19 @@ @ -} +#if !(MIN_VERSION_base(4,11,0)) {- |+Flipped version of '<$>'.+-}+(<&>) :: Functor f => f a -> (a -> b) -> f b+(<&>) x f = f <$> x+{-# INLINE (<&>) #-}++infixl 1 <&>+#endif++{- $reverse-fmap-note+ ('<&>') is flipped ('<$>'): @@@ -185,11 +202,6 @@ Nothing -> 'pure' map @ -}-(<&>) :: Functor f => f a -> (a -> b) -> f b-(<&>) x f = f <$> x-{-# INLINE (<&>) #-}--infixl 1 <&> -- Setting -----------------------------------------------------------------