The
readIO function is similar to
read except that it
signals parse failure to the
IO monad instead of terminating
the program.
This operation may fail with:
Examples
>>> fmap (+ 1) (readIO "1")
2
>>> readIO "not quite ()" :: IO ()
*** Exception: user error (Prelude.readIO: no parse)