Wrong position report on parse failure
Open
cabal-install: cmd/check
Cabal: parser
exact-print
type: bug
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Given
```
cabal-version: 2.4
name: bug
version: 0
library
if impl(<9.4)
build-depends: something
```
`Cabal` reports wrong position of parse error:
```
cabal-3.16.1.0 check
Warning: bug.cabal:1:1:
unexpected SecArgOther (Position 7 11) "<"
Errors encountered when parsing cabal file bug.cabal:
bug.cabal:1:1: error:
unexpected SecArgOther (Position 7 11) "<"
1 | cabal-version: 2.4
| ^
Error: [Cabal-7035]
parse error
```
The issue is in `impl(<9.4)` (which probably should be `impl(ghc <9.4)`.
Contributor guide
Assessment
This issue has not been assessed yet.