Include default flag values in --help#4653
Merged
Conversation
Fixes #893. The implementation strategy is to replace `First Bool` with either a `First True` or `First False` so that we can use the type to ensure we display the correct default. This results in a lot of changes to the codebase, but they are all type directed. Alternatively, we could introduce a typeclass here to reduce some boilerplate, but I prefer the more explicit approach.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #893. The implementation strategy is to replace
First Boolwitheither a
First TrueorFirst Falseso that we can use the type toensure we display the correct default. This results in a lot of changes
to the codebase, but they are all type directed.
Alternatively, we could introduce a typeclass here to reduce some
boilerplate, but I prefer the more explicit approach.
Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!