The
readLn function combines
getLine and
readIO.
This operation may fail with the same errors as
getLine and
readIO.
Examples
>>> fmap (+ 5) readLn
> 25
30
>>> readLn :: IO String
> this is not a string literal
*** Exception: user error (Prelude.readIO: no parse)