Hello community,
here is the log from the commit of package ghc-uri-bytestring for
openSUSE:Factory checked in at 2017-04-14 13:39:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-uri-bytestring (Old)
and /work/SRC/openSUSE:Factory/.ghc-uri-bytestring.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-uri-bytestring"
Fri Apr 14 13:39:03 2017 rev:3 rq:485171 version:0.2.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-uri-bytestring/ghc-uri-bytestring.changes
2017-02-03 17:40:25.261602617 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-uri-bytestring.new/ghc-uri-bytestring.changes
2017-04-14 13:39:03.444059501 +0200
@@ -1,0 +2,10 @@
+Tue Mar 7 11:19:22 UTC 2017 - [email protected]
+
+- Update to version 0.2.3.1 with cabal2obs.
+
+-------------------------------------------------------------------
+Mon Feb 27 10:12:20 UTC 2017 - [email protected]
+
+- Update to version 0.2.3.0 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
uri-bytestring-0.2.2.1.tar.gz
New:
----
uri-bytestring-0.2.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-uri-bytestring.spec ++++++
--- /var/tmp/diff_new_pack.h5ip2u/_old 2017-04-14 13:39:05.363788185 +0200
+++ /var/tmp/diff_new_pack.h5ip2u/_new 2017-04-14 13:39:05.367787620 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-uri-bytestring
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%global pkg_name uri-bytestring
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.2.2.1
+Version: 0.2.3.1
Release: 0
Summary: Haskell URI parsing as ByteStrings
License: BSD-3-Clause
@@ -32,6 +32,8 @@
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-rpm-macros
+BuildRequires: ghc-template-haskell-devel
+BuildRequires: ghc-th-lift-instances-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
BuildRequires: ghc-HUnit-devel
++++++ uri-bytestring-0.2.2.1.tar.gz -> uri-bytestring-0.2.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.2.1/README.md
new/uri-bytestring-0.2.3.1/README.md
--- old/uri-bytestring-0.2.2.1/README.md 2016-11-23 20:55:10.000000000
+0100
+++ new/uri-bytestring-0.2.3.1/README.md 2017-02-27 19:22:30.000000000
+0100
@@ -14,3 +14,4 @@
* [Brendan Hay](http://github.com/brendanhay)
* [k0ral](https://github.com/k0ral)
* [Michael Hatfield](https://github.com/mikehat)
+* [reactormonk](https://github.com/reactormonk)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.2.1/changelog.md
new/uri-bytestring-0.2.3.1/changelog.md
--- old/uri-bytestring-0.2.2.1/changelog.md 2016-11-23 20:55:10.000000000
+0100
+++ new/uri-bytestring-0.2.3.1/changelog.md 2017-02-27 19:22:30.000000000
+0100
@@ -1,3 +1,9 @@
+0.2.3.1
+* Add `relativeRef` quasi-quoter.
+
+0.2.3.0
+* Add `URI.ByteString.QQ` and the `uri` quasiquoter to be able to express
statically known to be valid URIs, e.g. `example =
[uri|http://www.example.com|]`. Thanks to
[reactormonk](https://github.com/reactormonk).
+
0.2.2.1
* Drop dependency on derive in tests.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.2.1/src/URI/ByteString/QQ.hs
new/uri-bytestring-0.2.3.1/src/URI/ByteString/QQ.hs
--- old/uri-bytestring-0.2.2.1/src/URI/ByteString/QQ.hs 1970-01-01
01:00:00.000000000 +0100
+++ new/uri-bytestring-0.2.3.1/src/URI/ByteString/QQ.hs 2017-02-27
19:22:30.000000000 +0100
@@ -0,0 +1,48 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE StandaloneDeriving #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE CPP #-}
+
+module URI.ByteString.QQ
+ ( uri
+ , relativeRef
+ ) where
+
+import Language.Haskell.TH.Quote
+import URI.ByteString
+import Data.ByteString.Char8
+import Instances.TH.Lift()
+
+-- | Allows uri literals via QuasiQuotes language extension.
+--
+-- >>> {-# LANGUAGE QuasiQuotes #-}
+-- >>> stackage :: URI
+-- >>> stackage = [uri|http://stackage.org|]
+uri :: QuasiQuoter
+uri = QuasiQuoter { quoteExp = \s ->
+ let
+ parsedURI = either (\err -> error $ show err) id
(parseURI laxURIParserOptions (pack s))
+ in
+ [| parsedURI |],
+ quotePat = error "Not implemented.",
+ quoteType = error "Not implemented.",
+ quoteDec = error "Not implemented."
+ }
+
+
+-------------------------------------------------------------------------------
+-- | Allows relative ref literals via QuasiQuotes language extension.
+--
+-- >>> {-# LANGUAGE QuasiQuotes #-}
+-- >>> ref :: RelativeRef
+-- >>> ref = [relativeRef|/foo?bar=baz#quux|]
+relativeRef :: QuasiQuoter
+relativeRef = QuasiQuoter { quoteExp = \s ->
+ let
+ parsedURI = either (\err -> error $ show err) id
(parseRelativeRef laxURIParserOptions (pack s))
+ in
+ [| parsedURI |],
+ quotePat = error "Not implemented.",
+ quoteType = error "Not implemented.",
+ quoteDec = error "Not implemented."
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.2.1/src/URI/ByteString/Types.hs
new/uri-bytestring-0.2.3.1/src/URI/ByteString/Types.hs
--- old/uri-bytestring-0.2.2.1/src/URI/ByteString/Types.hs 2016-11-23
20:55:10.000000000 +0100
+++ new/uri-bytestring-0.2.3.1/src/URI/ByteString/Types.hs 2017-02-27
19:22:30.000000000 +0100
@@ -4,6 +4,11 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
+#ifdef LIFT_COMPAT
+{-# LANGUAGE TemplateHaskell #-}
+#else
+{-# LANGUAGE DeriveLift #-}
+#endif
module URI.ByteString.Types where
-------------------------------------------------------------------------------
@@ -13,21 +18,37 @@
import Data.Typeable
import Data.Word
import GHC.Generics
+import Instances.TH.Lift()
-------------------------------------------------------------------------------
import Prelude
-------------------------------------------------------------------------------
-
+#ifdef LIFT_COMPAT
+import Language.Haskell.TH.Syntax()
+import Language.Haskell.TH.Lift
+#else
+import Language.Haskell.TH.Syntax
+#endif
-- | Required first component to referring to a specification for the
-- remainder of the URI's components, e.g. "http" or "https"
newtype Scheme = Scheme { schemeBS :: ByteString }
deriving (Show, Eq, Generic, Typeable, Ord)
+#ifdef LIFT_COMPAT
+deriveLift ''Scheme
+#else
+deriving instance Lift Scheme
+#endif
-------------------------------------------------------------------------------
newtype Host = Host { hostBS :: ByteString }
deriving (Show, Eq, Generic, Typeable, Ord)
+#ifdef LIFT_COMPAT
+deriveLift ''Host
+#else
+deriving instance Lift Host
+#endif
-------------------------------------------------------------------------------
-- | While some libraries have chosen to limit this to a Word16, the
@@ -35,6 +56,23 @@
newtype Port = Port { portNumber :: Int }
deriving (Show, Eq, Generic, Typeable, Ord)
+#ifdef LIFT_COMPAT
+deriveLift ''Port
+#else
+deriving instance Lift Port
+#endif
+
+-------------------------------------------------------------------------------
+data UserInfo = UserInfo {
+ uiUsername :: ByteString
+ , uiPassword :: ByteString
+ } deriving (Show, Eq, Generic, Typeable, Ord)
+
+#ifdef LIFT_COMPAT
+deriveLift ''UserInfo
+#else
+deriving instance Lift UserInfo
+#endif
-------------------------------------------------------------------------------
data Authority = Authority {
@@ -43,18 +81,39 @@
, authorityPort :: Maybe Port
} deriving (Show, Eq, Generic, Typeable, Ord)
+#ifdef LIFT_COMPAT
+deriveLift ''Authority
+#else
+deriving instance Lift Authority
+#endif
-------------------------------------------------------------------------------
-data UserInfo = UserInfo {
- uiUsername :: ByteString
- , uiPassword :: ByteString
- } deriving (Show, Eq, Generic, Typeable, Ord)
+newtype Query = Query { queryPairs :: [(ByteString, ByteString)] }
+ deriving (Show, Eq, Monoid, Generic, Typeable, Ord)
+#ifdef LIFT_COMPAT
+deriveLift ''Query
+#else
+deriving instance Lift Query
+#endif
-------------------------------------------------------------------------------
-newtype Query = Query { queryPairs :: [(ByteString, ByteString)] }
- deriving (Show, Eq, Monoid, Generic, Typeable, Ord)
+data Absolute deriving(Typeable)
+
+#ifdef LIFT_COMPAT
+deriveLift ''Absolute
+#else
+deriving instance Lift Absolute
+#endif
+
+-------------------------------------------------------------------------------
+data Relative deriving(Typeable)
+#ifdef LIFT_COMPAT
+deriveLift ''Relative
+#else
+deriving instance Lift Relative
+#endif
-------------------------------------------------------------------------------
-- | Note: URI fragment does not include the #
@@ -75,20 +134,17 @@
deriving instance Eq (URIRef a)
-- deriving instance Generic (URIRef a)
deriving instance Ord (URIRef a)
+#ifdef LIFT_COMPAT
+deriveLift ''URIRef
+#else
+deriving instance Lift (URIRef a)
+#endif
#ifdef WITH_TYPEABLE
deriving instance Typeable URIRef
#endif
-------------------------------------------------------------------------------
-data Absolute deriving(Typeable)
-
-
--------------------------------------------------------------------------------
-data Relative deriving(Typeable)
-
-
--------------------------------------------------------------------------------
type URI = URIRef Absolute
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.2.1/test/Main.hs
new/uri-bytestring-0.2.3.1/test/Main.hs
--- old/uri-bytestring-0.2.2.1/test/Main.hs 2016-11-23 20:55:10.000000000
+0100
+++ new/uri-bytestring-0.2.3.1/test/Main.hs 2017-02-27 19:22:30.000000000
+0100
@@ -1,9 +1,10 @@
module Main (main) where
-------------------------------------------------------------------------------
-import Test.Tasty
+import Test.Tasty
-------------------------------------------------------------------------------
-import URI.ByteStringTests
+import qualified URI.ByteStringTests
+import qualified URI.ByteStringQQTests
-------------------------------------------------------------------------------
@@ -14,4 +15,5 @@
testSuite = testGroup "uri-bytestring"
[
URI.ByteStringTests.tests
+ , URI.ByteStringQQTests.tests
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.2.1/test/URI/ByteStringQQTests.hs
new/uri-bytestring-0.2.3.1/test/URI/ByteStringQQTests.hs
--- old/uri-bytestring-0.2.2.1/test/URI/ByteStringQQTests.hs 1970-01-01
01:00:00.000000000 +0100
+++ new/uri-bytestring-0.2.3.1/test/URI/ByteStringQQTests.hs 2017-02-27
19:22:30.000000000 +0100
@@ -0,0 +1,28 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE QuasiQuotes #-}
+module URI.ByteStringQQTests (tests) where
+
+
+-------------------------------------------------------------------------------
+import Test.Tasty
+import Test.Tasty.HUnit
+-------------------------------------------------------------------------------
+import URI.ByteString
+import URI.ByteString.QQ
+-------------------------------------------------------------------------------
+
+
+quasiTest :: URI
+quasiTest = [uri|https://stackage.org/foo?bar=baz#quux|]
+
+
+quasiRelTest :: RelativeRef
+quasiRelTest = [relativeRef|/foo?bar=baz#quux|]
+
+tests :: TestTree
+tests = testGroup "URI.ByteString.QQ"
+ [ testCase "uri quasi quoter produces expected RelativeRef" $ do
+ quasiTest @?= URI (Scheme "https") (Just (Authority Nothing (Host
"stackage.org") Nothing)) "/foo" (Query [("bar", "baz")]) (Just "quux")
+ , testCase "relativeRef quasi quoter produces expected RelativeRef" $ do
+ quasiRelTest @?= RelativeRef Nothing "/foo" (Query [("bar", "baz")])
(Just "quux")
+ ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.2.1/test/URI/ByteStringTests.hs
new/uri-bytestring-0.2.3.1/test/URI/ByteStringTests.hs
--- old/uri-bytestring-0.2.2.1/test/URI/ByteStringTests.hs 2016-11-23
20:55:10.000000000 +0100
+++ new/uri-bytestring-0.2.3.1/test/URI/ByteStringTests.hs 2017-02-27
19:22:30.000000000 +0100
@@ -20,6 +20,7 @@
import URI.ByteString
import URI.ByteString.Arbitrary ()
-------------------------------------------------------------------------------
+import URI.ByteStringQQTests ()
tests :: TestTree
tests = testGroup "URI.Bytestring"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/uri-bytestring-0.2.2.1/uri-bytestring.cabal
new/uri-bytestring-0.2.3.1/uri-bytestring.cabal
--- old/uri-bytestring-0.2.2.1/uri-bytestring.cabal 2016-11-23
20:55:10.000000000 +0100
+++ new/uri-bytestring-0.2.3.1/uri-bytestring.cabal 2017-02-27
19:22:30.000000000 +0100
@@ -1,5 +1,5 @@
name: uri-bytestring
-version: 0.2.2.1
+version: 0.2.3.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
@@ -29,6 +29,7 @@
library
exposed-modules:
URI.ByteString
+ URI.ByteString.QQ
other-modules:
URI.ByteString.Lens
URI.ByteString.Types
@@ -40,6 +41,8 @@
, base >= 4.6 && < 4.10
, bytestring >= 0.9.1 && < 0.11
, blaze-builder >= 0.3.0.0 && < 0.5
+ , template-haskell >= 2.9 && < 2.12
+ , th-lift-instances >= 0.1.8 && < 0.2
, containers
hs-source-dirs: src
@@ -48,6 +51,11 @@
if impl(ghc >= 7.8)
cpp-options: -DWITH_TYPEABLE
+ if impl(ghc < 8)
+ cpp-options: -DLIFT_COMPAT
+ build-depends:
+ th-lift >= 0.7.5 && < 0.8
+
if flag(lib-Werror)
ghc-options: -Werror
@@ -59,6 +67,7 @@
other-modules:
URI.ByteString.Arbitrary
URI.ByteStringTests
+ URI.ByteStringQQTests
hs-source-dirs: test
build-depends:
uri-bytestring