-
Notifications
You must be signed in to change notification settings - Fork 28
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
Declaring TH dependency in .cabal
file
#28
Comments
Does this patch, Correctly implement your suggestions? |
@stepcut yes, looks good! While we're at it, I'd have a few more suggestions :-) I suspect that Then I see that the code makes seems to make use of
So I'd recommend to try to make more use of PS: I'll try to build |
Currently, happstack has
There's a couple of problems here (with cabal-1.24 & GHC 8.0)
If the TH-flag is set to false (or arch=arm), this package still won't build when GHC doesn't support TH, because then
extensions: TemplateHaskell
will still be in effect, and GHC will fail complaining it doesn't support TH.And with cabal-1.24, the solver will already exclude packages during solving where
extensions: TemplateHaskell
when GHC doesn't support that extension.Moreover, arch(arm) is not the only platform lacking TH support. However, since cabal knows when your environment supports TH, you should let cabal decide.
Consequently, I suggest the following definitions instead:
Use an automatic flag for declaring TH support, and make sure this flag doesn't have any other pressure applied other than
other-extensions: TemplateHaskell
ordefault-extensions: TemplateHaskell
, i.e.this will cause cabal (starting with 1.24) to set the
template_haskell
flag depending on whether the compiler supports TH./cc @bergmark @phadej
The text was updated successfully, but these errors were encountered: