From ec8dac9d4d011593623c99380858ceedd36f5139 Mon Sep 17 00:00:00 2001 From: sof Date: Sun, 18 May 1997 04:19:21 +0000 Subject: [PATCH] [project @ 1997-05-18 04:19:21 by sof] getLine defined in terms of hGetLine --- ghc/lib/ghc/PrelIO.lhs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ghc/lib/ghc/PrelIO.lhs b/ghc/lib/ghc/PrelIO.lhs index 0d99d24..24bf95b 100644 --- a/ghc/lib/ghc/PrelIO.lhs +++ b/ghc/lib/ghc/PrelIO.lhs @@ -43,10 +43,7 @@ getChar :: IO Char getChar = hGetChar stdin getLine :: IO String -getLine = do c <- getChar - if c == '\n' then return "" else - do s <- getLine - return (c:s) +getLine = hGetLine stdin getContents :: IO String getContents = hGetContents stdin -- 1.7.10.4