Safe Haskell | None |
---|---|
Language | GHC2021 |
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.
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
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
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
SwitchF 'ConfigPhaseArgs _1 = WithDisabled () | |
SwitchF 'ConfigPhaseToml _1 = Maybe Bool | |
SwitchF 'ConfigPhaseMerged t = t | |
SwitchF 'ConfigPhaseEnv t = t |