Use this module if you like to write simple scripts with String
-based
errors, but you prefer to use EitherT
to handle errors rather than
Control.Exception
.
import Control.Error
main = runScript $ do
str <- scriptIO getLine
n <- tryRead "Read failed" str
scriptIO $ print (n + 1)