Hello community,

here is the log from the commit of package ghc-monoid-extras for 
openSUSE:Factory checked in at 2016-11-10 13:25:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-monoid-extras (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-monoid-extras.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-monoid-extras"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-monoid-extras/ghc-monoid-extras.changes      
2016-11-02 12:36:43.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-monoid-extras.new/ghc-monoid-extras.changes 
2016-11-10 13:25:33.000000000 +0100
@@ -1,0 +2,5 @@
+Fri Jul 22 06:05:43 UTC 2016 - [email protected]
+
+- Update to version 0.4.2 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  monoid-extras-0.4.1.2.tar.gz

New:
----
  monoid-extras-0.4.2.tar.gz

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

Other differences:
------------------
++++++ ghc-monoid-extras.spec ++++++
--- /var/tmp/diff_new_pack.k58Yqt/_old  2016-11-10 13:25:34.000000000 +0100
+++ /var/tmp/diff_new_pack.k58Yqt/_new  2016-11-10 13:25:34.000000000 +0100
@@ -18,21 +18,19 @@
 
 %global pkg_name monoid-extras
 Name:           ghc-%{pkg_name}
-Version:        0.4.1.2
+Version:        0.4.2
 Release:        0
 Summary:        Various extra monoid-related definitions and utilities
 License:        BSD-3-Clause
-Group:          System/Libraries
+Group:          Development/Languages/Other
 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
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-groups-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-semigroupoids-devel
 BuildRequires:  ghc-semigroups-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
 
 %description
 Various extra monoid-related definitions and utilities, such as monoid actions,
@@ -53,15 +51,12 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %post devel
 %ghc_pkg_recache
 

++++++ monoid-extras-0.4.1.2.tar.gz -> monoid-extras-0.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/monoid-extras-0.4.1.2/CHANGES 
new/monoid-extras-0.4.2/CHANGES
--- old/monoid-extras-0.4.1.2/CHANGES   2016-06-16 23:55:33.000000000 +0200
+++ new/monoid-extras-0.4.2/CHANGES     2016-07-16 13:51:40.000000000 +0200
@@ -1,3 +1,7 @@
+* 0.4.2: 16 July 2016
+
+- Additions to Data.Monoid.SemiDirectProduct (unSemi, tag, untag)
+
 * 0.4.1.2: 16 June 2016
 
 - allow semigroupoids-5.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/monoid-extras-0.4.1.2/monoid-extras.cabal 
new/monoid-extras-0.4.2/monoid-extras.cabal
--- old/monoid-extras-0.4.1.2/monoid-extras.cabal       2016-06-16 
23:55:33.000000000 +0200
+++ new/monoid-extras-0.4.2/monoid-extras.cabal 2016-07-16 13:51:40.000000000 
+0200
@@ -1,5 +1,5 @@
 name:                monoid-extras
-version:             0.4.1.2
+version:             0.4.2
 synopsis:            Various extra monoid-related definitions and utilities
 description:         Various extra monoid-related definitions and utilities,
                      such as monoid actions, monoid coproducts, semi-direct
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/monoid-extras-0.4.1.2/src/Data/Monoid/SemiDirectProduct/Strict.hs 
new/monoid-extras-0.4.2/src/Data/Monoid/SemiDirectProduct/Strict.hs
--- old/monoid-extras-0.4.1.2/src/Data/Monoid/SemiDirectProduct/Strict.hs       
2016-06-16 23:55:33.000000000 +0200
+++ new/monoid-extras-0.4.2/src/Data/Monoid/SemiDirectProduct/Strict.hs 
2016-07-16 13:51:40.000000000 +0200
@@ -1,30 +1,37 @@
 -- | A strict version of the semi-direct product. If a monoid m acts
--- on s then this version of the semi-direct product is strict in the
--- m-portion of the semi-direct product.
+--   on s then this version of the semi-direct product is strict in
+--   the m-portion of the semi-direct product.
 
+{-# LANGUAGE CPP                   #-}
 {-# LANGUAGE FlexibleInstances     #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TupleSections         #-}
-{-# LANGUAGE CPP                   #-}
 
 module Data.Monoid.SemiDirectProduct.Strict
-       ( Semi, quotient, inject, embed
+       ( Semi, unSemi, tag, inject, untag, embed, quotient
        ) where
 
 #if !MIN_VERSION_base(4,8,0)
-import Data.Monoid
+import           Data.Monoid
 #endif
 
-import Data.Monoid.Action
+import           Data.Monoid.Action
 
--- | The semi-direct product of monoids @s@ and @m@. When the monoid
--- @m@ acts on the monoid @s@, this type acquires a monoid structure.
--- We call the monoid @m@ the quotient monoid and the monoid @s@ the
--- sub-monoid of the semi-direct product. The semi-direct product
--- @Semi s m@ is an extension of the monoid @s@ with @m@ being the
--- quotient.
+-- | The semi-direct product of monoids @s@ and @m@, which is a monoid
+--   when @m@ acts on @s@. Structurally, the semi-direct product is
+--   just a pair @(s,m)@.  However, the monoid instance is different.
+--   In particular, we have
+--
+-- > (s1,m1) <> (s2,m2) = (s1 <> (m1 `act` s2), m1 <> m2)
+--
+--   We call the monoid @m@ the quotient monoid and the monoid @s@ the
+--   sub-monoid of the semi-direct product. The semi-direct product
+--   @Semi s m@ is an extension of the monoid @s@ with @m@ being the
+--   quotient.
 data Semi s m = Semi s !m
 
+unSemi :: Semi s m -> (s,m)
+unSemi (Semi s m) = (s,m)
 
 instance (Monoid m, Monoid s, Action m s) => Monoid (Semi s m) where
   mempty                            = Semi mempty mempty
@@ -33,18 +40,36 @@
   {-# INLINE mappend #-}
   mconcat                           = foldr mappend mempty
   {-# INLINE mconcat #-}
-  
--- | The quotient map.
-quotient :: Semi s m -> m
-quotient (Semi _ m) = m
 
--- | The injection map.
+-- | Tag an @s@ value with an @m@ value to create an element of the
+--   semi-direct product.
+tag :: s -> m -> Semi s m
+tag = Semi
+
+-- | The injection map, *i.e.* give an @s@ value a trivial tag.
 inject :: Monoid m => s -> Semi s m
 inject = flip Semi mempty
 
--- | The semi-direct product gives a split extension of @s@ by
--- @m@. This allows us to embed @m@ into the semi-direct product. This
--- is the embedding map. The quotient and embed maps should satisfy
--- the equation @quotient . embed = id@.
+-- | Forget the monoidal tag.  Of course, @untag . inject = id@, and
+--   @untag (tag s m) = s@.
+untag :: Semi s m -> s
+untag (Semi s _) = s
+
+-- | Embed a "tag" value as a value of type @Semi s m@.  Note that
+--
+--   @inject s <> embed m = tag s m@
+--
+--   and
+--
+--   @embed m <> inject s@ = tag (act m s) m@.
+--
+--   The semi-direct product gives a split extension of @s@ by
+--   @m@. This allows us to embed @m@ into the semi-direct
+--   product. This is the embedding map. The quotient and embed maps
+--   should satisfy the equation @quotient . embed = id@.
 embed :: Monoid s => m -> Semi s m
 embed = Semi mempty
+
+-- | The quotient map, *i.e.* retrieve the monoidal tag value.
+quotient :: Semi s m -> m
+quotient (Semi _ m) = m
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/monoid-extras-0.4.1.2/src/Data/Monoid/SemiDirectProduct.hs 
new/monoid-extras-0.4.2/src/Data/Monoid/SemiDirectProduct.hs
--- old/monoid-extras-0.4.1.2/src/Data/Monoid/SemiDirectProduct.hs      
2016-06-16 23:55:33.000000000 +0200
+++ new/monoid-extras-0.4.2/src/Data/Monoid/SemiDirectProduct.hs        
2016-07-16 13:51:40.000000000 +0200
@@ -1,24 +1,32 @@
+{-# LANGUAGE CPP                   #-}
 {-# LANGUAGE FlexibleInstances     #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE TupleSections         #-}
-{-# LANGUAGE CPP                   #-}
 
 module Data.Monoid.SemiDirectProduct
-       ( Semi, quotient, inject, embed
+       ( Semi, unSemi, tag, inject, untag, embed, quotient
        ) where
 
 #if !MIN_VERSION_base(4,8,0)
-import Data.Monoid
+import           Data.Monoid
 #endif
 
-import Data.Monoid.Action
+import           Data.Monoid.Action
 
--- | The semi-direct product of monoids @s@ and @m@. When the monoid
--- @m@ acts on the monoid @s@, this type acquires a monoid structure.
--- We call the monoid @m@ the quotient monoid and the monoid @s@ the
--- sub-monoid of the semi-direct product. The semi-direct product
--- @Semi s m@ is an extension of the monoid @s@ with @m@ being the
--- quotient.
+-- | The semi-direct product of monoids @s@ and @m@, which is a monoid
+--   when @m@ acts on @s@. Structurally, the semi-direct product is
+--   just a pair @(s,m)@.  However, the monoid instance is different.
+--   In particular, we have
+--
+-- > (s1,m1) <> (s2,m2) = (s1 <> (m1 `act` s2), m1 <> m2)
+--
+--   We think of the @m@ values as a "tag" decorating the @s@ values,
+--   which also affect the way the @s@ values combine.
+--
+--   We call the monoid @m@ the quotient monoid and the monoid @s@ the
+--   sub-monoid of the semi-direct product. The semi-direct product
+--   @Semi s m@ is an extension of the monoid @s@ with @m@ being the
+--   quotient.
 newtype Semi s m = Semi { unSemi :: (s,m) }
 
 
@@ -34,17 +42,37 @@
   mconcat     = foldr mappend mempty
   {-# INLINE mconcat #-}
 
--- | The quotient map.
-quotient :: Semi s m -> m
-quotient = snd . unSemi
+-- | Tag an @s@ value with an @m@ value to create an element of the
+--   semi-direct product.
+tag :: s -> m -> Semi s m
+tag s m = Semi (s,m)
 
--- | The injection map.
+-- | The injection map, *i.e.* give an @s@ value a trivial tag.
 inject :: Monoid m => s -> Semi s m
 inject = Semi . (,mempty)
 
--- | The semi-direct product gives a split extension of @s@ by
--- @m@. This allows us to embed @m@ into the semi-direct product. This
--- is the embedding map. The quotient and embed maps should satisfy
--- the equation @quotient . embed = id@.
+-- | Forget the monoidal tag.  Of course, @untag . inject = id@, and
+--   @untag (tag s m) = s@.
+untag :: Semi s m -> s
+untag = fst . unSemi
+
+-- | Embed a "tag" value as a value of type @Semi s m@.  Note that
+--
+--   @inject s <> embed m = tag s m@
+--
+--   and
+--
+--   @embed m <> inject s@ = tag (act m s) m@.
+--
+--   The semi-direct product gives a split extension of @s@ by
+--   @m@. This allows us to embed @m@ into the semi-direct
+--   product. This is the embedding map. The quotient and embed maps
+--   should satisfy the equation @quotient . embed = id@.
 embed :: Monoid s => m -> Semi s m
 embed = Semi . (mempty,)
+
+-- | The quotient map, *i.e.* retrieve the monoidal tag value.
+quotient :: Semi s m -> m
+quotient = snd . unSemi
+
+


Reply via email to