Commit 1b12b2eb authored by Ian Lynagh's avatar Ian Lynagh

Fix some "warn-unused-do-bind" warnings where we want to ignore the value

parent 5480a97f
......@@ -430,7 +430,7 @@ runInUnboundThread action = do
if bound
then do
mv <- newEmptyMVar
forkIO (Exception.try action >>= putMVar mv)
_ <- forkIO (Exception.try action >>= putMVar mv)
takeMVar mv >>= \ei -> case ei of
Left exception -> Exception.throw (exception :: SomeException)
Right result -> return result
......
......@@ -69,7 +69,7 @@ emptySampleVar :: SampleVar a -> IO ()
emptySampleVar v = do
(readers, var) <- takeMVar v
if readers > 0 then do
takeMVar var
_ <- takeMVar var
putMVar v (0,var)
else
putMVar v (readers,var)
......
......@@ -147,7 +147,7 @@ hSetFileSize handle size =
hIsEOF :: Handle -> IO Bool
hIsEOF handle =
catch
(do hLookAhead handle; return False)
(hLookAhead handle >> return False)
(\e -> if isEOFError e then return True else ioError e)
-- ---------------------------------------------------------------------------
......@@ -668,7 +668,7 @@ dupHandleTo filepath h other_side
case cast devTo of
Nothing -> ioe_dupHandlesNotCompatible h
Just dev' -> do
IODevice.dup2 dev dev'
_ <- IODevice.dup2 dev dev'
FileHandle _ m <- dupHandle_ dev' filepath other_side h_ mb_finalizer
takeMVar m
......
......@@ -155,7 +155,8 @@ withArgv new_args act = do
pName <- System.Environment.getProgName
existing_args <- System.Environment.getArgs
bracket (setArgs new_args)
(\argv -> do setArgs (pName:existing_args); freeArgv argv)
(\argv -> do _ <- setArgs (pName:existing_args)
freeArgv argv)
(const act)
freeArgv :: Ptr CString -> IO ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment