harg-0.4.2.0: Haskell program configuration using higher kinded data

Safe HaskellSafe
LanguageHaskell2010

Options.Harg.Types

Synopsis

Documentation

data Opt a Source #

The basic option type

Constructors

Opt 

Fields

Instances
Functor Opt Source # 
Instance details

Defined in Options.Harg.Types

Methods

fmap :: (a -> b) -> Opt a -> Opt b #

(<$) :: a -> Opt b -> Opt a #

data OptionOpt (attr :: [OptAttr]) a Source #

Option for flags with arguments. Corresponds to option.

data FlagOpt (attr :: [OptAttr]) a Source #

Option for flags that act like switches between a default and an active value. Corresponds to flag.

data ArgumentOpt (attr :: [OptAttr]) a Source #

Option for arguments (no long/short specifiers). Corresponds to argument.

data OptType a Source #

Option types

Constructors

OptionOptType 
FlagOptType a

a is the active value for the flag parser

ArgumentOptType 
Instances
Functor OptType Source # 
Instance details

Defined in Options.Harg.Types

Methods

fmap :: (a -> b) -> OptType a -> OptType b #

(<$) :: a -> OptType b -> OptType a #

data SomeOpt where Source #

Existential wrapper for Opt, so that many options can be carried in a list.

Constructors

SomeOpt :: Opt a -> SomeOpt 

data HargCtx Source #

Context to carry around, that contains environment variables and command line arguments.

Constructors

HargCtx 

Fields

type Environment = [(String, String)] Source #

Environment variable pairs, can be retrieved with getEnvironment.