Hello community,
here is the log from the commit of package ghc-split for openSUSE:Factory checked in at 2013-08-01 15:33:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-split (Old)
and /work/SRC/openSUSE:Factory/.ghc-split.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-split"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-split/ghc-split.changes 2013-01-01 11:59:48.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-split.new/ghc-split.changes 2013-08-01 15:33:30.000000000 +0200
@@ -1,0 +2,10 @@
+Mon May 6 09:44:27 UTC 2013 - peter.trommler@ohm-hochschule.de
+
+- update to 0.2.2 from upstream
+* make splitting lazier (patch from Daniel Wagner)
+* allow base library version 4.7
+* new dropInnerBlanks combinator
+- update is part of Haskell Platform 2013.2
+- more transparent packaging (fewer macros)
+
+-------------------------------------------------------------------
Old:
----
split-0.2.1.1.tar.gz
New:
----
split-0.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-split.spec ++++++
--- /var/tmp/diff_new_pack.ldQ7UB/_old 2013-08-01 15:33:31.000000000 +0200
+++ /var/tmp/diff_new_pack.ldQ7UB/_new 2013-08-01 15:33:31.000000000 +0200
@@ -1,8 +1,7 @@
#
-# spec file for ghc-split
+# spec file for package ghc-split
#
-
-# Copyright (c) 2012 Herbert Graeber
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
%global pkg_name split
%global common_summary Haskell combinator library for splitting lists
@@ -23,47 +23,56 @@
%global common_description Combinator library and utility functions for splitting lists for Haskell.
Name: ghc-split
-Version: 0.2.1.1
-Release: 1
+Version: 0.2.2
+Release: 0
Summary: %{common_summary}
-
-Group: System/Libraries
License: BSD-3-Clause
+Group: System/Libraries
+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# BEGIN cabal2spec
-URL: http://hackage.haskell.org/package/%{pkg_name}
+Url: http://hackage.haskell.org/package/%{pkg_name}
Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
ExclusiveArch: %{ix86} x86_64 %{ghc_arches}
BuildRequires: ghc-Cabal-devel
-BuildRequires: ghc-rpm-macros %{!?without_hscolour:hscolour}
+BuildRequires: ghc-rpm-macros
# END cabal2spec
%description
%{common_description}
+%package devel
+Summary: Haskell %{pkg_name} library development files
+Group: Development/Languages/Other
+Requires: ghc-compiler
+Requires(post): ghc-compiler
+Requires(postun): ghc-compiler
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+%{common_description}
+This package contains the development files.
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
+%post devel
+%ghc_pkg_recache
-# devel subpackage
-%ghc_devel_package
-
-%ghc_devel_description
-
-
-%ghc_devel_post_postun
-
+%postun devel
+%ghc_pkg_recache
-%ghc_files LICENSE
+%files -f %{name}.files
+%defattr(-,root,root,-)
+%doc LICENSE CHANGES README
+%files devel -f %{name}-devel.files
+%defattr(-,root,root,-)
%changelog
++++++ split-0.2.1.1.tar.gz -> split-0.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/split-0.2.1.1/CHANGES new/split-0.2.2/CHANGES
--- old/split-0.2.1.1/CHANGES 2012-09-24 18:56:03.000000000 +0200
+++ new/split-0.2.2/CHANGES 2013-04-14 20:47:17.000000000 +0200
@@ -1,3 +1,19 @@
+* 0.2.2 (14 April 2013)
+
+ - Add 'dropInnerBlanks' combinator for dropping blank chunks between
+ consecutive delimiters while still keeping the delimiters separate.
+
+* 0.2.1.3 (28 March 2013)
+
+ - bump upper bound to allow base-4.7
+
+* 0.2.1.2 (28 January 2013)
+
+ - Patch from Daniel Wagner to make splitting lazier when using
+ keepDelimsR. Previously nothing was output until encountering a
+ delimiter; now it can start outputting a Text chunk before
+ reaching a delimiter.
+
* 0.2.1.1 (24 September 2012)
- Update this CHANGES file with details from the past two releases.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/split-0.2.1.1/README new/split-0.2.2/README
--- old/split-0.2.1.1/README 2012-09-24 18:56:03.000000000 +0200
+++ new/split-0.2.2/README 2013-04-14 20:47:17.000000000 +0200
@@ -26,3 +26,7 @@
Once the documentation has been built, you can access it by
pointing your browser to dist/doc/html/split/index.html.
+
+Running the tests:
+
+ cabal configure --enable-tests && cabal build && cabal test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/split-0.2.1.1/split.cabal new/split-0.2.2/split.cabal
--- old/split-0.2.1.1/split.cabal 2012-09-24 18:56:03.000000000 +0200
+++ new/split-0.2.2/split.cabal 2013-04-14 20:47:17.000000000 +0200
@@ -1,5 +1,5 @@
Name: split
-Version: 0.2.1.1
+Version: 0.2.2
Stability: stable
Description: A collection of various methods for splitting
@@ -51,7 +51,7 @@
Library
ghc-options: -Wall
- build-depends: base <4.7
+ build-depends: base <4.8
exposed-modules: Data.List.Split, Data.List.Split.Internals
default-language: Haskell2010
Hs-source-dirs: src
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/split-0.2.1.1/src/Data/List/Split/Internals.hs new/split-0.2.2/src/Data/List/Split/Internals.hs
--- old/split-0.2.1.1/src/Data/List/Split/Internals.hs 2012-09-24 18:56:02.000000000 +0200
+++ new/split-0.2.2/src/Data/List/Split/Internals.hs 2013-04-14 20:47:17.000000000 +0200
@@ -89,6 +89,10 @@
-- | What to do with multiple consecutive delimiters?
data CondensePolicy = Condense -- ^ Condense into a single delimiter.
+ | DropBlankFields -- ^ Keep consecutive
+ -- delimiters separate, but
+ -- don't insert blank chunks in
+ -- between them.
| KeepBlankFields -- ^ Insert blank chunks
-- between consecutive
-- delimiters.
@@ -143,7 +147,6 @@
toSplitList (Just ([],r:rs)) = Delim [] : Text [r] : splitInternal d rs
toSplitList (Just (delim,rest)) = Delim delim : splitInternal d rest
--- |
breakDelim :: Delimiter a -> [a] -> ([a],Maybe ([a],[a]))
breakDelim (Delimiter []) xs = ([],Just ([],xs))
breakDelim _ [] = ([],Nothing)
@@ -161,7 +164,7 @@
. dropInitial (initBlankPolicy s)
. doMerge (delimPolicy s)
. doDrop (delimPolicy s)
- . insertBlanks
+ . insertBlanks (condensePolicy s)
. doCondense (condensePolicy s)
-- | Drop delimiters if the 'DelimPolicy' is 'Drop'.
@@ -172,27 +175,30 @@
-- | Condense multiple consecutive delimiters into one if the
-- 'CondensePolicy' is 'Condense'.
doCondense :: CondensePolicy -> SplitList a -> SplitList a
-doCondense KeepBlankFields ls = ls
doCondense Condense ls = condense' ls
where condense' [] = []
condense' (c@(Text _) : l) = c : condense' l
condense' l = (Delim $ concatMap fromElem ds) : condense' rest
where (ds,rest) = span isDelim l
+doCondense _ ls = ls
--- | Insert blank chunks between any remaining consecutive delimiters,
--- and at the beginning or end if the first or last element is a
--- delimiter.
-insertBlanks :: SplitList a -> SplitList a
-insertBlanks [] = [Text []]
-insertBlanks (d@(Delim _) : l) = Text [] : insertBlanks' (d:l)
-insertBlanks l = insertBlanks' l
+-- | Insert blank chunks between any remaining consecutive delimiters
+-- (unless the condense policy is 'DropBlankFields'), and at the
+-- beginning or end if the first or last element is a delimiter.
+insertBlanks :: CondensePolicy -> SplitList a -> SplitList a
+insertBlanks _ [] = [Text []]
+insertBlanks cp (d@(Delim _) : l) = Text [] : insertBlanks' cp (d:l)
+insertBlanks cp l = insertBlanks' cp l
-- | Insert blank chunks between consecutive delimiters.
-insertBlanks' :: SplitList a -> SplitList a
-insertBlanks' [] = []
-insertBlanks' (d1@(Delim _) : d2@(Delim _) : l) = d1 : Text [] : insertBlanks' (d2:l)
-insertBlanks' [d@(Delim _)] = [d, Text []]
-insertBlanks' (c : l) = c : insertBlanks' l
+insertBlanks' :: CondensePolicy -> SplitList a -> SplitList a
+insertBlanks' _ [] = []
+insertBlanks' cp@DropBlankFields (d1@(Delim _) : d2@(Delim _) : l)
+ = d1 : insertBlanks' cp (d2:l)
+insertBlanks' cp (d1@(Delim _) : d2@(Delim _) : l)
+ = d1 : Text [] : insertBlanks' cp (d2:l)
+insertBlanks' _ [d@(Delim _)] = [d, Text []]
+insertBlanks' cp (c : l) = c : insertBlanks' cp l
-- | Merge delimiters into adjacent chunks according to the 'DelimPolicy'.
doMerge :: DelimPolicy -> SplitList a -> SplitList a
@@ -211,7 +217,13 @@
-- | Merge delimiters with adjacent chunks to the left.
mergeRight :: SplitList a -> SplitList a
mergeRight [] = []
-mergeRight ((Text c) : (Delim d) : l) = Text (c++d) : mergeRight l
+-- below fanciness is with the goal of laziness: we want to start returning
+-- stuff before we've necessarily discovered a delimiter, in case we're
+-- processing some infinite list with no delimiter
+mergeRight ((Text c) : l) = Text (c++d) : mergeRight lTail
+ where (d, lTail) = case l of
+ Delim d' : l' -> (d', l')
+ _ -> ([], l)
mergeRight (c : l) = c : mergeRight l
-- | Drop an initial blank chunk according to the given 'EndPolicy'.
@@ -320,10 +332,19 @@
dropFinalBlank :: Splitter a -> Splitter a
dropFinalBlank s = s { finalBlankPolicy = DropBlank }
+-- | Don't generate blank chunks between consecutive delimiters.
+-- For example:
+--
+-- > split (oneOf ":") "::b:::a" == ["",":","",":","b",":","",":","",":","a"]
+-- > split (dropInnerBlanks $ oneOf ":") "::b:::a" == ["", ":",":","b",":",":",":","a"]
+dropInnerBlanks :: Splitter a -> Splitter a
+dropInnerBlanks s = s { condensePolicy = DropBlankFields }
+
-- ** Derived combinators
--- | Drop all blank chunks from the output. Equivalent to
--- @'dropInitBlank' . 'dropFinalBlank' . 'condense'@. For example:
+-- | Drop all blank chunks from the output, and condense consecutive
+-- delimiters into one. Equivalent to @'dropInitBlank'
+-- . 'dropFinalBlank' . 'condense'@. For example:
--
-- > split (oneOf ":") "::b:::a" == ["",":","",":","b",":","",":","",":","a"]
-- > split (dropBlanks $ oneOf ":") "::b:::a" == ["::","b",":::","a"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/split-0.2.1.1/src/Data/List/Split.hs new/split-0.2.2/src/Data/List/Split.hs
--- old/split-0.2.1.1/src/Data/List/Split.hs 2012-09-24 18:56:02.000000000 +0200
+++ new/split-0.2.2/src/Data/List/Split.hs 2013-04-14 20:47:17.000000000 +0200
@@ -68,6 +68,7 @@
, condense
, dropInitBlank
, dropFinalBlank
+ , dropInnerBlanks
-- ** Derived combinators
-- $derived
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/split-0.2.1.1/test/Properties.hs new/split-0.2.2/test/Properties.hs
--- old/split-0.2.1.1/test/Properties.hs 2012-09-24 18:56:03.000000000 +0200
+++ new/split-0.2.2/test/Properties.hs 2013-04-14 20:47:17.000000000 +0200
@@ -12,8 +12,9 @@
import Data.Char
import Data.Functor
-import Data.List (genericTake, group, intercalate, isInfixOf, isPrefixOf,
- isSuffixOf, tails)
+import Data.List (genericTake, group, intercalate,
+ isInfixOf, isPrefixOf, isSuffixOf,
+ tails)
import Data.Maybe (isJust)
newtype Elt = Elt { unElt :: Char }
@@ -159,19 +160,19 @@
prop_doCondense_no_consec_delims l = noConsecDelims $ doCondense Condense l
prop_insBlanks_no_consec_delims :: SplitList Elt -> Bool
-prop_insBlanks_no_consec_delims l = noConsecDelims $ insertBlanks l
+prop_insBlanks_no_consec_delims l = noConsecDelims $ insertBlanks Condense l
prop_insBlanks_fl_not_delim :: SplitList Elt -> Bool
prop_insBlanks_fl_not_delim l =
- case insertBlanks l of
+ case insertBlanks Condense l of
[] -> True
xs -> (not . isDelim $ head xs) && (not . isDelim $ last xs)
prop_mergeL_no_delims :: SplitList Elt -> Bool
-prop_mergeL_no_delims = all (not . isDelim) . mergeLeft . insertBlanks
+prop_mergeL_no_delims = all (not . isDelim) . mergeLeft . insertBlanks Condense
prop_mergeR_no_delims :: SplitList Elt -> Bool
-prop_mergeR_no_delims = all (not . isDelim) . mergeRight . insertBlanks
+prop_mergeR_no_delims = all (not . isDelim) . mergeRight . insertBlanks Condense
getDelims :: Splitter Elt -> [Elt] -> [[Elt]]
getDelims s l = [ d | Delim d <- splitInternal (delimiter s) l ]
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org