haskell / haskell/cabal

simplifyVersionRange does not use ^>=

Open
#8,655 2 comments 0 reactions 0 assignees View on GitHub
re: constraint re: user experience type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

So something nice as
```
^>=4.14.3.0 || ^>=4.15.1.0 || ^>=4.16.4.0 || ^>=4.17.0.0,
```
turns into
```
>=4.14.3.0 && <4.15 || >=4.15.1.0 && <4.16 || >=4.16.4.0 && <4.17 || >=4.17.0.0 && <4.18
```

This is visible on hackage, for example (https://github.com/haskell/hackage-server/issues/1157).

Would it be reasonable to change `simplifyVersionRange` to use the newer syntax?

Or add a variant of the function that can take a flag to indicate which newer syntaxes (e.g. `^>= {…}`) to use?

(The actual code that needs to be touched seems to be `intervalToVersionRange`.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.