diff options
| -rw-r--r-- | ghc/lib/std/IO.lhs | 2 | ||||
| -rw-r--r-- | ghc/lib/std/PrelHandle.lhs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ghc/lib/std/IO.lhs b/ghc/lib/std/IO.lhs index c05e200db9..7f5f695705 100644 --- a/ghc/lib/std/IO.lhs +++ b/ghc/lib/std/IO.lhs @@ -252,7 +252,7 @@ character is available. \begin{code} hLookAhead :: Handle -> IO Char -hLookAhead handle = do +hLookAhead handle = wantReadableHandle "hLookAhead" handle $ \ handle_ -> do let fo = haFO__ handle_ intc <- mayBlock fo (CCALL(fileLookAhead) fo) -- ConcHask: UNSAFE, may block diff --git a/ghc/lib/std/PrelHandle.lhs b/ghc/lib/std/PrelHandle.lhs index 0e2a393c82..d044bf850a 100644 --- a/ghc/lib/std/PrelHandle.lhs +++ b/ghc/lib/std/PrelHandle.lhs @@ -892,7 +892,7 @@ hGetEcho handle = do hIsTerminalDevice :: Handle -> IO Bool hIsTerminalDevice handle = do withHandle handle $ \ handle_ -> do - case haType__ handle_ of + case haType__ handle_ of ErrorHandle theError -> do writeHandle handle handle_ ioError theError @@ -916,8 +916,8 @@ hConnectTo :: Handle -> Handle -> IO () hConnectTo hW hR = hConnectHdl_ hW hR 0{-connect regardless-} hConnectHdl_ :: Handle -> Handle -> Int -> IO () -hConnectHdl_ hW hR is_tty = - wantRWHandle "hConnectTo" hW $ \ hW_ -> do +hConnectHdl_ hW hR is_tty = + wantRWHandle "hConnectTo" hW $ \ hW_ -> wantRWHandle "hConnectTo" hR $ \ hR_ -> do CCALL(setConnectedTo) (haFO__ hR_) (haFO__ hW_) is_tty -- ConcHask: SAFE, won't block writeHandle hR hR_ @@ -1049,7 +1049,7 @@ the Handle contains.. \begin{code} getHandleFd :: Handle -> IO Int -getHandleFd handle = do +getHandleFd handle = withHandle handle $ \ handle_ -> do case (haType__ handle_) of ErrorHandle theError -> do |
