Skip to content

Commit

Permalink
Improve documentation for echo. Fixes #203
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriella439 committed Dec 30, 2016
1 parent efc31b6 commit ba9c992
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Turtle/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -781,11 +781,15 @@ inshellWithErr
-- ^ Lines of either standard output (`Right`) or standard error (`Left`)
inshellWithErr cmd = streamWithErr (Process.shell (unpack cmd))

-- | Print to @stdout@
{-| Print exactly one line to @stdout@
To print more than one line see `Turtle.Format.printf`, which also supports
formatted output
-}
echo :: MonadIO io => Line -> io ()
echo line = liftIO (Text.putStrLn (lineToText line))

-- | Print to @stderr@
-- | Print exactly one line to @stderr@
err :: MonadIO io => Line -> io ()
err line = liftIO (Text.hPutStrLn IO.stderr (lineToText line))

Expand Down

0 comments on commit ba9c992

Please sign in to comment.