Skip to content

Commit 8070ab1

Browse files
authored
Merge pull request #9549 from haskell/fix9548
Fix #9548 Improve accuracy of docs for condition `arch(name)`
2 parents 5b44c05 + 92a827b commit 8070ab1

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

doc/cabal-package-description-file.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,13 +1484,13 @@ system-dependent values for these fields.
14841484
Version constraints use the operators ``==, >=, >, <, <=`` and a
14851485
version number. Multiple constraints can be combined using ``&&`` or
14861486
``||``.
1487-
1487+
14881488
.. Note::
14891489

14901490
Even though there is no ``/=`` operator, by combining operators we can
14911491
skip over one or more versions, to skip a deprecated version or to skip
14921492
versions that narrow the constraint solving more than we'd like.
1493-
1493+
14941494
For example, the ``time =1.12.*`` series depends on ``base >=4.13 && <5``
14951495
but ``time-1.12.3`` bumps the lower bound on base to ``>=4.14``. If we
14961496
still want to compile with a ``ghc-8.8.*`` version of GHC that ships with
@@ -2490,10 +2490,15 @@ The following tests are currently supported.
24902490
implementations. If the canonicalised os names match, this test
24912491
evaluates to true, otherwise false. The match is case-insensitive.
24922492
:samp:`arch({name})`
2493-
Tests if the current architecture is *name*. The argument is matched
2494-
against ``System.Info.arch`` on the target system. If the arch names
2495-
match, this test evaluates to true, otherwise false. The match is
2496-
case-insensitive.
2493+
Tests if the current architecture is *name*. *name* should be the name of
2494+
one of the nullary constructors of ``Distribution.System.Arch`` (e.g.
2495+
``x86_64``, ``aarch64`` or ``i386``), otherwise it will be treated as an
2496+
'other architecture' of the given *name*. It will be compared with
2497+
``Distribution.System.buildArch``, which is derived from
2498+
``System.Info.arch`` (certain architectures are treated as synonymous; e.g.
2499+
``aarch64`` / ``arm64`` or ``powerpc64`` / ``powerpc64le`` are not
2500+
distinguished). For a match, this test evaluates to true, otherwise false.
2501+
The match is case-insensitive.
24972502
:samp:`impl({compiler})`
24982503
Tests for the configured Haskell implementation. An optional version
24992504
constraint may be specified (for example ``impl(ghc >= 6.6.1)``). If

0 commit comments

Comments
 (0)