Skip to content

Commit 5f04dc6

Browse files
Remove use of conduit Producer and Consumer.
Due to deprecations: "Deprecated: Use ConduitT directly".
1 parent c03e1ed commit 5f04dc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Database/MongoDB/GridFS.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ putChunk :: (Monad m, MonadIO m) => Bucket -> ObjectId -> Int -> L.ByteString ->
110110
putChunk bucket files_id i chunk = do
111111
insert_ (chunks bucket) ["files_id" =: files_id, "n" =: i, "data" =: Binary (L.toStrict chunk)]
112112

113-
sourceFile :: (Monad m, MonadIO m) => File -> Producer (Action m) S.ByteString
113+
sourceFile :: (Monad m, MonadIO m) => File -> ConduitT i S.ByteString (Action m) ()
114114
-- ^ A producer for the contents of a file
115115
sourceFile file = yieldChunk 0 where
116116
yieldChunk i = do
@@ -179,7 +179,7 @@ writeChunks (FileWriter chunkSize bucket files_id i size acc md5context md5acc)
179179
putChunk bucket files_id i chunk
180180
writeChunks (FileWriter chunkSize bucket files_id (i+1) size' acc' md5context' md5acc') L.empty
181181

182-
sinkFile :: (Monad m, MonadIO m) => Bucket -> Text -> Consumer S.ByteString (Action m) File
182+
sinkFile :: (Monad m, MonadIO m) => Bucket -> Text -> ConduitT S.ByteString o (Action m) File
183183
-- ^ A consumer that creates a file in the bucket and puts all consumed data in it
184184
sinkFile bucket filename = do
185185
files_id <- liftIO $ genObjectId

0 commit comments

Comments
 (0)