Hello community, here is the log from the commit of package ghc-extra for openSUSE:Factory checked in at 2016-01-11 19:12:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-extra (Old) and /work/SRC/openSUSE:Factory/.ghc-extra.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-extra" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-extra/ghc-extra.changes 2015-09-24 06:15:08.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-extra.new/ghc-extra.changes 2016-01-11 19:12:05.000000000 +0100 @@ -1,0 +2,6 @@ +Fri Jan 8 10:43:20 UTC 2016 - mimi...@gmail.com + +- update to 1.4.3 +* Add Data.Version.Extra + +------------------------------------------------------------------- Old: ---- extra-1.4.2.tar.gz New: ---- extra-1.4.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-extra.spec ++++++ --- /var/tmp/diff_new_pack.dcpngt/_old 2016-01-11 19:12:06.000000000 +0100 +++ /var/tmp/diff_new_pack.dcpngt/_new 2016-01-11 19:12:06.000000000 +0100 @@ -21,7 +21,7 @@ %global debug_package %{nil} %bcond_with tests Name: ghc-extra -Version: 1.4.2 +Version: 1.4.3 Release: 0 Summary: Extra functions I use License: BSD-3-Clause ++++++ extra-1.4.2.tar.gz -> extra-1.4.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.4.2/CHANGES.txt new/extra-1.4.3/CHANGES.txt --- old/extra-1.4.2/CHANGES.txt 2015-09-14 22:42:07.000000000 +0200 +++ new/extra-1.4.3/CHANGES.txt 2016-01-07 15:22:49.000000000 +0100 @@ -1,5 +1,7 @@ Changelog for Extra +1.4.3 + Add Data.Version.Extra 1.4.2 Make concatMapM/mapMaybeM faster 1.4.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.4.2/LICENSE new/extra-1.4.3/LICENSE --- old/extra-1.4.2/LICENSE 2015-09-14 22:42:07.000000000 +0200 +++ new/extra-1.4.3/LICENSE 2016-01-07 15:22:49.000000000 +0100 @@ -1,4 +1,4 @@ -Copyright Neil Mitchell 2014-2015. +Copyright Neil Mitchell 2014-2016. All rights reserved. Redistribution and use in source and binary forms, with or without diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.4.2/README.md new/extra-1.4.3/README.md --- old/extra-1.4.2/README.md 2015-09-14 22:42:07.000000000 +0200 +++ new/extra-1.4.3/README.md 2016-01-07 15:22:49.000000000 +0100 @@ -1,4 +1,4 @@ -# Extra [![Hackage version](https://img.shields.io/hackage/v/extra.svg?style=flat)](https://hackage.haskell.org/package/extra) [![Build Status](https://img.shields.io/travis/ndmitchell/extra.svg?style=flat)](https://travis-ci.org/ndmitchell/extra) +# Extra [![Hackage version](https://img.shields.io/hackage/v/extra.svg?label=Hackage)](https://hackage.haskell.org/package/extra) [![Stackage version](https://www.stackage.org/package/extra/badge/lts?label=Stackage)](https://www.stackage.org/package/extra) [![Linux Build Status](https://img.shields.io/travis/ndmitchell/extra.svg?label=Linux%20build)](https://travis-ci.org/ndmitchell/extra) [![Windows Build Status](https://img.shields.io/appveyor/ci/ndmitchell/extra.svg?label=Windows%20build)](https://ci.appveyor.com/project/ndmitchell/extra) A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2. A few examples: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.4.2/extra.cabal new/extra-1.4.3/extra.cabal --- old/extra-1.4.2/extra.cabal 2015-09-14 22:42:07.000000000 +0200 +++ new/extra-1.4.3/extra.cabal 2016-01-07 15:22:49.000000000 +0100 @@ -1,13 +1,13 @@ cabal-version: >= 1.10 build-type: Simple name: extra -version: 1.4.2 +version: 1.4.3 license: BSD3 license-file: LICENSE category: Development author: Neil Mitchell <ndmitch...@gmail.com> maintainer: Neil Mitchell <ndmitch...@gmail.com> -copyright: Neil Mitchell 2014-2015 +copyright: Neil Mitchell 2014-2016 synopsis: Extra functions I use. description: A library of extra functions for the standard Haskell libraries. Most functions are simple additions, filling out missing functionality. A few functions are available in later versions of GHC, but this package makes them available back to GHC 7.2. @@ -48,6 +48,7 @@ Data.IORef.Extra Data.List.Extra Data.Tuple.Extra + Data.Version.Extra Numeric.Extra System.Directory.Extra System.Environment.Extra diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.4.2/src/Data/Version/Extra.hs new/extra-1.4.3/src/Data/Version/Extra.hs --- old/extra-1.4.2/src/Data/Version/Extra.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-1.4.3/src/Data/Version/Extra.hs 2016-01-07 15:22:49.000000000 +0100 @@ -0,0 +1,35 @@ +{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -fno-warn-duplicate-exports #-} + +-- | This module extends "Data.Version" with extra utilities. +-- The package also exports the existing "Data.Version" functions. +module Data.Version.Extra( + module Data.Version, + makeVersion, readVersion + ) where + +import Data.Version +import Data.List.Extra +import Text.ParserCombinators.ReadP + + +#if __GLASGOW_HASKELL__ < 710 + +-- | Construct tag-less 'Version' +-- +-- > showVersion (makeVersion [1,2,3]) == "1.2.3" +makeVersion :: [Int] -> Version +makeVersion b = Version b [] + +#endif + +-- | Read a 'Version' or throw an exception. +-- +-- > \x -> readVersion (showVersion x) == x +-- > readVersion "hello" == undefined +readVersion :: String -> Version +readVersion s = + case [ x | (x,"") <- readP_to_S parseVersion $ trimEnd s] of + [x] -> x + [] -> error "Data.Version.Extra.readVersion: no parse" + _ -> error "Data.Version.Extra.readVersion: ambiguous parse" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.4.2/src/Extra.hs new/extra-1.4.3/src/Extra.hs --- old/extra-1.4.2/src/Extra.hs 2015-09-14 22:42:07.000000000 +0200 +++ new/extra-1.4.3/src/Extra.hs 2016-01-07 15:22:49.000000000 +0100 @@ -24,6 +24,9 @@ -- * Data.Tuple.Extra -- | Extra functions available in @"Data.Tuple.Extra"@. first, second, (***), (&&&), dupe, both, fst3, snd3, thd3, + -- * Data.Version.Extra + -- | Extra functions available in @"Data.Version.Extra"@. + makeVersion, readVersion, -- * Numeric.Extra -- | Extra functions available in @"Numeric.Extra"@. showDP, intToDouble, intToFloat, floatToDouble, doubleToFloat, @@ -54,6 +57,7 @@ import Data.IORef.Extra import Data.List.Extra import Data.Tuple.Extra +import Data.Version.Extra import Numeric.Extra import System.Directory.Extra import System.Environment.Extra diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.4.2/src/System/Directory/Extra.hs new/extra-1.4.3/src/System/Directory/Extra.hs --- old/extra-1.4.2/src/System/Directory/Extra.hs 2015-09-14 22:42:07.000000000 +0200 +++ new/extra-1.4.3/src/System/Directory/Extra.hs 2016-01-07 15:22:49.000000000 +0100 @@ -24,7 +24,9 @@ import Control.Monad.Extra import System.FilePath import Data.List +#if !MIN_VERSION_directory(1,2,3) import Control.Exception +#endif #ifndef mingw32_HOST_OS import qualified System.Posix diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.4.2/test/TestGen.hs new/extra-1.4.3/test/TestGen.hs --- old/extra-1.4.2/test/TestGen.hs 2015-09-14 22:42:07.000000000 +0200 +++ new/extra-1.4.3/test/TestGen.hs 2016-01-07 15:22:49.000000000 +0100 @@ -183,6 +183,9 @@ testGen "(succ &&& pred) 1 == (2,0)" $ (succ &&& pred) 1 == (2,0) testGen "dupe 12 == (12, 12)" $ dupe 12 == (12, 12) testGen "both succ (1,2) == (2,3)" $ both succ (1,2) == (2,3) + testGen "showVersion (makeVersion [1,2,3]) == \"1.2.3\"" $ showVersion (makeVersion [1,2,3]) == "1.2.3" + testGen "\\x -> readVersion (showVersion x) == x" $ \x -> readVersion (showVersion x) == x + testGen "readVersion \"hello\" == undefined" $ erroneous $ readVersion "hello" testGen "showDP 4 pi == \"3.1416\"" $ showDP 4 pi == "3.1416" testGen "showDP 0 pi == \"3\"" $ showDP 0 pi == "3" testGen "showDP 2 3 == \"3.00\"" $ showDP 2 3 == "3.00" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-1.4.2/test/TestUtil.hs new/extra-1.4.3/test/TestUtil.hs --- old/extra-1.4.2/test/TestUtil.hs 2015-09-14 22:42:07.000000000 +0200 +++ new/extra-1.4.3/test/TestUtil.hs 2016-01-07 15:22:49.000000000 +0100 @@ -7,6 +7,7 @@ import Control.Exception.Extra import Data.Either.Extra import System.IO.Extra +import Data.Version.Extra import Data.IORef import System.IO.Unsafe import Data.Time.Clock @@ -20,6 +21,7 @@ import Data.List as X import Data.Char as X import Data.Tuple as X +import Data.Version as X import System.Directory as X import System.FilePath as X import System.Info as X @@ -97,3 +99,6 @@ instance Arbitrary DiffTime where arbitrary = fmap realToFrac $ choose (0 :: Double, 86401) + +instance Arbitrary Version where + arbitrary = makeVersion . map abs <$> listOf1 arbitrary