Skip to content
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

Fix #9548 Improve accuracy of docs for condition arch(name) #9549

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions doc/cabal-package-description-file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1484,13 +1484,13 @@ system-dependent values for these fields.
Version constraints use the operators ``==, >=, >, <, <=`` and a
version number. Multiple constraints can be combined using ``&&`` or
``||``.

.. Note::

Even though there is no ``/=`` operator, by combining operators we can
skip over one or more versions, to skip a deprecated version or to skip
versions that narrow the constraint solving more than we'd like.

For example, the ``time =1.12.*`` series depends on ``base >=4.13 && <5``
but ``time-1.12.3`` bumps the lower bound on base to ``>=4.14``. If we
still want to compile with a ``ghc-8.8.*`` version of GHC that ships with
Expand Down Expand Up @@ -2490,10 +2490,15 @@ The following tests are currently supported.
implementations. If the canonicalised os names match, this test
evaluates to true, otherwise false. The match is case-insensitive.
:samp:`arch({name})`
Tests if the current architecture is *name*. The argument is matched
against ``System.Info.arch`` on the target system. If the arch names
match, this test evaluates to true, otherwise false. The match is
case-insensitive.
Tests if the current architecture is *name*. *name* should be the name of
one of the nullary constructors of ``Distribution.System.Arch`` (e.g.
``x86_64``, ``aarch64`` or ``i386``), otherwise it will be treated as an
'other architecture' of the given *name*. It will be compared with
``Distribution.System.buildArch``, which is derived from
``System.Info.arch`` (certain architectures are treated as synonymous; e.g.
``aarch64`` / ``arm64`` or ``powerpc64`` / ``powerpc64le`` are not
distinguished). For a match, this test evaluates to true, otherwise false.
The match is case-insensitive.
:samp:`impl({compiler})`
Tests for the configured Haskell implementation. An optional version
constraint may be specified (for example ``impl(ghc >= 6.6.1)``). If
Expand Down
Loading