elynx-tools-0.6.1.0: Tools for ELynx
Copyright(c) 2021 Dominik Schrempf
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Tools.Options

Description

Creation date: Thu Sep 2 19:17:07 2021.

Synopsis

Command options

seedOpt :: Parser SeedOpt Source #

Seed option for MWC. Defaults to Random.

executionModeOpt :: Parser ExecutionMode Source #

Execution mode option parser.

Arguments

data GlobalArguments Source #

A set of global arguments used by all programs. The idea is to provide a common framework for shared arguments.

Instances

Instances details
Eq GlobalArguments Source # 
Instance details

Defined in ELynx.Tools.Options

Show GlobalArguments Source # 
Instance details

Defined in ELynx.Tools.Options

Generic GlobalArguments Source # 
Instance details

Defined in ELynx.Tools.Options

Associated Types

type Rep GlobalArguments :: Type -> Type #

ToJSON GlobalArguments Source # 
Instance details

Defined in ELynx.Tools.Options

FromJSON GlobalArguments Source # 
Instance details

Defined in ELynx.Tools.Options

type Rep GlobalArguments Source # 
Instance details

Defined in ELynx.Tools.Options

type Rep GlobalArguments = D1 ('MetaData "GlobalArguments" "ELynx.Tools.Options" "elynx-tools-0.6.1.0-AWjKNFEpQDhHVmYwSmmoU2" 'False) (C1 ('MetaCons "GlobalArguments" 'PrefixI 'True) ((S1 ('MetaSel ('Just "verbosity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Verbosity) :*: S1 ('MetaSel ('Just "outFileBaseName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath))) :*: (S1 ('MetaSel ('Just "executionMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExecutionMode) :*: S1 ('MetaSel ('Just "writeElynxFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

data Arguments a Source #

Argument skeleton to be used with all commands.

Constructors

Arguments 

Fields

Instances

Instances details
Eq a => Eq (Arguments a) Source # 
Instance details

Defined in ELynx.Tools.Options

Methods

(==) :: Arguments a -> Arguments a -> Bool #

(/=) :: Arguments a -> Arguments a -> Bool #

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

Defined in ELynx.Tools.Options

Generic (Arguments a) Source # 
Instance details

Defined in ELynx.Tools.Options

Associated Types

type Rep (Arguments a) :: Type -> Type #

Methods

from :: Arguments a -> Rep (Arguments a) x #

to :: Rep (Arguments a) x -> Arguments a #

ToJSON a => ToJSON (Arguments a) Source # 
Instance details

Defined in ELynx.Tools.Options

FromJSON a => FromJSON (Arguments a) Source # 
Instance details

Defined in ELynx.Tools.Options

Reproducible a => Reproducible (Arguments a) Source # 
Instance details

Defined in ELynx.Tools.Options

type Rep (Arguments a) Source # 
Instance details

Defined in ELynx.Tools.Options

type Rep (Arguments a) = D1 ('MetaData "Arguments" "ELynx.Tools.Options" "elynx-tools-0.6.1.0-AWjKNFEpQDhHVmYwSmmoU2" 'False) (C1 ('MetaCons "Arguments" 'PrefixI 'True) (S1 ('MetaSel ('Just "global") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GlobalArguments) :*: S1 ('MetaSel ('Just "local") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Misc

parseArguments :: forall a. Reproducible a => IO (Arguments a) Source #

Parse arguments. Provide a global description, header, footer, and so on. Custom additional description (first argument) and footer (second argument) can be provided. print help if needed.

elynxParserInfo :: [String] -> [String] -> Parser a -> ParserInfo a Source #

ELynx parser info; convenience function.

createCommandReproducible :: forall a b. Reproducible a => (a -> b) -> Mod CommandFields b Source #

Create a command; convenience function.

createCommand :: String -> [String] -> [String] -> Parser a -> (a -> b) -> Mod CommandFields b Source #

Create a command; convenience function.

elynxFooter :: [Doc] Source #

Global ELynx footer.