shell-utility-0.0: Utility functions for writing command-line programs

Safe HaskellSafe
LanguageHaskell98

Shell.Utility.Exit

Description

The Exit mechanism is not compositional and thus should not be used in larger long-running programs. However, in small command-line utilities and especially for signaling errors in command-line arguments it is acceptable.

The IO instance is useful for GetOpt and immediate exit. The Either instance is useful for eitherReader.

Documentation

class Applicative f => Exit f where Source #

Methods

exitFailureMsg :: String -> f a Source #

Also known as die in newer versions of base.

Instances
Exit IO Source # 
Instance details

Defined in Shell.Utility.Exit

IsString str => Exit (Either str) Source # 
Instance details

Defined in Shell.Utility.Exit

Methods

exitFailureMsg :: String -> Either str a Source #