descriptive-0.1.1: Self-describing consumers/parsers; forms, cmd-line args, JSON, etc.

Safe HaskellSafe-Inferred
LanguageHaskell98

Descriptive.Options

Contents

Description

Command-line options parser.

Synopsis

Combinators

anyString :: Text -> Consumer [Text] Option Text Source

Consume one argument from the argument list.

constant :: Text -> Consumer [Text] Option Text Source

Consume one argument from the argument list.

flag :: Text -> Text -> Consumer [Text] Option Bool Source

Find a short boolean flag.

prefix :: Text -> Text -> Consumer [Text] Option Text Source

Find an argument prefixed by -X.

arg :: Text -> Text -> Consumer [Text] Option Text Source

Find a named argument.

Description

data Option Source

Description of a commandline option.

Instances

textDescription :: Description Option -> Text Source

Make a text description of the command line options.

textOpt :: Option -> Text Source

Make a text description of an option.