cardano-cli
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.CLI.Option.Flag.Type

Synopsis

Documentation

data Flag a Source #

A flag that can be used in the command line interface.

It contains information about how to render the flag, its long name, its content, and its value. The type variable a represents the type of the value that the flag holds.

The reason for this type instead of using 'Parser a' directly is to allow for more complex parsing logic, such as handling default values.

Constructors

Flag 

Instances

Instances details
Generic (Flag a) Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

Associated Types

type Rep (Flag a) 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

type Rep (Flag a) = D1 ('MetaData "Flag" "Cardano.CLI.Option.Flag.Type" "cardano-cli-10.9.0.0-inplace" 'False) (C1 ('MetaCons "Flag" 'PrefixI 'True) ((S1 ('MetaSel ('Just "longName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "format") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :*: (S1 ('MetaSel ('Just "options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FlagOptions) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))

Methods

from :: Flag a -> Rep (Flag a) x Source #

to :: Rep (Flag a) x -> Flag a Source #

Show a => Show (Flag a) Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

Methods

showsPrec :: Int -> Flag a -> ShowS Source #

show :: Flag a -> String Source #

showList :: [Flag a] -> ShowS Source #

Eq a => Eq (Flag a) Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

Methods

(==) :: Flag a -> Flag a -> Bool Source #

(/=) :: Flag a -> Flag a -> Bool Source #

type Rep (Flag a) Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

type Rep (Flag a) = D1 ('MetaData "Flag" "Cardano.CLI.Option.Flag.Type" "cardano-cli-10.9.0.0-inplace" 'False) (C1 ('MetaCons "Flag" 'PrefixI 'True) ((S1 ('MetaSel ('Just "longName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "format") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :*: (S1 ('MetaSel ('Just "options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FlagOptions) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))

data Defaultness Source #

Constructors

IsDefault 
NonDefault 

Instances

Instances details
Generic Defaultness Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

Associated Types

type Rep Defaultness 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

type Rep Defaultness = D1 ('MetaData "Defaultness" "Cardano.CLI.Option.Flag.Type" "cardano-cli-10.9.0.0-inplace" 'False) (C1 ('MetaCons "IsDefault" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonDefault" 'PrefixI 'False) (U1 :: Type -> Type))
Show Defaultness Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

Eq Defaultness Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

type Rep Defaultness Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

type Rep Defaultness = D1 ('MetaData "Defaultness" "Cardano.CLI.Option.Flag.Type" "cardano-cli-10.9.0.0-inplace" 'False) (C1 ('MetaCons "IsDefault" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonDefault" 'PrefixI 'False) (U1 :: Type -> Type))

newtype FlagOptions Source #

Options for a flag that control how it is rendered and parsed.

Constructors

FlagOptions 

Fields

Instances

Instances details
Generic FlagOptions Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

Associated Types

type Rep FlagOptions 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

type Rep FlagOptions = D1 ('MetaData "FlagOptions" "Cardano.CLI.Option.Flag.Type" "cardano-cli-10.9.0.0-inplace" 'True) (C1 ('MetaCons "FlagOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "isDefault") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Defaultness)))
Show FlagOptions Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

Eq FlagOptions Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

type Rep FlagOptions Source # 
Instance details

Defined in Cardano.CLI.Option.Flag.Type

type Rep FlagOptions = D1 ('MetaData "FlagOptions" "Cardano.CLI.Option.Flag.Type" "cardano-cli-10.9.0.0-inplace" 'True) (C1 ('MetaCons "FlagOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "isDefault") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Defaultness)))