microlens 0.4.2.0 → 0.4.2.1
raw patch · 7 files changed
+29/−3 lines, 7 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Lens.Micro: infixl 1 &
+ Lens.Micro: infixl 5 `failing`
+ Lens.Micro: infixl 8 ^?!
+ Lens.Micro: infixr 4 .~
+ Lens.Micro: instance Control.Monad.Fail.MonadFail m => Control.Monad.Fail.MonadFail (Lens.Micro.StateT s m)
- Lens.Micro.Internal: each :: Each s t a b => Traversal s t a b
+ Lens.Micro.Internal: each :: (Each s t a b, Traversable g, s ~ g a, t ~ g b) => Traversal s t a b
- Lens.Micro.Internal: ix :: Ixed m => Index m -> Traversal' m (IxValue m)
+ Lens.Micro.Internal: ix :: (Ixed m, At m) => Index m -> Traversal' m (IxValue m)
Files
- CHANGELOG.md +4/−0
- LICENSE +2/−1
- microlens.cabal +2/−2
- src/Lens/Micro.hs +8/−0
- src/Lens/Micro/Extras.hs +5/−0
- src/Lens/Micro/Internal.hs +4/−0
- src/Lens/Micro/Type.hs +4/−0
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.4.2.1++* Added forgotten copyright/authorship information.+ # 0.4.2.0 * Added `singular`.
LICENSE view
@@ -1,4 +1,5 @@-Copyright (c) 2015, Artyom+Copyright (c) 2013-2016 Edward Kmett,+ 2015-2016 Artyom All rights reserved.
microlens.cabal view
@@ -1,5 +1,5 @@ name: microlens-version: 0.4.2.0+version: 0.4.2.1 synopsis: A tiny part of the lens library with no dependencies description: This is an extract from <http://hackage.haskell.org/package/lens lens> (with no dependencies). It's not a toy lenses library, unsuitable for “real world”, but merely a small one. It is compatible with lens, and should have same performance. It also has better documentation.@@ -27,7 +27,7 @@ Note that microlens has /no/ dependencies starting from GHC 7.10 (base-4.8). Prior to that, it has to depend on transformers-0.2 or above. license: BSD3 license-file: LICENSE-author: Artyom+author: Edward Kmett, Artyom maintainer: Artyom <yom@artyom.me> homepage: http://github.com/aelve/microlens bug-reports: http://github.com/aelve/microlens/issues
src/Lens/Micro.hs view
@@ -10,6 +10,11 @@ #-} +{- |+Module : Lens.Micro+Copyright : (C) 2013-2016 Edward Kmett, 2015-2016 Artyom+License : BSD-style (see the file LICENSE)+-} module Lens.Micro ( (&),@@ -1026,12 +1031,15 @@ state :: Monad m => (s -> (a, s)) -> StateT s m a state f = StateT (return . f)+{-# INLINE state #-} evalState :: State s a -> s -> a evalState m s = fst (runState m s)+{-# INLINE evalState #-} runState :: State s a -> s -> (a, s) runState m = runIdentity . runStateT m+{-# INLINE runState #-} instance (Functor m) => Functor (StateT s m) where fmap f m = StateT $ \ s ->
src/Lens/Micro/Extras.hs view
@@ -3,6 +3,11 @@ #-} +{- |+Module : Lens.Micro.Extras+Copyright : (C) 2013-2016 Edward Kmett, 2015-2016 Artyom+License : BSD-style (see the file LICENSE)+-} module Lens.Micro.Extras ( view,
src/Lens/Micro/Internal.hs view
@@ -15,6 +15,10 @@ {- |+Module : Lens.Micro.Internal+Copyright : (C) 2013-2016 Edward Kmett, 2015-2016 Artyom+License : BSD-style (see the file LICENSE)+ This module is needed to give other packages from the microlens family (like <http://hackage.haskell.org/package/microlens-ghc microlens-ghc>) access to functions and classes that don't need to be exported from "Lens.Micro" (because they just clutter the namespace). Also: * 'traversed' is here because otherwise there'd be a dependency cycle
src/Lens/Micro/Type.hs view
@@ -6,6 +6,10 @@ {- |+Module : Lens.Micro.Type+Copyright : (C) 2013-2016 Edward Kmett, 2015-2016 Artyom+License : BSD-style (see the file LICENSE)+ This module provides just the types ('Lens', 'Traversal', etc). It's needed to break the dependency cycle – "Lens.Micro" depends on "Lens.Micro.Internal", but "Lens.Micro.Internal" needs types like 'Lens', so 'Lens' can't be defined in "Lens.Micro". -} module Lens.Micro.Type