From efb0235251634f3af28aad3903437c0b45924c6d Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Thu, 29 Jan 2015 19:55:39 -0800 Subject: [PATCH] Renamed `readLine` to `readline` --- src/Turtle/Prelude.hs | 6 +++--- src/Turtle/Tutorial.hs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Turtle/Prelude.hs b/src/Turtle/Prelude.hs index 89106b2..cfd7a78 100644 --- a/src/Turtle/Prelude.hs +++ b/src/Turtle/Prelude.hs @@ -100,7 +100,7 @@ module Turtle.Prelude ( , shell , echo , err - , readLine + , readline #if MIN_VERSION_base(4,7,0) , export , unset @@ -312,8 +312,8 @@ err = Text.hPutStrLn IO.stderr Returns `Nothing` if at end of input -} -readLine :: IO (Maybe Text) -readLine = do +readline :: IO (Maybe Text) +readline = do eof <- IO.isEOF if eof then return Nothing diff --git a/src/Turtle/Tutorial.hs b/src/Turtle/Tutorial.hs index 35d21eb..a215489 100644 --- a/src/Turtle/Tutorial.hs +++ b/src/Turtle/Tutorial.hs @@ -840,7 +840,7 @@ import Turtle -- `Shell`: -- -- @ --- Prelude Turtle> view (`liftIO` readLine) +-- Prelude Turtle> view (`liftIO` readline) -- ABC\ -- Just \"ABC\" -- @