| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Shrun.Configuration.Data.ConfigPhase
Contents
Description
Higher-Kinded data with type families for "phased-data" approach.
Synopsis
- data ConfigPhase
- type family ConfigPhaseF (p :: ConfigPhase) a where ...
- type family ConfigPhaseMaybeF (p :: ConfigPhase) a where ...
- type family LineTruncF (p :: ConfigPhase) where ...
- type family SwitchF (p :: ConfigPhase) t where ...
Types
data ConfigPhase Source #
Data "phases" related to configuration.
Constructors
| ConfigPhaseArgs | Args phase. |
| ConfigPhaseToml | Toml phase. |
| ConfigPhaseMerged | Merged args + toml phase. |
| ConfigPhaseEnv | Env created from MergedConfig |
Type families
type family ConfigPhaseF (p :: ConfigPhase) a where ... Source #
General type family representing:
- Args: Maybe w/ disable flag
- Toml: Maybe
- Merged: Definite
Equations
| ConfigPhaseF 'ConfigPhaseArgs a = WithDisabled a | |
| ConfigPhaseF 'ConfigPhaseToml a = Maybe a | |
| ConfigPhaseF 'ConfigPhaseMerged a = a | |
| ConfigPhaseF 'ConfigPhaseEnv a = a |
type family ConfigPhaseMaybeF (p :: ConfigPhase) a where ... Source #
General type family representing:
- Args: Maybe w/ disable flag
- Toml: Maybe
- Merged: Maybe
Equations
| ConfigPhaseMaybeF 'ConfigPhaseArgs a = WithDisabled a | |
| ConfigPhaseMaybeF 'ConfigPhaseToml a = Maybe a | |
| ConfigPhaseMaybeF 'ConfigPhaseMerged a = Maybe a | |
| ConfigPhaseMaybeF 'ConfigPhaseEnv a = Maybe a |
type family LineTruncF (p :: ConfigPhase) where ... Source #
Line truncation is truly optional, the default being none.
type family SwitchF (p :: ConfigPhase) t where ... Source #
General type family representing a boolean switch for a type t that
is isomorphic to Bool:
- Args: WithDisabled () (isomorphic to Disabled | Bool)
- Toml: Maybe Bool
- Merged: t
- Env: t
Equations
| SwitchF 'ConfigPhaseArgs _1 = WithDisabled () | |
| SwitchF 'ConfigPhaseToml _1 = Maybe Bool | |
| SwitchF 'ConfigPhaseMerged t = t | |
| SwitchF 'ConfigPhaseEnv t = t |