From 6ee2f67e582427f931c21c1fc58f62f8619d40b7 Mon Sep 17 00:00:00 2001 From: simonmar <unknown> Date: Tue, 1 Jun 1999 16:16:37 +0000 Subject: [PATCH] [project @ 1999-06-01 16:15:42 by simonmar] Remove illegal use of layout. --- ghc/lib/std/IO.lhs | 2 +- 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 c05e200db914..7f5f6957057d 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 0e2a393c82e2..d044bf850a69 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 -- GitLab