Hello community,

here is the log from the commit of package ghc-extra for openSUSE:Factory 
checked in at 2016-06-07 23:48:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      2016-05-31 
12:25:02.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-extra.new/ghc-extra.changes 2016-06-07 
23:48:18.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Jun  2 04:50:09 UTC 2016 - mimi...@gmail.com
+
+- update to 1.4.9
+* add Line 1
+
+-------------------------------------------------------------------

Old:
----
  extra-1.4.8.tar.gz

New:
----
  extra-1.4.9.tar.gz

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

Other differences:
------------------
++++++ ghc-extra.spec ++++++
--- /var/tmp/diff_new_pack.FDSZN4/_old  2016-06-07 23:48:19.000000000 +0200
+++ /var/tmp/diff_new_pack.FDSZN4/_new  2016-06-07 23:48:19.000000000 +0200
@@ -18,10 +18,9 @@
 
 %global pkg_name extra
 # no useful debuginfo for Haskell packages without C sources
-%global debug_package %{nil}
 %bcond_with tests
 Name:           ghc-extra
-Version:        1.4.8
+Version:        1.4.9
 Release:        0
 Summary:        Extra functions I use
 License:        BSD-3-Clause

++++++ extra-1.4.8.tar.gz -> extra-1.4.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.4.8/CHANGES.txt new/extra-1.4.9/CHANGES.txt
--- old/extra-1.4.8/CHANGES.txt 2016-05-26 21:39:07.000000000 +0200
+++ new/extra-1.4.9/CHANGES.txt 2016-06-01 11:40:52.000000000 +0200
@@ -1,5 +1,7 @@
 Changelog for Extra
 
+1.4.9
+    Add line1
 1.4.8
     Add displayException
 1.4.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.4.8/extra.cabal new/extra-1.4.9/extra.cabal
--- old/extra-1.4.8/extra.cabal 2016-05-26 21:39:07.000000000 +0200
+++ new/extra-1.4.9/extra.cabal 2016-06-01 11:40:52.000000000 +0200
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.10
 build-type:         Simple
 name:               extra
-version:            1.4.8
+version:            1.4.9
 license:            BSD3
 license-file:       LICENSE
 category:           Development
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.4.8/src/Data/List/Extra.hs 
new/extra-1.4.9/src/Data/List/Extra.hs
--- old/extra-1.4.8/src/Data/List/Extra.hs      2016-05-26 21:39:07.000000000 
+0200
+++ new/extra-1.4.9/src/Data/List/Extra.hs      2016-06-01 11:40:52.000000000 
+0200
@@ -8,7 +8,7 @@
 module Data.List.Extra(
     module Data.List,
     -- * String operations
-    lower, upper, trim, trimStart, trimEnd, word1,
+    lower, upper, trim, trimStart, trimEnd, word1, line1,
     -- * Splitting    
     dropEnd, takeEnd, splitAtEnd, breakEnd, spanEnd,
     dropWhileEnd, dropWhileEnd', takeWhileEnd,
@@ -42,6 +42,7 @@
 --
 -- > \xs -> repeatedly (splitAt 3) xs  == chunksOf 3 xs
 -- > \xs -> repeatedly word1 (trim xs) == words xs
+-- > \xs -> repeatedly line1 xs == lines xs
 repeatedly :: ([a] -> (b, [a])) -> [a] -> [b]
 repeatedly f [] = []
 repeatedly f as = b : repeatedly f as'
@@ -234,7 +235,17 @@
 -- > \s -> fst (word1 s) == concat (take 1 $ words s)
 -- > \s -> words (snd $ word1 s) == drop 1 (words s)
 word1 :: String -> (String, String)
-word1 x = second (dropWhile isSpace) $ break isSpace $ dropWhile isSpace x
+word1 = second (dropWhile isSpace) . break isSpace . dropWhile isSpace
+
+-- | Split the first line off a string.
+--
+-- > line1 "" == ("", "")
+-- > line1 "test" == ("test","")
+-- > line1 "test\n" == ("test","")
+-- > line1 "test\nrest" == ("test","rest")
+-- > line1 "test\nrest\nmore" == ("test","rest\nmore")
+line1 :: String -> (String, String)
+line1 = second drop1 . break (== '\n')
 
 
 #if __GLASGOW_HASKELL__ < 709
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.4.8/src/Extra.hs new/extra-1.4.9/src/Extra.hs
--- old/extra-1.4.8/src/Extra.hs        2016-05-26 21:39:07.000000000 +0200
+++ new/extra-1.4.9/src/Extra.hs        2016-06-01 11:40:52.000000000 +0200
@@ -23,7 +23,7 @@
     modifyIORef', writeIORef', atomicModifyIORef', atomicWriteIORef, 
atomicWriteIORef',
     -- * Data.List.Extra
     -- | Extra functions available in @"Data.List.Extra"@.
-    lower, upper, trim, trimStart, trimEnd, word1, dropEnd, takeEnd, 
splitAtEnd, breakEnd, spanEnd, dropWhileEnd, dropWhileEnd', takeWhileEnd, 
stripSuffix, stripInfix, stripInfixEnd, wordsBy, linesBy, breakOn, breakOnEnd, 
splitOn, split, chunksOf, list, uncons, unsnoc, cons, snoc, drop1, mconcatMap, 
groupSort, groupSortOn, groupSortBy, nubOrd, nubOrdBy, nubOrdOn, nubOn, 
groupOn, sortOn, disjoint, allSame, anySame, repeatedly, for, firstJust, 
concatUnzip, concatUnzip3, replace, merge, mergeBy,
+    lower, upper, trim, trimStart, trimEnd, word1, line1, dropEnd, takeEnd, 
splitAtEnd, breakEnd, spanEnd, dropWhileEnd, dropWhileEnd', takeWhileEnd, 
stripSuffix, stripInfix, stripInfixEnd, wordsBy, linesBy, breakOn, breakOnEnd, 
splitOn, split, chunksOf, list, uncons, unsnoc, cons, snoc, drop1, mconcatMap, 
groupSort, groupSortOn, groupSortBy, nubOrd, nubOrdBy, nubOrdOn, nubOn, 
groupOn, sortOn, disjoint, allSame, anySame, repeatedly, for, firstJust, 
concatUnzip, concatUnzip3, replace, merge, mergeBy,
     -- * Data.Tuple.Extra
     -- | Extra functions available in @"Data.Tuple.Extra"@.
     first, second, (***), (&&&), dupe, both, fst3, snd3, thd3,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-1.4.8/test/TestGen.hs 
new/extra-1.4.9/test/TestGen.hs
--- old/extra-1.4.8/test/TestGen.hs     2016-05-26 21:39:07.000000000 +0200
+++ new/extra-1.4.9/test/TestGen.hs     2016-06-01 11:40:52.000000000 +0200
@@ -57,6 +57,7 @@
     testGen "\\x -> fromEither (Right x) == x" $ \x -> fromEither (Right x) == 
x
     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
     testGen "for [1,2,3] (+1) == [2,3,4]" $ for [1,2,3] (+1) == [2,3,4]
     testGen "disjoint [1,2,3] [4,5] == True" $ disjoint [1,2,3] [4,5] == True
     testGen "disjoint [1,2,3] [4,1] == False" $ disjoint [1,2,3] [4,1] == False
@@ -115,6 +116,11 @@
     testGen "word1 \"  keyword\\n  rest of string\" == (\"keyword\",\"rest of 
string\")" $ word1 "  keyword\n  rest of string" == ("keyword","rest of string")
     testGen "\\s -> fst (word1 s) == concat (take 1 $ words s)" $ \s -> fst 
(word1 s) == concat (take 1 $ words s)
     testGen "\\s -> words (snd $ word1 s) == drop 1 (words s)" $ \s -> words 
(snd $ word1 s) == drop 1 (words s)
+    testGen "line1 \"\" == (\"\", \"\")" $ line1 "" == ("", "")
+    testGen "line1 \"test\" == (\"test\",\"\")" $ line1 "test" == ("test","")
+    testGen "line1 \"test\\n\" == (\"test\",\"\")" $ line1 "test\n" == 
("test","")
+    testGen "line1 \"test\\nrest\" == (\"test\",\"rest\")" $ line1 
"test\nrest" == ("test","rest")
+    testGen "line1 \"test\\nrest\\nmore\" == (\"test\",\"rest\\nmore\")" $ 
line1 "test\nrest\nmore" == ("test","rest\nmore")
     testGen "sortOn fst [(3,\"z\"),(1,\"\"),(3,\"a\")] == 
[(1,\"\"),(3,\"z\"),(3,\"a\")]" $ sortOn fst [(3,"z"),(1,""),(3,"a")] == 
[(1,""),(3,"z"),(3,"a")]
     testGen "groupSort [(1,'t'),(3,'t'),(2,'e'),(2,'s')] == 
[(1,\"t\"),(2,\"es\"),(3,\"t\")]" $ groupSort [(1,'t'),(3,'t'),(2,'e'),(2,'s')] 
== [(1,"t"),(2,"es"),(3,"t")]
     testGen "\\xs -> map fst (groupSort xs) == sort (nub (map fst xs))" $ \xs 
-> map fst (groupSort xs) == sort (nub (map fst xs))


Reply via email to