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

Fix NondecreasingIndentation filtering #4952

Merged
merged 2 commits into from
Dec 19, 2017
Merged

Conversation

gwils
Copy link
Collaborator

@gwils gwils commented Dec 12, 2017

Not every supported extension for a compiler has a corresponding flag.
for example NondecreasingIndentation is enabled by default on GHC 7.0.4,
hence it is considered a supported extension but not an accepted flag.

To resolve this, wrap Flags in Maybe, and follow through the resulting
refactoring.

Fixes #4443

Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

Please also shortly describe how you tested your change. Bonus points for added tests!

This was tested by running the repro example in the issue (#4443)
I intend to add a test to the suite, but I'd like some feedback on this much first.

Not every supported extension for a compiler has a corresponding flag.
for example NondecreasingIndentation is enabled by default on GHC 7.0.4,
hence it is considered a supported extension but not an accepted flag.

To resolve this, wrap Flags in Maybe, and follow through the resulting
refactoring.

Fixes haskell#4443
Copy link
Member

@23Skidoo 23Skidoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK. IMO it'd be nice to get rid of Maybe (Maybe Flag) in the future in favour of a special-purpose ADT.

@23Skidoo 23Skidoo merged commit b06aac9 into haskell:master Dec 19, 2017
@23Skidoo
Copy link
Member

Merged, thanks!

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

Successfully merging this pull request may close these issues.

NondecreasingIndentation-filtering broken
2 participants