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.Reader

  • 1 type
  • 12 values

Common readers

4 declarations
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.

valueexists :: Reader Bool
#

Always return True

exists = Reader $ const $ pure True

Constructing your own reader

2 declarations

Comma-separated readers

3 declarations
valuecommaSeparatedSet :: Ord a => Reader a -> Reader (Set a)
#

Like commaSeparated but uses a set type.

Note that this will never parse the empty list, so prefer commaSeparated if you want a more accurately typed function.

Note also that this function throws away any ordering information and ignores any duplicate values.

Internal

3 declarations