Copyright | (c) 2020-2021 berberman |
---|---|
License | MIT |
Maintainer | berberman <berberman@yandex.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module contains CLI parsers used in executables. Options.Applicative.Simple is re-exported.
Synopsis
- newtype CommunityDBOptions = CommunityDBOptions {}
- communityDBOptionsParser :: Parser CommunityDBOptions
- newtype FilesDBOptions = FilesDBOptions {}
- filesDBOptionsParser :: Parser FilesDBOptions
- newtype HackageDBOptions = HackageDBOptions {}
- hackageDBOptionsParser :: Parser HackageDBOptions
- optFlagAssignmentParser :: Parser (Map PackageName FlagAssignment)
- optFlagReader :: ReadM (String, String, Bool)
- optPackageNameReader :: ReadM PackageName
- optVersionReader :: ReadM Version
- module Options.Applicative.Simple
Load Community DB
newtype CommunityDBOptions Source #
Parsed options for loading [community]
communityDBOptionsParser :: Parser CommunityDBOptions Source #
CLI options parser of CommunityDBOptions
When alpm is enabled, it reads a flag no-alpm-community
;
otherwise it reads a string option community
.
Load files DB
newtype FilesDBOptions Source #
Parsed options for loading FilesDB
filesDBOptionsParser :: Parser FilesDBOptions Source #
CLI options parser of CommunityDBOptions
When alpm is enabled, it reads a flag no-alpm-files
;
otherwise it reads a string option files
.
Load Hackage DB
newtype HackageDBOptions Source #
Parsed options for loading HackageDB
hackageDBOptionsParser :: Parser HackageDBOptions Source #
CLI options parser that reads a string option hackage
.
Parse flags
optFlagAssignmentParser :: Parser (Map PackageName FlagAssignment) Source #
CLI options parser of flag assignments
optFlagReader :: ReadM (String, String, Bool) Source #
Read a flag assignment like package_name:flag_name:true|false
Readers
optPackageNameReader :: ReadM PackageName Source #
Read a PackageName
This function never fails, because it just wraps the input string with mkPackageName
.
optVersionReader :: ReadM Version Source #
Read a Version
This function calls simpleParsec
.
module Options.Applicative.Simple