HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleerrors-2.3.0Haskell98

Control.Error.Script

Use this module if you like to write simple scripts with Text-based errors, but you prefer to use ExceptT 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)
  • 1 type
  • 2 values
  • Packageerrors-2.3.0
  • Exports3
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceScript.hs

The Script Monad

3 declarations