| Safe Haskell | Safe-Infered |
|---|
Control.Error.Script
Contents
Description
Use this module if you like to write simple scripts, but you prefer to use
EitherT to handle errors rather than Control.Exception.
import Control.Error
main = runScript $ do
str <- tryIO getLine
n <- tryRead "Read failed" str
tryIO $ print (n + 1)