multiarg-0.28.0.0: Combinators to build command line parsers

Safe HaskellSafe-Inferred
LanguageHaskell98

Multiarg.Option

Description

These types represent options. Option names cannot have a dash as their first or second character, and long option names cannot have an equals sign anywhere in the name.

Synopsis

Documentation

data ShortOpt Source

Short options. Options that are preceded with a single dash on the command line and consist of a single letter. That single letter cannot be a dash. Any other Unicode character is good (including pathological ones like newlines).

makeShortOpt :: Char -> Maybe ShortOpt Source

Creates a short option. Returns Nothing if the character is not valid for a short option.

data LongOpt Source

Long options. Options that are preceded with two dashes on the command line and typically consist of an entire mnemonic word, such as lines. However, anything that is at least one letter long is fine for a long option name. The name must be at least one character long. It cannot have an equal sign anywhere in its name. Otherwise any Unicode character is good (including pathological ones like newlines).

makeLongOpt :: String -> Maybe LongOpt Source

Makes a long option. Returns Nothing if the string is not a valid long option.