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

Making a flag default based on ghc version #2397

Closed
ethercrow opened this issue Jan 29, 2015 · 3 comments
Closed

Making a flag default based on ghc version #2397

ethercrow opened this issue Jan 29, 2015 · 3 comments

Comments

@ethercrow
Copy link

yi depends on hint, which is not updated for ghc 7.10 yet, so I've tried the following in yi.cabal:

flag hint
  if impl(ghc >= 7.10.1)
    Default: False
  else
    Default: True
  Description: Include hint (haskell interpreter) in yi

but got

cabal: 'parseField' called on a non-field. This is possibly a bug in Cabal.
Please report it to the developers: https://github.com/haskell/cabal/issues/new

Is it a bug in cabal or is it illegal to place Default field under conditional?

@23Skidoo
Copy link
Member

/cc @dcoutts

@ttuegel ttuegel added this to the Cabal-1.24 milestone Apr 25, 2015
@23Skidoo 23Skidoo modified the milestones: Cabal 1.24, Cabal 1.26 Feb 21, 2016
@ezyang ezyang modified the milestone: Cabal 2.0 Sep 6, 2016
@grayjay
Copy link
Collaborator

grayjay commented Mar 12, 2017

See #2429 for another example of how conditionals in flag definitions could be used.

@grayjay
Copy link
Collaborator

grayjay commented Jun 11, 2018

Closing in favor of #5328, which would allow setting the flag default based on GHC version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants