roman / Haskell-etc

Declarative configuration spec for Haskell projects
MIT License
47 stars 7 forks source link

Allow validation of keys coming from Config Files #26

Closed roman closed 6 years ago

roman commented 6 years ago

Context

Currently, etc will aggregate all the configuration values that come from different configuration files, this has the benefit of being open around defining config entries, without necessarily having to define them in the spec.

However, when we have all the configuration values that we are expecting defined on the spec, and we read config files that have typos on those keys, we don't get notified appropriately.

Requirements

Have a resolveFile function that is strict on the keys from the spec, meaning, if the key is not defined in the spec, fail fast and throw an exception.