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

Refactor conditional tree parsing to allow field specification at top-level only #6925

Closed
phadej opened this issue Jun 22, 2020 · 1 comment
Assignees
Milestone

Comments

@phadej
Copy link
Collaborator

phadej commented Jun 22, 2020

No description provided.

@phadej phadej added this to the 3.4.0.0 milestone Jun 22, 2020
@phadej phadej self-assigned this Jun 22, 2020
phadej added a commit to phadej/cabal that referenced this issue Jun 22, 2020
- Add availableSince to language/extension fields
   - Also autogen-modules once we are on that.
- Remove default-language check for cabal-version: 3.4

We cannot make the field `uniqueFieldAlaDef`, as that would require
specifying `default-language` in each subconditional.
I leave it for haskell#6925

Note: the default language is whatever is the compiler's default.
The GHC-8.10 default is its variant of Haskell2010
with NondecreasingIndentation and without DatatypeContexts
@phadej phadej mentioned this issue Jun 22, 2020
3 tasks
phadej added a commit to phadej/cabal that referenced this issue Jun 23, 2020
- Add availableSince to language/extension fields
   - Also autogen-modules once we are on that.
- Remove default-language check for cabal-version: 3.4

We cannot make the field `uniqueFieldAlaDef`, as that would require
specifying `default-language` in each subconditional.
I leave it for haskell#6925

Note: the default language is whatever is the compiler's default.
The GHC-8.10 default is its variant of Haskell2010
with NondecreasingIndentation and without DatatypeContexts
@phadej
Copy link
Collaborator Author

phadej commented Jun 23, 2020

After a bit of though, this doesn't make sense:

if flag(haskell98)
  default-language: Haskell98
else
  default-language: Haskell2010

is completely fine. We could somehow check that default-language (and other optional fields) are set at most once per each possible flattening of CondTree, but it's tricky (maybe something of D.PD.Check.

@phadej phadej closed this as completed Jun 23, 2020
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

1 participant