Hello community,

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

Package is "ghc-tagsoup"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-tagsoup/ghc-tagsoup.changes  2016-07-27 
16:11:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-tagsoup.new/ghc-tagsoup.changes     
2016-10-18 10:39:13.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Sep 15 06:48:11 UTC 2016 - psim...@suse.com
+
+- Update to version 0.14 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  tagsoup-0.13.10.tar.gz

New:
----
  tagsoup-0.14.tar.gz

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

Other differences:
------------------
++++++ ghc-tagsoup.spec ++++++
--- /var/tmp/diff_new_pack.5WuX17/_old  2016-10-18 10:39:14.000000000 +0200
+++ /var/tmp/diff_new_pack.5WuX17/_new  2016-10-18 10:39:14.000000000 +0200
@@ -18,21 +18,19 @@
 
 %global pkg_name tagsoup
 Name:           ghc-%{pkg_name}
-Version:        0.13.10
+Version:        0.14
 Release:        0
 Summary:        Parsing and extracting information from (possibly malformed) 
HTML/XML documents
 License:        BSD-3-Clause
-Group:          System/Libraries
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
 
 %description
 TagSoup is a library for parsing HTML/XML. It supports the HTML 5
@@ -56,15 +54,12 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %post devel
 %ghc_pkg_recache
 

++++++ tagsoup-0.13.10.tar.gz -> tagsoup-0.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tagsoup-0.13.10/CHANGES.txt 
new/tagsoup-0.14/CHANGES.txt
--- old/tagsoup-0.13.10/CHANGES.txt     2016-05-06 16:01:11.000000000 +0200
+++ new/tagsoup-0.14/CHANGES.txt        2016-06-11 21:50:21.000000000 +0200
@@ -1,5 +1,7 @@
 Changelog for TagSoup
 
+0.14
+    #14, eliminate Text.HTML.Download
 0.13.10
     #51, improve the Haddock documentation
     #52, fix some > 16bit HTML entities
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tagsoup-0.13.10/Text/HTML/Download.hs 
new/tagsoup-0.14/Text/HTML/Download.hs
--- old/tagsoup-0.13.10/Text/HTML/Download.hs   2016-05-06 16:01:11.000000000 
+0200
+++ new/tagsoup-0.14/Text/HTML/Download.hs      1970-01-01 01:00:00.000000000 
+0100
@@ -1,76 +0,0 @@
-{-|
-    /DEPRECATED/: Use the HTTP package instead:
-
-    > import Network.HTTP
-    > openURL x = getResponseBody =<< simpleHTTP (getRequest x)
-
-    This module simply downloads a page off the internet. It is very 
restricted,
-    and it not intended for proper use.
-    
-    The original version was by Alistair Bayley, with additional help from
-    Daniel McAllansmith. It is taken from the Haskell-Cafe mailing list
-    \"Simple HTTP lib for Windows?\", 18 Jan 2007.
-    <http://thread.gmane.org/gmane.comp.lang.haskell.cafe/18443/>
--}
-
-module Text.HTML.Download(openURL, openItem) where
-
-import System.IO
-import System.IO.Unsafe
-import Network
-import Data.List (isPrefixOf)
-
-{-# DEPRECATED openItem, openURL "Use package HTTP, module Network.HTTP, 
getResponseBody =<< simpleHTTP (getRequest url)" #-}
-
-
--- | This function opens a URL on the internet.
---   Any @http:\/\/@ prefix is ignored.
---
--- > openURL "www.haskell.org/haskellwiki/Haskell"
---
--- Known Limitations:
---
--- * Only HTTP on port 80
---
--- * Outputs the HTTP Headers as well
---
--- * Does not work with all servers
---
--- It is hoped that a more reliable version of this function will be
--- placed in a new HTTP library at some point!
-openURL :: String -> IO String
-openURL url | "http://"; `isPrefixOf` url = openURL (drop 7 url)
-openURL url = client server 80 (if null path then "/" else path)
-    where (server,path) = break (== '/') url
-
-
-client :: [Char] -> PortNumber -> [Char] -> IO String
-client server port page = withSocketsDo $ do
-    hndl <- connectTo server (PortNumber port)
-    let out x = hPutStrLn hndl (x ++ "\r")
-    hSetBuffering hndl NoBuffering
-
-    out $ "GET " ++ page ++ " HTTP/1.1"
-    out $ "Host: " ++ server ++ ""
-    out $ "Connection: close"
-    out ""
-    out ""
-    readResponse hndl
-
-
-readResponse :: Handle -> IO String
-readResponse hndl = do
-    closed <- hIsClosed hndl
-    eof <- hIsEOF hndl
-    if closed || eof
-        then return []
-        else do
-            c <- hGetChar hndl
-            cs <- unsafeInterleaveIO $ readResponse hndl
-            return (c:cs)
-
-
--- | Open a URL (if it starts with @http:\/\/@) or a file otherwise
-openItem :: String -> IO String
-openItem x | "http://"; `isPrefixOf` x = openURL x
-           | otherwise = readFile x
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tagsoup-0.13.10/Text/HTML/TagSoup/Match.hs 
new/tagsoup-0.14/Text/HTML/TagSoup/Match.hs
--- old/tagsoup-0.13.10/Text/HTML/TagSoup/Match.hs      2016-05-06 
16:01:11.000000000 +0200
+++ new/tagsoup-0.14/Text/HTML/TagSoup/Match.hs 2016-06-11 21:50:21.000000000 
+0200
@@ -163,27 +163,34 @@
 
 -- * Matching attributes
 
+-- | Does any attribute name/value match the predicate.
 anyAttr :: ((str,str) -> Bool) -> [Attribute str] -> Bool
 anyAttr = any
 
+-- | Does any attribute name match the predicate.
 anyAttrName :: (str -> Bool) -> [Attribute str] -> Bool
 anyAttrName p = any (p . fst)
 
+-- | Does any attribute value match the predicate.
 anyAttrValue :: (str -> Bool) -> [Attribute str] -> Bool
 anyAttrValue p = any (p . snd)
 
 
+-- | Does any attribute name/value match.
 anyAttrLit :: Eq str => (str,str) -> [Attribute str] -> Bool
 anyAttrLit attr = anyAttr (attr==)
 
+-- | Does any attribute name match.
 anyAttrNameLit :: Eq str => str -> [Attribute str] -> Bool
 anyAttrNameLit name = anyAttrName (name==)
 
+-- | Does any attribute value match.
 anyAttrValueLit :: Eq str => str -> [Attribute str] -> Bool
 anyAttrValueLit value = anyAttrValue (value==)
 
 
 
+-- | Get the tags under tags with a given name where the attributes match some 
predicate.
 getTagContent :: Eq str => str -> ([Attribute str] -> Bool) -> [Tag str] -> 
[Tag str]
 getTagContent name pAttrs =
    takeWhile (not . tagCloseLit name) . drop 1 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tagsoup-0.13.10/Text/HTML/TagSoup/Tree.hs 
new/tagsoup-0.14/Text/HTML/TagSoup/Tree.hs
--- old/tagsoup-0.13.10/Text/HTML/TagSoup/Tree.hs       2016-05-06 
16:01:11.000000000 +0200
+++ new/tagsoup-0.14/Text/HTML/TagSoup/Tree.hs  2016-06-11 21:50:21.000000000 
+0200
@@ -17,8 +17,12 @@
 import GHC.Exts (build)
 
 
-data TagTree str = TagBranch str [Attribute str] [TagTree str]
-                 | TagLeaf (Tag str)
+-- | A tree of 'Tag' values.
+data TagTree str
+    = -- | A 'TagOpen'/'TagClose' pair with the 'Tag' values in between.
+      TagBranch str [Attribute str] [TagTree str]
+    | -- | Any leaf node
+      TagLeaf (Tag str)
                    deriving (Eq,Ord,Show)
 
 instance Functor TagTree where
@@ -51,12 +55,15 @@
             where (a,b) = f xs
         f [] = ([], [])
 
+-- | Build a 'TagTree' from a string.
 parseTree :: StringLike str => str -> [TagTree str]
 parseTree = tagTree . parseTags
 
+-- | Build a 'TagTree' from a string, specifying the 'ParseOptions'.
 parseTreeOptions :: StringLike str => ParseOptions str -> str -> [TagTree str]
 parseTreeOptions opts str = tagTree $ parseTagsOptions opts str
 
+-- | Flatten a 'TagTree' back to a list of 'Tag'.
 flattenTree :: [TagTree str] -> [Tag str]
 flattenTree xs = build $ flattenTreeFB xs
 
@@ -68,9 +75,11 @@
             TagOpen name atts `cons` flattenTreeOnto inner (TagClose name 
`cons` flattenTreeOnto trs tags)
         flattenTreeOnto (TagLeaf x:trs) tags = x `cons` flattenTreeOnto trs 
tags
 
+-- | Render a 'TagTree'.
 renderTree :: StringLike str => [TagTree str] -> str
 renderTree = renderTags . flattenTree
 
+-- | Render a 'TagTree' with some 'RenderOptions'.
 renderTreeOptions :: StringLike str => RenderOptions str -> [TagTree str] -> 
str
 renderTreeOptions opts trees = renderTagsOptions opts $ flattenTree trees
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tagsoup-0.13.10/Text/HTML/TagSoup.hs 
new/tagsoup-0.14/Text/HTML/TagSoup.hs
--- old/tagsoup-0.13.10/Text/HTML/TagSoup.hs    2016-05-06 16:01:11.000000000 
+0200
+++ new/tagsoup-0.14/Text/HTML/TagSoup.hs       2016-06-11 21:50:21.000000000 
+0200
@@ -62,6 +62,7 @@
 
 -- | Define a class to allow String's or Tag str's to be used as matches
 class TagRep a where
+    -- | Convert a value into a 'Tag'.
     toTagRep :: StringLike str => a -> Tag str
 
 instance StringLike str => TagRep (Tag str) where toTagRep = fmap castString
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tagsoup-0.13.10/tagsoup.cabal 
new/tagsoup-0.14/tagsoup.cabal
--- old/tagsoup-0.13.10/tagsoup.cabal   2016-05-06 16:01:11.000000000 +0200
+++ new/tagsoup-0.14/tagsoup.cabal      2016-06-11 21:50:21.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:  >= 1.6
 name:           tagsoup
-version:        0.13.10
+version:        0.14
 copyright:      Neil Mitchell 2006-2016
 author:         Neil Mitchell <ndmitch...@gmail.com>
 maintainer:     Neil Mitchell <ndmitch...@gmail.com>
@@ -31,17 +31,9 @@
     default: False
     description: Build the test program
 
-flag download
-    default: False
-    description: Build with Download module
-
 library
     build-depends: base == 4.*, containers, bytestring, text
 
-    if flag(download)
-        build-depends: network
-        exposed-modules: Text.HTML.Download
-
     exposed-modules:
         Text.HTML.TagSoup
         Text.HTML.TagSoup.Entity


Reply via email to