diff --git a/conduit-resumablesink.cabal b/conduit-resumablesink.cabal index 70f81b2..355cd0e 100644 --- a/conduit-resumablesink.cabal +++ b/conduit-resumablesink.cabal @@ -1,5 +1,5 @@ Name: conduit-resumablesink -Version: 0.1.1 +Version: 0.1.1.0 Synopsis: Allows conduit to resume sinks to feed multiple sources into it. Description: @conduit-resumablesink@ is a solution to the problem where you have a @conduit@ @@ -20,7 +20,7 @@ Library Exposed-modules: Data.Conduit.ResumableSink Build-depends: base >= 4 && < 5, - conduit >= 1.0.5 && <1.1, + conduit >= 1.1 && <1.2, void >= 0.6 && < 0.7 ghc-options: -Wall @@ -34,6 +34,7 @@ test-suite test hspec >= 1.3, bytestring, void, + resourcet, transformers ghc-options: -Wall diff --git a/test/main.hs b/test/main.hs index d8c6596..80e0210 100644 --- a/test/main.hs +++ b/test/main.hs @@ -4,16 +4,17 @@ import qualified Data.Conduit.List as C import Data.Conduit.ResumableSink import Data.IORef import Control.Monad.IO.Class +import Control.Monad.Trans.Resource as R main :: IO () main = hspec $ describe "use resumable sink" $ do it "behaves like normal conduit when -++$$ used immediately" $ do - r <- C.runResourceT $ + r <- R.runResourceT $ C.sourceList ["hello", "world"] -++$$ newResumableSink C.consume r `shouldBe` ["hello", "world"] it "sink can be resumed" $ do - r <- C.runResourceT $ do + r <- R.runResourceT $ do Right r1 <- C.sourceList ["hello", "world"] +$$ C.consume C.sourceList ["hello", "world"] -++$$ r1 r `shouldBe` ["hello", "world", "hello", "world"] @@ -22,7 +23,7 @@ main = hspec $ describe "use resumable sink" $ do s <- newIORef (0 :: Int, 0 :: Int, 0 :: Int) let clean f _ = liftIO $ modifyIORef s f - r <- C.runResourceT $ do + r <- R.runResourceT $ do Right r1 <- C.addCleanup (clean incA) (C.sourceList ["hello", "world"]) +$$ C.addCleanup (clean incC) C.consume