readIO package:ghc-lib-parser

The readIO function is similar to read except that it signals parse failure to the IO monad instead of terminating the program.