Parsing: Negate the condition when `if` branch is empty.
Open
Cabal: parser
type: discussion
type: enhancement
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I.e. parse
```cabal
if flag(some-condition)
buildable: True
else
buildable: False
```
as
```cabal
if !flag(some-condition)
buildable: False
```
And / Or: issue warning if this is the case, so `.cabal` file can be edited by author.
---
Motivation: is that the above would be pretty printed as
```cabal
if flag(some-condition)
else
buildable: False
```
which is ugly.
Contributor guide
Assessment
This issue has not been assessed yet.