omnifmt-0.2.0.1: A pretty-printer wrapper to faciliate ease of formatting during development.

Copyright(c) Henry J. Wylde, 2015
LicenseBSD3
Maintainerpublic@hjwylde.com
Safe HaskellSafe
LanguageHaskell2010

Omnifmt.Exit

Contents

Description

Extra exit utilities.

Synopsis

Exiting

panic :: (MonadError ExitCode m, MonadIO m, MonadLogger m) => String -> m a Source

Panics, logging the error to stderr and exiting fast with 128.

panic_ :: (MonadIO m, MonadLogger m) => String -> m a Source

Panics, logging the error to stderr and exiting fast with 128. Rather than exiting fast using a MonadError, this method uses exitWith (panic_ = runPanic . panic).

runPanic :: MonadIO m => ExceptT ExitCode m a -> m a Source

Runs the panic, calling exitWith if the ExceptT had an error thrown.