Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/src/prelude/PreludeIO/GetLine.hs
module Prelude where getLine :: IO String getLine = do c <- getChar if c == '\n' then return "" else do s <- getLine return (c:s)