cmdargs

System.Console.CmdArgs.Implicit.Type

Description

The underlying CmdArgs type.

Synopsis

- data CmdArgs a = CmdArgs {
  - cmdArgsValue :: a
  - cmdArgsHelp :: Maybe String
  - cmdArgsVersion :: Maybe String
  - cmdArgsVerbosity :: Maybe Verbosity
  - cmdArgsPrivate :: CmdArgsPrivate
  }
- cmdArgsHasValue :: CmdArgs a -> Bool
- embed :: a -> CmdArgs a
- reembed :: CmdArgs a -> (a, a -> CmdArgs a)
- data CmdArgsPrivate
- incArgsSeen :: CmdArgs a -> CmdArgs a
- getArgsSeen :: CmdArgs t -> Int

# Documentation

data CmdArgs a

A structure to store the additional data relating to `--help`, `--version`, `--quiet` and `--verbose`.

Constructors

CmdArgs |

Fields

cmdArgsValue :: a

  The underlying value being wrapped.

cmdArgsHelp :: Maybe String

  `Just` if `--help` is given, then gives the help message for display, including a trailing newline.

cmdArgsVersion :: Maybe String

  `Just` if `--version` is given, then gives the version message for display, including a trailing newline.

cmdArgsVerbosity :: Maybe Verbosity

  `Just` if `--quiet` or `--verbose` is given, then gives the verbosity to use.

cmdArgsPrivate :: CmdArgsPrivate

  Private: Only exported due to Haddock limitations.

Instances

Functor CmdArgs |
Typeable1 CmdArgs |
Eq a => Eq (CmdArgs a) |
Data a => Data (CmdArgs a) |
Ord a => Ord (CmdArgs a) |
Show a => Show (CmdArgs a) |

cmdArgsHasValue :: CmdArgs a -> Bool

embed :: a -> CmdArgs a

reembed :: CmdArgs a -> (a, a -> CmdArgs a)

data CmdArgsPrivate

Instances

Eq CmdArgsPrivate |
Data CmdArgsPrivate |
Ord CmdArgsPrivate |
Show CmdArgsPrivate |
Typeable CmdArgsPrivate |

incArgsSeen :: CmdArgs a -> CmdArgs a

getArgsSeen :: CmdArgs t -> Int