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

Incorrect translation of caret operator ^>= #515

Open
hasufell opened this issue Jul 1, 2022 · 1 comment
Open

Incorrect translation of caret operator ^>= #515

hasufell opened this issue Jul 1, 2022 · 1 comment

Comments

@hasufell
Copy link
Contributor

hasufell commented Jul 1, 2022

^>=0.5.0.0 gets translated to >=0.5.0.0 && <0.6

This is not strictly the same and explained in the cabal documentation: https://cabal.readthedocs.io/en/3.4/cabal-package.html?highlight=caret%20operator#build-information

Another way to say this is that foo < 1.3 expresses negative information, i.e. “foo-1.3 or foo-1.4.2 will not be compatible”; whereas foo ^>= 1.2.3.4 asserts the positive information that “foo-1.2.3.4 is known to be compatible”

And

The subtle but important difference in signaling allows tooling to treat explicitly expressed <-style constraints and inferred (^>=-style) upper bounds differently. For instance, allow-newer’s ^-modifier allows to relax only ^>=-style bounds while leaving explicitly stated <-constraints unaffected.

@tfausak
Copy link
Collaborator

tfausak commented Jul 4, 2022

This thread might be useful for context: commercialhaskell/stack#3464

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

No branches or pull requests

2 participants