Copyright | 2021 Dominik Schrempf |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creation date: Thu Sep 2 19:17:07 2021.
Synopsis
- seedOpt :: Parser SeedOpt
- executionModeOpt :: Parser ExecutionMode
- data GlobalArguments = GlobalArguments {}
- data Arguments a = Arguments {
- global :: GlobalArguments
- local :: a
- parseArguments :: forall a. Reproducible a => IO (Arguments a)
- elynxParserInfo :: [String] -> [String] -> Parser a -> ParserInfo a
- createCommandReproducible :: forall a b. Reproducible a => (a -> b) -> Mod CommandFields b
- createCommand :: String -> [String] -> [String] -> Parser a -> (a -> b) -> Mod CommandFields b
- elynxFooter :: [Doc]
Command options
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
Argument skeleton to be used with all commands.
Arguments | |
|
Instances
FromJSON a => FromJSON (Arguments a) Source # | |
ToJSON a => ToJSON (Arguments a) Source # | |
Defined in ELynx.Tools.Options | |
Generic (Arguments a) Source # | |
Show a => Show (Arguments a) Source # | |
Reproducible a => Reproducible (Arguments a) Source # | |
Eq a => Eq (Arguments a) Source # | |
type Rep (Arguments a) Source # | |
Defined in ELynx.Tools.Options type Rep (Arguments a) = D1 ('MetaData "Arguments" "ELynx.Tools.Options" "elynx-tools-0.7.1.0-2Fz5ICNg6WtAI9fPqY8P8z" '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.