From: simonmar Date: Tue, 1 Jun 1999 16:16:37 +0000 (+0000) Subject: [project @ 1999-06-01 16:15:42 by simonmar] X-Git-Tag: Approximately_9120_patches~6170 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6ee2f67e582427f931c21c1fc58f62f8619d40b7;p=ghc-hetmet.git [project @ 1999-06-01 16:15:42 by simonmar] Remove illegal use of layout. --- diff --git a/ghc/lib/std/IO.lhs b/ghc/lib/std/IO.lhs index c05e200..7f5f695 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 0e2a393..d044bf8 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