-
Notifications
You must be signed in to change notification settings - Fork 101
Reset config #1270
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
base: master
Are you sure you want to change the base?
Reset config #1270
Conversation
Can you explain what all the type families are for? I'm unable to see why exactly we need it. We have tests for optparse and can just use those to define our expectations. |
|
The type checking is used here just to prevent errors that the developer could make by adding new field to UserSettings and missing to update Reset module (for example) |
I prefer to not have this complexity in the codebase. We're not exposing APIs that need rigorous type family code to ensure safety. We can add tests to:
|
That looks much better |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The throwM
usage is problematic, other comments are minor nitpicks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'll get to this soon. |
Resolve #1058
I use
reset
command instead ofunset
to prevent ambiguity with existentunset
one.I use type checking to keep the strict correspondence between UserSettings' fields and parser of the arguments that user passes.
Otherwise it is possible to have bad scenarios like