Hello community, here is the log from the commit of package ghc-http-types for openSUSE:Factory checked in at 2016-01-08 15:22:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-http-types (Old) and /work/SRC/openSUSE:Factory/.ghc-http-types.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-http-types" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-http-types/ghc-http-types.changes 2015-05-21 08:37:11.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-http-types.new/ghc-http-types.changes 2016-01-08 15:22:59.000000000 +0100 @@ -1,0 +2,5 @@ +Wed Dec 30 12:36:36 UTC 2015 - mimi...@gmail.com + +- update to 0.9 + +------------------------------------------------------------------- Old: ---- http-types-0.8.6.tar.gz New: ---- http-types-0.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-http-types.spec ++++++ --- /var/tmp/diff_new_pack.ZqSLE0/_old 2016-01-08 15:23:00.000000000 +0100 +++ /var/tmp/diff_new_pack.ZqSLE0/_new 2016-01-08 15:23:00.000000000 +0100 @@ -23,7 +23,7 @@ %global debug_package %{nil} Name: ghc-http-types -Version: 0.8.6 +Version: 0.9 Release: 0 Summary: Generic HTTP types for Haskell (for both client and server code) License: BSD-3-Clause ++++++ http-types-0.8.6.tar.gz -> http-types-0.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.8.6/Network/HTTP/Types/Header.hs new/http-types-0.9/Network/HTTP/Types/Header.hs --- old/http-types-0.8.6/Network/HTTP/Types/Header.hs 2015-02-16 20:58:49.000000000 +0100 +++ new/http-types-0.9/Network/HTTP/Types/Header.hs 2015-10-05 20:03:53.000000000 +0200 @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings, FlexibleInstances, MultiParamTypeClasses, FunctionalDependencies, DeriveDataTypeable #-} +{-# LANGUAGE OverloadedStrings, FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable, CPP #-} module Network.HTTP.Types.Header ( -- ** Types @@ -8,24 +8,53 @@ , ResponseHeaders -- ** Common headers , hAccept +, hAcceptCharset +, hAcceptEncoding , hAcceptLanguage +, hAcceptRanges +, hAge +, hAllow , hAuthorization , hCacheControl -, hCookie , hConnection , hContentEncoding +, hContentLanguage , hContentLength +, hContentLocation , hContentMD5 +, hContentRange , hContentType +, hCookie , hDate +, hETag +, hExpect +, hExpires +, hFrom +, hHost +, hIfMatch , hIfModifiedSince +, hIfNoneMatch , hIfRange +, hIfUnmodifiedSince , hLastModified , hLocation +, hMaxForwards +, hPragma +, hProxyAuthenticate +, hProxyAuthorization , hRange , hReferer +, hRetryAfter , hServer +, hTE +, hTrailer +, hTransferEncoding +, hUpgrade , hUserAgent +, hVary +, hVia +, hWWWAuthenticate +, hWarning -- ** Byte ranges , ByteRange(..) , renderByteRangeBuilder @@ -37,7 +66,9 @@ where import Data.List +#if __GLASGOW_HASKELL__ < 710 import Data.Monoid +#endif import qualified Blaze.ByteString.Builder as Blaze import qualified Blaze.ByteString.Builder.Char8 as Blaze import qualified Data.ByteString as B @@ -59,31 +90,61 @@ type ResponseHeaders = [Header] -- | HTTP Header names -hAccept, hAcceptLanguage, hAuthorization, hCacheControl, hConnection, hContentEncoding, hContentLength, hContentMD5, hContentType, hCookie, hDate, hIfModifiedSince, hIfRange, hLastModified, hLocation, hRange, hReferer, hServer, hUserAgent :: HeaderName -hAccept = "Accept" -hAcceptLanguage = "Accept-Language" -hAuthorization = "Authorization" -hCacheControl = "Cache-Control" -hConnection = "Connection" -hContentEncoding = "Content-Encoding" -hContentLength = "Content-Length" -hContentMD5 = "Content-MD5" -hContentType = "Content-Type" -hCookie = "Cookie" -hDate = "Date" -hIfModifiedSince = "If-Modified-Since" -hIfRange = "If-Range" -hLastModified = "Last-Modified" -hLocation = "Location" -hRange = "Range" -hReferer = "Referer" -hServer = "Server" -hUserAgent = "User-Agent" +-- According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html +hAccept, hAcceptCharset, hAcceptEncoding, hAcceptLanguage, hAcceptRanges, hAge, hAllow, hAuthorization, hCacheControl, hConnection, hContentEncoding, hContentLanguage, hContentLength, hContentLocation, hContentMD5, hContentRange, hContentType, hCookie, hDate, hETag, hExpect, hExpires, hFrom, hHost, hIfMatch, hIfModifiedSince, hIfNoneMatch, hIfRange, hIfUnmodifiedSince, hLastModified, hLocation, hMaxForwards, hPragma, hProxyAuthenticate, hProxyAuthorization, hRange, hReferer, hRetryAfter, hServer, hTE, hTrailer, hTransferEncoding, hUpgrade, hUserAgent, hVary, hVia, hWWWAuthenticate, hWarning :: HeaderName +hAccept = "Accept" +hAcceptCharset = "Accept-Charset" +hAcceptEncoding = "Accept-Encoding" +hAcceptLanguage = "Accept-Language" +hAcceptRanges = "Accept-Ranges" +hAge = "Age" +hAllow = "Allow" +hAuthorization = "Authorization" +hCacheControl = "Cache-Control" +hConnection = "Connection" +hContentEncoding = "Content-Encoding" +hContentLanguage = "Content-Language" +hContentLength = "Content-Length" +hContentLocation = "Content-Location" +hContentMD5 = "Content-MD5" +hContentRange = "Content-Range" +hContentType = "Content-Type" +hCookie = "Cookie" +hDate = "Date" +hETag = "ETag" +hExpect = "Expect" +hExpires = "Expires" +hFrom = "From" +hHost = "Host" +hIfMatch = "If-Match" +hIfModifiedSince = "If-Modified-Since" +hIfNoneMatch = "If-None-Match" +hIfRange = "If-Range" +hIfUnmodifiedSince = "If-Unmodified-Since" +hLastModified = "Last-Modified" +hLocation = "Location" +hMaxForwards = "Max-Forwards" +hPragma = "Pragma" +hProxyAuthenticate = "Proxy-Authenticate" +hProxyAuthorization = "Proxy-Authorization" +hRange = "Range" +hReferer = "Referer" +hRetryAfter = "Retry-After" +hServer = "Server" +hTE = "TE" +hTrailer = "Trailer" +hTransferEncoding = "Transfer-Encoding" +hUpgrade = "Upgrade" +hUserAgent = "User-Agent" +hVary = "Vary" +hVia = "Via" +hWWWAuthenticate = "WWW-Authenticate" +hWarning = "Warning" --- | RFC 2616 Byte range (individual). --- +-- | RFC 2616 Byte range (individual). +-- -- Negative indices are not allowed! -data ByteRange +data ByteRange = ByteRangeFrom !Integer | ByteRangeFromTo !Integer !Integer | ByteRangeSuffix !Integer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.8.6/Network/HTTP/Types/Method.hs new/http-types-0.9/Network/HTTP/Types/Method.hs --- old/http-types-0.8.6/Network/HTTP/Types/Method.hs 2015-02-16 20:58:49.000000000 +0100 +++ new/http-types-0.9/Network/HTTP/Types/Method.hs 2015-10-05 20:03:53.000000000 +0200 @@ -1,3 +1,4 @@ +{-# LANGUAGE DeriveDataTypeable #-} module Network.HTTP.Types.Method ( Method @@ -21,6 +22,7 @@ import Data.Array import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B8 +import Data.Typeable -- | HTTP method (flat string type). type Method = B.ByteString @@ -49,7 +51,7 @@ | CONNECT | OPTIONS | PATCH - deriving (Read, Show, Eq, Ord, Enum, Bounded, Ix) + deriving (Read, Show, Eq, Ord, Enum, Bounded, Ix, Typeable) -- These are ordered by suspected frequency. More popular methods should go first. -- The reason is that methodList is used with lookup. -- lookup is probably faster for these few cases than setting up an elaborate data structure. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.8.6/Network/HTTP/Types/Status.hs new/http-types-0.9/Network/HTTP/Types/Status.hs --- old/http-types-0.8.6/Network/HTTP/Types/Status.hs 2015-02-16 20:58:49.000000000 +0100 +++ new/http-types-0.9/Network/HTTP/Types/Status.hs 2015-10-05 20:03:53.000000000 +0200 @@ -1,7 +1,6 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-} module Network.HTTP.Types.Status -( - Status(..) +( Status(..) , mkStatus , status100 , continue100 @@ -35,6 +34,8 @@ , useProxy305 , status307 , temporaryRedirect307 +, status308 +, permanentRedirect308 , status400 , badRequest400 , status401 @@ -98,10 +99,10 @@ , statusIsRedirection , statusIsClientError , statusIsServerError -) -where +) where import qualified Data.ByteString as B +import Data.Typeable -- | HTTP Status. -- @@ -112,11 +113,9 @@ -- -- Note that the Show instance is only for debugging. data Status - = Status { - statusCode :: Int - , statusMessage :: B.ByteString - } - deriving (Show) + = Status { statusCode :: Int + , statusMessage :: B.ByteString + } deriving (Show, Typeable) instance Eq Status where Status { statusCode = a } == Status { statusCode = b } = a == b @@ -125,48 +124,53 @@ compare Status { statusCode = a } Status { statusCode = b } = a `compare` b instance Enum Status where - fromEnum = statusCode - toEnum 100 = status100 - toEnum 101 = status101 - toEnum 200 = status200 - toEnum 201 = status201 - toEnum 202 = status202 - toEnum 203 = status203 - toEnum 204 = status204 - toEnum 205 = status205 - toEnum 206 = status206 - toEnum 300 = status300 - toEnum 301 = status301 - toEnum 302 = status302 - toEnum 303 = status303 - toEnum 304 = status304 - toEnum 305 = status305 - toEnum 307 = status307 - toEnum 400 = status400 - toEnum 401 = status401 - toEnum 402 = status402 - toEnum 403 = status403 - toEnum 404 = status404 - toEnum 405 = status405 - toEnum 406 = status406 - toEnum 407 = status407 - toEnum 408 = status408 - toEnum 409 = status409 - toEnum 410 = status410 - toEnum 411 = status411 - toEnum 412 = status412 - toEnum 413 = status413 - toEnum 414 = status414 - toEnum 415 = status415 - toEnum 416 = status416 - toEnum 417 = status417 - toEnum 500 = status500 - toEnum 501 = status501 - toEnum 502 = status502 - toEnum 503 = status503 - toEnum 504 = status504 - toEnum 505 = status505 - toEnum c = mkStatus c B.empty + fromEnum = statusCode + toEnum 100 = status100 + toEnum 101 = status101 + toEnum 200 = status200 + toEnum 201 = status201 + toEnum 202 = status202 + toEnum 203 = status203 + toEnum 204 = status204 + toEnum 205 = status205 + toEnum 206 = status206 + toEnum 300 = status300 + toEnum 301 = status301 + toEnum 302 = status302 + toEnum 303 = status303 + toEnum 304 = status304 + toEnum 305 = status305 + toEnum 307 = status307 + toEnum 308 = status308 + toEnum 400 = status400 + toEnum 401 = status401 + toEnum 402 = status402 + toEnum 403 = status403 + toEnum 404 = status404 + toEnum 405 = status405 + toEnum 406 = status406 + toEnum 407 = status407 + toEnum 408 = status408 + toEnum 409 = status409 + toEnum 410 = status410 + toEnum 411 = status411 + toEnum 412 = status412 + toEnum 413 = status413 + toEnum 414 = status414 + toEnum 415 = status415 + toEnum 416 = status416 + toEnum 417 = status417 + toEnum 428 = status428 + toEnum 429 = status429 + toEnum 431 = status431 + toEnum 500 = status500 + toEnum 501 = status501 + toEnum 502 = status502 + toEnum 503 = status503 + toEnum 504 = status504 + toEnum 505 = status505 + toEnum 511 = status511 + toEnum c = mkStatus c B.empty -- | Create a Status from status code and message. mkStatus :: Int -> B.ByteString -> Status @@ -300,6 +304,14 @@ temporaryRedirect307 :: Status temporaryRedirect307 = status307 +-- | Permanent Redirect 308 +status308 :: Status +status308 = mkStatus 308 "Permanent Redirect" + +-- | Permanent Redirect 308 +permanentRedirect308 :: Status +permanentRedirect308 = status308 + -- | Bad Request 400 status400 :: Status status400 = mkStatus 400 "Bad Request" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.8.6/Network/HTTP/Types/URI.hs new/http-types-0.9/Network/HTTP/Types/URI.hs --- old/http-types-0.8.6/Network/HTTP/Types/URI.hs 2015-02-16 20:58:49.000000000 +0100 +++ new/http-types-0.9/Network/HTTP/Types/URI.hs 2015-10-05 20:03:53.000000000 +0200 @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings, CPP #-} module Network.HTTP.Types.URI ( -- * Query string @@ -38,7 +38,9 @@ import Data.Char import Data.List import Data.Maybe +#if __GLASGOW_HASKELL__ < 710 import Data.Monoid +#endif import Data.Text (Text) import Data.Text.Encoding (encodeUtf8, decodeUtf8With) import Data.Text.Encoding.Error (lenientDecode) @@ -215,7 +217,7 @@ x' <- hexVal x (y, ys) <- B.uncons xs y' <- hexVal y - Just $ (combine x' y', ys) + Just (combine x' y', ys) Just (w, ws) -> Just (w, ws) hexVal w | 48 <= w && w <= 57 = Just $ w - 48 -- 0 - 9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.8.6/Network/HTTP/Types/Version.hs new/http-types-0.9/Network/HTTP/Types/Version.hs --- old/http-types-0.8.6/Network/HTTP/Types/Version.hs 2015-02-16 20:58:49.000000000 +0100 +++ new/http-types-0.9/Network/HTTP/Types/Version.hs 2015-10-05 20:03:53.000000000 +0200 @@ -1,3 +1,4 @@ +{-# LANGUAGE DeriveDataTypeable #-} module Network.HTTP.Types.Version ( HttpVersion(..) @@ -7,15 +8,17 @@ ) where +import Data.Typeable + -- | HTTP Version. --- +-- -- Note that the Show instance is intended merely for debugging. -data HttpVersion +data HttpVersion = HttpVersion { - httpMajor :: !Int + httpMajor :: !Int , httpMinor :: !Int } - deriving (Eq, Ord) + deriving (Eq, Ord, Typeable) instance Show HttpVersion where show (HttpVersion major minor) = "HTTP/" ++ show major ++ "." ++ show minor diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-types-0.8.6/http-types.cabal new/http-types-0.9/http-types.cabal --- old/http-types-0.8.6/http-types.cabal 2015-02-16 20:58:49.000000000 +0100 +++ new/http-types-0.9/http-types.cabal 2015-10-05 20:03:53.000000000 +0200 @@ -1,5 +1,5 @@ Name: http-types -Version: 0.8.6 +Version: 0.9 Synopsis: Generic HTTP types for Haskell (for both client and server code). Description: Generic HTTP types for Haskell (for both client and server code). Homepage: https://github.com/aristidb/http-types @@ -16,7 +16,7 @@ Source-repository this type: git location: https://github.com/aristidb/http-types.git - tag: 0.8.6 + tag: 0.9 Source-repository head type: git