summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ghc/lib/std/PrelHandle.lhs3
-rw-r--r--ghc/lib/std/PrelIO.lhs14
2 files changed, 5 insertions, 12 deletions
diff --git a/ghc/lib/std/PrelHandle.lhs b/ghc/lib/std/PrelHandle.lhs
index f5d51b8897..2e46e84a0d 100644
--- a/ghc/lib/std/PrelHandle.lhs
+++ b/ghc/lib/std/PrelHandle.lhs
@@ -1,5 +1,5 @@
% ------------------------------------------------------------------------------
-% $Id: PrelHandle.lhs,v 1.59 2000/07/07 11:03:58 simonmar Exp $
+% $Id: PrelHandle.lhs,v 1.60 2000/07/25 15:20:10 simonmar Exp $
%
% (c) The AQUA Project, Glasgow University, 1994-2000
%
@@ -416,7 +416,6 @@ hClose handle =
-- associated with this handle.
else do freeBuffers (haBuffers__ handle_)
return (handle_{ haType__ = ClosedHandle,
- haFO__ = nullFile__,
haBuffers__ = [] })
\end{code}
diff --git a/ghc/lib/std/PrelIO.lhs b/ghc/lib/std/PrelIO.lhs
index 944ed19639..e93410ffd1 100644
--- a/ghc/lib/std/PrelIO.lhs
+++ b/ghc/lib/std/PrelIO.lhs
@@ -1,5 +1,5 @@
% ------------------------------------------------------------------------------
-% $Id: PrelIO.lhs,v 1.14 2000/07/07 11:03:58 simonmar Exp $
+% $Id: PrelIO.lhs,v 1.15 2000/07/25 15:20:10 simonmar Exp $
%
% (c) The University of Glasgow, 1992-2000
%
@@ -282,9 +282,7 @@ lazyReadBlock handle fo = do
-1 -> -- an error occurred, close the handle
withHandle handle $ \ handle_ -> do
closeFile (haFO__ handle_) 0{-don't bother flushing-} -- ConcHask: SAFE, won't block.
- return (handle_ { haType__ = ClosedHandle,
- haFO__ = nullFile__ },
- "")
+ return (handle_ { haType__ = ClosedHandle }, "")
_ -> do
more <- unsafeInterleaveIO (lazyReadBlock handle fo)
stToIO (unpackNBytesAccST buf bytes more)
@@ -298,9 +296,7 @@ lazyReadLine handle fo = do
-1 -> -- an error occurred, close the handle
withHandle handle $ \ handle_ -> do
closeFile (haFO__ handle_) 0{- don't bother flushing-} -- ConcHask: SAFE, won't block
- return (handle_ { haType__ = ClosedHandle,
- haFO__ = nullFile__ },
- "")
+ return (handle_ { haType__ = ClosedHandle }, "")
_ -> do
more <- unsafeInterleaveIO (lazyReadLine handle fo)
buf <- getBufStart fo bytes -- ConcHask: won't block
@@ -318,9 +314,7 @@ lazyReadChar handle fo = do
-1 -> -- error, silently close handle.
withHandle handle $ \ handle_ -> do
closeFile (haFO__ handle_) 0{-don't bother flusing-} -- ConcHask: SAFE, won't block
- return (handle_{ haType__ = ClosedHandle,
- haFO__ = nullFile__ },
- "")
+ return (handle_{ haType__ = ClosedHandle }, "")
_ -> do
more <- unsafeInterleaveIO (lazyReadChar handle fo)
return (chr char : more)