HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleopt-env-conf-0.11.0.0Haskell2010

OptEnvConf.Setting

  • 8 types
  • 34 values
datadata Setting a
#

A setting for parsing and documenting a single value.

Constructors

Builders

27 declarations
valueswitch :: a -> Builder a
#

Try to parse a switch, activate the given value when succesful

You'll also need to add at least one long or short.

Multiple switchs override eachother.

valuereader :: Reader a -> Builder a
#

Declare how to parse an argument, option, or environment variable.

valuestr :: IsString s => Reader s
#

Read a string as-is.

This is the reader you will want to use for reading a String.

This is different from auto for strings because Read wants to parse quotes when parsing Strings.

valueauto :: Read a => Reader a
#

Read via the Read instance

You cannot use this for bare strings, because Read for strings parses quotes.

valuelong :: String -> Builder a
#

Try to parse this long option or switch.

long "foo" corresponds to --foo

Notes: * Parsing options with an empty name in the long is not supported. * Parsing options with an = sign in the long is not supported.

Multiple longs will be tried in order. Empty longs will be ignored.

valuevalue :: Show a => a -> Builder a
#

Set the default value

Multiple values override eachother.

API Note: default is not a valid identifier in Haskell. I'd also have preferred default instead.

valuehidden :: Builder a
#

Don't show this setting in documentation

Multiple hiddens are redundant.

Internal

12 declarations