Hello community, here is the log from the commit of package ghc-extra for openSUSE:Factory checked in at 2018-12-21 08:21:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-extra (Old) and /work/SRC/openSUSE:Factory/.ghc-extra.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-extra" Fri Dec 21 08:21:09 2018 rev:19 rq:658075 version:1.6.14 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-extra/ghc-extra.changes 2018-10-25 08:17:10.956048678 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-extra.new.28833/ghc-extra.changes 2018-12-21 08:21:26.117569095 +0100 @@ -1,0 +2,7 @@ +Tue Dec 11 03:01:57 UTC 2018 - [email protected] + +- Update extra to version 1.6.14. + 1.6.14, released 2018-12-10 + Add mapLeft and mapRight + +------------------------------------------------------------------- Old: ---- extra-1.6.13.tar.gz New: ---- extra-1.6.14.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-extra.spec ++++++ --- /var/tmp/diff_new_pack.YgsvsE/_old 2018-12-21 08:21:26.509568727 +0100 +++ /var/tmp/diff_new_pack.YgsvsE/_new 2018-12-21 08:21:26.513568724 +0100 @@ -19,7 +19,7 @@ %global pkg_name extra %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.6.13 +Version: 1.6.14 Release: 0 Summary: Extra functions I use License: BSD-3-Clause ++++++ extra-1.6.13.tar.gz -> extra-1.6.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/CHANGES.txt new/extra-1.6.14/CHANGES.txt --- old/extra-1.6.13/CHANGES.txt 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/CHANGES.txt 2018-12-10 20:24:13.000000000 +0100 @@ -1,5 +1,7 @@ Changelog for Extra +1.6.14, released 2018-12-10 + Add mapLeft and mapRight 1.6.13, released 2018-10-14 #40, deprecate Data.List.Extra.for (clashes with Traversable) 1.6.12, released 2018-09-24 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/extra.cabal new/extra-1.6.14/extra.cabal --- old/extra-1.6.13/extra.cabal 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/extra.cabal 2018-12-10 20:24:24.000000000 +0100 @@ -1,7 +1,7 @@ cabal-version: >= 1.18 build-type: Simple name: extra -version: 1.6.13 +version: 1.6.14 license: BSD3 license-file: LICENSE category: Development @@ -15,7 +15,7 @@ The module "Extra" documents all functions provided by this library. Modules such as "Data.List.Extra" provide extra functions over "Data.List" and also reexport "Data.List". Users are recommended to replace "Data.List" imports with "Data.List.Extra" if they need the extra functionality. homepage: https://github.com/ndmitchell/extra#readme bug-reports: https://github.com/ndmitchell/extra/issues -tested-with: GHC==8.6.1, GHC==8.4.3, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 +tested-with: GHC==8.6.3, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 extra-doc-files: CHANGES.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/src/Control/Concurrent/Extra.hs new/extra-1.6.14/src/Control/Concurrent/Extra.hs --- old/extra-1.6.13/src/Control/Concurrent/Extra.hs 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/src/Control/Concurrent/Extra.hs 2018-12-10 15:33:37.000000000 +0100 @@ -5,13 +5,13 @@ -- -- This module includes three new types of 'MVar', namely 'Lock' (no associated value), -- 'Var' (never empty) and 'Barrier' (filled at most once). See --- <http://neilmitchell.blogspot.co.uk/2012/06/flavours-of-mvar_04.html this blog post> +-- <httpd://neilmitchell.blogspot.co.uk/2012/06/flavours-of-mvar_04.html this blog post> -- for examples and justification. -- -- If you need greater control of exceptions and threads --- see the <http://hackage.haskell.org/package/slave-thread slave-thread> package. +-- see the <https://hackage.haskell.org/package/slave-thread slave-thread> package. -- If you need elaborate relationships between threads --- see the <http://hackage.haskell.org/package/async async> package. +-- see the <httdp://hackage.haskell.org/package/async async> package. module Control.Concurrent.Extra( module Control.Concurrent, getNumCapabilities, setNumCapabilities, withNumCapabilities, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/src/Control/Exception/Extra.hs new/extra-1.6.14/src/Control/Exception/Extra.hs --- old/extra-1.6.13/src/Control/Exception/Extra.hs 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/src/Control/Exception/Extra.hs 2018-12-10 15:34:38.000000000 +0100 @@ -4,6 +4,9 @@ -- | Extra functions for "Control.Exception". -- These functions provide retrying, showing in the presence of exceptions, -- and functions to catch\/ignore exceptions, including monomorphic (no 'Exception' context) versions. +-- +-- If you want to use a safer set of exceptions see the +-- <https://hackage.haskell.org/package/safe-exceptions safe-exceptions> package. module Control.Exception.Extra( module Control.Exception, Partial, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/src/Control/Monad/Extra.hs new/extra-1.6.14/src/Control/Monad/Extra.hs --- old/extra-1.6.13/src/Control/Monad/Extra.hs 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/src/Control/Monad/Extra.hs 2018-12-07 12:00:34.000000000 +0100 @@ -3,7 +3,7 @@ -- | Extra functions for "Control.Monad". -- These functions provide looping, list operations and booleans. -- If you need a wider selection of monad loops and list generalisations, --- see <http://hackage.haskell.org/package/monad-loops monad-loops>. +-- see <https://hackage.haskell.org/package/monad-loops monad-loops>. module Control.Monad.Extra( module Control.Monad, whenJust, whenJustM, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/src/Data/Either/Extra.hs new/extra-1.6.14/src/Data/Either/Extra.hs --- old/extra-1.6.13/src/Data/Either/Extra.hs 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/src/Data/Either/Extra.hs 2018-12-10 16:20:39.000000000 +0100 @@ -4,11 +4,15 @@ -- | This module extends "Data.Either" with extra operations, particularly -- to quickly extract from inside an 'Either'. Some of these operations are -- partial, and should be used with care in production-quality code. +-- +-- If you need more 'Either' functions see the +-- <https://hackage.haskell.org/package/either either>. module Data.Either.Extra( module Data.Either, isLeft, isRight, fromLeft, fromRight, fromEither, fromLeft', fromRight', eitherToMaybe, maybeToEither, + mapLeft, mapRight, ) where import Data.Either @@ -93,3 +97,20 @@ -- > \x -> eitherToMaybe (Right x) == Just x eitherToMaybe :: Either a b -> Maybe b eitherToMaybe = either (const Nothing) Just + + +-- | The 'mapLeft' function takes a function and applies it to an Either value +-- iff the value takes the form @'Left' _@. +-- +-- > mapLeft show (Left 1) == Left "1" +-- > mapLeft show (Right True) == Right True +mapLeft :: (a -> c) -> Either a b -> Either c b +mapLeft f = either (Left . f) Right + +-- | The 'mapRight' function takes a function and applies it to an Either value +-- iff the value takes the form @'Right' _@. +-- +-- > mapRight show (Left 1) == Left 1 +-- > mapRight show (Right True) == Right "True" +mapRight :: (b -> c) -> Either a b -> Either a c +mapRight = fmap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/src/Data/List/Extra.hs new/extra-1.6.14/src/Data/List/Extra.hs --- old/extra-1.6.13/src/Data/List/Extra.hs 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/src/Data/List/Extra.hs 2018-12-07 12:00:54.000000000 +0100 @@ -4,7 +4,7 @@ -- | This module extends "Data.List" with extra functions of a similar nature. -- The package also exports the existing "Data.List" functions. -- Some of the names and semantics were inspired by the --- <http://hackage.haskell.org/package/text text> package. +-- <https://hackage.haskell.org/package/text text> package. module Data.List.Extra( module Data.List, -- * String operations @@ -708,7 +708,7 @@ --------------------------------------------------------------------- -- OKASAKI RED BLACK TREE --- Taken from http://www.cs.kent.ac.uk/people/staff/smk/redblack/Untyped.hs +-- Taken from https://www.cs.kent.ac.uk/people/staff/smk/redblack/Untyped.hs data Color = R | B deriving Show data RB a = E | T Color (RB a) a (RB a) deriving Show diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/src/Extra.hs new/extra-1.6.14/src/Extra.hs --- old/extra-1.6.13/src/Extra.hs 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/src/Extra.hs 2018-12-10 15:41:09.000000000 +0100 @@ -17,7 +17,7 @@ whenJust, whenJustM, whenMaybe, whenMaybeM, unit, maybeM, eitherM, loop, loopM, whileM, partitionM, concatMapM, concatForM, mconcatMapM, mapMaybeM, findM, firstJustM, fold1M, fold1M_, whenM, unlessM, ifM, notM, (||^), (&&^), orM, andM, anyM, allM, -- * Data.Either.Extra -- | Extra functions available in @"Data.Either.Extra"@. - isLeft, isRight, fromLeft, fromRight, fromEither, fromLeft', fromRight', eitherToMaybe, maybeToEither, + isLeft, isRight, fromLeft, fromRight, fromEither, fromLeft', fromRight', eitherToMaybe, maybeToEither, mapLeft, mapRight, -- * Data.IORef.Extra -- | Extra functions available in @"Data.IORef.Extra"@. modifyIORef', writeIORef', atomicModifyIORef', atomicWriteIORef, atomicWriteIORef', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/src/System/IO/Extra.hs new/extra-1.6.14/src/System/IO/Extra.hs --- old/extra-1.6.13/src/System/IO/Extra.hs 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/src/System/IO/Extra.hs 2018-12-07 12:00:59.000000000 +0100 @@ -3,7 +3,7 @@ -- | More IO functions. The functions include ones for reading files with specific encodings, -- strictly reading files, and writing files with encodings. There are also some simple -- temporary file functions, more advanced alternatives can be found in --- the <http://hackage.haskell.org/package/exceptions exceptions> package. +-- the <https://hackage.haskell.org/package/exceptions exceptions> package. module System.IO.Extra( module System.IO, captureOutput, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.6.13/test/TestGen.hs new/extra-1.6.14/test/TestGen.hs --- old/extra-1.6.13/test/TestGen.hs 2018-10-14 18:09:12.000000000 +0200 +++ new/extra-1.6.14/test/TestGen.hs 2018-12-10 15:41:24.000000000 +0100 @@ -68,6 +68,10 @@ testGen "\\a -> maybeToEither a Nothing == Left a" $ \a -> maybeToEither a Nothing == Left a testGen "\\x -> eitherToMaybe (Left x) == Nothing" $ \x -> eitherToMaybe (Left x) == Nothing testGen "\\x -> eitherToMaybe (Right x) == Just x" $ \x -> eitherToMaybe (Right x) == Just x + testGen "mapLeft show (Left 1) == Left \"1\"" $ mapLeft show (Left 1) == Left "1" + testGen "mapLeft show (Right True) == Right True" $ mapLeft show (Right True) == Right True + testGen "mapRight show (Left 1) == Left 1" $ mapRight show (Left 1) == Left 1 + testGen "mapRight show (Right True) == Right \"True\"" $ mapRight show (Right True) == Right "True" testGen "\\xs -> repeatedly (splitAt 3) xs == chunksOf 3 xs" $ \xs -> repeatedly (splitAt 3) xs == chunksOf 3 xs testGen "\\xs -> repeatedly word1 (trim xs) == words xs" $ \xs -> repeatedly word1 (trim xs) == words xs testGen "\\xs -> repeatedly line1 xs == lines xs" $ \xs -> repeatedly line1 xs == lines xs
