Hello community,

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

Package is "ghc-protolude"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-protolude/ghc-protolude.changes      
2016-11-02 12:47:26.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-protolude.new/ghc-protolude.changes 
2016-11-10 13:25:49.000000000 +0100
@@ -1,0 +2,10 @@
+Sun Oct 30 16:26:57 UTC 2016 - [email protected]
+
+- Update to version 0.1.10 with cabal2obs.
+
+-------------------------------------------------------------------
+Mon Oct 17 15:37:55 UTC 2016 - [email protected]
+
+- Update to version 0.1.8 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  protolude-0.1.7.tar.gz

New:
----
  protolude-0.1.10.tar.gz

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

Other differences:
------------------
++++++ ghc-protolude.spec ++++++
--- /var/tmp/diff_new_pack.wh9TGR/_old  2016-11-10 13:25:50.000000000 +0100
+++ /var/tmp/diff_new_pack.wh9TGR/_new  2016-11-10 13:25:50.000000000 +0100
@@ -18,7 +18,7 @@
 
 %global pkg_name protolude
 Name:           ghc-%{pkg_name}
-Version:        0.1.7
+Version:        0.1.10
 Release:        0
 Summary:        A sensible set of defaults for writing custom Preludes
 License:        MIT

++++++ protolude-0.1.7.tar.gz -> protolude-0.1.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/protolude-0.1.7/protolude.cabal 
new/protolude-0.1.10/protolude.cabal
--- old/protolude-0.1.7/protolude.cabal 2016-08-15 14:55:57.000000000 +0200
+++ new/protolude-0.1.10/protolude.cabal        2016-10-27 11:08:43.000000000 
+0200
@@ -1,5 +1,5 @@
 name:                protolude
-version:             0.1.7
+version:             0.1.10
 synopsis:            A sensible set of defaults for writing custom Preludes.
 description:         A sensible set of defaults for writing custom Preludes.
 homepage:            https://github.com/sdiehl/protolude
@@ -46,6 +46,7 @@
     Functor
     Semiring
     Bifunctor
+    Exceptions
     Panic
 
   other-modules:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/protolude-0.1.7/src/Applicative.hs 
new/protolude-0.1.10/src/Applicative.hs
--- old/protolude-0.1.7/src/Applicative.hs      2016-08-15 14:55:57.000000000 
+0200
+++ new/protolude-0.1.10/src/Applicative.hs     2016-10-27 11:08:43.000000000 
+0200
@@ -5,9 +5,13 @@
   orAlt,
   orEmpty,
   eitherA,
+  purer,
+  liftAA2,
+  (<<*>>),
 ) where
 
 import Data.Bool (Bool)
+import Data.Function ((.))
 import Data.Either (Either(..))
 import Data.Monoid (Monoid(..))
 import Control.Applicative
@@ -20,3 +24,12 @@
 
 eitherA :: (Alternative f) => f a -> f b -> f (Either a b)
 eitherA a b = (Left <$> a) <|> (Right <$> b)
+
+purer :: (Applicative f, Applicative g) => a -> f (g a)
+purer = pure . pure
+
+liftAA2 :: (Applicative f, Applicative g) => (a -> b -> c) -> f (g a) -> f (g 
b) -> f (g c)
+liftAA2 = liftA2 . liftA2
+
+(<<*>>) :: (Applicative f, Applicative g)  => f (g (a -> b)) -> f (g a) -> f 
(g b)
+(<<*>>) = liftA2 (<*>)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/protolude-0.1.7/src/Exceptions.hs 
new/protolude-0.1.10/src/Exceptions.hs
--- old/protolude-0.1.7/src/Exceptions.hs       1970-01-01 01:00:00.000000000 
+0100
+++ new/protolude-0.1.10/src/Exceptions.hs      2016-10-27 11:08:43.000000000 
+0200
@@ -0,0 +1,28 @@
+{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+
+module Exceptions (
+  hush,
+  note,
+  tryIO,
+) where
+
+import Base (IO)
+import Data.Function ((.))
+import Control.Monad.Trans (liftIO)
+import Control.Monad.IO.Class (MonadIO)
+import Control.Monad.Except (ExceptT(..), MonadError, throwError)
+import Control.Exception as Exception
+import Control.Applicative
+import Data.Maybe (Maybe, maybe)
+import Data.Either (Either(..))
+
+hush :: Alternative m => Either e a -> m a
+hush (Left _)  = empty
+hush (Right x) = pure x
+
+note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a
+note err = maybe (throwError err) pure
+
+tryIO :: MonadIO m => IO a -> ExceptT IOException m a
+tryIO = ExceptT . liftIO . Exception.try
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/protolude-0.1.7/src/Functor.hs 
new/protolude-0.1.10/src/Functor.hs
--- old/protolude-0.1.7/src/Functor.hs  2016-08-15 14:55:57.000000000 +0200
+++ new/protolude-0.1.10/src/Functor.hs 2016-10-27 11:08:43.000000000 +0200
@@ -23,12 +23,16 @@
   )
 
 import Data.Function (flip)
+import Data.Function ((.))
 
 infixl 4 $>
 
 ($>) :: Functor f => f a -> b -> f b
 ($>) = flip (<$)
 
+(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
+(<<$>>) = fmap . fmap
+
 void :: Functor f => f a -> f ()
 void x = () <$ x
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/protolude-0.1.7/src/List.hs 
new/protolude-0.1.10/src/List.hs
--- old/protolude-0.1.7/src/List.hs     2016-08-15 14:55:57.000000000 +0200
+++ new/protolude-0.1.10/src/List.hs    2016-10-27 11:08:43.000000000 +0200
@@ -6,16 +6,19 @@
   ordNub,
   sortOn,
   list,
+  product,
+  sum
 ) where
 
 import Data.List (sortBy)
 import Data.Maybe (Maybe(..))
 import Data.Ord (Ord, comparing)
-import Data.Foldable (Foldable, foldr)
+import Data.Foldable (Foldable, foldr, foldl')
 import Data.Function ((.))
 import Data.Functor (fmap)
 import Control.Monad (return)
 import qualified Data.Set as Set
+import GHC.Num (Num, (+), (*))
 
 head :: (Foldable f) => f a -> Maybe a
 head = foldr (\x _ -> return x) Nothing
@@ -37,3 +40,11 @@
 list def f xs = case xs of
   [] -> def
   _  -> fmap f xs
+
+{-# INLINE product #-}
+product :: (Foldable f, Num a) => f a -> a
+product = foldl' (*) 1
+
+{-# INLINE sum #-}
+sum :: (Foldable f, Num a) => f a -> a
+sum = foldl' (+) 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/protolude-0.1.7/src/Protolude.hs 
new/protolude-0.1.10/src/Protolude.hs
--- old/protolude-0.1.7/src/Protolude.hs        2016-08-15 14:55:57.000000000 
+0200
+++ new/protolude-0.1.10/src/Protolude.hs       2016-10-27 11:08:43.000000000 
+0200
@@ -17,8 +17,11 @@
   print,
   throwIO,
   throwTo,
+  foreach,
   show,
-
+  pass,
+  guarded,
+  guardedA,
   LText,
   LByteString,
 ) where
@@ -33,6 +36,7 @@
 import Applicative as X
 import Conv as X
 import Panic as X
+import Exceptions as X
 
 import Base as Base hiding (
     putStr           -- Overriden by Show.putStr
@@ -91,6 +95,8 @@
 import Data.Foldable as X hiding (
     foldr1
   , foldl1
+  , product
+  , sum
   )
 import Semiring as X
 import Data.Functor.Identity as X
@@ -335,6 +341,7 @@
   , throwTo
   , assert
   , displayException
+  , Handler(..)
   )
 
 import qualified Control.Exception
@@ -342,6 +349,7 @@
 import Control.Monad.STM as X
 import Control.Concurrent as X hiding (
     throwTo
+  , yield
   )
 import Control.Concurrent.Async as X
 
@@ -393,6 +401,18 @@
 throwTo :: (X.MonadIO m, Exception e) => ThreadId -> e -> m ()
 throwTo tid e = liftIO (Control.Exception.throwTo tid e)
 
+foreach :: Functor f => f a -> (a -> b) -> f b
+foreach = flip fmap
+
+pass :: Applicative f => f ()
+pass = pure ()
+
+guarded :: (Alternative f) => (a -> Bool) -> a -> f a
+guarded p x = X.bool empty (pure x) (p x)
+
+guardedA :: (Functor f, Alternative t) => (a -> f Bool) -> a -> f (t a)
+guardedA p x = X.bool empty (pure x) <$> p x
+
 show :: (Show a, StringConv String b) => a -> b
 show x = toS (PBase.show x)
 {-# SPECIALIZE show :: Show  a => a -> Text  #-}


Reply via email to