Skip to content
Snippets Groups Projects
Commit 52ffbe35 authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 2000-06-14 10:08:47 by simonmar]

Fix mondo bogosity in hGetLine, probably caused by cut-n-pasting with eyes shut.
parent 9a826286
No related merge requests found
......@@ -140,12 +140,12 @@ hGetChar handle = do
hGetLine :: Handle -> IO String
hGetLine h = do
buffer_mode <- wantWriteableHandle_ "hGetLine" h
(\ handle_ -> do getBuffer handle_)
buffer_mode <- wantReadableHandle "hGetLine" h
(\ handle_ -> do return (haBufferMode__ handle_))
case buffer_mode of
(NoBuffering, _, _) -> hGetLineUnBuffered h
(LineBuffering, buf, bsz) -> hGetLineBuf' []
(BlockBuffering _, buf, bsz) -> hGetLineBuf' []
NoBuffering -> hGetLineUnBuffered h
LineBuffering -> hGetLineBuf' []
BlockBuffering _ -> hGetLineBuf' []
where hGetLineBuf' xss = do
(eol, xss) <- catch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment