HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

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)
Contents
  1. The Script Monad
Synopsis
  • Packageerrors-2.3.0
  • Exports3
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceScript.hs

The Script Monad