HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleenvparse-0.6.0Haskell2010

Env.Internal.Parser

  • 6 types
  • 1 class
  • 18 values
  • Packageenvparse-0.6.0
  • Exports25
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceParser.hs
newtypenewtype Mod (t :: Type -> Type) a
#

This represents a modification of the properties of a particular Parser. Combine them using the Monoid instance.

Constructors

  • Mod (t a -> t a)
Instances2Semigroup, Monoid
  • Semigroup (Mod t a)Defined in envparse-0.6.0 · Env.Internal.Parser
  • Monoid (Mod t a)Defined in envparse-0.6.0 · Env.Internal.Parser
typetype Reader e a = String -> Either e a
#

An environment variable's value parser. Use (<=<) and (>=>) to combine these

valuesplitOn :: Char -> Reader e [String]
#

The reader that splits a string into a list of strings consuming the separator.

valuedef :: a -> Mod Var a
#

The default value of the variable

Note: specifying it means the parser won't ever fail.

valueshowDef :: Show a => Mod Var a
#

Use the Show instance to show the default value of the variable in help.

valueflag
  1. :: a

    default value

  2. -> a

    active value

  3. -> String
  4. -> Mod Flag a
  5. -> Parser e a
#

A flag that takes the active value if the environment variable is set and non-empty and the default value otherwise

Note: this parser never fails.

datadata Flag a
#

Flag metadata

Instances1HasHelp
  • HasHelp FlagDefined in envparse-0.6.0 · Env.Internal.Parser
classclass HasHelp (t :: Type -> Type) where
#

A class of things that can have a help message attached to them

Instances2HasHelp
  • HasHelp FlagDefined in envparse-0.6.0 · Env.Internal.Parser
  • HasHelp VarDefined in envparse-0.6.0 · Env.Internal.Parser
valuesensitive :: Parser e a -> Parser e a
#

Mark the enclosed variables as sensitive to remove them from the environment once they've been parsed successfully.