lambda-options-1.0.2.0: Declarative command-line parser using type-driven pattern matching.

Safe HaskellSafe
LanguageHaskell2010

Text.LambdaOptions.Keyword

Description

Data definition for option keywords.

Synopsis

Documentation

data Keyword Source #

An option keyword, such as "--help"

Constructors

Keyword 

Fields

  • kwNames :: [String]

    All the aliases for this keyword.

  • kwArgText :: String

    Text to describe the arguments to the option given by this keyword.

  • kwText :: String

    Text to describe the function of the option given by this keyword.

Instances
Eq Keyword Source # 
Instance details

Defined in Text.LambdaOptions.Keyword

Methods

(==) :: Keyword -> Keyword -> Bool #

(/=) :: Keyword -> Keyword -> Bool #

Data Keyword Source # 
Instance details

Defined in Text.LambdaOptions.Keyword

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Keyword -> c Keyword #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Keyword #

toConstr :: Keyword -> Constr #

dataTypeOf :: Keyword -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Keyword) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Keyword) #

gmapT :: (forall b. Data b => b -> b) -> Keyword -> Keyword #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Keyword -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Keyword -> r #

gmapQ :: (forall d. Data d => d -> u) -> Keyword -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Keyword -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Keyword -> m Keyword #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Keyword -> m Keyword #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Keyword -> m Keyword #

Ord Keyword Source # 
Instance details

Defined in Text.LambdaOptions.Keyword

Show Keyword Source # 
Instance details

Defined in Text.LambdaOptions.Keyword

IsString Keyword Source # 
Instance details

Defined in Text.LambdaOptions.Keyword

Methods

fromString :: String -> Keyword #

ToKeyword Keyword Source #

Identiy mapping.

Instance details

Defined in Text.LambdaOptions.Keyword

class ToKeyword a where Source #

Convenience Keyword creation class.

Methods

toKeyword :: a -> Keyword Source #

Instances
ToKeyword () Source #

Used to create an empty Keyword with no aliases.

Instance details

Defined in Text.LambdaOptions.Keyword

Methods

toKeyword :: () -> Keyword Source #

ToKeyword String Source #

Used to create a Keyword with a single alias.

Instance details

Defined in Text.LambdaOptions.Keyword

ToKeyword Keyword Source #

Identiy mapping.

Instance details

Defined in Text.LambdaOptions.Keyword

ToKeyword [String] Source #

Used to create a Keyword with many (or no) aliases

Instance details

Defined in Text.LambdaOptions.Keyword

kw :: ToKeyword a => a -> Keyword Source #

Shorthand for toKeyword.

argText :: Keyword -> String -> Keyword Source #

Sets the kwArgText field in the keyword. Intended to be used infix:

kw "--directory" `argText` "DIR" `text` "Write files to DIR."

text :: Keyword -> String -> Keyword Source #

Sets the kwText field in the keyword. Intended to be used infix.

kw "--quiet" `text` "Suppress message display."