Fix some warnings.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
parent
5656f90c27
commit
4ce8a44011
2 changed files with 3 additions and 3 deletions
|
@ -561,7 +561,7 @@ newCursor :: (MonadIO m, MonadBaseControl IO m) => Database -> Collection -> Bat
|
|||
newCursor db col batchSize dBatch = do
|
||||
var <- newMVar dBatch
|
||||
let cursor = Cursor (db <.> col) batchSize var
|
||||
mkWeakMVar var (closeCursor cursor)
|
||||
_ <- mkWeakMVar var (closeCursor cursor)
|
||||
return cursor
|
||||
#if !MIN_VERSION_base(4,6,0)
|
||||
where mkWeakMVar = addMVarFinalizer
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
A pipeline closes itself when a read or write causes an error, so you can detect a broken pipeline by checking isClosed. It also closes itself when garbage collected, or you can close it explicitly. -}
|
||||
|
||||
{-# LANGUAGE DoRec, RecordWildCards, NamedFieldPuns, ScopedTypeVariables #-}
|
||||
{-# LANGUAGE RecursiveDo, RecordWildCards, NamedFieldPuns, ScopedTypeVariables #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module System.IO.Pipeline (
|
||||
|
@ -69,7 +69,7 @@ newPipeline stream = do
|
|||
rec
|
||||
let pipe = Pipeline{..}
|
||||
listenThread <- forkIO (listen pipe)
|
||||
mkWeakMVar vStream $ do
|
||||
_ <- mkWeakMVar vStream $ do
|
||||
killThread listenThread
|
||||
closeStream stream
|
||||
return pipe
|
||||
|
|
Loading…
Reference in a new issue