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

System.Console.Argument

Contents

Synopsis

Documentation

data Type a Source

Constructors

Type 

Instances

Argument types

optionalSource

Arguments

:: a

Default value.

-> Type a 
-> Type a 

string :: Type StringSource

A plain string.

boolean :: Type BoolSource

A boolean. Argument can be "1","0","true","false","on","off".

directory :: Type FilePathSource

A directory path. A trailing slash is stripped, if present.

file :: Type FilePathSource

A file path.

device :: Type FilePathSource

A device path.

natural :: Type IntegerSource

A natural number (in decimal).

integer :: Type IntegerSource

An integer number (in decimal).

Option descriptions

optionSource

Arguments

:: (a -> s)

Function that creates a setting (of type s) from the option argument.

-> [Char]

List of short option characters.

-> [String]

List of long option strings.

-> Type a

Type of option argument.

-> String

Description.

-> OptDescr (Either String s)

The resulting option description.

Create an option description.