Description
Reasonable conventions for embedding YAML configuration with Template Haskell.
Description
Please see the README on GitHub at https://github.com/simspace/embed-config#readme
README.md
embed-config
Reasonable conventions for embedding YAML configuration with Template Haskell
Quick Start
config/settings.yml
foo-bar: 42
baz-quux: hello
src/MyApp/Config.hs
module MyApp.Config where
import Data.Yaml.Config.Embed (AesonKebab(..), embedConfig)
loadConfig :: IO Config
loadConfig = $(embedConfig)
data Config = Config
{ fooBar :: Int
, bazQuux :: String
} deriving stock (Show, Eq, Generic)
deriving (FromJSON) via AesonKebab Config