Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incorrect translation of caret operator ^>= #515

@hasufell

Description

@hasufell

^>=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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions