Hello community,

here is the log from the commit of package ghc-mono-traversable for 
openSUSE:Leap:15.2 checked in at 2020-02-19 18:40:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/ghc-mono-traversable (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.ghc-mono-traversable.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-mono-traversable"

Wed Feb 19 18:40:08 2020 rev:12 rq:771383 version:1.0.15.1

Changes:
--------
--- 
/work/SRC/openSUSE:Leap:15.2/ghc-mono-traversable/ghc-mono-traversable.changes  
    2020-01-15 15:02:21.285807898 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.ghc-mono-traversable.new.26092/ghc-mono-traversable.changes
   2020-02-19 18:40:08.638111702 +0100
@@ -1,0 +2,41 @@
+Sun Dec 29 10:27:23 UTC 2019 - [email protected]
+
+- Update mono-traversable to version 1.0.15.1.
+  # ChangeLog for mono-traversable
+
+  ## 1.0.15.1
+
+  * Remove whitespace after `@` in as-patterns for GHC HEAD 
[#186](https://github.com/snoyberg/mono-traversable/pull/186)
+
+  ## 1.0.15.0
+
+  * Added `toNonEmpty` to `Data.NonNull`
+    [#185](https://github.com/snoyberg/mono-traversable/pull/185)
+
+  ## 1.0.14.0
+  * Added `WrappedMono` to `Data.MonoTraversable`
+    [#182](https://github.com/snoyberg/mono-traversable/pull/182)
+
+-------------------------------------------------------------------
+Fri Nov  8 16:14:15 UTC 2019 - Peter Simons <[email protected]>
+
+- Drop obsolete group attributes.
+
+-------------------------------------------------------------------
+Fri Oct  4 02:01:58 UTC 2019 - [email protected]
+
+- Update mono-traversable to version 1.0.13.0.
+  ## 1.0.13.0
+  * Added `WrappedPoly` to `Data.MonoTraversable`
+    [#180](https://github.com/snoyberg/mono-traversable/pull/180)
+
+-------------------------------------------------------------------
+Thu Aug 15 02:01:34 UTC 2019 - [email protected]
+
+- Update mono-traversable to version 1.0.12.0.
+  ## 1.0.12.0
+  * Added `filterSet` to `Data.Containers`
+  * Use container specific implementations for `filterSet` and `filterMap`
+    [#178](https://github.com/snoyberg/mono-traversable/pull/178)
+
+-------------------------------------------------------------------

Old:
----
  mono-traversable-1.0.11.0.tar.gz

New:
----
  mono-traversable-1.0.15.1.tar.gz

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

Other differences:
------------------
++++++ ghc-mono-traversable.spec ++++++
--- /var/tmp/diff_new_pack.XIMO6Z/_old  2020-02-19 18:40:08.994112139 +0100
+++ /var/tmp/diff_new_pack.XIMO6Z/_new  2020-02-19 18:40:08.994112139 +0100
@@ -19,11 +19,10 @@
 %global pkg_name mono-traversable
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.0.11.0
+Version:        1.0.15.1
 Release:        0
 Summary:        Type classes for mapping, folding, and traversing monomorphic 
containers
 License:        MIT
-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
@@ -50,7 +49,6 @@
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
-Group:          Development/Libraries/Haskell
 Requires:       %{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}

++++++ mono-traversable-1.0.11.0.tar.gz -> mono-traversable-1.0.15.1.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mono-traversable-1.0.11.0/ChangeLog.md 
new/mono-traversable-1.0.15.1/ChangeLog.md
--- old/mono-traversable-1.0.11.0/ChangeLog.md  2019-02-02 17:09:51.000000000 
+0100
+++ new/mono-traversable-1.0.15.1/ChangeLog.md  2019-12-25 06:14:05.000000000 
+0100
@@ -1,3 +1,27 @@
+# ChangeLog for mono-traversable
+
+## 1.0.15.1
+
+* Remove whitespace after `@` in as-patterns for GHC HEAD 
[#186](https://github.com/snoyberg/mono-traversable/pull/186)
+
+## 1.0.15.0
+
+* Added `toNonEmpty` to `Data.NonNull`
+  [#185](https://github.com/snoyberg/mono-traversable/pull/185)
+
+## 1.0.14.0
+* Added `WrappedMono` to `Data.MonoTraversable`
+  [#182](https://github.com/snoyberg/mono-traversable/pull/182)
+
+## 1.0.13.0
+* Added `WrappedPoly` to `Data.MonoTraversable`
+  [#180](https://github.com/snoyberg/mono-traversable/pull/180)
+
+## 1.0.12.0
+* Added `filterSet` to `Data.Containers`
+* Use container specific implementations for `filterSet` and `filterMap`
+  [#178](https://github.com/snoyberg/mono-traversable/pull/178)
+
 ## 1.0.11.0
 
 * Adding monomorphic instances for GHC.Generics and Data.Proxy types
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mono-traversable-1.0.11.0/README.md 
new/mono-traversable-1.0.15.1/README.md
--- old/mono-traversable-1.0.11.0/README.md     2018-08-02 07:29:05.000000000 
+0200
+++ new/mono-traversable-1.0.15.1/README.md     2019-12-25 06:12:47.000000000 
+0100
@@ -155,7 +155,7 @@
 * IsMap: unifies operations across different `Map`s
 * MonoZip: zip operations on MonoFunctors.
 
-Note that because `Set` and `Map` are not a Functor (and therefore not 
MonoFoldable), one must use `mapFromList`, `mapToList`, `setFromList`, and 
`setToList`.
+Note that because `Set` is not a Functor (and therefore neither a MonoFunctor 
nor MonoTraversable), one must use `setFromList` and `setToList` to `omap` or 
`otraverse` over the elements of a `Set`.
 
 
 ### Sequences
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mono-traversable-1.0.11.0/mono-traversable.cabal 
new/mono-traversable-1.0.15.1/mono-traversable.cabal
--- old/mono-traversable-1.0.11.0/mono-traversable.cabal        2019-02-02 
17:10:44.000000000 +0100
+++ new/mono-traversable-1.0.15.1/mono-traversable.cabal        2019-12-25 
06:14:22.000000000 +0100
@@ -1,13 +1,13 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.31.1.
+-- This file has been generated from package.yaml by hpack version 0.31.2.
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: d58c5bc6fce9bf509cf559fa04639076650c2e3c940a7a1d113ea8f647a49335
+-- hash: b2ac08c2845dd12213a3bc3c6e01f805bb98a7693a588b0ae313ceadcb5ca592
 
 name:           mono-traversable
-version:        1.0.11.0
+version:        1.0.15.1
 synopsis:       Type classes for mapping, folding, and traversing monomorphic 
containers
 description:    Please see the README at 
<https://www.stackage.org/package/mono-traversable>
 category:       Data
@@ -27,11 +27,19 @@
   location: https://github.com/snoyberg/mono-traversable
 
 library
+  exposed-modules:
+      Data.Containers
+      Data.MonoTraversable
+      Data.MonoTraversable.Unprefixed
+      Data.NonNull
+      Data.Sequences
+  other-modules:
+      Paths_mono_traversable
   hs-source-dirs:
       src
   ghc-options: -Wall
   build-depends:
-      base >=4.9 && <5
+      base >=4.10 && <5
     , bytestring >=0.9
     , containers >=0.5.8
     , hashable
@@ -44,19 +52,14 @@
   if impl(ghc <8.0)
     build-depends:
         semigroups >=0.10
-  exposed-modules:
-      Data.Containers
-      Data.MonoTraversable
-      Data.MonoTraversable.Unprefixed
-      Data.NonNull
-      Data.Sequences
-  other-modules:
-      Paths_mono_traversable
   default-language: Haskell2010
 
 test-suite test
   type: exitcode-stdio-1.0
   main-is: main.hs
+  other-modules:
+      Spec
+      Paths_mono_traversable
   hs-source-dirs:
       test
   ghc-options: -O0
@@ -74,14 +77,13 @@
     , transformers
     , unordered-containers
     , vector
-  other-modules:
-      Spec
-      Paths_mono_traversable
   default-language: Haskell2010
 
 benchmark sorting
   type: exitcode-stdio-1.0
   main-is: sorting.hs
+  other-modules:
+      Paths_mono_traversable
   hs-source-dirs:
       bench
   ghc-options: -Wall -O2
@@ -91,6 +93,4 @@
     , mono-traversable
     , mwc-random
     , vector
-  other-modules:
-      Paths_mono_traversable
   default-language: Haskell2010
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mono-traversable-1.0.11.0/src/Data/Containers.hs 
new/mono-traversable-1.0.15.1/src/Data/Containers.hs
--- old/mono-traversable-1.0.11.0/src/Data/Containers.hs        2018-08-02 
07:29:05.000000000 +0200
+++ new/mono-traversable-1.0.15.1/src/Data/Containers.hs        2019-08-14 
05:22:01.000000000 +0200
@@ -616,6 +616,8 @@
     {-# INLINE mapWithKey #-}
     omapKeysWith = Map.mapKeysWith
     {-# INLINE omapKeysWith #-}
+    filterMap = Map.filter
+    {-# INLINE filterMap #-}
 
 #if MIN_VERSION_containers(0, 5, 0)
 -- | This instance uses the functions from "Data.HashMap.Strict".
@@ -653,6 +655,8 @@
     --unionsWith = HashMap.unionsWith
     --mapWithKey = HashMap.mapWithKey
     --mapKeysWith = HashMap.mapKeysWith
+    filterMap = HashMap.filter
+    {-# INLINE filterMap #-}
 
 #if MIN_VERSION_containers(0, 5, 0)
 -- | This instance uses the functions from "Data.IntMap.Strict".
@@ -703,6 +707,8 @@
     omapKeysWith = IntMap.mapKeysWith
     {-# INLINE omapKeysWith #-}
 #endif
+    filterMap = IntMap.filter
+    {-# INLINE filterMap #-}
 
 instance Eq key => IsMap [(key, value)] where
     type MapValue [(key, value)] = value
@@ -736,6 +742,12 @@
     -- | Convert a set to a list.
     setToList :: set -> [Element set]
 
+    -- | Filter values in a set.
+    --
+    -- @since 1.0.12.0
+    filterSet :: (Element set -> Bool) -> set -> set
+    filterSet p = setFromList . filter p . setToList
+
 instance Ord element => IsSet (Set.Set element) where
     insertSet = Set.insert
     {-# INLINE insertSet #-}
@@ -747,6 +759,8 @@
     {-# INLINE setFromList #-}
     setToList = Set.toList
     {-# INLINE setToList #-}
+    filterSet = Set.filter
+    {-# INLINE filterSet #-}
 
 instance (Eq element, Hashable element) => IsSet (HashSet.HashSet element) 
where
     insertSet = HashSet.insert
@@ -759,6 +773,8 @@
     {-# INLINE setFromList #-}
     setToList = HashSet.toList
     {-# INLINE setToList #-}
+    filterSet = HashSet.filter
+    {-# INLINE filterSet #-}
 
 instance IsSet IntSet.IntSet where
     insertSet = IntSet.insert
@@ -771,6 +787,8 @@
     {-# INLINE setFromList #-}
     setToList = IntSet.toList
     {-# INLINE setToList #-}
+    filterSet = IntSet.filter
+    {-# INLINE filterSet #-}
 
 
 -- | Zip operations on 'MonoFunctor's.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mono-traversable-1.0.11.0/src/Data/MonoTraversable.hs 
new/mono-traversable-1.0.15.1/src/Data/MonoTraversable.hs
--- old/mono-traversable-1.0.11.0/src/Data/MonoTraversable.hs   2019-02-02 
17:09:51.000000000 +0100
+++ new/mono-traversable-1.0.15.1/src/Data/MonoTraversable.hs   2019-12-25 
06:12:47.000000000 +0100
@@ -1,11 +1,14 @@
 {-# LANGUAGE ConstrainedClassMethods #-}
 {-# LANGUAGE CPP                     #-}
 {-# LANGUAGE DefaultSignatures       #-}
+{-# LANGUAGE DerivingStrategies      #-}
 {-# LANGUAGE FlexibleContexts        #-}
 {-# LANGUAGE FlexibleInstances       #-}
+{-# LANGUAGE GADTs                   #-}
 {-# LANGUAGE TypeFamilies            #-}
 {-# LANGUAGE TypeOperators           #-}
 {-# LANGUAGE UndecidableInstances    #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
 -- | Type classes mirroring standard typeclasses, but working with monomorphic 
containers.
 --
 -- The motivation is that some commonly used data types (i.e., 'ByteString' and
@@ -1311,7 +1314,7 @@
 instance MonoComonad (ViewL a) where
     oextract ~(x :< _) = x
     {-# INLINE oextract #-}
-    oextend f w@ ~(_ :< xxs) =
+    oextend f w@(~(_ :< xxs)) =
         f w :< case Seq.viewl xxs of
                  EmptyL -> Seq.empty
                  xs     -> case oextend f xs of
@@ -1321,7 +1324,7 @@
 instance MonoComonad (ViewR a) where
     oextract ~(_ :> x) = x
     {-# INLINE oextract #-}
-    oextend f w@ ~(xxs :> _) =
+    oextend f w@(~(xxs :> _)) =
         (case Seq.viewr xxs of
            EmptyR -> Seq.empty
            xs     -> case oextend f xs of
@@ -1382,3 +1385,127 @@
         ointercalate x = T.intercalate x . otoList #-}
 {-# RULES "intercalate LText" forall x.
         ointercalate x = TL.intercalate x . otoList #-}
+
+-- | Provides a `MonoFoldable`, `MonoFunctor` or `MonoPointed` for an arbitrary
+-- `F.Foldable`, `Functor` or `Applicative`.
+--
+-- Useful for, e.g., passing a `F.Foldable` type you don't own into a
+-- function that expects a `MonoFoldable`.
+--
+-- > // package A
+-- > data MyList a = MyList [a] deriving Foldable
+-- >
+-- > // package B
+-- > process :: MonoFoldable mono => mono -> IO ()
+-- >
+-- > // package C
+-- > process (WrappedPoly (MyList []))
+--
+-- @since 1.0.13.0
+newtype WrappedPoly f a = WrappedPoly { unwrapPoly :: f a }
+    deriving newtype (F.Foldable, Functor, Applicative, Monad)
+
+type instance Element (WrappedPoly f a) = a
+instance F.Foldable f  => MonoFoldable (WrappedPoly f a)
+instance Functor f     => MonoFunctor (WrappedPoly f a)
+instance Applicative f => MonoPointed (WrappedPoly f a)
+
+
+-- | Provides a `F.Foldable` for an arbitrary `MonoFoldable`.
+--
+-- @since 1.0.14.0
+data WrappedMono mono a where
+    WrappedMono :: Element mono ~ a => mono -> WrappedMono mono a
+
+-- | Unwraps a `WrappedMono`.
+--
+-- @since 1.0.14.0
+unwrapMono :: WrappedMono mono a -> mono
+unwrapMono (WrappedMono mono) = mono
+{-# INLINE unwrapMono #-}
+
+type instance Element (WrappedMono mono a) = Element mono
+
+instance MonoFoldable mono => MonoFoldable (WrappedMono mono a) where
+    ofoldMap f = ofoldMap f . unwrapMono
+    {-# INLINE ofoldMap #-}
+    ofoldr f z = ofoldr f z . unwrapMono
+    {-# INLINE ofoldr #-}
+    ofoldl' f z = ofoldl' f z . unwrapMono
+    {-# INLINE ofoldl' #-}
+    otoList = otoList . unwrapMono
+    {-# INLINE otoList #-}
+    oall f = oall f . unwrapMono
+    {-# INLINE oall #-}
+    oany f = oany f . unwrapMono
+    {-# INLINE oany #-}
+    onull = onull . unwrapMono
+    {-# INLINE onull #-}
+    olength = olength . unwrapMono
+    {-# INLINE olength #-}
+    olength64 = olength64 . unwrapMono
+    {-# INLINE olength64 #-}
+    ocompareLength mono i = ocompareLength (unwrapMono mono) i
+    {-# INLINE ocompareLength #-}
+    otraverse_ f = otraverse_ f . unwrapMono
+    {-# INLINE otraverse_ #-}
+    ofor_ mono f = ofor_ (unwrapMono mono) f
+    {-# INLINE ofor_ #-}
+    omapM_ f = omapM_ f . unwrapMono
+    {-# INLINE omapM_ #-}
+    oforM_ mono f = oforM_ (unwrapMono mono) f
+    {-# INLINE oforM_ #-}
+    ofoldlM f z = ofoldlM f z . unwrapMono
+    {-# INLINE ofoldlM #-}
+    ofoldMap1Ex f = ofoldMap1Ex f . unwrapMono
+    {-# INLINE ofoldMap1Ex #-}
+    ofoldr1Ex f = ofoldr1Ex f . unwrapMono
+    {-# INLINE ofoldr1Ex #-}
+    ofoldl1Ex' f = ofoldl1Ex' f . unwrapMono
+    {-# INLINE ofoldl1Ex' #-}
+    headEx = headEx . unwrapMono
+    {-# INLINE headEx #-}
+    lastEx = lastEx . unwrapMono
+    {-# INLINE lastEx #-}
+    unsafeHead = unsafeHead . unwrapMono
+    {-# INLINE unsafeHead #-}
+    unsafeLast = unsafeLast . unwrapMono
+    {-# INLINE unsafeLast #-}
+    maximumByEx f = maximumByEx f . unwrapMono
+    {-# INLINE maximumByEx #-}
+    minimumByEx f = minimumByEx f . unwrapMono
+    {-# INLINE minimumByEx #-}
+    oelem a = oelem a . unwrapMono
+    {-# INLINE oelem #-}
+    onotElem a = onotElem a . unwrapMono
+    {-# INLINE onotElem #-}
+
+instance MonoFunctor mono => MonoFunctor (WrappedMono mono a) where
+    omap f (WrappedMono mono) = WrappedMono (omap f mono)
+    {-# INLINE omap #-}
+
+instance (MonoPointed mono, Element mono ~ a) => MonoPointed (WrappedMono mono 
a) where
+    opoint a = WrappedMono (opoint a)
+    {-# INLINE opoint #-}
+
+instance MonoFoldable mono => F.Foldable (WrappedMono mono) where
+    foldr f zero (WrappedMono mono) = ofoldr f zero mono
+    {-# INLINE foldr #-}
+    foldMap f (WrappedMono mono) = ofoldMap f mono
+    {-# INLINE foldMap #-}
+    foldl' f z (WrappedMono mono) = ofoldl' f z mono
+    {-# INLINE foldl' #-}
+    foldl1 f (WrappedMono mono) = ofoldl1Ex' f mono
+    {-# INLINE foldl1 #-}
+    toList (WrappedMono mono) = otoList mono
+    {-# INLINE toList #-}
+    null (WrappedMono mono) = onull mono
+    {-# INLINE null #-}
+    length (WrappedMono mono) = olength mono
+    {-# INLINE length #-}
+    elem a (WrappedMono mono) = oelem a mono
+    {-# INLINE elem #-}
+    maximum (WrappedMono mono) = maximumEx mono
+    {-# INLINE maximum #-}
+    minimum (WrappedMono mono) = minimumEx mono
+    {-# INLINE minimum #-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mono-traversable-1.0.11.0/src/Data/NonNull.hs 
new/mono-traversable-1.0.15.1/src/Data/NonNull.hs
--- old/mono-traversable-1.0.11.0/src/Data/NonNull.hs   2018-10-04 
15:18:41.000000000 +0200
+++ new/mono-traversable-1.0.15.1/src/Data/NonNull.hs   2019-12-25 
06:12:47.000000000 +0100
@@ -16,6 +16,7 @@
   , nonNull
   , toNullable
   , fromNonEmpty
+  , toNonEmpty
   , ncons
   , nuncons
   , splitFirst
@@ -132,6 +133,12 @@
 fromNonEmpty = impureNonNull . fromList . NE.toList
 {-# INLINE fromNonEmpty #-}
 
+-- | __Safely__ convert from a 'NonNull' container to a 'NonEmpty' list.
+--
+-- @since 1.0.15.0
+toNonEmpty :: MonoFoldable mono => NonNull mono -> NE.NonEmpty (Element mono)
+toNonEmpty = NE.fromList . otoList
+
 -- | Specializes 'fromNonEmpty' to lists only.
 toMinList :: NE.NonEmpty a -> NonNull [a]
 toMinList = fromNonEmpty
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mono-traversable-1.0.11.0/test/Spec.hs 
new/mono-traversable-1.0.15.1/test/Spec.hs
--- old/mono-traversable-1.0.11.0/test/Spec.hs  2018-12-20 06:25:46.000000000 
+0100
+++ new/mono-traversable-1.0.15.1/test/Spec.hs  2019-12-25 06:12:47.000000000 
+0100
@@ -209,6 +209,9 @@
         describe "fromNonEmpty" $ do
             prop "toMinList" $ \(NonEmpty' ne) ->
                 (NE.toList ne :: [Int]) @?= NN.toNullable (NN.toMinList ne)
+        describe "toNonEmpty" $ do
+            it "converts nonnull to nonempty" $ do
+                NN.toNonEmpty (NN.impureNonNull [1,2,3]) @?= NE.fromList 
[1,2,3]
 
         describe "mapNonNull" $ do
             prop "mapNonNull id == id" $ \x xs ->


Reply via email to