X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FIO%2FHandle.hs;fp=GHC%2FIO%2FHandle.hs;h=1531b4a27c13d14fc5e181793d9459d83af00e08;hb=0715d6cc14f7a37f3b8c6fb989615e084483948f;hp=5becae8cdb0f424763d7a9d91c1b0134f5cb61fe;hpb=8c689077e1b645cc41fc24b8929b75d8653acca1;p=ghc-base.git diff --git a/GHC/IO/Handle.hs b/GHC/IO/Handle.hs index 5becae8..1531b4a 100644 --- a/GHC/IO/Handle.hs +++ b/GHC/IO/Handle.hs @@ -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