-
Notifications
You must be signed in to change notification settings - Fork 10
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
Adding bounds to library with common stanza results in malformed cabal file #26
Comments
I'd say this is also an upstream problem; it is questionable for a declarative language that |
I agree that it is a surprising constraint. I have no idea about the reasons though. |
The way
would desugar into
and interpret as if it were
because conditionals are pushed back. That would be fine if all fields contents were commutative (like Thus to avoid any confusion imports have to come first. That was also a conservative change, it can be relaxed later. That said, future relaxations won't help |
To fix the issue, I think we can simply tweak the existing logic so the additional Here's the Lines 780 to 822 in fbf1967
…and the function that finds the insertion position: Lines 441 to 449 in fbf1967
|
I've developed https://github.com/Bodigrim/cabal-add, capable to insert dependencies even in the presense of common stanzas. |
@Bodigrim Kudos! I'll try it out next time I need to make revisions... |
Given https://hackage.haskell.org/package/ede-0.3.2.0/revision/0.cabal, if I run
,
hackage-cli
applies the following patch:If I try to push this revision, the response is:
cabal check
reveals:The text was updated successfully, but these errors were encountered: