-
Notifications
You must be signed in to change notification settings - Fork 701
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 and improve list parser of cabal init cli #8663
Conversation
cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs
Outdated
Show resolved
Hide resolved
cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs
Outdated
Show resolved
Hide resolved
@emilypi Tests fail because tests use the state I think the new assertion is the more correct form since it is actually what's going to be generated. Any opinions? |
1c97965
to
ff014da
Compare
Occurrences of `Flag [a]` behave in a slightly unexpected way. The monoid instance of `Flag` is right associative and discard the value on the left. Thus, make sure we merge the contents of the flags, instead of using the monoid instance of `Flag` itself.
ff014da
to
a93a7cd
Compare
Ready for review, just fix the parsers, and add test-cases for all modified parsers. |
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 thanks @fendor
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.
Thanks a lot. I'm marking the absence of a changelog so that we don't miss it when reviewing again.
3fa83f9
to
a407d1c
Compare
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.
Brilliant.
@fendor: when you are ready, feel free to set a label (I guess squash+merge_me?). |
This is the only PR left before cutting 3.10, so let me speed it up... |
Fixes #8659
Fix cli list parser errors in
cabal init
Occurrences of
Flag [a]
seem to behave in an unexpected way. The monoidinstance of
Flag
is right associative and discard the value on theleft.
Fixes for all
Flag [a]
the cli parser incabal init
. Adds tests for proving the improvement.