| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.Etc.Spec
Synopsis
- data ConfigSpec cmd
- data ConfigValue cmd
- data ConfigurationError
- parseConfigSpec :: MonadThrow m => Text -> m (ConfigSpec ())
- readConfigSpec :: Text -> IO (ConfigSpec ())
Documentation
data ConfigSpec cmd #
Instances
| Eq cmd => Eq (ConfigSpec cmd) # | |
Defined in System.Etc.Internal.Spec.Types Methods (==) :: ConfigSpec cmd -> ConfigSpec cmd -> Bool # (/=) :: ConfigSpec cmd -> ConfigSpec cmd -> Bool # | |
| Show cmd => Show (ConfigSpec cmd) # | |
Defined in System.Etc.Internal.Spec.Types Methods showsPrec :: Int -> ConfigSpec cmd -> ShowS # show :: ConfigSpec cmd -> String # showList :: [ConfigSpec cmd] -> ShowS # | |
| FromJSON cmd => FromJSON (ConfigSpec cmd) # | |
Defined in System.Etc.Internal.Spec.Types Methods parseJSON :: Value -> Parser (ConfigSpec cmd) # parseJSONList :: Value -> Parser [ConfigSpec cmd] # | |
data ConfigValue cmd #
Instances
data ConfigurationError #
Constructors
| InvalidConfiguration !(Maybe Text) !Text | |
| InvalidConfigKeyPath ![Text] | |
| ConfigurationFileNotFound !Text |
Instances
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).
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).