Description
The instructions to build leksah say to do:
cabal build regex-tdfa-text --ghc-options=-XFlexibleContexts
So I tried same with stack:
stack build regex-tdfa-text --ghc-options=-XFlexibleContexts # and, just in case
stack build --ghc-options=-XFlexibleContexts regex-tdfa-text
And it didn't pick up FlexibleContexts, build fails. #758 gave me the impression this technique should work?
I then discovered you can add ghc-options
sections to a stack.yaml, like so:
ghc-options:
regex-tdfa-text: -XFlexibleContexts
(and then realized the one added to the leksah repo turns out to have had that, but I wasn't then using 'master', was trying to build release) and it built.
Shouldn't --ghc-options=-XBlah
have passed -XBlah
through to enable the Blah language extension? The stack documentation talks about this being preferable to doing it in stack.yaml so snapshot version isn't impacted (not that anyone else is using this package, but anyway).
[I gather the issue on point is https://github.com/leksah/leksah/issues/156 but I wanted to report my attempted workaround and my impression that it should have worked]
AfC