From 40f998b2792e3c8d651f37606a66091d7a47d707 Mon Sep 17 00:00:00 2001 From: chessai Date: Wed, 13 Feb 2019 19:01:08 -0500 Subject: [PATCH] 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