| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.Etc.Spec
- parseConfigSpec :: (MonadCatch m, FromJSON cmd) => Text -> m (ConfigSpec cmd)
- readConfigSpec :: FromJSON cmd => Text -> IO (ConfigSpec cmd)
Documentation
Arguments
| :: (MonadCatch m, FromJSON cmd) | |
| => Text | Text to be parsed |
| -> m (ConfigSpec cmd) | returns ConfigSpec |
Parses a text input into a ConfigSpec, input can be JSON or YAML (if cabal
flag is set).
Arguments
| :: FromJSON cmd | |
| => Text | Filepath where contents are going to be read from and parsed |
| -> IO (ConfigSpec cmd) | 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).