HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleopt-env-conf-0.15.0.3Haskell2010

OptEnvConf.Setting

Contents
  1. Builders
  2. Internal
Synopsis
datadata Setting a

A setting for parsing and documenting a single value.

Constructors

Builders

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.

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.

The annotation for any setting reading secrets.

We add these so that we can disable them in settings checks, to avoid failing settings checks when secrets are read at runtime instead of build-time.

Internal