Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow update of config value during validation #4

Open
larskuhtz opened this issue Dec 10, 2014 · 1 comment
Open

Allow update of config value during validation #4

larskuhtz opened this issue Dec 10, 2014 · 1 comment
Assignees
Milestone

Comments

@larskuhtz
Copy link
Member

Sometimes validation of a configuration value fails, but the failure could be resolved, for example, from other configuration settings. To allow this the type of ConfigValidation should be changed from

type ConfigValidation α λ = (MonadIO μ, Functor μ, Applicative μ, MonadError Text μ, MonadWriter (λ Text) μ) => α -> μ ()

to

type ConfigValidation α λ = (MonadIO μ, Functor μ, Applicative μ, MonadError Text μ, MonadWriter (λ Text) μ) => α -> μ α

and the resulting value should be passed as configuration to the application.

@larskuhtz larskuhtz self-assigned this Dec 10, 2014
@larskuhtz
Copy link
Member Author

This feature would be an API change and should go into version 0.3. I don't think that there it is worth to do it in a backward compatible way. Also, the change in the function type should prevent compatibility bugs that wouldn't show up during compilation and would result in bad run-time behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant