| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Shrun.Configuration.Toml.Legend
Description
Provides types for the legend.
Documentation
Holds a map key/val pair. The maintained invariants are:
keyis non-empty.valis non-empty.- all
v_iinvalare non-empty.
Bundled Patterns
| pattern MkKeyVal :: Text -> NESeq Text -> KeyVal | Unidirectional pattern synonym for |
Instances
| Show KeyVal Source # | |
| Eq KeyVal Source # | |
| DecodeTOML KeyVal Source # | |
Defined in Shrun.Configuration.Toml.Legend Methods | |
| (k ~ A_Getter, a ~ Text, b ~ Text) => LabelOptic "key" k KeyVal KeyVal a b Source # | |
Defined in Shrun.Configuration.Toml.Legend | |
| (k ~ A_Getter, a ~ NESeq Text, b ~ NESeq Text) => LabelOptic "val" k KeyVal KeyVal a b Source # | |
Defined in Shrun.Configuration.Toml.Legend | |
mkKeyVal :: Text -> List Text -> Maybe KeyVal Source #
Smart constructor for KeyVal. Given UnsafeKeyVal key vals, all
conditions must be satisfied for success:
keyis non-empty.valsis non-empty.- all
v_iinvalsare non-empty.
unsafeKeyVal :: HasCallStack => Text -> List Text -> KeyVal Source #
Variant of UnsafeKeyVal that throws an error on failures.