From f4f4aac433ac14a9b7ccfc43731116e6092ce2a7 Mon Sep 17 00:00:00 2001 From: Ollie Charles Date: Mon, 30 Aug 2021 15:39:51 +0100 Subject: [PATCH 1/3] Upgrade to GHC 9 --- src/Streaming/Conduit.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Streaming/Conduit.hs b/src/Streaming/Conduit.hs index f8091a3..7580aee 100644 --- a/src/Streaming/Conduit.hs +++ b/src/Streaming/Conduit.hs @@ -63,7 +63,7 @@ fromStreamSource = void . fromStream -- | A more specialised variant of 'fromStream' that is subject to -- fusion. -fromStreamProducer :: (Monad m) => Stream (Of a) m r -> Producer m a +fromStreamProducer :: (Monad m) => Stream (Of a) m r -> ConduitT i a m () fromStreamProducer = CL.unfoldM S.uncons . void -- | Convert a streaming 'B.ByteString' into a 'Source'; subject to fusion. @@ -71,7 +71,7 @@ fromBStream :: (Monad m) => B.ByteString m r -> ConduitM i ByteString m r fromBStream = CL.unfoldEitherM B.nextChunk -- | A more specialised variant of 'fromBStream'. -fromBStreamProducer :: (Monad m) => B.ByteString m r -> Producer m ByteString +fromBStreamProducer :: (Monad m) => B.ByteString m r -> ConduitT i ByteString m () fromBStreamProducer = CL.unfoldM B.unconsChunk . void -- | Convert a 'Producer' to a 'Stream'. Subject to fusion. From fd85655c594ac798a68692b8ba1cd8160364e7e1 Mon Sep 17 00:00:00 2001 From: Ollie Charles Date: Mon, 30 Aug 2021 15:42:15 +0100 Subject: [PATCH 2/3] Update Conduit.hs --- src/Streaming/Conduit.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Streaming/Conduit.hs b/src/Streaming/Conduit.hs index 7580aee..81dc523 100644 --- a/src/Streaming/Conduit.hs +++ b/src/Streaming/Conduit.hs @@ -43,7 +43,7 @@ import Control.Monad (join, void) import Control.Monad.Trans.Class (lift) import Data.ByteString (ByteString) import qualified Data.ByteString.Streaming as B -import Data.Conduit (Conduit, ConduitM, Producer, Source, Consumer, +import Data.Conduit (Conduit, ConduitM, ConduitT, Producer, Source, Consumer, await, runConduit, transPipe, (.|)) import qualified Data.Conduit.List as CL import Streaming (Of, Stream) From 59bd4aa50c78f7cc7ab4217474bfabdc3bb735ca Mon Sep 17 00:00:00 2001 From: Stefan Wehr Date: Thu, 7 Aug 2025 18:06:14 +0200 Subject: [PATCH 3/3] build with stackage lts-24 --- src/Streaming/Conduit.hs | 2 +- stack.yaml | 6 ++++++ stack.yaml.lock | 12 ++++++++++++ streaming-conduit.cabal | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 stack.yaml create mode 100644 stack.yaml.lock diff --git a/src/Streaming/Conduit.hs b/src/Streaming/Conduit.hs index 81dc523..273cdf9 100644 --- a/src/Streaming/Conduit.hs +++ b/src/Streaming/Conduit.hs @@ -72,7 +72,7 @@ fromBStream = CL.unfoldEitherM B.nextChunk -- | A more specialised variant of 'fromBStream'. fromBStreamProducer :: (Monad m) => B.ByteString m r -> ConduitT i ByteString m () -fromBStreamProducer = CL.unfoldM B.unconsChunk . void +fromBStreamProducer = CL.unfoldEitherM B.unconsChunk . void -- | Convert a 'Producer' to a 'Stream'. Subject to fusion. -- diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..0882d8f --- /dev/null +++ b/stack.yaml @@ -0,0 +1,6 @@ +resolver: lts-24.3 +packages: + - "." +extra-deps: [] +flags: {} +extra-package-dbs: [] diff --git a/stack.yaml.lock b/stack.yaml.lock new file mode 100644 index 0000000..881149d --- /dev/null +++ b/stack.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/topics/lock_files + +packages: [] +snapshots: +- completed: + sha256: aa97dce5253937e4aa56100a0a9dc1f79a554cf543ad7cfab0afe6ed42de2f31 + size: 724941 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/3.yaml + original: lts-24.3 diff --git a/streaming-conduit.cabal b/streaming-conduit.cabal index af3f795..2040c22 100644 --- a/streaming-conduit.cabal +++ b/streaming-conduit.cabal @@ -34,7 +34,7 @@ test-suite conversions build-depends: streaming-conduit , base , conduit - , hspec == 2.4.* + , hspec , streaming hs-source-dirs: test default-language: Haskell2010