Hoogle Search
Within LTS Haskell 24.68 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
settingSetDoc :: Setting a -> Maybe SetDocopt-env-conf OptEnvConf.Doc No documentation available.
setting :: HasCallStack => [Builder a] -> Parser aopt-env-conf OptEnvConf.Parser settings are the building blocks of Parsers. setting lets you put together different builders to define what to parse. Here are some common examples:
- Argument
setting [ help "Document your argument" , reader str -- The argument is a string , argument ] :: Parser String
- Switch
setting [ help "Document your switch" , switch True -- The value of the switch when activated , long foo -- "--foo" , short f -- "-f" , value False -- The default value of the switch ] :: Parser Bool
- Option
setting [ help "Document your option" , reader str -- The argument is a string , long foo -- "--foo" , short f -- "-f" , option ] :: Parser String
- Environment Variable
setting [ help "Document your environment variable" , reader str -- The argument is a string , env FOO_BAR ] :: Parser String
- Configuration Value
setting [ help "Document your configuration value" , conf "foo-bar" ] :: Parser String
- Some combination
setting [ help "Document your configuration value" , conf "foo-bar" ] :: Parser String
Note that parsing is always tried in this order when using a combined setting:- Argument
- Switch
- Option
- Environment variable
- Configuration value
- Argument
settingsParser :: HasParser a => Parser aopt-env-conf OptEnvConf.Parser No documentation available.
settingCompleter :: Setting a -> !Maybe Completeropt-env-conf OptEnvConf.Setting No documentation available.
settingConfigVals :: Setting a -> !Maybe (NonEmpty (ConfigValSetting a))opt-env-conf OptEnvConf.Setting Which and how to parse config values
settingDasheds :: Setting a -> ![Dashed]opt-env-conf OptEnvConf.Setting Which dashed values are required for parsing No dashed values means this is an argument.
settingDefaultValue :: Setting a -> !Maybe (a, String)opt-env-conf OptEnvConf.Setting Default value, if none of the above find the setting.
settingEnvVars :: Setting a -> !Maybe (NonEmpty String)opt-env-conf OptEnvConf.Setting Which env vars can be read.
settingExamples :: Setting a -> ![String]opt-env-conf OptEnvConf.Setting Example values
settingHelp :: Setting a -> !Maybe Stringopt-env-conf OptEnvConf.Setting No documentation available.