Hello community,

here is the log from the commit of package ghc-microlens for openSUSE:Factory 
checked in at 2017-04-14 13:38:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-microlens (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-microlens.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-microlens"

Fri Apr 14 13:38:20 2017 rev:7 rq:485141 version:0.4.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-microlens/ghc-microlens.changes      
2016-09-05 21:20:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-microlens.new/ghc-microlens.changes 
2017-04-14 13:38:21.421998491 +0200
@@ -1,0 +2,5 @@
+Tue Mar 14 09:26:28 UTC 2017 - [email protected]
+
+- Update to version 0.4.8.0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  microlens-0.4.7.0.tar.gz

New:
----
  microlens-0.4.8.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-microlens.spec ++++++
--- /var/tmp/diff_new_pack.fSHctR/_old  2017-04-14 13:38:22.757809701 +0200
+++ /var/tmp/diff_new_pack.fSHctR/_new  2017-04-14 13:38:22.761809136 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-microlens
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %global pkg_name microlens
 Name:           ghc-%{pkg_name}
-Version:        0.4.7.0
+Version:        0.4.8.0
 Release:        0
 Summary:        A tiny lens library with no dependencies. If you're writing an 
app, you probably want microlens-platform, not this
 License:        BSD-3-Clause

++++++ microlens-0.4.7.0.tar.gz -> microlens-0.4.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.7.0/CHANGELOG.md 
new/microlens-0.4.8.0/CHANGELOG.md
--- old/microlens-0.4.7.0/CHANGELOG.md  2016-08-12 00:26:02.000000000 +0200
+++ new/microlens-0.4.8.0/CHANGELOG.md  2017-03-07 14:57:26.000000000 +0100
@@ -1,3 +1,8 @@
+# 0.4.8.0
+
+* Added `forOf_` and `forOf`.
+* Added an instance for `Each (NonEmpty a)` (available starting from GHC 8).
+
 # 0.4.7.0
 
 * Fixed the [Haddock crash on GHC 
8](https://github.com/aelve/microlens/issues/72) by removing default method 
implementations (`each = traverse` and `ix = ixAt`). If you had custom 
instances of `Ixed` or `Each` which relied on default methods, they'd stop 
working.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.7.0/microlens.cabal 
new/microlens-0.4.8.0/microlens.cabal
--- old/microlens-0.4.7.0/microlens.cabal       2016-08-12 00:26:02.000000000 
+0200
+++ new/microlens-0.4.8.0/microlens.cabal       2017-03-07 14:57:26.000000000 
+0100
@@ -1,5 +1,5 @@
 name:                microlens
-version:             0.4.7.0
+version:             0.4.8.0
 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!).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.7.0/src/Lens/Micro/Internal.hs 
new/microlens-0.4.8.0/src/Lens/Micro/Internal.hs
--- old/microlens-0.4.7.0/src/Lens/Micro/Internal.hs    2016-08-12 
00:26:02.000000000 +0200
+++ new/microlens-0.4.8.0/src/Lens/Micro/Internal.hs    2017-03-07 
14:57:26.000000000 +0100
@@ -64,6 +64,10 @@
 import Data.Functor.Identity
 import Data.Complex
 
+#if __GLASGOW_HASKELL__ >= 800
+import Data.List.NonEmpty (NonEmpty)
+#endif
+
 #if __GLASGOW_HASKELL__ < 710
 import Data.Traversable
 #endif
@@ -73,7 +77,7 @@
 #else
 import Unsafe.Coerce
 #endif
-  
+
 
 {- |
 'traversed' traverses any 'Traversable' container (list, vector, @Map@, 
'Maybe', you name it):
@@ -218,6 +222,12 @@
   each = traverse
   {-# INLINE each #-}
 
+#if __GLASGOW_HASKELL__ >= 800
+instance Each (NonEmpty a) (NonEmpty b) a b where
+  each = traversed
+  {-# INLINE each #-}
+#endif
+
 type family Index (s :: *) :: *
 
 type family IxValue (m :: *) :: *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.7.0/src/Lens/Micro.hs 
new/microlens-0.4.8.0/src/Lens/Micro.hs
--- old/microlens-0.4.7.0/src/Lens/Micro.hs     2016-08-12 00:26:02.000000000 
+0200
+++ new/microlens-0.4.8.0/src/Lens/Micro.hs     2017-03-07 14:57:26.000000000 
+0100
@@ -58,6 +58,7 @@
   (^?),
   (^?!),
   traverseOf_,
+  forOf_,
   has,
   folded,
   folding,
@@ -78,6 +79,7 @@
   -- $traversals-note
   Traversal, Traversal',
   traverseOf,
+  forOf,
   singular,
   failing,
   filtered,
@@ -607,6 +609,27 @@
 {-# INLINE traverseOf_ #-}
 
 {- |
+'traverseOf_' with flipped arguments. Useful if the “loop body” is a lambda
+or a @do@ block, or in some other cases – for instance, you can avoid
+accidentally using 'Data.Foldable.for_' on a tuple or 'Either' by switching
+to @'forOf_' 'each'@. Or you can write custom loops like these:
+
+@
+'forOf_' 'both' (a, b) $ \\x -\>
+  ...
+'forOf_' 'each' [1..10] $ \\x -\>
+  ...
+'forOf_' ('each' . '_Right') $ \\x -\>
+  ...
+@
+-}
+forOf_
+  :: Functor f
+  => Getting (Traversed r f) s a -> s -> (a -> f r) -> f ()
+forOf_ = flip . traverseOf_
+{-# INLINE forOf_ #-}
+
+{- |
 'has' checks whether a getter (any getter, including lenses, traversals, and 
folds) returns at least 1 value.
 
 Checking whether a list is non-empty:
@@ -882,6 +905,14 @@
 {-# INLINE traverseOf #-}
 
 {- |
+'traverseOf' with flipped arguments. Useful if the “loop body” is a lambda or
+a @do@ block.
+-}
+forOf :: LensLike f s t a b -> s -> (a -> f b) -> f t
+forOf = flip
+{-# INLINE forOf #-}
+
+{- |
 'singular' turns a traversal into a lens that behaves like a single-element 
traversal:
 
 >>> [1,2,3] ^. signular each


Reply via email to