Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

support the cabal condition "impl(ahc-ghc)" #900

Open
gelisam opened this issue May 6, 2022 · 0 comments
Open

support the cabal condition "impl(ahc-ghc)" #900

gelisam opened this issue May 6, 2022 · 0 comments

Comments

@gelisam
Copy link

gelisam commented May 6, 2022

Is your feature request related to a problem? Please describe.
I want the same code to compile with both ahc-ghc and ghc, but some libraries (e.g. sdl2) are not compatible with ahc-ghc.

Describe the solution you'd like
I wish ahc-cabal would recognize the condition impl(ahc-ghc). Currently, it recognizes impl(ghc), so I cannot use this condition to distinguish ahc-ghc from ghc.

Describe alternatives you've considered
I have defined a configuration flag instead:

flag asterius
  description: Whether we're compiling with ahc-ghc (true) or ghc (false).
  default: false
  manual: true

It works fine, I just have to remember to pass --flags="asterius" when compiling with ahc-cabal and to not pass it when compiling with cabal. Since the cabal package description format provides an easy way to detect the compiler automatically, it just seems unfortunate that I have to specify it manually :)

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

No branches or pull requests

1 participant