Hello community,
here is the log from the commit of package ghc-uri-bytestring for
openSUSE:Factory checked in at 2017-01-31 12:40:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-uri-bytestring (Old)
and /work/SRC/openSUSE:Factory/.ghc-uri-bytestring.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-uri-bytestring"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-uri-bytestring/ghc-uri-bytestring.changes
2017-01-18 21:38:07.131878951 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-uri-bytestring.new/ghc-uri-bytestring.changes
2017-02-03 17:40:25.261602617 +0100
@@ -1,0 +2,10 @@
+Tue Nov 29 11:31:01 UTC 2016 - [email protected]
+
+- Update to version 0.2.2.1 with cabal2obs.
+
+-------------------------------------------------------------------
+Wed Aug 17 18:24:02 UTC 2016 - [email protected]
+
+- Update to version 0.2.2.0 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
uri-bytestring-0.2.1.2.tar.gz
New:
----
uri-bytestring-0.2.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-uri-bytestring.spec ++++++
--- /var/tmp/diff_new_pack.CZODRS/_old 2017-02-03 17:40:25.669544876 +0100
+++ /var/tmp/diff_new_pack.CZODRS/_new 2017-02-03 17:40:25.677543744 +0100
@@ -19,15 +19,14 @@
%global pkg_name uri-bytestring
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.2.1.2
+Version: 0.2.2.1
Release: 0
Summary: Haskell URI parsing as ByteStrings
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-attoparsec-devel
BuildRequires: ghc-blaze-builder-devel
BuildRequires: ghc-bytestring-devel
@@ -37,7 +36,7 @@
%if %{with tests}
BuildRequires: ghc-HUnit-devel
BuildRequires: ghc-QuickCheck-devel
-BuildRequires: ghc-derive-devel
+BuildRequires: ghc-generics-sop-devel
BuildRequires: ghc-lens-simple-devel
BuildRequires: ghc-quickcheck-instances-devel
BuildRequires: ghc-semigroups-devel
@@ -45,7 +44,6 @@
BuildRequires: ghc-tasty-hunit-devel
BuildRequires: ghc-tasty-quickcheck-devel
%endif
-# End cabal-rpm deps
%description
Uri-bytestring aims to be an RFC3986 compliant URI parser that uses efficient
@@ -65,20 +63,14 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
%check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
%post devel
%ghc_pkg_recache
++++++ uri-bytestring-0.2.1.2.tar.gz -> uri-bytestring-0.2.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.1.2/README.md
new/uri-bytestring-0.2.2.1/README.md
--- old/uri-bytestring-0.2.1.2/README.md 2016-06-25 01:14:33.000000000
+0200
+++ new/uri-bytestring-0.2.2.1/README.md 2016-11-23 20:55:10.000000000
+0100
@@ -13,3 +13,4 @@
* [Timo von Holtz](http://github.com/tvh)
* [Brendan Hay](http://github.com/brendanhay)
* [k0ral](https://github.com/k0ral)
+* [Michael Hatfield](https://github.com/mikehat)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.1.2/changelog.md
new/uri-bytestring-0.2.2.1/changelog.md
--- old/uri-bytestring-0.2.1.2/changelog.md 2016-06-25 01:14:33.000000000
+0200
+++ new/uri-bytestring-0.2.2.1/changelog.md 2016-11-23 20:55:10.000000000
+0100
@@ -1,3 +1,10 @@
+0.2.2.1
+* Drop dependency on derive in tests.
+
+0.2.2.0
+* Internally use attoparsec's numeric parser. Raise lower bounds on attoparsec.
+* Allow blank fragments.
+
0.2.1.2
* Fixed bug introduced at 0.2.1.1 where RelativeRefs would fail to serialize
their port numbers.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/uri-bytestring-0.2.1.2/src/URI/ByteString/Internal.hs
new/uri-bytestring-0.2.2.1/src/URI/ByteString/Internal.hs
--- old/uri-bytestring-0.2.1.2/src/URI/ByteString/Internal.hs 2016-06-25
01:14:33.000000000 +0200
+++ new/uri-bytestring-0.2.2.1/src/URI/ByteString/Internal.hs 2016-11-23
20:55:10.000000000 +0100
@@ -13,6 +13,7 @@
import Control.Monad
import Data.Attoparsec.ByteString
import qualified Data.Attoparsec.ByteString as A
+import qualified Data.Attoparsec.ByteString.Char8 as A ( decimal )
import Data.Bits
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
@@ -512,12 +513,12 @@
, dot
, decOctet]
where
+ decOctet :: Parser ByteString
decOctet = do
- s <- A.takeWhile1 isDigit
+ (s,num) <- A.match A.decimal
let len = BS.length s
- guard $ len > 0 && len <= 3
- let num = bsToNum s
- guard $ num >= 1 && num <= 255
+ guard $ len <= 3
+ guard $ num >= (1 :: Int) && num <= 255
return s
dot = string "."
@@ -540,7 +541,7 @@
-- | Parses port number from the hostname. Colon separator must be
-- handled elsewhere.
portParser :: URIParser Port
-portParser = (Port . bsToNum <$> A.takeWhile1 isDigit) `orFailWith`
MalformedPort
+portParser = (Port <$> A.decimal) `orFailWith` MalformedPort
-------------------------------------------------------------------------------
@@ -620,13 +621,13 @@
-------------------------------------------------------------------------------
-- | Only parses a fragment if the # signifiier is there
mFragmentParser :: URIParser (Maybe ByteString)
-mFragmentParser = word8' hash `thenJust` fragmentParser
+mFragmentParser = mParse $ word8' hash *> fragmentParser
-------------------------------------------------------------------------------
-- | The final piece of a uri, e.g. #fragment, minus the #.
fragmentParser :: URIParser ByteString
-fragmentParser = A.takeWhile1 validFragmentWord `orFailWith` MalformedFragment
+fragmentParser = Parser' $ A.takeWhile validFragmentWord
where
validFragmentWord = inClass ('?':'/':pchar)
@@ -755,17 +756,6 @@
-- | ByteString Utilities
-------------------------------------------------------------------------------
--- FIXME: theres probably a much better way to do this
-
--------------------------------------------------------------------------------
--- | Convert a bytestring into an int representation. Assumes the
--- entire string is comprised of 0-9 digits.
-bsToNum :: ByteString -> Int
-bsToNum s = sum $ zipWith (*) (reverse ints) [10 ^ x | x <- [0..] :: [Int]]
- where
- w2i w = fromEnum $ w - 48
- ints = map w2i . BS.unpack $ s
-
-------------------------------------------------------------------------------
-- | Decoding specifically for the query string, which decodes + as
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/uri-bytestring-0.2.1.2/test/URI/ByteString/Arbitrary.hs
new/uri-bytestring-0.2.2.1/test/URI/ByteString/Arbitrary.hs
--- old/uri-bytestring-0.2.1.2/test/URI/ByteString/Arbitrary.hs 2016-06-25
01:14:33.000000000 +0200
+++ new/uri-bytestring-0.2.2.1/test/URI/ByteString/Arbitrary.hs 2016-11-23
20:55:10.000000000 +0100
@@ -1,13 +1,16 @@
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module URI.ByteString.Arbitrary where
-------------------------------------------------------------------------------
import Control.Applicative
-import Data.Derive.Arbitrary (makeArbitrary)
-import Data.DeriveTH (derive)
+import Data.Proxy (Proxy (..))
+import qualified Generics.SOP as SOP
+import qualified Generics.SOP.GGP as SOP
+import GHC.Generics (Generic)
import Test.QuickCheck
import Test.QuickCheck.Instances ()
-------------------------------------------------------------------------------
@@ -17,6 +20,19 @@
-------------------------------------------------------------------------------
+-- this workaround can go away when
+-- <https://github.com/nick8325/quickcheck/pull/40> is merged.
+sopArbitrary :: (Generic a, SOP.GTo a, SOP.All SOP.SListI (SOP.GCode a),
SOP.All2 Arbitrary (SOP.GCode a)) => Gen a
+sopArbitrary = fmap SOP.gto sopArbitrary'
+
+
+sopArbitrary' :: (SOP.All SOP.SListI xss, SOP.All2 Arbitrary xss) => Gen
(SOP.SOP SOP.I xss)
+sopArbitrary' = oneof (map SOP.hsequence $ SOP.apInjs_POP $ SOP.hcpure p
arbitrary)
+ where
+ p :: Proxy Arbitrary
+ p = Proxy
+
+
instance Arbitrary UserInfo where
arbitrary = UserInfo <$> arbitrary
<*> arbitrary
@@ -73,5 +89,12 @@
<*> arbitrary
<*> arbitrary
-$(derive makeArbitrary ''SchemaError)
-$(derive makeArbitrary ''URIParseError)
+
+instance Arbitrary SchemaError where
+ arbitrary = sopArbitrary
+ shrink = genericShrink
+
+
+instance Arbitrary URIParseError where
+ arbitrary = sopArbitrary
+ shrink = genericShrink
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.1.2/test/URI/ByteStringTests.hs
new/uri-bytestring-0.2.2.1/test/URI/ByteStringTests.hs
--- old/uri-bytestring-0.2.1.2/test/URI/ByteStringTests.hs 2016-06-25
01:14:33.000000000 +0200
+++ new/uri-bytestring-0.2.2.1/test/URI/ByteStringTests.hs 2016-11-23
20:55:10.000000000 +0100
@@ -91,6 +91,12 @@
"/foo"
mempty
(Just "bar")
+ , testParses "http://www.example.org/foo#" $
+ URI (Scheme "http")
+ (Just (Authority Nothing (Host "www.example.org") Nothing))
+ "/foo"
+ mempty
+ (Just "")
, testParseFailure "http://www.example.org/foo#bar#baz" MalformedFragment
, testParseFailure "https://www.example.org?listParam[]=foo,bar"
MalformedQuery
, testParsesLax "https://www.example.org?listParam[]=foo,bar" $
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.1.2/uri-bytestring.cabal
new/uri-bytestring-0.2.2.1/uri-bytestring.cabal
--- old/uri-bytestring-0.2.1.2/uri-bytestring.cabal 2016-06-25
01:14:33.000000000 +0200
+++ new/uri-bytestring-0.2.2.1/uri-bytestring.cabal 2016-11-23
20:55:10.000000000 +0100
@@ -1,5 +1,5 @@
name: uri-bytestring
-version: 0.2.1.2
+version: 0.2.2.1
synopsis: Haskell URI parsing as ByteStrings
description: uri-bytestring aims to be an RFC3986 compliant URI parser that
uses efficient ByteStrings for parsing and representing the URI data.
license: BSD3
@@ -36,7 +36,7 @@
build-depends:
- attoparsec >= 0.10 && < 0.14
+ attoparsec >= 0.12 && < 0.14
, base >= 4.6 && < 4.10
, bytestring >= 0.9.1 && < 0.11
, blaze-builder >= 0.3.0.0 && < 0.5
@@ -67,7 +67,6 @@
, tasty
, tasty-hunit
, tasty-quickcheck
- , derive
, attoparsec
, base
, blaze-builder
@@ -76,6 +75,7 @@
, quickcheck-instances
, semigroups
, containers
+ , generics-sop >= 0.2
default-language: Haskell2010
if flag(lib-Werror)