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

Moduleenvparse-0.6.0Haskell2010

Env.Internal.Parser

Synopsis
  • 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

valuedef :: a -> Mod Var a

The default value of the variable

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

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.