From 507ebc629c6b40179af5707eb337eff2fd4c3eef Mon Sep 17 00:00:00 2001 From: Ollie Charles Date: Wed, 3 Jan 2018 14:41:21 +0000 Subject: [PATCH 1/7] Bump upper bounds --- streaming-utils.cabal | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/streaming-utils.cabal b/streaming-utils.cabal index 24ca383..f776f02 100644 --- a/streaming-utils.cabal +++ b/streaming-utils.cabal @@ -67,19 +67,19 @@ library build-depends: base >=4.7 && <5.0, transformers >=0.4 && <0.5.3, mtl >=2.2 && <2.3, - attoparsec > 0.13.0.0 && < 0.13.2.0, - streaming >= 0.1.4.0 && < 0.1.4.8, - streaming-bytestring >= 0.1.4.0 && < 0.1.4.8, + attoparsec > 0.13.0.0 && < 0.14, + streaming >= 0.1.4.0 && < 0.3, + streaming-bytestring >= 0.1.4.0 && < 0.2, bytestring > 0.10.0 && < 0.11.0, pipes >= 4.0 && < 4.4, network-simple, network, http-client >=0.2 && <0.6, http-client-tls, - aeson > 0.8 && <1.2, + aeson > 0.8 && <1.3, json-stream > 0.4.0 && < 0.4.2, resourcet > 1.0 && < 1.2, - streaming-commons > 0.1.0 && < 0.1.18 + streaming-commons > 0.1.0 && < 0.2 -- hs-source-dirs: default-language: Haskell2010 From 40f998b2792e3c8d651f37606a66091d7a47d707 Mon Sep 17 00:00:00 2001 From: chessai Date: Wed, 13 Feb 2019 19:01:08 -0500 Subject: [PATCH 2/7] update dependencies and ensure build for ghc >= 7.10.3 --- .gitignore | 2 ++ Data/ByteString/Streaming/HTTP.hs | 6 +++--- nix-ci-ish.sh | 6 ++++++ streaming-utils.cabal | 25 ++++++++++++------------- 4 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 nix-ci-ish.sh diff --git a/.gitignore b/.gitignore index e2d43c9..62df6a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ dist +dist-newstyle +*.ghc* cabal-dev *.o *.hi diff --git a/Data/ByteString/Streaming/HTTP.hs b/Data/ByteString/Streaming/HTTP.hs index 7b0b60b..cceecd9 100644 --- a/Data/ByteString/Streaming/HTTP.hs +++ b/Data/ByteString/Streaming/HTTP.hs @@ -1,4 +1,4 @@ -{-#LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings #-} -- | This module replicates `pipes-http` as closely as will type-check, adding a -- conduit-like @http@ in @ResourceT@ and a primitive @simpleHTTP@ that emits -- a streaming bytestring rather than a lazy one. @@ -38,7 +38,7 @@ -- > import Data.ByteString.Streaming.HTTP -- > -- > main = do --- > req <- parseUrl "https://www.example.com" +-- > req <- parseUrlThrow "https://www.example.com" -- > m <- newManager tlsManagerSettings -- > runResourceT $ do -- > resp <- http request manager @@ -205,7 +205,7 @@ import Data.ByteString.Streaming.HTTP simpleHTTP :: MonadResource m => String -> ByteString m () simpleHTTP url = do man <- liftIO (newManager tlsManagerSettings) - req <- liftIO (parseUrl url) + req <- liftIO (parseUrlThrow url) bracketByteString (responseOpen req man) responseClose diff --git a/nix-ci-ish.sh b/nix-ci-ish.sh new file mode 100644 index 0000000..ad4b62b --- /dev/null +++ b/nix-ci-ish.sh @@ -0,0 +1,6 @@ +nix-shell -I nixpkgs=https://github.com/nixos/nixpkgs-channels/archive/nixos-17.09.tar.gz -p haskell.compiler.ghc7103 --run "cabal new-build" +nix-shell -I nixpkgs=https://github.com/nixos/nixpkgs-channels/archive/nixos-17.09.tar.gz -p haskell.compiler.ghc802 --run "cabal new-build" +nix-shell -I nixpkgs=https://github.com/nixos/nixpkgs-channels/archive/nixos-18.09.tar.gz -p haskell.compiler.ghc822 --run "cabal new-build" +nix-shell -I nixpkgs=https://github.com/nixos/nixpkgs-channels/archive/nixos-18.09.tar.gz -p haskell.compiler.ghc844 --run "cabal new-build" +nix-shell -I nixpkgs=https://github.com/nixos/nixpkgs-channels/archive/nixos-18.09.tar.gz -p haskell.compiler.ghc862 --run "cabal new-build" + diff --git a/streaming-utils.cabal b/streaming-utils.cabal index f776f02..559f12f 100644 --- a/streaming-utils.cabal +++ b/streaming-utils.cabal @@ -39,16 +39,15 @@ description: This package includes http-client, aeson, attoparsec, zlib license: BSD3 license-file: LICENSE author: michaelt -maintainer: what_is_it_to_do_anything@yahoo.com +maintainer: chessai1996@gmail.com -- copyright: -category: Data build-type: Simple +category: Data, Pipes, Streaming -- extra-source-files: cabal-version: >=1.10 stability: Experimental homepage: https://github.com/michaelt/streaming-utils bug-reports: https://github.com/michaelt/streaming-utils/issues -category: Data, Pipes, Streaming source-repository head type: git location: https://github.com/michaelt/streaming-utils @@ -64,22 +63,22 @@ library -- other-modules: other-extensions: CPP, Trustworthy - build-depends: base >=4.7 && <5.0, - transformers >=0.4 && <0.5.3, + build-depends: base >=4.8 && <5.0, + transformers >=0.4 && <0.6, mtl >=2.2 && <2.3, attoparsec > 0.13.0.0 && < 0.14, - streaming >= 0.1.4.0 && < 0.3, - streaming-bytestring >= 0.1.4.0 && < 0.2, - bytestring > 0.10.0 && < 0.11.0, + streaming >= 0.2 && < 0.3, + streaming-bytestring >= 0.1 && < 0.2, + bytestring > 0.10 && < 0.11, pipes >= 4.0 && < 4.4, network-simple, network, - http-client >=0.2 && <0.6, + http-client >=0.2 && <0.7, http-client-tls, - aeson > 0.8 && <1.3, - json-stream > 0.4.0 && < 0.4.2, - resourcet > 1.0 && < 1.2, - streaming-commons > 0.1.0 && < 0.2 + aeson > 0.8 && <1.5, + json-stream > 0.4 && < 0.5, + resourcet > 1.0 && < 1.3, + streaming-commons > 0.2 && < 0.3 -- hs-source-dirs: default-language: Haskell2010 From 3f634381530f81c6182e28d0dea3e245b8b33c6f Mon Sep 17 00:00:00 2001 From: chessai Date: Wed, 13 Feb 2019 19:07:21 -0500 Subject: [PATCH 3/7] version bump; hk release --- streaming-utils.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streaming-utils.cabal b/streaming-utils.cabal index 559f12f..c8122db 100644 --- a/streaming-utils.cabal +++ b/streaming-utils.cabal @@ -1,5 +1,5 @@ name: streaming-utils -version: 0.1.4.7 +version: 0.2.0.0 synopsis: http, attoparsec, pipes and other utilities for the streaming libraries description: This package includes http-client, aeson, attoparsec, zlib and pipes utilities for use with From 906232de902dda62f86bc7e8af69b278bb550e5c Mon Sep 17 00:00:00 2001 From: "Gregory W. Schwartz" Date: Fri, 30 Aug 2019 10:33:03 -0400 Subject: [PATCH 4/7] Added decompressAll. --- Streaming/Zip.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Streaming/Zip.hs b/Streaming/Zip.hs index ebfebdf..1b853bd 100644 --- a/Streaming/Zip.hs +++ b/Streaming/Zip.hs @@ -4,6 +4,7 @@ module Streaming.Zip ( -- * Streams decompress , decompress' + , decompressAll , compress , gunzip , gunzip' @@ -83,6 +84,14 @@ decompress' wbits p0 = go p0 =<< liftIO (Z.initInflate wbits) else return $ Left (chunk leftover >> p') {-# INLINABLE decompress' #-} +-- | Keep decompressing a compressed bytestream until exhaused. +decompressAll :: MonadIO m => Z.WindowBits -> ByteString m r -> ByteString m r +decompressAll w bs = decompress' w bs >>= go + where + go (Left bs) = decompress' w bs >>= go + go (Right r) = return r +{-# INLINABLE decompressAll #-} + -- | Compress a byte stream. -- -- See the "Codec.Compression.Zlib" module for details about From 8ddd8ec07c5a9050793d0875e71a41847458ce19 Mon Sep 17 00:00:00 2001 From: chessai Date: Fri, 30 Aug 2019 11:18:18 -0400 Subject: [PATCH 5/7] fix typo (exhaused -> exhausted) --- Streaming/Zip.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Streaming/Zip.hs b/Streaming/Zip.hs index 1b853bd..7523316 100644 --- a/Streaming/Zip.hs +++ b/Streaming/Zip.hs @@ -84,7 +84,7 @@ decompress' wbits p0 = go p0 =<< liftIO (Z.initInflate wbits) else return $ Left (chunk leftover >> p') {-# INLINABLE decompress' #-} --- | Keep decompressing a compressed bytestream until exhaused. +-- | Keep decompressing a compressed bytestream until exhausted. decompressAll :: MonadIO m => Z.WindowBits -> ByteString m r -> ByteString m r decompressAll w bs = decompress' w bs >>= go where From 0a2af6d118ba76fc5673ce67b85161fcb7250edf Mon Sep 17 00:00:00 2001 From: Ollie Charles Date: Thu, 10 Sep 2020 14:09:48 +0100 Subject: [PATCH 6/7] SUpport aeson-1.5 --- streaming-utils.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streaming-utils.cabal b/streaming-utils.cabal index c8122db..88fea95 100644 --- a/streaming-utils.cabal +++ b/streaming-utils.cabal @@ -75,7 +75,7 @@ library network, http-client >=0.2 && <0.7, http-client-tls, - aeson > 0.8 && <1.5, + aeson > 0.8 && <1.6, json-stream > 0.4 && < 0.5, resourcet > 1.0 && < 1.3, streaming-commons > 0.2 && < 0.3 From bedf3a21b6ca0b17c09c37858f241fadc559f862 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 4 Nov 2020 18:55:27 -0500 Subject: [PATCH 7/7] Add zlib as pkgconfig-depend This allows packaging infrastructure more flexibility in providing the dependency. --- streaming-utils.cabal | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/streaming-utils.cabal b/streaming-utils.cabal index 88fea95..9c8cb84 100644 --- a/streaming-utils.cabal +++ b/streaming-utils.cabal @@ -79,6 +79,7 @@ library json-stream > 0.4 && < 0.5, resourcet > 1.0 && < 1.3, streaming-commons > 0.2 && < 0.3 - + + pkgconfig-depends: zlib -- hs-source-dirs: default-language: Haskell2010