console-program-0.2.0.1: Interprets the command line and a config file as commands and options

System.Console.Action

Synopsis

Documentation

data Action c Source

An Action s is an IO action, which may take arguments ("non-options") from the command line, and which may use a configuration of type s.

simple :: IO () -> Action cSource

A simple action, taking no argument.

withArgument :: Type x -> (x -> Action c) -> Action cSource

Create an action that takes an argument (non-option).

The type of argument is specified by the first parameter; such values can be obtained from the module System.Console.Argument.

usingConfiguration :: (c -> Action c) -> Action cSource

Create an action that depends on the program configuration (determined by the configuration file and command line arguments).