Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Documentation
orDie :: (e -> Text) -> EitherT e IO a -> IO a Source #
orDieWithCode with an exit code of 1 in case of an error
orDieWithCode :: Int -> (e -> Text) -> EitherT 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.