| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.Etc.Spec
Synopsis
- data ConfigSpec cmd
- data ConfigValue cmd
- module System.Etc.Internal.Errors
- parseConfigSpec :: MonadThrow m => Text -> m (ConfigSpec ())
- readConfigSpecTH :: (Lift k, FromJSON k) => Proxy k -> Text -> ExpQ
- readConfigSpec :: Text -> IO (ConfigSpec ())
Documentation
data ConfigSpec cmd Source #
Instances
data ConfigValue cmd Source #
Instances
module System.Etc.Internal.Errors
Arguments
| :: MonadThrow m | |
| => Text | Text to be parsed |
| -> m (ConfigSpec ()) | returns ConfigSpec |
Parses a text input into a ConfigSpec, input can be JSON or YAML (if cabal
flag is set).
readConfigSpecTH :: (Lift k, FromJSON k) => Proxy k -> Text -> ExpQ Source #
Reads a specified FilePath and parses a ConfigSpec at compilation time.
Arguments
| :: Text | Filepath where contents are going to be read from and parsed |
| -> IO (ConfigSpec ()) | returns ConfigSpec |
Reads contents of a file and parses into a ConfigSpec, file contents can be
either JSON or YAML (if cabal flag is set).