Hello community,

here is the log from the commit of package ghc-microlens for openSUSE:Factory 
checked in at 2018-05-30 12:10:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-microlens (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-microlens.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-microlens"

Wed May 30 12:10:39 2018 rev:8 rq:607835 version:0.4.9.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-microlens/ghc-microlens.changes      
2017-04-14 13:38:21.421998491 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-microlens.new/ghc-microlens.changes 
2018-05-30 12:26:21.116240614 +0200
@@ -1,0 +2,10 @@
+Mon May 14 17:02:11 UTC 2018 - psim...@suse.com
+
+- Update microlens to version 0.4.9.1.
+  * Reexported `<&>` from `Data.Functor` (on recent versions of `base`).
+  * Added `<>~`.
+  * Added fixities for `<%~`, `<<%~`, `<<.~`.
+  * Fixed compilation on GHC 8.4.
+  * Added `HasCallStack` for some partial functions.
+
+-------------------------------------------------------------------

Old:
----
  microlens-0.4.8.0.tar.gz

New:
----
  microlens-0.4.9.1.tar.gz

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

Other differences:
------------------
++++++ ghc-microlens.spec ++++++
--- /var/tmp/diff_new_pack.r88amv/_old  2018-05-30 12:26:21.872215051 +0200
+++ /var/tmp/diff_new_pack.r88amv/_new  2018-05-30 12:26:21.872215051 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-microlens
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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,16 +18,15 @@
 
 %global pkg_name microlens
 Name:           ghc-%{pkg_name}
-Version:        0.4.8.0
+Version:        0.4.9.1
 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
-Group:          Development/Languages/Other
-Url:            https://hackage.haskell.org/package/%{pkg_name}
+Group:          Development/Libraries/Haskell
+URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-rpm-macros
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 NOTE: If you're writing an app, you probably want
@@ -89,7 +88,7 @@
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
-Group:          Development/Libraries/Other
+Group:          Development/Libraries/Haskell
 Requires:       %{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}
@@ -114,11 +113,9 @@
 %ghc_pkg_recache
 
 %files -f %{name}.files
-%defattr(-,root,root,-)
-%doc LICENSE
+%license LICENSE
 
 %files devel -f %{name}-devel.files
-%defattr(-,root,root,-)
 %doc CHANGELOG.md
 
 %changelog

++++++ microlens-0.4.8.0.tar.gz -> microlens-0.4.9.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.8.0/CHANGELOG.md 
new/microlens-0.4.9.1/CHANGELOG.md
--- old/microlens-0.4.8.0/CHANGELOG.md  2017-03-07 14:57:26.000000000 +0100
+++ new/microlens-0.4.9.1/CHANGELOG.md  2018-03-24 14:11:56.000000000 +0100
@@ -1,3 +1,24 @@
+# 0.4.9.1
+
+* Reexported `<&>` from `Data.Functor` (on recent versions of `base`).
+
+# 0.4.9
+
+* Added `<>~`.
+* Added fixities for `<%~`, `<<%~`, `<<.~`.
+
+# 0.4.8.3
+
+* Fixed compilation on GHC 8.4.
+
+# 0.4.8.2
+
+Skipped (the tarball got corrupted).
+
+# 0.4.8.1
+
+* Added `HasCallStack` for some partial functions.
+
 # 0.4.8.0
 
 * Added `forOf_` and `forOf`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.8.0/microlens.cabal 
new/microlens-0.4.9.1/microlens.cabal
--- old/microlens-0.4.8.0/microlens.cabal       2017-03-07 14:57:26.000000000 
+0100
+++ new/microlens-0.4.9.1/microlens.cabal       2018-03-24 14:11:52.000000000 
+0100
@@ -1,5 +1,5 @@
 name:                microlens
-version:             0.4.8.0
+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!).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.8.0/src/Lens/Micro/Extras.hs 
new/microlens-0.4.9.1/src/Lens/Micro/Extras.hs
--- old/microlens-0.4.8.0/src/Lens/Micro/Extras.hs      2017-03-07 
14:57:26.000000000 +0100
+++ new/microlens-0.4.9.1/src/Lens/Micro/Extras.hs      2018-03-09 
11:39:19.000000000 +0100
@@ -1,6 +1,4 @@
-{-# LANGUAGE
-Trustworthy
-  #-}
+{-# LANGUAGE Trustworthy #-}
 
 
 {- |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.8.0/src/Lens/Micro/Internal.hs 
new/microlens-0.4.9.1/src/Lens/Micro/Internal.hs
--- old/microlens-0.4.8.0/src/Lens/Micro/Internal.hs    2017-03-07 
14:57:26.000000000 +0100
+++ new/microlens-0.4.9.1/src/Lens/Micro/Internal.hs    2018-03-09 
11:39:19.000000000 +0100
@@ -1,16 +1,16 @@
-{-# LANGUAGE
-CPP,
-FlexibleContexts,
-FlexibleInstances,
-UndecidableInstances,
-RankNTypes,
-ScopedTypeVariables,
-KindSignatures,
-TypeFamilies,
-MultiParamTypeClasses,
-FunctionalDependencies,
-Unsafe
-  #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE FunctionalDependencies #-}
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE ImplicitParams #-}
+{-# LANGUAGE Unsafe #-}
 
 
 {- |
@@ -52,6 +52,9 @@
   Cons(..),
   Snoc(..),
   Strict(..),
+
+  -- * CallStack
+  HasCallStack,
 )
 where
 
@@ -78,6 +81,17 @@
 import Unsafe.Coerce
 #endif
 
+-- We don't depend on the call-stack package because building an extra
+-- package is likely slower than adding several lines of code here.
+#if MIN_VERSION_base(4,9,0)
+import GHC.Stack (HasCallStack)
+#elif MIN_VERSION_base(4,8,1)
+import qualified GHC.Stack as GHC
+type HasCallStack = (?callStack :: GHC.CallStack)
+#else
+import GHC.Exts (Constraint)
+type HasCallStack = (() :: Constraint)
+#endif
 
 {- |
 'traversed' traverses any 'Traversable' container (list, vector, @Map@, 
'Maybe', you name it):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.8.0/src/Lens/Micro/Type.hs 
new/microlens-0.4.9.1/src/Lens/Micro/Type.hs
--- old/microlens-0.4.8.0/src/Lens/Micro/Type.hs        2017-03-07 
14:57:26.000000000 +0100
+++ new/microlens-0.4.9.1/src/Lens/Micro/Type.hs        2018-03-09 
11:39:19.000000000 +0100
@@ -1,8 +1,6 @@
-{-# LANGUAGE
-CPP,
-RankNTypes,
-Safe
-  #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE Safe #-}
 
 
 {- |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/microlens-0.4.8.0/src/Lens/Micro.hs 
new/microlens-0.4.9.1/src/Lens/Micro.hs
--- old/microlens-0.4.8.0/src/Lens/Micro.hs     2017-03-07 14:57:26.000000000 
+0100
+++ new/microlens-0.4.9.1/src/Lens/Micro.hs     2018-03-24 14:17:31.000000000 
+0100
@@ -1,13 +1,12 @@
-{-# LANGUAGE
-CPP,
-FlexibleInstances,
-FlexibleContexts,
-UndecidableInstances,
-RankNTypes,
-ScopedTypeVariables,
-MonoLocalBinds,
-Trustworthy
-  #-}
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE MonoLocalBinds #-}
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE Trustworthy #-}
 
 
 {- |
@@ -33,12 +32,14 @@
   (&),
   -- $ampersand-note
   (<&>),
+  -- $reverse-fmap-note
 
   -- * Setter: modifies something in a structure
   -- $setters-note
   ASetter, ASetter',
   sets,
   (%~), over,
+  (<>~),
   (.~), set,
   (?~),
   (<%~), (<<%~), (<<.~),
@@ -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 -----------------------------------------------------------------
 
@@ -292,6 +304,18 @@
 {-# INLINE over #-}
 
 {- |
+('<>~') appends a value monoidally to the target.
+
+>>> ("hello", "goodbye") & both <>~ " world!"
+("hello world!", "goodbye world!")
+-}
+(<>~) :: (Monoid a) => ASetter s t a a -> a -> s -> t
+(<>~) l a = over l (`mappend` a)
+{-# INLINE (<>~) #-}
+
+infixr 4 <>~
+
+{- |
 ('.~') assigns a value to the target. It's the same thing as using ('%~') with 
'const':
 
 @
@@ -387,6 +411,8 @@
 (<%~) l f = l (join (,) . f)
 {-# INLINE (<%~) #-}
 
+infixr 4 <%~
+
 {- |
 This is a version of ('%~') which modifies the structure and returns it along 
with the old value:
 
@@ -404,6 +430,8 @@
 (<<%~) l f = l (\a -> (a, f a))
 {-# INLINE (<<%~) #-}
 
+infixr 4 <<%~
+
 {- |
 This is a version of ('.~') which modifies the structure and returns it along 
with the old value:
 
@@ -421,6 +449,8 @@
 (<<.~) l x = l (\a -> (a, x))
 {-# INLINE (<<.~) #-}
 
+infixr 4 <<.~
+
 -- Getting -----------------------------------------------------------------
 
 {- $getters-note
@@ -587,7 +617,7 @@
 {- |
 ('^?!') is an unsafe variant of ('^?') – instead of using 'Nothing' to 
indicate that there were no elements returned, it throws an exception.
 -}
-(^?!) :: s -> Getting (Endo a) s a -> a
+(^?!) :: HasCallStack => s -> Getting (Endo a) s a -> a
 s ^?! l = foldrOf l const (error "(^?!): empty Fold") s
 {-# INLINE (^?!) #-}
 
@@ -816,7 +846,7 @@
 >>> Just 1 & non 0 %~ subtract 1
 Nothing
 
->>> Just 1 & non 0 .~ (+ 1)
+>>> Just 1 & non 0 %~ (+ 1)
 Just 2
 
 'non' is often useful when combined with 'at'. For instance, if you have a map 
of songs and their playcounts, it makes sense not to store songs with 0 plays 
in the map; 'non' can act as a filter that wouldn't pass such entries.
@@ -915,7 +945,7 @@
 {- |
 'singular' turns a traversal into a lens that behaves like a single-element 
traversal:
 
->>> [1,2,3] ^. signular each
+>>> [1,2,3] ^. singular each
 1
 
 >>> [1,2,3] & singular each %~ negate
@@ -930,7 +960,7 @@
 
 >>> [] & singular each %~ negate
 -}
-singular :: Traversal s t a a -> Lens s t a a
+singular :: HasCallStack => Traversal s t a a -> Lens s t a a
 singular l afb s = case ins b of
   (w:ws) -> unsafeOuts b . (:ws) <$> afb w
   []     -> unsafeOuts b . return <$>
@@ -969,7 +999,7 @@
 infixl 5 `failing`
 
 {- |
-'filtered' is a traversal that filters elements “passing” thru it:
+'filtered' is a traversal that filters elements “passing” through it:
 
 >>> (1,2,3,4) ^.. each
 [1,2,3,4]
@@ -1000,7 +1030,7 @@
 
 @
 filtered :: (a -> Bool) -> 'Traversal'' a a
-filtered p s = if p s then f s else 'pure' s
+filtered p f s = if p s then f s else 'pure' s
 @
 
 By the way, note that 'filtered' can generate illegal traversals – sometimes 
this can bite you. In particular, an optimisation that should be safe becomes 
unsafe. (To the best of my knowledge, this optimisation never happens 
automatically. If you just use 'filtered' to modify/view something, you're 
safe. If you don't define any traversals that use 'filtered', you're safe too.)
@@ -1032,7 +1062,7 @@
 pairedWithEvens = 'each' '.' 'filtered' ('even' '.' 'fst') '.' '_2'
 @
 
-Since you can't do anything with the 1st components thru this traversal, the 
following holds for any @f@ and @g@:
+Since you can't do anything with the 1st components through this traversal, 
the following holds for any @f@ and @g@:
 
 @
 'over' pairedWithEvens f '.' 'over' pairedWithEvens g = 'over' pairedWithEvens 
(f '.' g)
@@ -1167,7 +1197,7 @@
 
 Gathering all @Left@s in a structure (like the 'Data.Either.lefts' function, 
but not necessarily just for lists):
 
->>> [Left 1, Right 'c', Left 3] ^.. each._Just
+>>> [Left 1, Right 'c', Left 3] ^.. each._Left
 [1,3]
 
 Checking whether an 'Either' is a 'Left' (like 'Data.Either.isLeft'):
@@ -1274,8 +1304,14 @@
 instance Applicative f => Monoid (Traversed a f) where
   mempty = Traversed (pure (error "Lens.Micro.Traversed: value used"))
   {-# INLINE mempty #-}
+#if !MIN_VERSION_base(4,11,0)
   Traversed ma `mappend` Traversed mb = Traversed (ma *> mb)
   {-# INLINE mappend #-}
+#else
+instance Applicative f => Semigroup (Traversed a f) where
+  Traversed ma <> Traversed mb = Traversed (ma *> mb)
+  {-# INLINE (<>) #-}
+#endif
 
 newtype Bazaar a b t = Bazaar (forall f. Applicative f => (a -> f b) -> f t)
 


Reply via email to