transformers-except-0.1.2: An Except monad transformer with
Safe HaskellSafe-Inferred
LanguageHaskell98

Control.Monad.Trans.Except.Exit

Synopsis

Documentation

orDie :: (e -> Text) -> ExceptT e IO a -> IO a Source #

orDieWithCode with an exit code of 1 in case of an error

orDieWithCode :: Int -> (e -> Text) -> ExceptT e IO a -> IO a Source #

An idiom for failing hard on EitherT errors.

  • This really dies*. There is no other way to say it.

The reason it lives with command line parser tooling, is that it is the only valid place to actually exit like this. Be appropriately wary.