etc-0.0.0.1: Declarative configuration spec for Haskell projects

Safe HaskellNone
LanguageHaskell2010

System.Etc.Spec

Synopsis

Documentation

parseConfigSpec Source #

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).

readConfigSpec Source #

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).