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
import
in if
#5563
Comments
You should be able to put conditional into common stanza. And also import common stanzas into other ones.
…Sent from my iPhone
On 4 Sep 2018, at 10.35, Edward Kmett ***@***.***> wrote:
It'd be useful to be able to place an import statement inside of an if to factor out repetitive logic.
e.g. in the common idiom of
if !flag(test-whatever)
buildable: False
else
...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Putting the conditional into a common stanza doesn't work for this idiom where the test is particular to the test suite in question. |
Fwiw, this is strongly correlated with #5564 regarding the underlying technical limitation |
I've started using common blocks and imports rather than build-depends so I only have to state my version ranges once in some otherwise massive cabal configurations. e.g.
but this breaks with the idiom of doing
I currently bury my dependencies down under the |
That'd probably work for me. |
This is possible with |
It'd be useful to be able to place an
import
statement inside of anif
to factor out repetitive logic.e.g. in the common idiom of
The text was updated successfully, but these errors were encountered: