Skip to content

Commit 31af6ee

Browse files
authored
Merge pull request #3704 from RyanGlScott/doc2
Clarify what logical negation of impl with version ranges means
2 parents c2c5d36 + f658805 commit 31af6ee

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Cabal/doc/developing-packages.markdown

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,6 +1721,20 @@ The following tests are currently supported.
17211721
version constraint, then this evaluates to true, otherwise false.
17221722
The match is case-insensitive.
17231723

1724+
Note that including a version constraint in an `impl` test causes it
1725+
to check for two properties:
1726+
1727+
* The current compiler has the specified name, and
1728+
1729+
* The compiler's version satisfied the specified version constraint
1730+
1731+
As a result, `!impl(ghc >= x.y.z)` is not entirely equivalent to
1732+
`impl(ghc < x.y.z)`. The test `!impl(ghc >= x.y.z)` checks that:
1733+
1734+
* The current compiler is not GHC, or
1735+
1736+
* The version of GHC is earlier than version x.y.z.
1737+
17241738
`flag(`_name_`)`
17251739
: Evaluates to the current assignment of the flag of the given name.
17261740
Flag names are case insensitive. Testing for flags that have not

0 commit comments

Comments
 (0)