openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
August 2017
- 1 participants
- 2097 discussions
Hello community,
here is the log from the commit of package ghc-RSA for openSUSE:Factory checked in at 2017-08-31 20:46:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-RSA (Old)
and /work/SRC/openSUSE:Factory/.ghc-RSA.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-RSA"
Thu Aug 31 20:46:06 2017 rev:4 rq:513195 version:2.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-RSA/ghc-RSA.changes 2016-07-27 16:09:24.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-RSA.new/ghc-RSA.changes 2017-08-31 20:46:08.214419939 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:58 UTC 2017 - psimons(a)suse.com
+
+- Update to version 2.3.0.
+
+-------------------------------------------------------------------
Old:
----
RSA-2.2.0.tar.gz
New:
----
RSA-2.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-RSA.spec ++++++
--- /var/tmp/diff_new_pack.mLBLQy/_old 2017-08-31 20:46:09.246275105 +0200
+++ /var/tmp/diff_new_pack.mLBLQy/_new 2017-08-31 20:46:09.250274543 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-RSA
#
-# 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,21 +19,19 @@
%global pkg_name RSA
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 2.2.0
+Version: 2.3.0
Release: 0
Summary: Implementation of RSA, using the padding schemes of PKCS#1 v2.1
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}-%{ve…
BuildRequires: ghc-Cabal-devel
-# Begin cabal-rpm deps:
BuildRequires: ghc-SHA-devel
BuildRequires: ghc-binary-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-crypto-api-devel
BuildRequires: ghc-crypto-pubkey-types-devel
-BuildRequires: ghc-pureMD5-devel
BuildRequires: ghc-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
@@ -43,7 +41,6 @@
BuildRequires: ghc-test-framework-devel
BuildRequires: ghc-test-framework-quickcheck2-devel
%endif
-# End cabal-rpm deps
%description
This library implements the RSA encryption and signature algorithms for
@@ -66,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
++++++ RSA-2.2.0.tar.gz -> RSA-2.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RSA-2.2.0/RSA.cabal new/RSA-2.3.0/RSA.cabal
--- old/RSA-2.2.0/RSA.cabal 2015-10-12 20:52:47.000000000 +0200
+++ new/RSA-2.3.0/RSA.cabal 2017-06-08 23:42:59.000000000 +0200
@@ -1,6 +1,6 @@
name: RSA
category: Cryptography, Codec
-version: 2.2.0
+version: 2.3.0
license: BSD3
license-file: LICENSE
author: Adam Wick <awick(a)galois.com>
@@ -24,7 +24,6 @@
bytestring > 0.8 && < 0.12,
crypto-api >= 0.10 && < 0.14,
crypto-pubkey-types >= 0.2 && < 0.6,
- pureMD5 >= 2.1 && < 2.3,
SHA >= 1.6.4.1 && < 2.0
exposed-modules: Codec.Crypto.RSA,
Codec.Crypto.RSA.Exceptions,
@@ -42,7 +41,6 @@
crypto-api >= 0.10 && < 0.14,
crypto-pubkey-types >= 0.4 && < 0.6,
DRBG >= 0.5.2 && < 0.7,
- pureMD5 >= 2.1 && < 2.3,
QuickCheck >= 2.5 && < 3,
tagged >= 0.2 && < 0.9,
test-framework >= 0.8.0.3 && < 0.10,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RSA-2.2.0/Test.hs new/RSA-2.3.0/Test.hs
--- old/RSA-2.2.0/Test.hs 2015-10-12 20:52:47.000000000 +0200
+++ new/RSA-2.3.0/Test.hs 2017-06-08 23:42:59.000000000 +0200
@@ -4,7 +4,6 @@
import qualified Data.ByteString as BSS
import Data.ByteString.Lazy(ByteString)
import qualified Data.ByteString.Lazy as BS
-import qualified Data.Digest.Pure.MD5 as MD5
import Data.Digest.Pure.SHA
import System.IO
import Test.QuickCheck
@@ -81,7 +80,6 @@
instance Show HashInfo where
show (HashInfo ident _)
- | ident == algorithmIdent hashMD5 = "<MD5>"
| ident == algorithmIdent hashSHA1 = "<SHA1>"
| ident == algorithmIdent hashSHA224 = "<SHA224>"
| ident == algorithmIdent hashSHA256 = "<SHA256>"
@@ -90,7 +88,7 @@
| otherwise = "<unknownHASH>"
instance Arbitrary HashInfo where
- arbitrary = elements [hashMD5, hashSHA1, hashSHA224,
+ arbitrary = elements [hashSHA1, hashSHA224,
hashSHA256, hashSHA384, hashSHA512]
newtype LargePrime = LP Integer
@@ -115,8 +113,7 @@
show (HF s _) = "<" ++ s ++ ">"
instance Arbitrary HashFun where
- arbitrary = elements [HF "MD5" (encode . MD5.md5),
- HF "SHA1" (bytestringDigest . sha1),
+ arbitrary = elements [HF "SHA1" (bytestringDigest . sha1),
HF "SHA256" (bytestringDigest . sha256),
HF "SHA384" (bytestringDigest . sha384),
HF "SHA512" (bytestringDigest . sha512)]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RSA-2.2.0/src/Codec/Crypto/RSA/Exceptions.hs new/RSA-2.3.0/src/Codec/Crypto/RSA/Exceptions.hs
--- old/RSA-2.2.0/src/Codec/Crypto/RSA/Exceptions.hs 2015-10-12 20:52:47.000000000 +0200
+++ new/RSA-2.3.0/src/Codec/Crypto/RSA/Exceptions.hs 2017-06-08 23:42:59.000000000 +0200
@@ -27,7 +27,7 @@
, rsassa_pkcs1_v1_5_sign
, rsassa_pkcs1_v1_5_verify
-- * Hashing algorithm declarations for use in RSA functions
- , hashMD5, hashSHA1
+ , hashSHA1
, hashSHA224, hashSHA256, hashSHA384, hashSHA512
-- * Other mathematical functions that are handy for implementing
-- other RSA primitives.
@@ -259,7 +259,7 @@
-- or 35.
--
-- Thus,
--- * for MD5, SHA1, and SHA256, use 512+ bit keys
+-- * for SHA1 and SHA256, use 512+ bit keys
-- * for SHA384 and SHA512, use 1024+ bit keys
--
rsassa_pkcs1_v1_5_sign :: HashInfo {- ^The hash function to use -} ->
@@ -359,9 +359,6 @@
-- ----------------------------------------------------------------------------
-hashMD5 :: HashInfo
-hashMD5 = Pure.hashMD5
-
hashSHA1 :: HashInfo
hashSHA1 = Pure.hashSHA1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RSA-2.2.0/src/Codec/Crypto/RSA/Pure.hs new/RSA-2.3.0/src/Codec/Crypto/RSA/Pure.hs
--- old/RSA-2.2.0/src/Codec/Crypto/RSA/Pure.hs 2015-10-12 20:52:47.000000000 +0200
+++ new/RSA-2.3.0/src/Codec/Crypto/RSA/Pure.hs 2017-06-08 23:42:59.000000000 +0200
@@ -29,7 +29,7 @@
, rsassa_pkcs1_v1_5_sign
, rsassa_pkcs1_v1_5_verify
-- * Hashing algorithm declarations for use in RSA functions
- , hashMD5, hashSHA1
+ , hashSHA1
, hashSHA224, hashSHA256, hashSHA384, hashSHA512
-- * Other mathematical functions that are handy for implementing
-- other RSA primitives.
@@ -56,7 +56,6 @@
import Data.Bits
import Data.ByteString.Lazy(ByteString)
import qualified Data.ByteString.Lazy as BS
-import qualified Data.Digest.Pure.MD5 as MD5
import Data.Digest.Pure.SHA
import Data.Int
import Data.Typeable
@@ -449,7 +448,7 @@
-- or 35.
--
-- Thus,
--- * for MD5, SHA1, and SHA256, use 512+ bit keys
+-- * for SHA1 and SHA256, use 512+ bit keys
-- * for SHA384 and SHA512, use 1024+ bit keys
--
rsassa_pkcs1_v1_5_sign :: HashInfo {- ^The hash function to use -} ->
@@ -748,13 +747,6 @@
-- ----------------------------------------------------------------------------
-hashMD5 :: HashInfo
-hashMD5 = HashInfo {
- algorithmIdent = BS.pack [0x30,0x20,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,
- 0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x04,0x10]
- , hashFunction = encode . MD5.md5
- }
-
hashSHA1 :: HashInfo
hashSHA1 = HashInfo {
algorithmIdent = BS.pack [0x30,0x21,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,
1
0
Hello community,
here is the log from the commit of package ghc-OpenGLRaw for openSUSE:Factory checked in at 2017-08-31 20:46:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-OpenGLRaw (Old)
and /work/SRC/openSUSE:Factory/.ghc-OpenGLRaw.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-OpenGLRaw"
Thu Aug 31 20:46:04 2017 rev:19 rq:513194 version:3.2.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-OpenGLRaw/ghc-OpenGLRaw.changes 2017-01-12 15:46:52.607432504 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-OpenGLRaw.new/ghc-OpenGLRaw.changes 2017-08-31 20:46:05.974734308 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:21 UTC 2017 - psimons(a)suse.com
+
+- Update to version 3.2.5.0.
+
+-------------------------------------------------------------------
Old:
----
OpenGLRaw-3.2.4.0.tar.gz
_constraints
New:
----
OpenGLRaw-3.2.5.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-OpenGLRaw.spec ++++++
--- /var/tmp/diff_new_pack.OgotUW/_old 2017-08-31 20:46:07.018587790 +0200
+++ /var/tmp/diff_new_pack.OgotUW/_new 2017-08-31 20:46:07.030586106 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-OpenGLRaw
#
-# 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
@@ -18,7 +18,7 @@
%global pkg_name OpenGLRaw
Name: ghc-%{pkg_name}
-Version: 3.2.4.0
+Version: 3.2.5.0
Release: 0
Summary: A raw binding for the OpenGL graphics system
License: BSD-3-Clause
++++++ OpenGLRaw-3.2.4.0.tar.gz -> OpenGLRaw-3.2.5.0.tar.gz ++++++
++++ 157307 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-MusicBrainz for openSUSE:Factory checked in at 2017-08-31 20:46:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-MusicBrainz (Old)
and /work/SRC/openSUSE:Factory/.ghc-MusicBrainz.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-MusicBrainz"
Thu Aug 31 20:46:02 2017 rev:3 rq:513193 version:0.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-MusicBrainz/ghc-MusicBrainz.changes 2017-06-04 01:56:55.396830986 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-MusicBrainz.new/ghc-MusicBrainz.changes 2017-08-31 20:46:03.943019486 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:54 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.3 revision 1.
+
+-------------------------------------------------------------------
Old:
----
MusicBrainz-0.2.4.tar.gz
New:
----
MusicBrainz-0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-MusicBrainz.spec ++++++
--- /var/tmp/diff_new_pack.vFdcgc/_old 2017-08-31 20:46:04.922881949 +0200
+++ /var/tmp/diff_new_pack.vFdcgc/_new 2017-08-31 20:46:04.934880265 +0200
@@ -18,7 +18,7 @@
%global pkg_name MusicBrainz
Name: ghc-%{pkg_name}
-Version: 0.2.4
+Version: 0.3
Release: 0
Summary: Interface to MusicBrainz XML2 web service
License: GPL-3.0+
++++++ MusicBrainz-0.2.4.tar.gz -> MusicBrainz-0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MusicBrainz-0.2.4/MusicBrainz.cabal new/MusicBrainz-0.3/MusicBrainz.cabal
--- old/MusicBrainz-0.2.4/MusicBrainz.cabal 2015-05-08 13:49:53.000000000 +0200
+++ new/MusicBrainz-0.3/MusicBrainz.cabal 2017-05-21 16:09:59.000000000 +0200
@@ -1,5 +1,5 @@
name: MusicBrainz
-version: 0.2.4
+version: 0.3
synopsis: interface to MusicBrainz XML2 web service
description: interface to MusicBrainz XML2 web service
homepage: http://floss.scru.org/hMusicBrainz
@@ -7,7 +7,7 @@
license-file: LICENSE
author: Clint Adams
maintainer: clint(a)debian.org
-copyright: 2012-2015 Clint Adams
+copyright: 2012-2017 Clint Adams
category: Network
build-type: Simple
cabal-version: >=1.8
@@ -32,17 +32,17 @@
, xml-types >= 0.3
, http-conduit >= 1.8.8
, http-types >= 0.6
- , xml-conduit >= 1.1
+ , xml-conduit >= 1.5
, HTTP >= 4000.0
, aeson >= 0.6.1
ghc-options: -Wall
source-repository head
type: git
- location: git://anonscm.debian.org/users/clint/MusicBrainz.git
+ location: https://anonscm.debian.org/git/users/clint/MusicBrainz.git
branch: master
source-repository this
type: git
- location: git://anonscm.debian.org/users/clint/MusicBrainz.git
- tag: hMB/0.2.4
+ location: https://anonscm.debian.org/git/users/clint/MusicBrainz.git
+ tag: hMB/0.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MusicBrainz-0.2.4/Network/Protocol/MusicBrainz/JSON/WebService.hs new/MusicBrainz-0.3/Network/Protocol/MusicBrainz/JSON/WebService.hs
--- old/MusicBrainz-0.2.4/Network/Protocol/MusicBrainz/JSON/WebService.hs 2015-05-08 13:49:53.000000000 +0200
+++ new/MusicBrainz-0.3/Network/Protocol/MusicBrainz/JSON/WebService.hs 2017-05-21 16:09:59.000000000 +0200
@@ -9,7 +9,6 @@
import Network.Protocol.MusicBrainz.Types
import Control.Monad.IO.Class (MonadIO)
-import Control.Monad.Trans.Control (MonadBaseControl)
import Data.Aeson (eitherDecode)
import qualified Data.ByteString.Lazy as BL
import Data.List (intercalate)
@@ -24,8 +23,8 @@
simpleHttp url
where
incs [] = ""
- incs xs = ("?inc="++) . intercalate "+" . map T.unpack $ xs
- fj = "&fmt=json"
+ incs xs = ("?inc="++) . intercalate "+" . map T.unpack $ xs
+ fj = "&fmt=json"
musicBrainzWSSearch :: MonadIO m => Text -> Text -> Maybe Int -> Maybe Int -> m BL.ByteString
musicBrainzWSSearch reqtype query mlimit moffset = do
@@ -33,22 +32,22 @@
simpleHttp url
where
limit Nothing = ""
- limit (Just l) = "&limit=" ++ show l
+ limit (Just l) = "&limit=" ++ show l
offset Nothing = ""
- offset (Just o) = "&offset=" ++ show o
- fj = "&fmt=json"
+ offset (Just o) = "&offset=" ++ show o
+ fj = "&fmt=json"
-getRecordingById :: (MonadBaseControl IO m, MonadIO m) => MBID -> m (Either String Recording)
+getRecordingById :: MonadIO m => MBID -> m (Either String Recording)
getRecordingById mbid = do
lbs <- musicBrainzWSLookup "recording" (unMBID mbid) ["artist-credits"]
return $ eitherDecode lbs
-getReleaseById :: (MonadBaseControl IO m, MonadIO m) => MBID -> m (Either String Release)
+getReleaseById :: MonadIO m => MBID -> m (Either String Release)
getReleaseById mbid = do
lbs <- musicBrainzWSLookup "release" (unMBID mbid) ["recordings", "artist-credits"]
return $ eitherDecode lbs
-searchReleasesByArtistAndRelease :: (MonadIO m, MonadBaseControl IO m) => Text -> Text -> Maybe Int -> Maybe Int -> m (Either String [(Int, Release)])
+searchReleasesByArtistAndRelease :: MonadIO m => Text -> Text -> Maybe Int -> Maybe Int -> m (Either String [(Int, Release)])
searchReleasesByArtistAndRelease artist release mlimit moffset = do
lbs <- musicBrainzWSSearch "release" (T.concat ["artist:\"", artist, "\" AND release:\"", release, "\""]) mlimit moffset
return $ eitherDecode lbs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MusicBrainz-0.2.4/Network/Protocol/MusicBrainz/Types.hs new/MusicBrainz-0.3/Network/Protocol/MusicBrainz/Types.hs
--- old/MusicBrainz-0.2.4/Network/Protocol/MusicBrainz/Types.hs 2015-05-08 13:49:53.000000000 +0200
+++ new/MusicBrainz-0.3/Network/Protocol/MusicBrainz/Types.hs 2017-05-21 16:09:59.000000000 +0200
@@ -27,7 +27,7 @@
import Data.Aeson (FromJSON(..), (.:), (.:?), Value(..))
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
-import Data.Time.Format (parseTime)
+import Data.Time.Format (parseTimeM)
import Data.Time.Locale.Compat (defaultTimeLocale)
newtype MBID = MBID { unMBID :: Text }
@@ -53,19 +53,19 @@
instance FromJSON Release where
parseJSON (Object v) = Release <$>
(MBID <$> v .: "id") <*>
- v .: "title" <*>
- v .:? "status" <*>
- v .:? "quality" <*>
- v .:? "packaging" <*>
- v .:? "text-representation" <*>
- v .: "artist-credit" <*>
- ((parseTime defaultTimeLocale "%Y-%m-%d" . T.unpack =<<) <$> v .:? "date") <*>
- v .:? "country" <*>
- v .: "release-events" <*>
- v .:? "barcode" <*>
- v .:? "asin" <*>
- v .:? "cover-art-archive" <*>
- v .: "media"
+ v .: "title" <*>
+ v .:? "status" <*>
+ v .:? "quality" <*>
+ v .:? "packaging" <*>
+ v .:? "text-representation" <*>
+ v .: "artist-credit" <*>
+ ((parseTimeM True defaultTimeLocale "%Y-%m-%d" . T.unpack =<<) <$> v .:? "date") <*>
+ v .:? "country" <*>
+ v .: "release-events" <*>
+ v .:? "barcode" <*>
+ v .:? "asin" <*>
+ v .:? "cover-art-archive" <*>
+ v .: "media"
parseJSON _ = mzero
data TextRepresentation = TextRepresentation {
@@ -75,8 +75,8 @@
instance FromJSON TextRepresentation where
parseJSON (Object v) = TextRepresentation <$>
- v .:? "language" <*>
- v .:? "script"
+ v .:? "language" <*>
+ v .:? "script"
parseJSON _ = mzero
data Medium = Medium {
@@ -90,12 +90,12 @@
instance FromJSON Medium where
parseJSON (Object v) = Medium <$>
- v .:? "title" <*>
- v .:? "position" <*>
- v .:? "format" <*>
- v .: "track-count" <*>
- v .:? "track-offset" <*>
- v .:? "tracks"
+ v .:? "title" <*>
+ v .:? "position" <*>
+ v .:? "format" <*>
+ v .: "track-count" <*>
+ v .:? "track-offset" <*>
+ v .:? "tracks"
parseJSON _ = mzero
data Track = Track {
@@ -109,12 +109,12 @@
instance FromJSON Track where
parseJSON (Object v) = Track <$>
- (MBID <$> v .: "id") <*>
- v .: "artist-credit" <*>
- v .:? "position" <*>
- v .:? "number" <*>
- v .:? "length" <*>
- v .: "recording"
+ (MBID <$> v .: "id") <*>
+ v .: "artist-credit" <*>
+ v .:? "position" <*>
+ v .:? "number" <*>
+ v .:? "length" <*>
+ v .: "recording"
parseJSON _ = mzero
data Recording = Recording {
@@ -126,10 +126,10 @@
instance FromJSON Recording where
parseJSON (Object v) = Recording <$>
- (MBID <$> v .: "id") <*>
- v .:? "title" <*>
- v .:? "length" <*>
- v .: "artist-credit"
+ (MBID <$> v .: "id") <*>
+ v .:? "title" <*>
+ v .:? "length" <*>
+ v .: "artist-credit"
parseJSON _ = mzero
data ArtistCredit = ArtistCredit {
@@ -140,9 +140,9 @@
instance FromJSON ArtistCredit where
parseJSON (Object v) = ArtistCredit <$>
- v .: "artist" <*>
- v .:? "joinphrase" <*>
- v .:? "name"
+ v .: "artist" <*>
+ v .:? "joinphrase" <*>
+ v .:? "name"
parseJSON _ = mzero
data Artist = Artist {
@@ -154,10 +154,10 @@
instance FromJSON Artist where
parseJSON (Object v) = Artist <$>
- (MBID <$> v .: "id") <*>
- v .:? "name" <*>
- v .:? "sort-name" <*>
- v .:? "disambiguation"
+ (MBID <$> v .: "id") <*>
+ v .:? "name" <*>
+ v .:? "sort-name" <*>
+ v .:? "disambiguation"
parseJSON _ = mzero
data ReleaseGroup = ReleaseGroup {
@@ -188,8 +188,8 @@
instance FromJSON ReleaseEvent where
parseJSON (Object v) = ReleaseEvent <$>
- ((parseTime defaultTimeLocale "%Y-%m-%d" . T.unpack =<<) <$> v .:? "date") <*>
- v .:? "area"
+ ((parseTimeM True defaultTimeLocale "%Y-%m-%d" . T.unpack =<<) <$> v .:? "date") <*>
+ v .:? "area"
parseJSON _ = mzero
data Area = Area {
@@ -203,12 +203,12 @@
instance FromJSON Area where
parseJSON (Object v) = Area <$>
- (MBID <$> v .: "id") <*>
- v .:? "name" <*>
- v .:? "sort-name" <*>
- (fromMaybe [] <$> v .:? "iso_3166_1_codes") <*>
- (fromMaybe [] <$> v .:? "iso_3166_2_codes") <*>
- (fromMaybe [] <$> v .:? "iso_3166_3_codes")
+ (MBID <$> v .: "id") <*>
+ v .:? "name" <*>
+ v .:? "sort-name" <*>
+ (fromMaybe [] <$> v .:? "iso_3166_1_codes") <*>
+ (fromMaybe [] <$> v .:? "iso_3166_2_codes") <*>
+ (fromMaybe [] <$> v .:? "iso_3166_3_codes")
parseJSON _ = mzero
data CoverArtArchive = CoverArtArchive {
@@ -220,10 +220,10 @@
instance FromJSON CoverArtArchive where
parseJSON (Object v) = CoverArtArchive <$>
- v .:? "artwork" <*>
- v .:? "count" <*>
- v .:? "front" <*>
- v .:? "back"
+ v .:? "artwork" <*>
+ v .:? "count" <*>
+ v .:? "front" <*>
+ v .:? "back"
parseJSON _ = mzero
newtype ISO3166Code = ISO3166Code { unISO3166Code :: Text }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MusicBrainz-0.2.4/Network/Protocol/MusicBrainz/XML2/WebService.hs new/MusicBrainz-0.3/Network/Protocol/MusicBrainz/XML2/WebService.hs
--- old/MusicBrainz-0.2.4/Network/Protocol/MusicBrainz/XML2/WebService.hs 2015-05-08 13:49:53.000000000 +0200
+++ new/MusicBrainz-0.3/Network/Protocol/MusicBrainz/XML2/WebService.hs 2017-05-21 16:09:59.000000000 +0200
@@ -20,13 +20,13 @@
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Read as TR
-import Data.Time.Format (parseTime)
+import Data.Time.Format (parseTimeM)
import qualified Data.Vector as V
import Data.XML.Types (Event)
import Network.HTTP.Base (urlEncode)
import Network.HTTP.Conduit (simpleHttp)
import Data.Time.Locale.Compat (defaultTimeLocale)
-import Text.XML.Stream.Parse (parseBytes, def, content, tagNoAttr, tagName, requireAttr, optionalAttr, force, many, AttrParser)
+import Text.XML.Stream.Parse (parseBytes, def, content, tagNoAttr, tag', requireAttr, attr, force, many, AttrParser)
import Text.XML (Name(..))
musicBrainzWSLookup :: MonadIO m => Text -> Text -> [Text] -> m BL.ByteString
@@ -35,7 +35,7 @@
simpleHttp url
where
incs [] = ""
- incs xs = ("?inc="++) . intercalate "+" . map T.unpack $ xs
+ incs xs = ("?inc="++) . intercalate "+" . map T.unpack $ xs
musicBrainzWSSearch :: MonadIO m => Text -> Text -> Maybe Int -> Maybe Int -> m BL.ByteString
musicBrainzWSSearch reqtype query mlimit moffset = do
@@ -43,9 +43,9 @@
simpleHttp url
where
limit Nothing = ""
- limit (Just l) = "&limit=" ++ show l
+ limit (Just l) = "&limit=" ++ show l
offset Nothing = ""
- offset (Just o) = "&offset=" ++ show o
+ offset (Just o) = "&offset=" ++ show o
getRecordingById :: (MonadBaseControl IO m, MonadIO m, MonadThrow m) => MBID -> m Recording
getRecordingById mbid = do
@@ -66,18 +66,18 @@
sinkReleases = force "metadata required" (tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}metadata" $ many (fmap (fmap snd) parseRelease))
sinkReleaseList :: MonadThrow m => Consumer Event m [(Int, Release)]
-sinkReleaseList = force "metadata required" (tagName "{http://musicbrainz.org/ns/mmd-2.0#}metadata" (optionalAttr "created") $ \_ ->
- force "release-list required" (tagName "{http://musicbrainz.org/ns/mmd-2.0#}release-list" (liftA2 (,) (requireAttr "count") (requireAttr "offset")) $ \_ -> many parseRelease))
+sinkReleaseList = force "metadata required" (tag' "{http://musicbrainz.org/ns/mmd-2.0#}metadata" (attr "created") $ \_ ->
+ force "release-list required" (tag' "{http://musicbrainz.org/ns/mmd-2.0#}release-list" (liftA2 (,) (requireAttr "count") (requireAttr "offset")) $ \_ -> many parseRelease))
parseRecording :: MonadThrow m => Consumer Event m (Maybe Recording)
-parseRecording = tagName "{http://musicbrainz.org/ns/mmd-2.0#}recording" (requireAttr "id") $ \rid -> do
+parseRecording = tag' "{http://musicbrainz.org/ns/mmd-2.0#}recording" (requireAttr "id") $ \rid -> do
title <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}title" content
len <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}length" content
ncs <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}artist-credit" $ many parseArtistCredit
return Recording { _recordingId = MBID rid, _recordingTitle = title, _recordingLength = fmap forceReadDec len, _recordingArtistCredit = fromMaybe [] ncs }
parseArtistCredit :: MonadThrow m => Consumer Event m (Maybe ArtistCredit)
-parseArtistCredit = tagName "{http://musicbrainz.org/ns/mmd-2.0#}name-credit" (buggyJoinPhrase) $ \mjp -> force "artist required" (tagName "{http://musicbrainz.org/ns/mmd-2.0#}artist" (requireAttr "id") $ \aid -> do
+parseArtistCredit = tag' "{http://musicbrainz.org/ns/mmd-2.0#}name-credit" (buggyJoinPhrase) $ \mjp -> force "artist required" (tag' "{http://musicbrainz.org/ns/mmd-2.0#}artist" (requireAttr "id") $ \aid -> do
name <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}name" content
sortName <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}sort-name" content
_ <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}disambiguation" content
@@ -88,13 +88,13 @@
-- what's up with this
buggyJoinPhrase :: AttrParser (Maybe Text)
buggyJoinPhrase = fmap Just (requireAttr "{http://musicbrainz.org/ns/mmd-2.0#}joinphrase")
- <|> optionalAttr "{http://musicbrainz.org/ns/mmd-2.0#}joinphrase" { nameNamespace = Nothing }
+ <|> attr "{http://musicbrainz.org/ns/mmd-2.0#}joinphrase" { nameNamespace = Nothing }
forceReadDec :: Integral a => Text -> a
forceReadDec = (\(Right (d, _)) -> d) . TR.decimal
parseRelease :: MonadThrow m => Consumer Event m (Maybe (Int, Release))
-parseRelease = tagName "{http://musicbrainz.org/ns/mmd-2.0#}release" (liftA2 (,) (requireAttr "id") (optionalAttr "{http://musicbrainz.org/ns/ext#-2.0}score")) $ \(rid,score) -> do
+parseRelease = tag' "{http://musicbrainz.org/ns/mmd-2.0#}release" (liftA2 (,) (requireAttr "id") (attr "{http://musicbrainz.org/ns/ext#-2.0}score")) $ \(rid,score) -> do
title <- force "title required" (tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}title" content)
status <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}status" content
quality <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}quality" content
@@ -104,12 +104,12 @@
_ <- parseReleaseGroup
date <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}date" content
country <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}country" content
- rel <- tagName "{http://musicbrainz.org/ns/mmd-2.0#}release-event-list" (requireAttr "count") $ \_ -> many parseReleaseEvent
+ rel <- tag' "{http://musicbrainz.org/ns/mmd-2.0#}release-event-list" (requireAttr "count") $ \_ -> many parseReleaseEvent
barcode <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}barcode" content
amazonASIN <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}asin" content
coverArtArchive <- parseCoverArtArchive
_ <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}label-info-list" $ parseLabelInfo
- media <- tagName "{http://musicbrainz.org/ns/mmd-2.0#}medium-list" (requireAttr "count") $ \_ -> (tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}track-count" content >> many parseMedium)
+ media <- tag' "{http://musicbrainz.org/ns/mmd-2.0#}medium-list" (requireAttr "count") $ \_ -> (tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}track-count" content >> many parseMedium)
return (maybe 0 forceReadDec score, Release {
_releaseId = MBID rid
, _releaseTitle = title
@@ -118,7 +118,7 @@
, _releasePackaging = packaging
, _releaseTextRepresentation = tr
, _releaseArtistCredit = fromMaybe [] ncs
- , _releaseDate = parseTime defaultTimeLocale "%Y-%m-%d" . T.unpack =<< date
+ , _releaseDate = parseTimeM True defaultTimeLocale "%Y-%m-%d" . T.unpack =<< date
, _releaseCountry = country
, _releaseEvents = fromMaybe [] rel
, _releaseBarcode = barcode
@@ -141,7 +141,7 @@
title <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}title" content
position <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}position" content
format <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}format" content
- Just med <- tagName "{http://musicbrainz.org/ns/mmd-2.0#}track-list" (liftA2 (,) (requireAttr "count") (optionalAttr "offset")) $ \(c,o) -> do -- not Just
+ Just med <- tag' "{http://musicbrainz.org/ns/mmd-2.0#}track-list" (liftA2 (,) (requireAttr "count") (attr "offset")) $ \(c,o) -> do -- not Just
tracks <- many parseTrack
return Medium {
_mediumTitle = title
@@ -154,7 +154,7 @@
return med
parseTrack :: MonadThrow m => Consumer Event m (Maybe Track)
-parseTrack = tagName "{http://musicbrainz.org/ns/mmd-2.0#}track" (requireAttr "id") $ \i -> do
+parseTrack = tag' "{http://musicbrainz.org/ns/mmd-2.0#}track" (requireAttr "id") $ \i -> do
position <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}position" content
number <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}number" content
len <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}length" content
@@ -170,7 +170,7 @@
}
parseReleaseGroup :: MonadThrow m => Consumer Event m (Maybe ReleaseGroup)
-parseReleaseGroup = tagName "{http://musicbrainz.org/ns/mmd-2.0#}release-group" (liftA2 (,) (requireAttr "type") (requireAttr "id")) $ \(t,i) -> do
+parseReleaseGroup = tag' "{http://musicbrainz.org/ns/mmd-2.0#}release-group" (liftA2 (,) (requireAttr "type") (requireAttr "id")) $ \(t,i) -> do
title <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}title" content
frd <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}first-release-date" content
pt <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}primary-type" content
@@ -194,7 +194,7 @@
}
parseLabel :: MonadThrow m => Consumer Event m (Maybe Label)
-parseLabel = tagName "{http://musicbrainz.org/ns/mmd-2.0#}label" (requireAttr "id") $ \i -> do
+parseLabel = tag' "{http://musicbrainz.org/ns/mmd-2.0#}label" (requireAttr "id") $ \i -> do
name <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}name" content
sortname <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}sort-name" content
labelcode <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}label-code" content
@@ -210,12 +210,12 @@
date <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}date" content
area <- parseArea
return ReleaseEvent {
- _releaseEventDate = parseTime defaultTimeLocale "%Y-%m-%d" . T.unpack =<< date
+ _releaseEventDate = parseTimeM True defaultTimeLocale "%Y-%m-%d" . T.unpack =<< date
, _releaseEventArea = area
}
parseArea :: MonadThrow m => Consumer Event m (Maybe Area)
-parseArea = tagName "{http://musicbrainz.org/ns/mmd-2.0#}area" (requireAttr "id") $ \i -> do
+parseArea = tag' "{http://musicbrainz.org/ns/mmd-2.0#}area" (requireAttr "id") $ \i -> do
name <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}name" content
sortname <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}sort-name" content
isocodes1 <- tagNoAttr "{http://musicbrainz.org/ns/mmd-2.0#}iso-3166-1-code-list" $ many parseISO3166Code
++++++ MusicBrainz.cabal ++++++
--- /var/tmp/diff_new_pack.vFdcgc/_old 2017-08-31 20:46:05.198843215 +0200
+++ /var/tmp/diff_new_pack.vFdcgc/_new 2017-08-31 20:46:05.210841531 +0200
@@ -1,5 +1,5 @@
name: MusicBrainz
-version: 0.2.4
+version: 0.3
x-revision: 1
synopsis: interface to MusicBrainz XML2 web service
description: interface to MusicBrainz XML2 web service
@@ -8,7 +8,7 @@
license-file: LICENSE
author: Clint Adams
maintainer: clint(a)debian.org
-copyright: 2012-2015 Clint Adams
+copyright: 2012-2017 Clint Adams
category: Network
build-type: Simple
cabal-version: >=1.8
@@ -26,24 +26,24 @@
, conduit >= 1.0.0
, conduit-extra >= 1.0.0
, text
- , time
+ , time >= 1.5
, resourcet
, time-locale-compat
, vector >= 0.9
, xml-types >= 0.3
, http-conduit >= 1.8.8
, http-types >= 0.6
- , xml-conduit >= 1.1 && <1.5
+ , xml-conduit >= 1.5
, HTTP >= 4000.0
, aeson >= 0.6.1
ghc-options: -Wall
source-repository head
type: git
- location: git://anonscm.debian.org/users/clint/MusicBrainz.git
+ location: https://anonscm.debian.org/git/users/clint/MusicBrainz.git
branch: master
source-repository this
type: git
- location: git://anonscm.debian.org/users/clint/MusicBrainz.git
- tag: hMB/0.2.4
+ location: https://anonscm.debian.org/git/users/clint/MusicBrainz.git
+ tag: hMB/0.3
1
0
Hello community,
here is the log from the commit of package ghc-JuicyPixels-scale-dct for openSUSE:Factory checked in at 2017-08-31 20:45:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-JuicyPixels-scale-dct (Old)
and /work/SRC/openSUSE:Factory/.ghc-JuicyPixels-scale-dct.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-JuicyPixels-scale-dct"
Thu Aug 31 20:45:58 2017 rev:3 rq:513192 version:0.1.1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-JuicyPixels-scale-dct/ghc-JuicyPixels-scale-dct.changes 2017-04-11 09:37:13.448370685 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-JuicyPixels-scale-dct.new/ghc-JuicyPixels-scale-dct.changes 2017-08-31 20:45:58.559775094 +0200
@@ -1,0 +2,5 @@
+Sat Jul 29 03:02:02 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.1.1.2 revision 1.
+
+-------------------------------------------------------------------
New:
----
JuicyPixels-scale-dct.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-JuicyPixels-scale-dct.spec ++++++
--- /var/tmp/diff_new_pack.2seP7J/_old 2017-08-31 20:45:59.859592648 +0200
+++ /var/tmp/diff_new_pack.2seP7J/_new 2017-08-31 20:45:59.875590403 +0200
@@ -26,6 +26,7 @@
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-JuicyPixels-devel
BuildRequires: ghc-base-compat-devel
@@ -57,6 +58,7 @@
%prep
%setup -q -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ JuicyPixels-scale-dct.cabal ++++++
name: JuicyPixels-scale-dct
version: 0.1.1.2
x-revision: 1
synopsis: Scale JuicyPixels images with DCT
description: Scale JuicyPixels Images with DCT
.
There is also a @friday@ version: <http://hackage.haskell.org/package/friday-scale-dct friday-scale-dct>
category: Web
homepage: https://github.com/phadej/JuicyPixels-scale-dct#readme
bug-reports: https://github.com/phadej/JuicyPixels-scale-dct/issues
author: Oleg Grenrus <oleg.grenrus(a)iki.fi>
maintainer: Oleg Grenrus <oleg.grenrus(a)iki.fi>
license: BSD3
license-file: LICENSE
build-type: Simple
cabal-version: >=1.10
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1
extra-source-files:
CHANGELOG.md
phadej.png
README.md
source-repository head
type: git
location: https://github.com/phadej/JuicyPixels-scale-dct
library
hs-source-dirs:
src
ghc-options: -Wall
build-depends:
base >=4.7 && <4.11
, base-compat >=0.6.0 && <0.10
, JuicyPixels >=3.2.5.3 && <3.3
, fft >=0.1.8.1 && <0.2
, carray >=0.1.6.1 && <0.2
exposed-modules:
Codec.Picture.ScaleDCT
default-language: Haskell2010
test-suite example
type: exitcode-stdio-1.0
main-is: Example.hs
hs-source-dirs:
example
ghc-options: -Wall
build-depends:
base
, base-compat
, JuicyPixels
, fft
, carray
, base
, JuicyPixels >=3.2.8
, JuicyPixels-scale-dct
, time >=1.4.2 && <1.9
default-language: Haskell2010
1
0
Hello community,
here is the log from the commit of package ghc-JuicyPixels-extra for openSUSE:Factory checked in at 2017-08-31 20:45:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-JuicyPixels-extra (Old)
and /work/SRC/openSUSE:Factory/.ghc-JuicyPixels-extra.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-JuicyPixels-extra"
Thu Aug 31 20:45:55 2017 rev:2 rq:513191 version:0.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-JuicyPixels-extra/ghc-JuicyPixels-extra.changes 2017-04-12 18:04:42.539584284 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-JuicyPixels-extra.new/ghc-JuicyPixels-extra.changes 2017-08-31 20:45:56.412076551 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:56 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.2.1 revision 1.
+
+-------------------------------------------------------------------
Old:
----
JuicyPixels-extra-0.1.1.tar.gz
New:
----
JuicyPixels-extra-0.2.1.tar.gz
JuicyPixels-extra.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-JuicyPixels-extra.spec ++++++
--- /var/tmp/diff_new_pack.sOL4V4/_old 2017-08-31 20:45:58.323808215 +0200
+++ /var/tmp/diff_new_pack.sOL4V4/_new 2017-08-31 20:45:58.323808215 +0200
@@ -19,13 +19,14 @@
%global pkg_name JuicyPixels-extra
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.1.1
+Version: 0.2.1
Release: 0
Summary: Efficiently scale, crop, flip images with JuicyPixels
License: BSD-3-Clause
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-JuicyPixels-devel
BuildRequires: ghc-rpm-macros
@@ -51,6 +52,7 @@
%prep
%setup -q -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ JuicyPixels-extra-0.1.1.tar.gz -> JuicyPixels-extra-0.2.1.tar.gz ++++++
/work/SRC/openSUSE:Factory/ghc-JuicyPixels-extra/JuicyPixels-extra-0.1.1.tar.gz /work/SRC/openSUSE:Factory/.ghc-JuicyPixels-extra.new/JuicyPixels-extra-0.2.1.tar.gz differ: char 12, line 1
++++++ JuicyPixels-extra.cabal ++++++
name: JuicyPixels-extra
version: 0.2.1
x-revision: 1
cabal-version: >= 1.10
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1
license: BSD3
license-file: LICENSE.md
author: Mark Karpov <markkarpov92(a)gmail.com>
maintainer: Mark Karpov <markkarpov92(a)gmail.com>
homepage: https://github.com/mrkkrp/JuicyPixels-extra
bug-reports: https://github.com/mrkkrp/JuicyPixels-extra/issues
category: Graphics, Image
synopsis: Efficiently scale, crop, flip images with JuicyPixels
build-type: Simple
description: Efficiently scale, crop, flip images with JuicyPixels.
extra-doc-files: CHANGELOG.md
, README.md
data-files: data-examples/*.png
source-repository head
type: git
location: https://github.com/mrkkrp/JuicyPixels-extra.git
flag dev
description: Turn on development settings.
manual: True
default: False
library
build-depends: base >= 4.7 && < 5
, JuicyPixels >= 3.2.6.4 && < 3.3
exposed-modules: Codec.Picture.Extra
if flag(dev)
ghc-options: -Wall -Werror
else
ghc-options: -O2 -Wall
default-language: Haskell2010
test-suite tests
main-is: Spec.hs
hs-source-dirs: tests
type: exitcode-stdio-1.0
build-depends: base >= 4.7 && < 5
, JuicyPixels >= 3.2.6.4 && < 3.3
, JuicyPixels-extra
, hspec >= 2.0
other-modules: Codec.Picture.ExtraSpec
if flag(dev)
ghc-options: -Wall -Werror
else
ghc-options: -O2 -Wall
default-language: Haskell2010
benchmark bench
main-is: Main.hs
hs-source-dirs: bench
type: exitcode-stdio-1.0
build-depends: base >= 4.7 && < 5.0
, JuicyPixels >= 3.2.6.4 && < 3.3
, JuicyPixels-extra
, criterion >= 0.6.2.1 && < 1.3
if flag(dev)
ghc-options: -O2 -Wall -Werror
else
ghc-options: -O2 -Wall
default-language: Haskell2010
1
0
Hello community,
here is the log from the commit of package ghc-IPv6Addr for openSUSE:Factory checked in at 2017-08-31 20:45:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-IPv6Addr (Old)
and /work/SRC/openSUSE:Factory/.ghc-IPv6Addr.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-IPv6Addr"
Thu Aug 31 20:45:53 2017 rev:4 rq:513190 version:1.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-IPv6Addr/ghc-IPv6Addr.changes 2017-03-18 20:50:14.820458524 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-IPv6Addr.new/ghc-IPv6Addr.changes 2017-08-31 20:45:54.372362851 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:08 UTC 2017 - psimons(a)suse.com
+
+- Update to version 1.0.1.
+
+-------------------------------------------------------------------
Old:
----
IPv6Addr-0.6.3.tar.gz
IPv6Addr.cabal
New:
----
IPv6Addr-1.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-IPv6Addr.spec ++++++
--- /var/tmp/diff_new_pack.4mtGZY/_old 2017-08-31 20:45:55.588192193 +0200
+++ /var/tmp/diff_new_pack.4mtGZY/_new 2017-08-31 20:45:55.604189948 +0200
@@ -19,15 +19,15 @@
%global pkg_name IPv6Addr
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.6.3
+Version: 1.0.1
Release: 0
Summary: Library to deal with IPv6 address text representations
License: BSD-3-Clause
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
-Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-aeson-devel
BuildRequires: ghc-attoparsec-devel
BuildRequires: ghc-iproute-devel
BuildRequires: ghc-network-devel
@@ -59,7 +59,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ IPv6Addr-0.6.3.tar.gz -> IPv6Addr-1.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IPv6Addr-0.6.3/IPv6Addr.cabal new/IPv6Addr-1.0.1/IPv6Addr.cabal
--- old/IPv6Addr-0.6.3/IPv6Addr.cabal 2016-12-26 16:25:59.000000000 +0100
+++ new/IPv6Addr-1.0.1/IPv6Addr.cabal 2017-04-17 14:42:36.000000000 +0200
@@ -1,5 +1,5 @@
name: IPv6Addr
-version: 0.6.3
+version: 1.0.1
synopsis: Library to deal with IPv6 address text representations.
description: Library to deal with IPv6 address text representations, canonization and manipulations.
homepage: https://github.com/MichelBoucey/IPv6Addr
@@ -7,7 +7,7 @@
license-file: LICENSE
author: Michel Boucey
maintainer: michel.boucey(a)cybervisible.fr
-copyright: (c) 2011-2016 - Michel Boucey
+copyright: (c) 2011-2017 - Michel Boucey
category: Network
build-type: Simple
extra-source-files: README.md
@@ -18,14 +18,15 @@
Location: https://github.com/MichelBoucey/IPv6Addr.git
library
- exposed-modules: Text.IPv6Addr, Text.IPv6Addr.Types, Text.IPv6Addr.Manip, Text.IPv6Addr.Internal
+ exposed-modules: Text.IPv6Addr
other-extensions: OverloadedStrings
- build-depends: base >=4.6 && <5
- , text >=1.1 && <1.3
- , iproute >=1.3 && <1.8
- , network >=2.5 && <2.7
- , random >=1.0 && <=1.1
- , attoparsec >=0.12 && <0.14
+ build-depends: base >=4.8 && < 5
+ , text >=1.1 && < 1.3
+ , iproute >=1.3 && < 1.8
+ , network >=2.5 && < 2.7
+ , random >=1.0 && <= 1.1
+ , attoparsec >=0.12 && < 0.14
+ , aeson >= 0.8.0.2 && < 1.3
, network-info >=0.2 && <=0.3
default-language: Haskell2010
GHC-Options: -Wall
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IPv6Addr-0.6.3/LICENSE new/IPv6Addr-1.0.1/LICENSE
--- old/IPv6Addr-0.6.3/LICENSE 2016-04-05 18:28:22.000000000 +0200
+++ new/IPv6Addr-1.0.1/LICENSE 2017-04-02 14:06:49.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright (c) 2011-2016, Michel Boucey
+Copyright (c) 2011-2017, Michel Boucey
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IPv6Addr-0.6.3/Text/IPv6Addr/Internal.hs new/IPv6Addr-1.0.1/Text/IPv6Addr/Internal.hs
--- old/IPv6Addr-0.6.3/Text/IPv6Addr/Internal.hs 2016-11-17 11:10:08.000000000 +0100
+++ new/IPv6Addr-1.0.1/Text/IPv6Addr/Internal.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,314 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-
-module Text.IPv6Addr.Internal
- ( expandTokens
- , macAddr
- , maybeIPv6AddrTokens
- , ipv4AddrToIPv6AddrTokens
- , ipv6TokensToText
- , ipv6TokensToIPv6Addr
- , isIPv6Addr
- , maybeTokIPv6Addr
- , maybeTokPureIPv6Addr
- , toDoubleColon
- , fromDoubleColon
- , fromIPv6Addr
- , networkInterfacesIPv6AddrList
- ) where
-
-import Control.Applicative ((<|>))
-import Control.Monad (guard)
-import Data.Attoparsec.Text
-import Data.Char (isDigit)
-import Data.List (elemIndex, elemIndices, group,
- intersperse, isSuffixOf)
-import Data.Maybe (fromJust)
-import Data.Monoid ((<>))
-import qualified Data.Text as T
-import qualified Data.Text.Read as R (decimal)
-import Network.Info
-import Numeric (showHex)
-
-import Text.IPv6Addr.Types
-
--- | Returns the 'T.Text' of an IPv6 address.
-fromIPv6Addr :: IPv6Addr -> T.Text
-fromIPv6Addr (IPv6Addr t) = t
-
--- | Given an arbitrary list of 'IPv6AddrToken', returns the corresponding 'T.Text'.
-ipv6TokensToText :: [IPv6AddrToken] -> T.Text
-ipv6TokensToText l = T.concat $ map ipv6TokenToText l
-
--- | Returns the corresponding 'T.Text' of an IPv6 address token.
-ipv6TokenToText :: IPv6AddrToken -> T.Text
-ipv6TokenToText (SixteenBit s) = s
-ipv6TokenToText Colon = ":"
-ipv6TokenToText DoubleColon = "::"
-ipv6TokenToText AllZeros = "0" -- "A single 16-bit 0000 field MUST be represented as 0" (RFC 5952, 4.1)
-ipv6TokenToText (IPv4Addr a) = a
-
--- | Returns 'True' if a list of 'IPv6AddrToken' constitutes a valid IPv6 Address.
-isIPv6Addr :: [IPv6AddrToken] -> Bool
-isIPv6Addr [] = False
-isIPv6Addr [DoubleColon] = True
-isIPv6Addr [DoubleColon,SixteenBit "1"] = True
-isIPv6Addr tks =
- diffNext tks && (do
- let cdctks = countDoubleColon tks
- lentks = length tks
- lasttk = last tks
- lenconst = (lentks == 15 && cdctks == 0) || (lentks < 15 && cdctks == 1)
- firstValidToken tks &&
- (case countIPv4Addr tks :: Int of
- 0 -> case lasttk of
- SixteenBit _ -> lenconst
- DoubleColon -> lenconst
- AllZeros -> lenconst
- _ -> False
- 1 -> case lasttk of
- IPv4Addr _ ->
- (lentks == 13 && cdctks == 0) || (lentks < 12 && cdctks == 1)
- _ -> False
- _ -> False))
- where
- diffNext [] = False
- diffNext [_] = True
- diffNext (t:ts) = do
- let h = head ts
- case t of
- SixteenBit _ ->
- case h of
- SixteenBit _ -> False
- AllZeros -> False
- _ -> diffNext ts
- AllZeros ->
- case h of
- SixteenBit _ -> False
- AllZeros -> False
- _ -> diffNext ts
- _ -> diffNext ts
- firstValidToken l =
- case head l of
- SixteenBit _ -> True
- DoubleColon -> True
- AllZeros -> True
- _ -> False
- countDoubleColon l = length $ elemIndices DoubleColon l
-
-countIPv4Addr :: [IPv6AddrToken] -> Int
-countIPv4Addr =
- foldr oneMoreIPv4Addr 0
- where
- oneMoreIPv4Addr t c =
- case t of
- IPv4Addr _ -> c + 1
- _ -> c
-
--- | This is the main function which returns 'Just' the list of a tokenized IPv6
--- address text representation validated against RFC 4291 and canonized
--- in conformation with RFC 5952, or 'Nothing'.
-maybeTokIPv6Addr :: T.Text -> Maybe [IPv6AddrToken]
-maybeTokIPv6Addr t =
- case maybeIPv6AddrTokens t of
- Just ltks -> do
- guard (isIPv6Addr ltks)
- Just $ (ipv4AddrReplacement . toDoubleColon . fromDoubleColon) ltks
- Nothing -> Nothing
- where
- ipv4AddrReplacement ltks =
- if ipv4AddrRewrite ltks
- then init ltks ++ ipv4AddrToIPv6AddrTokens (last ltks)
- else ltks
-
--- | Returns 'Just' the list of tokenized pure IPv6 address, always rewriting an
--- embedded IPv4 address if present.
-maybeTokPureIPv6Addr :: T.Text -> Maybe [IPv6AddrToken]
-maybeTokPureIPv6Addr t = do
- ltks <- maybeIPv6AddrTokens t
- guard (isIPv6Addr ltks)
- return $ (toDoubleColon . ipv4AddrReplacement . fromDoubleColon) ltks
- where
- ipv4AddrReplacement ltks' =
- init ltks' ++ ipv4AddrToIPv6AddrTokens (last ltks')
-
--- | Tokenize a 'T.Text' into 'Just' a list of 'IPv6AddrToken', or 'Nothing'.
-maybeIPv6AddrTokens :: T.Text -> Maybe [IPv6AddrToken]
-maybeIPv6AddrTokens s =
- case readText s of
- Done r l -> if r==T.empty then Just l else Nothing
- Fail {} -> Nothing
- Partial _ -> Nothing
- where
- readText _s =
- feed
- (parse (many1 $ ipv4Addr <|> sixteenBit <|> doubleColon <|> colon) _s)
- T.empty
-
--- | An embedded IPv4 address have to be rewritten to output a pure IPv6 Address
--- text representation in hexadecimal digits. But some well-known prefixed IPv6
--- addresses have to keep visible in their text representation the fact that
--- they deals with IPv4 to IPv6 transition process (RFC 5952 Section 5):
---
--- IPv4-compatible IPv6 address like "::1.2.3.4"
---
--- IPv4-mapped IPv6 address like "::ffff:1.2.3.4"
---
--- IPv4-translated address like "::ffff:0:1.2.3.4"
---
--- IPv4-translatable address like "64:ff9b::1.2.3.4"
---
--- ISATAP address like "fe80::5efe:1.2.3.4"
---
-ipv4AddrRewrite :: [IPv6AddrToken] -> Bool
-ipv4AddrRewrite tks =
- case last tks of
- IPv4Addr _ -> do
- let itks = init tks
- not (itks == [DoubleColon]
- || itks == [DoubleColon,SixteenBit tokffff,Colon]
- || itks == [DoubleColon,SixteenBit tokffff,Colon,AllZeros,Colon]
- || itks == [SixteenBit "64",Colon,SixteenBit "ff9b",DoubleColon]
- || [SixteenBit "200",Colon,SixteenBit tok5efe,Colon] `isSuffixOf` itks
- || [AllZeros,Colon,SixteenBit tok5efe,Colon] `isSuffixOf` itks
- || [DoubleColon,SixteenBit tok5efe,Colon] `isSuffixOf` itks)
- _ -> False
- where
- tokffff = "ffff"
- tok5efe = "5efe"
-
--- | Rewrites an embedded 'IPv4Addr' into the corresponding list of pure 'IPv6Addr' tokens.
---
--- > ipv4AddrToIPv6AddrTokens (IPv4Addr "127.0.0.1") == [SixteenBits "7f0",Colon,SixteenBits "1"]
---
-ipv4AddrToIPv6AddrTokens :: IPv6AddrToken -> [IPv6AddrToken]
-ipv4AddrToIPv6AddrTokens t =
- case t of
- IPv4Addr a -> do
- let m = toHex a
- [ SixteenBit ((!!) m 0 <> addZero ((!!) m 1))
- , Colon
- , SixteenBit ((!!) m 2 <> addZero ((!!) m 3)) ]
- _ -> [t]
- where
- toHex a = map (\x -> T.pack $ showHex (read (T.unpack x)::Int) "") $ T.split (=='.') a
- addZero d = if T.length d == 1 then "0" <> d else d
-
-expandTokens :: [IPv6AddrToken] -> [IPv6AddrToken]
-expandTokens =
- map expandToken
- where
- expandToken (SixteenBit s) = SixteenBit $ T.justifyRight 4 '0' s
- expandToken AllZeros = SixteenBit "0000"
- expandToken t = t
-
-fromDoubleColon :: [IPv6AddrToken] -> [IPv6AddrToken]
-fromDoubleColon tks =
- if DoubleColon `notElem` tks
- then tks
- else do
- let s = splitAt (fromJust $ elemIndex DoubleColon tks) tks
- fsts = fst s
- snds = if not (null (snd s)) then tail(snd s) else []
- fste = if null fsts then [] else fsts ++ [Colon]
- snde = if null snds then [] else Colon : snds
- fste ++ allZerosTokensReplacement(quantityOfAllZerosTokenToReplace tks) ++ snde
- where
- allZerosTokensReplacement x = intersperse Colon (replicate x AllZeros)
- quantityOfAllZerosTokenToReplace _x =
- ntks tks - foldl (\c _x -> if (_x /= DoubleColon) && (_x /= Colon) then c+1 else c) 0 _x
- where
- ntks _tks = if countIPv4Addr _tks == 1 then 7 else 8
-
-toDoubleColon :: [IPv6AddrToken] -> [IPv6AddrToken]
-toDoubleColon tks =
- zerosToDoubleColon tks (zerosRunToReplace $ zerosRunsList tks)
- where
- -- No all zeros token, so no double colon replacement...
- zerosToDoubleColon ls (_,0) = ls
- -- "The symbol '::' MUST NOT be used to shorten just one 16-bit 0 field" (RFC 5952 4.2.2)
- zerosToDoubleColon ls (_,1) = ls
- zerosToDoubleColon ls (i,l) =
- let ls' = filter (/= Colon) ls
- in intersperse Colon (Prelude.take i ls') ++ [DoubleColon] ++ intersperse Colon (drop (i+l) ls')
- zerosRunToReplace t =
- let l = longestLengthZerosRun t
- in (firstLongestZerosRunIndex t l,l)
- where
- firstLongestZerosRunIndex x y = sum . snd . unzip $ Prelude.takeWhile (/=(True,y)) x
- longestLengthZerosRun x =
- maximum $ map longest x
- where
- longest _t =
- case _t of
- (True,i) -> i
- _ -> 0
- zerosRunsList x =
- map helper $ groupZerosRuns x
- where
- helper h = (head h == AllZeros, lh) where lh = length h
- groupZerosRuns = group . filter (/= Colon)
-
-ipv6TokensToIPv6Addr :: [IPv6AddrToken] -> Maybe IPv6Addr
-ipv6TokensToIPv6Addr l = Just $ IPv6Addr $ ipv6TokensToText l
-
-networkInterfacesIPv6AddrList :: IO [(String,IPv6)]
-networkInterfacesIPv6AddrList =
- fmap networkInterfacesIPv6Addr <$> getNetworkInterfaces
- where
- networkInterfacesIPv6Addr (NetworkInterface n _ a _) = (n,a)
-
-macAddr :: Parser (Maybe [IPv6AddrToken])
-macAddr = do
- n1 <- count 2 hexaChar <* ":"
- n2 <- count 2 hexaChar <* ":"
- n3 <- count 2 hexaChar <* ":"
- n4 <- count 2 hexaChar <* ":"
- n5 <- count 2 hexaChar <* ":"
- n6 <- count 2 hexaChar
- return $ maybeIPv6AddrTokens $ T.pack $ concat [n1,n2,n3,n4,n5,n6]
-
-sixteenBit :: Parser IPv6AddrToken
-sixteenBit = do
- r <- ipv6AddrFullChunk <|> count 3 hexaChar <|> count 2 hexaChar <|> count 1 hexaChar
- -- "Leading zeros MUST be suppressed" (RFC 5952, 4.1)
- let r' = T.dropWhile (=='0') $ T.pack r
- return $
- if T.null r'
- then AllZeros
- -- Hexadecimal digits MUST be in lowercase (RFC 5952 4.3)
- else SixteenBit $ T.toLower r'
-
-ipv4Addr :: Parser IPv6AddrToken
-ipv4Addr = do
- n1 <- manyDigits <* "."
- guard (n1 /= T.empty)
- n2 <- manyDigits <* "."
- guard (n2 /= T.empty)
- n3 <- manyDigits <* "."
- guard (n3 /= T.empty)
- n4 <- manyDigits
- guard (n4 /= T.empty)
- return $ IPv4Addr $ T.intercalate "." [n1,n2,n3,n4]
- where
- manyDigits = do
- ds <- takeWhile1 isDigit
- case R.decimal ds :: Either String (Integer, T.Text) of
- Right (n,_) -> return $ if n < 256 then T.pack $ show n else T.empty
- Left _ -> return T.empty
-
-doubleColon :: Parser IPv6AddrToken
-doubleColon = do
- _ <- string "::"
- return DoubleColon
-
-colon :: Parser IPv6AddrToken
-colon = do
- _ <- string ":"
- return Colon
-
-ipv6AddrFullChunk :: Parser String
-ipv6AddrFullChunk = count 4 hexaChar
-
-hexaChar :: Parser Char
-hexaChar = satisfy (inClass "0-9a-fA-F")
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IPv6Addr-0.6.3/Text/IPv6Addr/Manip.hs new/IPv6Addr-1.0.1/Text/IPv6Addr/Manip.hs
--- old/IPv6Addr-0.6.3/Text/IPv6Addr/Manip.hs 2016-11-17 11:05:34.000000000 +0100
+++ new/IPv6Addr-1.0.1/Text/IPv6Addr/Manip.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,80 +0,0 @@
-module Text.IPv6Addr.Manip
- ( randIPv6AddrChunk
- , randPartialIPv6Addr
- , macAddrToIPv6AddrTokens
- , getTokIPv6AddrOf
- , getTokMacAddrOf
- ) where
-
-import Control.Monad (replicateM)
-import Data.Attoparsec.Text as A
-import Data.Char (intToDigit)
-import Data.List (intersperse)
-import qualified Data.Text as T
-import Network.Info
-import System.Random (randomRIO)
-
-import Text.IPv6Addr.Internal
-import Text.IPv6Addr.Types
-
--- | Returns 'Just' a random 'SixteenBit' token based on a mask \"____\", each
--- underscore being replaced by a random hexadecimal digit.
---
--- > randIPv6AddrChunk "_f__" == Just (SixteenBit "bfd4")
---
-randIPv6AddrChunk :: String -> IO IPv6AddrToken
-randIPv6AddrChunk m =
- mapM getHex m >>= \g -> return $ SixteenBit $ T.dropWhile (=='0') $ T.pack g
- where
- getHex c
- | c == '_' = intToDigit <$> randomRIO (0,15)
- | otherwise = return c
-
--- | Generates a random partial 'IPv6Addr' with n 'SixteenBit'.
-randPartialIPv6Addr :: Int -> IO [IPv6AddrToken]
-randPartialIPv6Addr n
- | n > 0 && n < 9 =
- intersperse Colon <$> replicateM n (randIPv6AddrChunk "____")
- | otherwise = return []
-
--- | Given a MAC address, returns 'Just' the corresponding 'IPv6AddrToken' list, or 'Nothing'.
---
--- > macAddrToIPv6AddrTokens "fa:1d:58:cc:95:16" == Just [SixteenBit "fa1d",Colon,SixteenBit "58cc",Colon,SixteenBit "9516"]
---
-macAddrToIPv6AddrTokens :: T.Text -> Maybe [IPv6AddrToken]
-macAddrToIPv6AddrTokens t =
- case parse macAddr t of
- Done a b ->
- if a == T.empty
- then intersperse Colon <$> b
- else Nothing
- _ -> Nothing
-
---
--- Functions based upon Network.Info to get local MAC and IPv6 addresses.
---
--- | Given a valid name of a local network interface, returns 'Just' the list of
--- tokens of the interface's IPv6 address, or 'Nothing'.
---
--- > getTokIPv6AddrOf "eth0" == Just [SixteenBit "fe80",DoubleColon,SixteenBit "fa1d",Colon,SixteenBit "58cc",Colon,SixteenBit "9516"]
---
-getTokIPv6AddrOf :: String -> IO (Maybe [IPv6AddrToken])
-getTokIPv6AddrOf s =
- maybe Nothing (maybeTokIPv6Addr. T.pack . show) <$>
- (lookup s <$> networkInterfacesIPv6AddrList)
-
--- | Given a valid name of a local network interface,
--- returns 'Just' the corresponding list of 'IPv6AddrToken' of the interface's MAC Address,
--- or 'Nothing'.
---
--- > getTokMacAddrOf "eth0" == Just [SixteenBit "fa1d",Colon,SixteenBit "58cc",Colon,SixteenBit "9516"]
---
-getTokMacAddrOf :: String -> IO (Maybe [IPv6AddrToken])
-getTokMacAddrOf s =
- maybe Nothing (macAddrToIPv6AddrTokens . T.pack . show) <$>
- (lookup s <$> networkInterfacesMacAddrList)
- where
- networkInterfacesMacAddrList = getNetworkInterfaces >>=
- \n -> return $ map networkInterfacesMac n
- where networkInterfacesMac (NetworkInterface n _ _ m) = (n,m)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IPv6Addr-0.6.3/Text/IPv6Addr/Types.hs new/IPv6Addr-1.0.1/Text/IPv6Addr/Types.hs
--- old/IPv6Addr-0.6.3/Text/IPv6Addr/Types.hs 2016-11-09 11:31:02.000000000 +0100
+++ new/IPv6Addr-1.0.1/Text/IPv6Addr/Types.hs 1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-module Text.IPv6Addr.Types where
-
-import qualified Data.Text as T
-
-data IPv6Addr = IPv6Addr !T.Text
-
-instance Show IPv6Addr where
- show (IPv6Addr a) = T.unpack a
-
-data IPv6AddrToken
- = SixteenBit !T.Text -- ^ A four hexadecimal digits group representing a 16-Bit chunk
- | AllZeros -- ^ An all zeros 16-Bit chunk
- | Colon -- ^ A separator between 16-Bit chunks
- | DoubleColon -- ^ A double-colon stands for a unique compression of many consecutive 16-Bit chunks
- | IPv4Addr !T.Text -- ^ An embedded IPv4 address as representation of the last 32-Bit
- deriving (Eq, Show)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IPv6Addr-0.6.3/Text/IPv6Addr.hs new/IPv6Addr-1.0.1/Text/IPv6Addr.hs
--- old/IPv6Addr-0.6.3/Text/IPv6Addr.hs 2016-11-17 10:59:56.000000000 +0100
+++ new/IPv6Addr-1.0.1/Text/IPv6Addr.hs 2017-04-08 15:27:59.000000000 +0200
@@ -1,9 +1,7 @@
{-# LANGUAGE OverloadedStrings #-}
-{-# OPTIONS_GHC -fno-warn-orphans #-}
module Text.IPv6Addr
- (
- IPv6Addr (IPv6Addr)
+ ( IPv6Addr (IPv6Addr)
, maybeIPv6Addr
, maybePureIPv6Addr
, maybeFullIPv6Addr
@@ -16,29 +14,62 @@
, toIP6ARPA
, toUNC
- -- * Utils
+ -- * Utilities
, getIPv6AddrOf
, randIPv6Addr
, randIPv6AddrWithPrefix
- ) where
-
-import Data.IP (IPv6)
-import Data.Maybe (fromJust, isNothing)
-import Data.Monoid ((<>))
-import qualified Data.Text as T
-import Control.Monad (guard)
-import Network (HostName)
-import System.Random (randomRIO)
-
-import Text.IPv6Addr.Internal
-import Text.IPv6Addr.Manip (randPartialIPv6Addr)
-import Text.IPv6Addr.Types
+ -- * Manipulations
+ , randIPv6AddrChunk
+ , randPartialIPv6Addr
+ , macAddrToIPv6AddrTokens
+ , getTokIPv6AddrOf
+ , getTokMacAddrOf ) where
+
+import Control.Applicative ((<|>))
+import Control.Monad (replicateM, guard)
+import Data.Aeson
+import Data.Attoparsec.Text as A
+import Data.Char (intToDigit, isDigit)
+import Data.IP (IPv6)
+import Data.List (elemIndex, elemIndices, group,
+ intersperse, isSuffixOf)
+import Data.Maybe (fromJust, isNothing)
+import Data.Monoid ((<>))
+import qualified Data.Text as T
+import qualified Data.Text.Read as R (decimal)
+import Network (HostName)
+import Network.Info
+import Numeric (showHex)
+import System.Random (randomRIO)
+
+data IPv6Addr = IPv6Addr !T.Text
+
+instance Show IPv6Addr where
+ show (IPv6Addr a) = T.unpack a
+
+data IPv6AddrToken
+ = SixteenBit !T.Text -- ^ A four hexadecimal digits group representing a 16-Bit chunk
+ | AllZeros -- ^ An all zeros 16-Bit chunk
+ | Colon -- ^ A separator between 16-Bit chunks
+ | DoubleColon -- ^ A double-colon stands for a unique compression of many consecutive 16-Bit chunks
+ | IPv4Addr !T.Text -- ^ An embedded IPv4 address as representation of the last 32-Bit
+ deriving (Eq, Show)
instance Eq IPv6Addr where
(==) (IPv6Addr a) (IPv6Addr b) =
show (maybePureIPv6Addr a) == show (maybePureIPv6Addr b)
+instance ToJSON IPv6Addr where
+ toJSON (IPv6Addr a) = String a
+
+instance FromJSON IPv6Addr where
+ parseJSON (String s) =
+ case maybeIPv6Addr s of
+ Just a -> pure a
+ Nothing -> fail "Not An IPv6 Address"
+ parseJSON _ = fail "JSON String Expected"
+
-- | Returns 'Just' the text representation of a canonized
-- 'IPv6Addr' in conformation with RFC 5952, or 'Nothing'.
--
@@ -100,7 +131,7 @@
toHostName = show
-- | Given an 'IPv6addr', returns the corresponding 'IPv6' address.
-toIPv6 :: IPv6Addr -> IPv6
+toIPv6 :: IPv6Addr -> Data.IP.IPv6
toIPv6 a = read $ show a
-- | Returns 'Just' the canonized 'IPv6Addr' of the given local network interface,
@@ -161,9 +192,9 @@
Nothing -> return Nothing
where
countChunks =
- foldr count (0,0)
+ foldr go (0,0)
where
- count c (a,b) =
+ go c (a,b) =
case c of
SixteenBit _ -> (a+1,b)
AllZeros -> (a+1,b)
@@ -175,3 +206,359 @@
AllZeros -> ts ++ [Colon]
_ -> ts
+
+-- ------------------------------------------------------------------------ --
+-- Maniplations --
+-- ------------------------------------------------------------------------ --
+
+-- | Returns 'Just' a random 'SixteenBit' token based on a mask \"____\", each
+-- underscore being replaced by a random hexadecimal digit.
+--
+-- > randIPv6AddrChunk "_f__" == Just (SixteenBit "bfd4")
+--
+randIPv6AddrChunk :: String -> IO IPv6AddrToken
+randIPv6AddrChunk m =
+ mapM getHex m >>= \g -> return $ SixteenBit $ T.dropWhile (=='0') $ T.pack g
+ where
+ getHex c
+ | c == '_' = getDigit
+ | otherwise = pure c
+
+-- | Generates a random partial 'IPv6Addr' with n 'SixteenBit'.
+randPartialIPv6Addr :: Int -> IO [IPv6AddrToken]
+randPartialIPv6Addr n =
+ if n > 0 && n < 9
+ then
+ intersperse Colon <$>
+ replicateM n (SixteenBit . T.pack <$> replicateM 4 getDigit)
+ else pure []
+
+-- | Given a MAC address, returns 'Just' the corresponding 'IPv6AddrToken' list, or 'Nothing'.
+--
+-- > macAddrToIPv6AddrTokens "fa:1d:58:cc:95:16" == Just [SixteenBit "fa1d",Colon,SixteenBit "58cc",Colon,SixteenBit "9516"]
+--
+macAddrToIPv6AddrTokens :: T.Text -> Maybe [IPv6AddrToken]
+macAddrToIPv6AddrTokens t =
+ case parse macAddr t of
+ Done a b ->
+ if a == T.empty
+ then intersperse Colon <$> b
+ else Nothing
+ _ -> Nothing
+
+--
+-- Functions based upon Network.Info to get local MAC and IPv6 addresses.
+--
+-- | Given a valid name of a local network interface, returns 'Just' the list of
+-- tokens of the interface's IPv6 address, or 'Nothing'.
+--
+-- > getTokIPv6AddrOf "eth0" == Just [SixteenBit "fe80",DoubleColon,SixteenBit "fa1d",Colon,SixteenBit "58cc",Colon,SixteenBit "9516"]
+--
+getTokIPv6AddrOf :: String -> IO (Maybe [IPv6AddrToken])
+getTokIPv6AddrOf s =
+ maybe Nothing (maybeTokIPv6Addr. T.pack . show) <$>
+ (lookup s <$> networkInterfacesIPv6AddrList)
+
+-- | Given a valid name of a local network interface,
+-- returns 'Just' the corresponding list of 'IPv6AddrToken' of the interface's MAC Address,
+-- or 'Nothing'.
+--
+-- > getTokMacAddrOf "eth0" == Just [SixteenBit "fa1d",Colon,SixteenBit "58cc",Colon,SixteenBit "9516"]
+--
+getTokMacAddrOf :: String -> IO (Maybe [IPv6AddrToken])
+getTokMacAddrOf s =
+ maybe Nothing (macAddrToIPv6AddrTokens . T.pack . show) <$>
+ (lookup s <$> networkInterfacesMacAddrList)
+ where
+ networkInterfacesMacAddrList = getNetworkInterfaces >>=
+ \n -> return (networkInterfacesMac <$> n)
+ where networkInterfacesMac (NetworkInterface n _ _ m) = (n,m)
+
+getDigit :: IO Char
+getDigit = intToDigit <$> randomRIO (0,15)
+
+-- ----------------------------------------------------------------------------
+-- Internals
+-- ----------------------------------------------------------------------------
+
+-- | Returns the 'T.Text' of an IPv6 address.
+fromIPv6Addr :: IPv6Addr -> T.Text
+fromIPv6Addr (IPv6Addr t) = t
+
+-- | Given an arbitrary list of 'IPv6AddrToken', returns the corresponding 'T.Text'.
+ipv6TokensToText :: [IPv6AddrToken] -> T.Text
+ipv6TokensToText l = T.concat $ map ipv6TokenToText l
+
+-- | Returns the corresponding 'T.Text' of an IPv6 address token.
+ipv6TokenToText :: IPv6AddrToken -> T.Text
+ipv6TokenToText (SixteenBit s) = s
+ipv6TokenToText Colon = ":"
+ipv6TokenToText DoubleColon = "::"
+ipv6TokenToText AllZeros = "0" -- "A single 16-bit 0000 field MUST be represented as 0" (RFC 5952, 4.1)
+ipv6TokenToText (IPv4Addr a) = a
+
+-- | Returns 'True' if a list of 'IPv6AddrToken' constitutes a valid IPv6 Address.
+isIPv6Addr :: [IPv6AddrToken] -> Bool
+isIPv6Addr [] = False
+isIPv6Addr [DoubleColon] = True
+isIPv6Addr [DoubleColon,SixteenBit "1"] = True
+isIPv6Addr tks =
+ diffNext tks && (do
+ let cdctks = countDoubleColon tks
+ lentks = length tks
+ lasttk = last tks
+ lenconst = (lentks == 15 && cdctks == 0) || (lentks < 15 && cdctks == 1)
+ firstValidToken tks &&
+ (case countIPv4Addr tks :: Int of
+ 0 -> case lasttk of
+ SixteenBit _ -> lenconst
+ DoubleColon -> lenconst
+ AllZeros -> lenconst
+ _ -> False
+ 1 -> case lasttk of
+ IPv4Addr _ ->
+ (lentks == 13 && cdctks == 0) || (lentks < 12 && cdctks == 1)
+ _ -> False
+ _ -> False))
+ where
+ diffNext [] = False
+ diffNext [_] = True
+ diffNext (t:ts) = do
+ let h = head ts
+ case t of
+ SixteenBit _ ->
+ case h of
+ SixteenBit _ -> False
+ AllZeros -> False
+ _ -> diffNext ts
+ AllZeros ->
+ case h of
+ SixteenBit _ -> False
+ AllZeros -> False
+ _ -> diffNext ts
+ _ -> diffNext ts
+ firstValidToken l =
+ case head l of
+ SixteenBit _ -> True
+ DoubleColon -> True
+ AllZeros -> True
+ _ -> False
+ countDoubleColon l = length $ elemIndices DoubleColon l
+
+countIPv4Addr :: [IPv6AddrToken] -> Int
+countIPv4Addr =
+ foldr oneMoreIPv4Addr 0
+ where
+ oneMoreIPv4Addr t c =
+ case t of
+ IPv4Addr _ -> c + 1
+ _ -> c
+
+-- | This is the main function which returns 'Just' the list of a tokenized IPv6
+-- address text representation validated against RFC 4291 and canonized
+-- in conformation with RFC 5952, or 'Nothing'.
+maybeTokIPv6Addr :: T.Text -> Maybe [IPv6AddrToken]
+maybeTokIPv6Addr t =
+ case maybeIPv6AddrTokens t of
+ Just ltks -> do
+ guard (isIPv6Addr ltks)
+ Just $ (ipv4AddrReplacement . toDoubleColon . fromDoubleColon) ltks
+ Nothing -> Nothing
+ where
+ ipv4AddrReplacement ltks =
+ if ipv4AddrRewrite ltks
+ then init ltks ++ ipv4AddrToIPv6AddrTokens (last ltks)
+ else ltks
+
+-- | Returns 'Just' the list of tokenized pure IPv6 address, always rewriting an
+-- embedded IPv4 address if present.
+maybeTokPureIPv6Addr :: T.Text -> Maybe [IPv6AddrToken]
+maybeTokPureIPv6Addr t = do
+ ltks <- maybeIPv6AddrTokens t
+ guard (isIPv6Addr ltks)
+ return $ (toDoubleColon . ipv4AddrReplacement . fromDoubleColon) ltks
+ where
+ ipv4AddrReplacement ltks' =
+ init ltks' ++ ipv4AddrToIPv6AddrTokens (last ltks')
+
+-- | Tokenize a 'T.Text' into 'Just' a list of 'IPv6AddrToken', or 'Nothing'.
+maybeIPv6AddrTokens :: T.Text -> Maybe [IPv6AddrToken]
+maybeIPv6AddrTokens s =
+ case readText s of
+ Done r l -> if r==T.empty then Just l else Nothing
+ Fail {} -> Nothing
+ Partial _ -> Nothing
+ where
+ readText _s =
+ feed
+ (parse (many1 $ ipv4Addr <|> sixteenBit <|> doubleColon <|> colon) _s)
+ T.empty
+
+-- | An embedded IPv4 address have to be rewritten to output a pure IPv6 Address
+-- text representation in hexadecimal digits. But some well-known prefixed IPv6
+-- addresses have to keep visible in their text representation the fact that
+-- they deals with IPv4 to IPv6 transition process (RFC 5952 Section 5):
+--
+-- IPv4-compatible IPv6 address like "::1.2.3.4"
+--
+-- IPv4-mapped IPv6 address like "::ffff:1.2.3.4"
+--
+-- IPv4-translated address like "::ffff:0:1.2.3.4"
+--
+-- IPv4-translatable address like "64:ff9b::1.2.3.4"
+--
+-- ISATAP address like "fe80::5efe:1.2.3.4"
+--
+ipv4AddrRewrite :: [IPv6AddrToken] -> Bool
+ipv4AddrRewrite tks =
+ case last tks of
+ IPv4Addr _ -> do
+ let itks = init tks
+ not (itks == [DoubleColon]
+ || itks == [DoubleColon,SixteenBit tokffff,Colon]
+ || itks == [DoubleColon,SixteenBit tokffff,Colon,AllZeros,Colon]
+ || itks == [SixteenBit "64",Colon,SixteenBit "ff9b",DoubleColon]
+ || [SixteenBit "200",Colon,SixteenBit tok5efe,Colon] `isSuffixOf` itks
+ || [AllZeros,Colon,SixteenBit tok5efe,Colon] `isSuffixOf` itks
+ || [DoubleColon,SixteenBit tok5efe,Colon] `isSuffixOf` itks)
+ _ -> False
+ where
+ tokffff = "ffff"
+ tok5efe = "5efe"
+
+-- | Rewrites an embedded 'IPv4Addr' into the corresponding list of pure 'IPv6Addr' tokens.
+--
+-- > ipv4AddrToIPv6AddrTokens (IPv4Addr "127.0.0.1") == [SixteenBits "7f0",Colon,SixteenBits "1"]
+--
+ipv4AddrToIPv6AddrTokens :: IPv6AddrToken -> [IPv6AddrToken]
+ipv4AddrToIPv6AddrTokens t =
+ case t of
+ IPv4Addr a -> do
+ let m = toHex a
+ [ SixteenBit ((!!) m 0 <> addZero ((!!) m 1))
+ , Colon
+ , SixteenBit ((!!) m 2 <> addZero ((!!) m 3)) ]
+ _ -> [t]
+ where
+ toHex a = map (\x -> T.pack $ showHex (read (T.unpack x)::Int) "") $ T.split (=='.') a
+ addZero d = if T.length d == 1 then "0" <> d else d
+
+expandTokens :: [IPv6AddrToken] -> [IPv6AddrToken]
+expandTokens =
+ map expandToken
+ where
+ expandToken (SixteenBit s) = SixteenBit $ T.justifyRight 4 '0' s
+ expandToken AllZeros = SixteenBit "0000"
+ expandToken t = t
+
+fromDoubleColon :: [IPv6AddrToken] -> [IPv6AddrToken]
+fromDoubleColon tks =
+ if DoubleColon `notElem` tks
+ then tks
+ else do
+ let s = splitAt (fromJust $ elemIndex DoubleColon tks) tks
+ fsts = fst s
+ snds = if not (null (snd s)) then tail(snd s) else []
+ fste = if null fsts then [] else fsts ++ [Colon]
+ snde = if null snds then [] else Colon : snds
+ fste ++ allZerosTokensReplacement(quantityOfAllZerosTokenToReplace tks) ++ snde
+ where
+ allZerosTokensReplacement x = intersperse Colon (replicate x AllZeros)
+ quantityOfAllZerosTokenToReplace _x =
+ ntks tks - foldl (\c _x -> if (_x /= DoubleColon) && (_x /= Colon) then c+1 else c) 0 _x
+ where
+ ntks _tks = if countIPv4Addr _tks == 1 then 7 else 8
+
+toDoubleColon :: [IPv6AddrToken] -> [IPv6AddrToken]
+toDoubleColon tks =
+ zerosToDoubleColon tks (zerosRunToReplace $ zerosRunsList tks)
+ where
+ -- No all zeros token, so no double colon replacement...
+ zerosToDoubleColon ls (_,0) = ls
+ -- "The symbol '::' MUST NOT be used to shorten just one 16-bit 0 field" (RFC 5952 4.2.2)
+ zerosToDoubleColon ls (_,1) = ls
+ zerosToDoubleColon ls (i,l) =
+ let ls' = filter (/= Colon) ls
+ in intersperse Colon (Prelude.take i ls') ++ [DoubleColon] ++ intersperse Colon (drop (i+l) ls')
+ zerosRunToReplace t =
+ let l = longestLengthZerosRun t
+ in (firstLongestZerosRunIndex t l,l)
+ where
+ firstLongestZerosRunIndex x y = sum . snd . unzip $ Prelude.takeWhile (/=(True,y)) x
+ longestLengthZerosRun x =
+ maximum $ map longest x
+ where
+ longest _t =
+ case _t of
+ (True,i) -> i
+ _ -> 0
+ zerosRunsList x =
+ map helper $ groupZerosRuns x
+ where
+ helper h = (head h == AllZeros, lh) where lh = length h
+ groupZerosRuns = group . filter (/= Colon)
+
+ipv6TokensToIPv6Addr :: [IPv6AddrToken] -> Maybe IPv6Addr
+ipv6TokensToIPv6Addr l = Just $ IPv6Addr $ ipv6TokensToText l
+
+networkInterfacesIPv6AddrList :: IO [(String,Network.Info.IPv6)]
+networkInterfacesIPv6AddrList =
+ fmap networkInterfacesIPv6Addr <$> getNetworkInterfaces
+ where
+ networkInterfacesIPv6Addr (NetworkInterface n _ a _) = (n,a)
+
+macAddr :: Parser (Maybe [IPv6AddrToken])
+macAddr = do
+ n1 <- count 2 hexaChar <* ":"
+ n2 <- count 2 hexaChar <* ":"
+ n3 <- count 2 hexaChar <* ":"
+ n4 <- count 2 hexaChar <* ":"
+ n5 <- count 2 hexaChar <* ":"
+ n6 <- count 2 hexaChar
+ return $ maybeIPv6AddrTokens $ T.pack $ concat [n1,n2,n3,n4,n5,n6]
+
+sixteenBit :: Parser IPv6AddrToken
+sixteenBit = do
+ r <- ipv6AddrFullChunk <|> count 3 hexaChar <|> count 2 hexaChar <|> count 1 hexaChar
+ -- "Leading zeros MUST be suppressed" (RFC 5952, 4.1)
+ let r' = T.dropWhile (=='0') $ T.pack r
+ return $
+ if T.null r'
+ then AllZeros
+ -- Hexadecimal digits MUST be in lowercase (RFC 5952 4.3)
+ else SixteenBit $ T.toLower r'
+
+ipv4Addr :: Parser IPv6AddrToken
+ipv4Addr = do
+ n1 <- manyDigits <* "."
+ guard (n1 /= T.empty)
+ n2 <- manyDigits <* "."
+ guard (n2 /= T.empty)
+ n3 <- manyDigits <* "."
+ guard (n3 /= T.empty)
+ n4 <- manyDigits
+ guard (n4 /= T.empty)
+ return $ IPv4Addr $ T.intercalate "." [n1,n2,n3,n4]
+ where
+ manyDigits = do
+ ds <- takeWhile1 isDigit
+ case R.decimal ds :: Either String (Integer, T.Text) of
+ Right (n,_) -> return $ if n < 256 then T.pack $ show n else T.empty
+ Left _ -> return T.empty
+
+doubleColon :: Parser IPv6AddrToken
+doubleColon = do
+ _ <- string "::"
+ return DoubleColon
+
+colon :: Parser IPv6AddrToken
+colon = do
+ _ <- string ":"
+ return Colon
+
+ipv6AddrFullChunk :: Parser String
+ipv6AddrFullChunk = count 4 hexaChar
+
+hexaChar :: Parser Char
+hexaChar = satisfy (inClass "0-9a-fA-F")
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IPv6Addr-0.6.3/tests/Main.hs new/IPv6Addr-1.0.1/tests/Main.hs
--- old/IPv6Addr-0.6.3/tests/Main.hs 2016-04-05 18:20:50.000000000 +0200
+++ new/IPv6Addr-1.0.1/tests/Main.hs 2017-01-31 11:24:27.000000000 +0100
@@ -25,6 +25,7 @@
, (~?=) (maybeIPv6Addr "::1") (Just (IPv6Addr "::1"))
, (~?=) (maybeIPv6Addr "::1:") Nothing
, (~?=) (maybeIPv6Addr "0000:0000:0000:0000:0000:0000:0000:0001") (Just (IPv6Addr "::1"))
+ , (~?=) (maybeIPv6Addr "0:0:0:0:0:0:0:1") (Just (IPv6Addr "::1"))
, (~?=) (maybeIPv6Addr "a") Nothing
, (~?=) (maybeIPv6Addr "ab") Nothing
, (~?=) (maybeIPv6Addr "abc") Nothing
1
0
Hello community,
here is the log from the commit of package ghc-HsOpenSSL for openSUSE:Factory checked in at 2017-08-31 20:45:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-HsOpenSSL (Old)
and /work/SRC/openSUSE:Factory/.ghc-HsOpenSSL.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-HsOpenSSL"
Thu Aug 31 20:45:51 2017 rev:9 rq:513189 version:0.11.4.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-HsOpenSSL/ghc-HsOpenSSL.changes 2017-06-21 13:54:46.395838173 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-HsOpenSSL.new/ghc-HsOpenSSL.changes 2017-08-31 20:45:51.232803528 +0200
@@ -1,0 +2,5 @@
+Wed Jul 26 03:02:12 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.11.4.9 revision 1.
+
+-------------------------------------------------------------------
New:
----
HsOpenSSL.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-HsOpenSSL.spec ++++++
--- /var/tmp/diff_new_pack.qP9AzU/_old 2017-08-31 20:45:52.168672167 +0200
+++ /var/tmp/diff_new_pack.qP9AzU/_new 2017-08-31 20:45:52.172671605 +0200
@@ -26,6 +26,7 @@
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-network-devel
@@ -59,6 +60,7 @@
%prep
%setup -q -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ HsOpenSSL.cabal ++++++
Name: HsOpenSSL
Synopsis: Partial OpenSSL binding for Haskell
Description:
.
HsOpenSSL is an OpenSSL binding for Haskell. It can generate RSA
and DSA keys, read and write PEM files, generate message digests,
sign and verify messages, encrypt and decrypt messages. It has
also some capabilities of creating SSL clients and servers.
.
This package is in production use by a number of Haskell based
systems and stable. You may also be interested in the @tls@ package,
<http://hackage.haskell.org/package/tls>, which is a pure Haskell
implementation of SSL.
.
Version: 0.11.4.9
x-revision: 1
License: PublicDomain
License-File: COPYING
Author: Adam Langley, Mikhail Vorozhtsov, PHO, Taru Karttunen
Maintainer: Vladimir Shabanov <vshabanoff(a)gmail.com>
Stability: stable
Homepage: https://github.com/vshabanov/HsOpenSSL
Bug-Reports: https://github.com/vshabanov/HsOpenSSL/issues
Category: Cryptography
Cabal-Version: >= 1.12
Tested-With:
GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2
Build-Type: Custom
Extra-Source-Files:
AUTHORS
ChangeLog
README.md
cbits/HsOpenSSL.h
cbits/mutex.h
examples/Makefile
examples/GenRSAKey.hs
examples/HelloWorld.hs
examples/PKCS7.hs
examples/Server.hs
examples/server.crt
examples/server.pem
Source-Repository head
Type: git
Location: git://github.com/vshabanov/HsOpenSSL.git
Flag fast-bignum
Description:
Enable fast moving of bignums between OpenSSL and GMP (GHC only).
Default:
True
Flag homebrew-openssl
Description:
Use Homebrew version of OpenSSL (macOS only).
Default:
False
Flag macports-openssl
Description:
Use MacPorts version of OpenSSL (macOS only).
Default:
False
Custom-setup
setup-depends: Cabal >=1.12 && <2.1,
base >=4.4 && <5
Library
Build-Depends:
base >= 4.4 && < 5,
bytestring >= 0.9 && < 0.11,
network >= 2.1 && < 2.7,
time >= 1.5 && < 1.9
Build-Tools: hsc2hs >= 0.67
if flag(fast-bignum) && impl(ghc >= 7.10.1)
-- only new integer-gmp 1.0.0 is supported
-- and it only works in OpenSSL version < 1.1.0 where BIGNUM
-- wasn't opaque structure.
CPP-Options: -DFAST_BIGNUM
Build-Depends: integer-gmp >= 1.0.0 && < 1.1.0
if os(darwin) && flag(homebrew-openssl)
Include-Dirs: /usr/local/opt/openssl/include
Extra-Lib-Dirs: /usr/local/opt/openssl/lib
if os(darwin) && flag(macports-openssl)
Include-Dirs: /opt/local/include
Extra-Lib-Dirs: /opt/local/lib
if os(mingw32)
if arch(x86_64)
Extra-Libraries: eay32 ssl
if arch(i386)
Extra-Libraries: eay32 ssl32
C-Sources: cbits/mutex-win.c
CC-Options: -D MINGW32 -DNOCRYPT
CPP-Options: -DCALLCONV=stdcall
else
Extra-Libraries: crypto ssl
C-Sources: cbits/mutex-pthread.c
CC-Options: -D PTHREAD
CPP-Options: -DCALLCONV=ccall
Exposed-Modules:
OpenSSL
OpenSSL.BN
OpenSSL.DER
OpenSSL.EVP.Base64
OpenSSL.EVP.Cipher
OpenSSL.EVP.Digest
OpenSSL.EVP.Internal
OpenSSL.EVP.Open
OpenSSL.EVP.PKey
OpenSSL.EVP.Seal
OpenSSL.EVP.Sign
OpenSSL.EVP.Verify
OpenSSL.Cipher
OpenSSL.PEM
OpenSSL.PKCS7
OpenSSL.Random
OpenSSL.DSA
OpenSSL.RSA
OpenSSL.X509
OpenSSL.X509.Revocation
OpenSSL.X509.Request
OpenSSL.X509.Store
OpenSSL.Session
OpenSSL.DH
Other-Modules:
OpenSSL.ASN1
OpenSSL.BIO
OpenSSL.ERR
OpenSSL.Objects
OpenSSL.SSL.Option
OpenSSL.Stack
OpenSSL.Utils
OpenSSL.X509.Name
OpenSSL.DH.Internal
Default-Language:
Haskell2010
GHC-Options:
-Wall
C-Sources:
cbits/HsOpenSSL.c
Include-Dirs:
cbits
Includes:
openssl/asn1.h
Test-Suite test-dsa
Type: exitcode-stdio-1.0
Main-Is: Test/OpenSSL/DSA.hs
Other-Modules: Test.OpenSSL.TestUtils
Build-Depends:
HsOpenSSL,
base >= 4.4 && < 5,
bytestring >= 0.9 && < 0.11
Default-Language:
Haskell2010
GHC-Options:
-Wall
Test-Suite test-der
Type: exitcode-stdio-1.0
Main-Is: Test/OpenSSL/DER.hs
Other-Modules: Test.OpenSSL.TestUtils
Build-Depends:
HsOpenSSL,
base >= 4.4 && < 5
Default-Language:
Haskell2010
GHC-Options:
-Wall
Test-Suite test-evp-base64
Type: exitcode-stdio-1.0
Main-Is: Test/OpenSSL/EVP/Base64.hs
Other-Modules: Test.OpenSSL.TestUtils
Build-Depends:
HsOpenSSL,
base >= 4.4 && < 5,
bytestring >= 0.9 && < 0.11
Default-Language:
Haskell2010
GHC-Options:
-Wall
Test-Suite test-evp-digest
Type: exitcode-stdio-1.0
Main-Is: Test/OpenSSL/EVP/Digest.hs
Other-Modules: Test.OpenSSL.TestUtils
Build-Depends:
HsOpenSSL,
base >= 4.4 && < 5,
bytestring >= 0.9 && < 0.11
Default-Language:
Haskell2010
GHC-Options:
-Wall
1
0
Hello community,
here is the log from the commit of package ghc-Earley for openSUSE:Factory checked in at 2017-08-31 20:45:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-Earley (Old)
and /work/SRC/openSUSE:Factory/.ghc-Earley.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-Earley"
Thu Aug 31 20:45:48 2017 rev:2 rq:513185 version:0.12.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-Earley/ghc-Earley.changes 2017-02-28 23:47:14.589443327 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-Earley.new/ghc-Earley.changes 2017-08-31 20:45:49.625029199 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:05:02 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.12.0.0.
+
+-------------------------------------------------------------------
Old:
----
Earley-0.11.0.1.tar.gz
New:
----
Earley-0.12.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-Earley.spec ++++++
--- /var/tmp/diff_new_pack.cxeveG/_old 2017-08-31 20:45:50.736873138 +0200
+++ /var/tmp/diff_new_pack.cxeveG/_new 2017-08-31 20:45:50.744872015 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-Earley
#
-# 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,25 +19,23 @@
%global pkg_name Earley
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.11.0.1
+Version: 0.12.0.0
Release: 0
Summary: Parsing all context-free grammars using Earley's algorithm
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}-%{ve…
BuildRequires: ghc-Cabal-devel
-# Begin cabal-rpm deps:
BuildRequires: ghc-ListLike-devel
BuildRequires: ghc-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
+BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-tasty-devel
BuildRequires: ghc-tasty-hunit-devel
BuildRequires: ghc-tasty-quickcheck-devel
%endif
-# End cabal-rpm deps
-BuildRequires: ghc-unordered-containers-devel
%description
See <https://www.github.com/ollef/Earley> for more information and
@@ -57,20 +55,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
++++++ Earley-0.11.0.1.tar.gz -> Earley-0.12.0.0.tar.gz ++++++
++++ 1892 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-ChasingBottoms for openSUSE:Factory checked in at 2017-08-31 20:45:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-ChasingBottoms (Old)
and /work/SRC/openSUSE:Factory/.ghc-ChasingBottoms.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-ChasingBottoms"
Thu Aug 31 20:45:46 2017 rev:3 rq:513184 version:1.3.1.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-ChasingBottoms/ghc-ChasingBottoms.changes 2016-10-14 09:06:12.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-ChasingBottoms.new/ghc-ChasingBottoms.changes 2017-08-31 20:45:47.313353672 +0200
@@ -1,0 +2,5 @@
+Fri Jul 28 07:54:15 UTC 2017 - psimons(a)suse.com
+
+- Relax the over-specified version constraint on syb to fix build.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-ChasingBottoms.spec ++++++
--- /var/tmp/diff_new_pack.vQxriM/_old 2017-08-31 20:45:48.161234661 +0200
+++ /var/tmp/diff_new_pack.vQxriM/_new 2017-08-31 20:45:48.165234100 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-ChasingBottoms
#
-# 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
@@ -134,6 +134,7 @@
%prep
%setup -q -n %{pkg_name}-%{version}
+cabal-tweak-dep-ver syb '< 0.7' ' < 0.8'
%build
%ghc_lib_build
1
0
Hello community,
here is the log from the commit of package c2hs for openSUSE:Factory checked in at 2017-08-31 20:45:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/c2hs (Old)
and /work/SRC/openSUSE:Factory/.c2hs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "c2hs"
Thu Aug 31 20:45:41 2017 rev:4 rq:513182 version:0.28.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/c2hs/c2hs.changes 2016-07-20 09:18:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.c2hs.new/c2hs.changes 2017-08-31 20:45:42.226067736 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:43 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.28.2.
+
+-------------------------------------------------------------------
Old:
----
c2hs-0.28.1.tar.gz
New:
----
c2hs-0.28.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ c2hs.spec ++++++
--- /var/tmp/diff_new_pack.eqhbl7/_old 2017-08-31 20:45:43.769851046 +0200
+++ /var/tmp/diff_new_pack.eqhbl7/_new 2017-08-31 20:45:43.773850485 +0200
@@ -1,7 +1,7 @@
#
# spec file for package c2hs
#
-# 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
@@ -18,15 +18,15 @@
%bcond_with tests
Name: c2hs
-Version: 0.28.1
+Version: 0.28.2
Release: 0
Summary: C->Haskell FFI tool that gives some cross-language type safety
License: GPL-2.0+
-Group: System/Libraries
+Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{name}
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.t…
+BuildRequires: c2hs
BuildRequires: ghc-Cabal-devel
-# Begin cabal-rpm deps:
BuildRequires: ghc-array-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
@@ -46,7 +46,6 @@
BuildRequires: ghc-text-devel
BuildRequires: ghc-transformers-devel
%endif
-# End cabal-rpm deps
%description
C->Haskell assists in the development of Haskell bindings to C libraries.
@@ -58,20 +57,14 @@
%prep
%setup -q
-
%build
%ghc_bin_build
-
%install
%ghc_bin_install
-
%check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
%files
%defattr(-,root,root,-)
++++++ c2hs-0.28.1.tar.gz -> c2hs-0.28.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/ChangeLog new/c2hs-0.28.2/ChangeLog
--- old/c2hs-0.28.1/ChangeLog 2016-04-01 17:39:33.000000000 +0200
+++ new/c2hs-0.28.2/ChangeLog 2017-03-06 22:07:57.000000000 +0100
@@ -1,3 +1,5 @@
+0.28.2
+ - Switch to language-c 0.6 [#176]
0.28.1
- Switch to language-c 0.5 [#157]
- Fix class hook problem with imports [#155]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/c2hs.cabal new/c2hs-0.28.2/c2hs.cabal
--- old/c2hs-0.28.1/c2hs.cabal 2016-04-01 17:39:32.000000000 +0200
+++ new/c2hs-0.28.2/c2hs.cabal 2017-03-06 22:07:57.000000000 +0100
@@ -1,12 +1,12 @@
Name: c2hs
-Version: 0.28.1
+Version: 0.28.2
License: GPL-2
License-File: COPYING
Copyright: Copyright (c) 1999-2007 Manuel M T Chakravarty
2005-2013 Duncan Coutts
2008 Benedikt Huber
Author: Manuel M T Chakravarty
-Maintainer: chak(a)cse.unsw.edu.au, duncan(a)community.haskell.org, ian(a)skybluetrades.net
+Maintainer: chak(a)cse.unsw.edu.au, duncan(a)community.haskell.org, ian(a)skybluetrades.net, aditya.siram(a)gmail.com
Stability: Stable
Homepage: https://github.com/haskell/c2hs
Bug-Reports: https://github.com/haskell/c2hs/issues
@@ -101,6 +101,7 @@
tests/bugs/issue-151/*.chs tests/bugs/issue-151/*.h
tests/bugs/issue-152/*.chs tests/bugs/issue-152/*.h
tests/bugs/issue-155/*.chs tests/bugs/issue-155/*.h
+ tests/bugs/issue-180/*.chs tests/bugs/issue-180/*.h
source-repository head
type: git
@@ -111,7 +112,7 @@
Executable c2hs
Build-Depends: base >= 2 && < 5,
bytestring,
- language-c >= 0.5 && < 0.6,
+ language-c >= 0.6 && < 0.7,
filepath,
dlist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/src/C2HS/Gen/Bind.hs new/c2hs-0.28.2/src/C2HS/Gen/Bind.hs
--- old/c2hs-0.28.1/src/C2HS/Gen/Bind.hs 2016-04-01 17:39:32.000000000 +0200
+++ new/c2hs-0.28.2/src/C2HS/Gen/Bind.hs 2017-03-06 22:07:57.000000000 +0100
@@ -521,7 +521,9 @@
else doSplit 0 mln True (f:acc) fs'
| otherwise = if null (dropWhile isSpace s) || isJust mln
then doSplit 0 mln wh (f:acc) fs'
- else doSplit 0 (Just $ posRow pos) wh (f:acc) fs'
+ else doSplit 0 mln' wh (f:acc) fs'
+ where mln' | isSourcePos pos = Just $ posRow pos
+ | otherwise = Nothing
doSplit cdep mln wh acc (f@(CHSVerb s _) : fs')
| s == "-}" = doSplit (cdep-1) mln wh (f:acc) fs'
| s == "{-" = doSplit (cdep+1) mln wh (f:acc) fs'
@@ -1438,7 +1440,11 @@
parms' <- addDft parms'' cts
return (CHSParm imMarsh' hsTy True omMarsh' False p c : parms')
addDft [] [] = return []
- addDft ((CHSParm _ _ _ _ _ pos' _):_) [] =
+ addDft (CHSPlusParm _:_) [] =
+ marshArgMismatchErr pos "This parameter is in excess of the C arguments."
+ addDft (CHSParm _ _ _ _ _ pos' _:_) [] =
+ marshArgMismatchErr pos' "This parameter is in excess of the C arguments."
+ addDft (CHSParm _ _ True _ _ pos' _:_) [_] =
marshArgMismatchErr pos' "This parameter is in excess of the C arguments."
addDft [] (_:_) =
marshArgMismatchErr pos "Parameter marshallers are missing."
@@ -2303,7 +2309,7 @@
hasStdCallAttr = any isStdCallAttr . funAttrs
funAttrs (CDecl specs declrs _) =
- let (_,attrs',_,_,_) = partitionDeclSpecs specs
+ let (_,attrs',_,_,_,_) = partitionDeclSpecs specs
in attrs' ++ funEndAttrs declrs ++ funPtrAttrs declrs
-- attrs after the function name, e.g. void foo() __attribute__((...));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/src/Data/NameSpaces.hs new/c2hs-0.28.2/src/Data/NameSpaces.hs
--- old/c2hs-0.28.1/src/Data/NameSpaces.hs 2016-04-01 17:39:32.000000000 +0200
+++ new/c2hs-0.28.2/src/Data/NameSpaces.hs 2017-03-06 22:07:57.000000000 +0100
@@ -77,7 +77,7 @@
--
-- * if the identfier is already declared, the resulting name space contains
-- the new binding and the second component of the result contains the
--- definition declared previosuly (which is henceforth not contained in the
+-- definition declared previously (which is henceforth not contained in the
-- name space anymore)
--
defGlobal :: NameSpace a -> Ident -> a -> (NameSpace a, Maybe a)
@@ -105,7 +105,7 @@
--
-- * if the identfier is already declared, the resulting name space contains
-- the new binding and the second component of the result contains the
--- definition declared previosuly (which is henceforth not contained in the
+-- definition declared previously (which is henceforth not contained in the
-- name space anymore)
--
defLocal :: NameSpace a -> Ident -> a -> (NameSpace a, Maybe a)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/tests/bugs/issue-128/issue128.c new/c2hs-0.28.2/tests/bugs/issue-128/issue128.c
--- old/c2hs-0.28.1/tests/bugs/issue-128/issue128.c 2016-04-01 17:39:33.000000000 +0200
+++ new/c2hs-0.28.2/tests/bugs/issue-128/issue128.c 2017-03-06 22:07:57.000000000 +0100
@@ -20,6 +20,7 @@
tststruct *p = (tststruct *)malloc(sizeof(tststruct));
p->a = ain;
p->b = false;
+ return p;
}
void free_tststruct(tststruct *s)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/tests/bugs/issue-180/Issue180.chs new/c2hs-0.28.2/tests/bugs/issue-180/Issue180.chs
--- old/c2hs-0.28.1/tests/bugs/issue-180/Issue180.chs 1970-01-01 01:00:00.000000000 +0100
+++ new/c2hs-0.28.2/tests/bugs/issue-180/Issue180.chs 2017-03-06 22:07:57.000000000 +0100
@@ -0,0 +1,13 @@
+module Main where
+
+#include "issue180.h"
+
+marshalIn = undefined
+
+{#fun pure test as test1
+ { 'marshalIn'* `Int'&} -> `()' #}
+
+main :: IO ()
+main = do
+ test
+ print "OK"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/tests/bugs/issue-180/issue180.h new/c2hs-0.28.2/tests/bugs/issue-180/issue180.h
--- old/c2hs-0.28.1/tests/bugs/issue-180/issue180.h 1970-01-01 01:00:00.000000000 +0100
+++ new/c2hs-0.28.2/tests/bugs/issue-180/issue180.h 2017-03-06 22:07:57.000000000 +0100
@@ -0,0 +1 @@
+void test(int arg);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/tests/test-bugs.hs new/c2hs-0.28.2/tests/test-bugs.hs
--- old/c2hs-0.28.1/tests/test-bugs.hs 2016-04-01 17:39:32.000000000 +0200
+++ new/c2hs-0.28.2/tests/test-bugs.hs 2017-03-06 22:07:57.000000000 +0100
@@ -92,6 +92,7 @@
, testCase "Issue #151" issue151
, testCase "Issue #152" issue152
, testCase "Issue #155" issue155
+ , testCase "Issue #180" issue180
] ++
-- Some tests that won't work on Windows.
if os /= "cygwin32" && os /= "mingw32"
@@ -112,6 +113,17 @@
let expected = ["upper C();", "lower c();", "upper C();"]
liftIO $ assertBool "" (T.lines res == expected)
+issue180 :: Assertion
+issue180 = c2hsShelly $ chdir "tests/bugs/issue-180" $ do
+ mapM_ rm_f ["Issue180.chs.h"]
+ errExit False $ do
+ run "c2hs" [toTextIgnore "Issue180.chs"]
+ code <- lastExitCode
+ liftIO $ assertEqual "error code" 1 code
+ stderr <- lastStderr
+ let excessMsgCount = T.count "excess of the C arguments" stderr
+ liftIO $ assertBool "correct error message" (excessMsgCount == 1)
+
issue155 :: Assertion
issue155 = c2hsShelly $ chdir "tests/bugs/issue-155" $ do
mapM_ rm_f ["Issue155.hs", "Issue155.chs.h", "Issue155.chs.c", "Issue155.chi",
1
0