Skip to content

Commit 2f15a18

Browse files
committed
Use terms for cabal and cabal-install
1 parent d3682e2 commit 2f15a18

11 files changed

+60
-60
lines changed

doc/cabal-commands.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ cabal user-config
258258

259259
``cabal user-config [init|diff|update]`` prints and updates user's global
260260
cabal preferences. It is very useful when you are e.g. first configuring
261-
``cabal`` on a new machine.
261+
:term:`cabal` on a new machine.
262262

263263
- ``cabal user-config init`` creates a new configuration file.
264264

@@ -633,7 +633,7 @@ Examples:
633633
Read dependency version bounds from the v2-style freeze file
634634
(by default, ``cabal.project.freeze``) instead of the package
635635
description file. ``--new-freeze-file`` is an alias for this flag
636-
that can be used with pre-2.4 ``cabal``.
636+
that can be used with pre-2.4 :term:`cabal`.
637637

638638
.. option:: --project-file=FILE
639639

@@ -675,7 +675,7 @@ Examples:
675675
cabal path
676676
^^^^^^^^^^
677677

678-
``cabal path`` allows to query for paths used by ``cabal``.
678+
``cabal path`` allows to query for paths used by :term:`cabal`.
679679
For example, it allows to query for the directories of the cache, store,
680680
installed binaries, and so on.
681681

@@ -796,8 +796,8 @@ symlinks/copies their executables in ``installdir`` (usually ``~/.local/bin``).
796796
than ``all`` as the target. To overwrite an installation, use
797797
``--overwrite-policy=always`` as the default policy is ``never``.
798798

799-
For example this command will build the latest ``cabal-install`` and symlink
800-
its ``cabal`` executable:
799+
For example this command will build the latest :term:`cabal-install:exe:cabal` and symlink
800+
its :term:`cabal` executable:
801801

802802
::
803803

@@ -806,7 +806,7 @@ its ``cabal`` executable:
806806
In addition, it's possible to use ``cabal install`` to install components
807807
of a local project. For example, with an up-to-date Git clone of the Cabal
808808
repository, this command will build cabal-install HEAD and symlink the
809-
``cabal`` executable:
809+
:term:`cabal` executable:
810810

811811
::
812812

doc/cabal-context.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Haskell_ software. It helps people to
55
configure, build and install Haskell software and to distribute it
66
easily to other users and developers.
77

8-
There is a command line tool called ``cabal`` for working with Cabal
8+
There is a command line tool called :term:`cabal` for working with Cabal
99
packages. It helps with installing existing packages and also helps
1010
people developing their own packages. It can be used to work with local
1111
packages or to install packages from online package archives, including
@@ -52,7 +52,7 @@ other Haskell implementations).
5252
A tool for working with packages
5353
--------------------------------
5454

55-
There is a command line tool, called "``cabal``", that users and
55+
There is a command line tool, called ":term:`cabal`", that users and
5656
developers can use to build and install Cabal packages. It can be used
5757
for both local packages and for packages available remotely over the
5858
network. It can automatically install Cabal packages plus any other
@@ -76,7 +76,7 @@ It is also possible to install several local packages at once, e.g.
7676
$ cabal install foo/ bar/
7777

7878
Developers and users can use the tool to install packages from remote
79-
Cabal package archives. By default, the ``cabal`` tool is configured to
79+
Cabal package archives. By default, the :term:`cabal` tool is configured to
8080
use the central Haskell package archive called
8181
Hackage_ but it is possible to use it
8282
with any other suitable archive.
@@ -102,7 +102,7 @@ which Haskell implementation to use and whether to build optimised code
102102
or build with the ability to profile code. It is not expected that users
103103
will have to modify any of the information in the ``.cabal`` file.
104104

105-
Note that ``cabal`` is not the only tool for working with Cabal
105+
Note that :term:`cabal` is not the only tool for working with Cabal
106106
packages. Due to the standardised format and a library for reading
107107
``.cabal`` files, there are several other special-purpose tools.
108108

@@ -134,7 +134,7 @@ Cabal and its associated tools and websites covers:
134134
- packaging for distribution
135135
- automated package management
136136

137-
- natively using the ``cabal`` command line tool; or
137+
- natively using the :term:`cabal` command line tool; or
138138
- by translation into native package formats such as RPM or deb
139139

140140
- web and local Cabal package archives

doc/cabal-package-description-file.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ describe the package as a whole:
353353
what syntax to expect and what each part means.
354354

355355
The version number you specify will affect both compatibility and
356-
behaviour. Most tools (including the Cabal library and the ``cabal``
356+
behaviour. Most tools (including the Cabal library and the :term:`cabal`
357357
program) understand a range of versions of the Cabal specification.
358358
Older tools will of course only work with older versions of the
359359
Cabal specification that was known at the time. Most of the time,
@@ -429,7 +429,7 @@ describe the package as a whole:
429429

430430
If the build type is anything other than ``Custom``, then the
431431
``Setup.hs`` file *must* be exactly the standardized content
432-
discussed below. This is because in these cases, ``cabal`` will
432+
discussed below. This is because in these cases, :term:`cabal` will
433433
ignore the ``Setup.hs`` file completely, whereas other methods of
434434
package management, such as ``runhaskell Setup.hs [CMD]``, still
435435
rely on the ``Setup.hs`` file.
@@ -467,7 +467,7 @@ describe the package as a whole:
467467
main = defaultMain
468468
469469
For build type ``Custom``, the file ``Setup.hs`` can be customized,
470-
and will be used both by ``cabal`` and other tools.
470+
and will be used both by :term:`cabal` and other tools.
471471

472472
For most packages, the build type ``Simple`` is sufficient. For more exotic
473473
needs, the ``Hooks`` build type is recommended; see :ref:`setup-hooks`.

doc/cabal-project-description-file.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ directories when there is none in the current directory.
4242
Conditionals and imports
4343
------------------------
4444

45-
As of ``cabal-install`` version 3.8, cabal supports conditional logic and
45+
As of :term:`cabal-install:exe:cabal` version 3.8, cabal supports conditional logic and
4646
imports in ``cabal.project`` files.
4747

4848
.. warning::
@@ -92,7 +92,7 @@ You *must* provide a non-empty list of local packages in your project, filling
9292
out either a ``packages`` field or an ``optional-packages`` field or both to
9393
satisfy this requirement.
9494

95-
When ``cabal.project`` doesn't exist, ``cabal-install`` fabricates an ephemeral
95+
When ``cabal.project`` doesn't exist, :term:`cabal-install:exe:cabal` fabricates an ephemeral
9696
project for its own use with this simple content, a glob that will find any (but
9797
expects to find one) package in the current directory:
9898

@@ -315,7 +315,7 @@ package, and thus apply globally:
315315

316316
:default: 1
317317

318-
Control the verbosity of ``cabal`` commands, valid values are from 0
318+
Control the verbosity of :term:`cabal` commands, valid values are from 0
319319
to 3.
320320

321321
The command line variant of this field is ``--verbose=2``; a short
@@ -346,7 +346,7 @@ package, and thus apply globally:
346346
This option instructs cabal to control parallelism by creating a new system semaphore,
347347
whose number of tokens is specified by ``--jobs`` (or ``-j``).
348348
This semaphore is passed to GHC, which allows it to use any leftover parallelism
349-
that ``cabal-install`` is not using.
349+
that :term:`cabal-install:exe:cabal` is not using.
350350

351351
Requires ``ghc >= 9.8``.
352352

@@ -420,9 +420,9 @@ package, and thus apply globally:
420420
:since: 3.7
421421

422422
By modifying ``package-dbs`` you can modify the default package environment
423-
which ``cabal`` will see. The package databases you add using ``package-dbs``
423+
which :term:`cabal` will see. The package databases you add using ``package-dbs``
424424
will not be written into and only used as immutable package stores to initialise
425-
the environment with additional packages that ``cabal`` can choose to use.
425+
the environment with additional packages that :term:`cabal` can choose to use.
426426

427427
There are three package databases involved with most builds:
428428

doc/config.rst

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Configuration
66
Overview
77
--------
88

9-
The global configuration file for ``cabal-install`` is by default
10-
``$XDG_CONFIG_HOME/cabal/config``. If you do not have this file, ``cabal`` will create
9+
The global configuration file for :term:`cabal-install:exe:cabal` is by default
10+
``$XDG_CONFIG_HOME/cabal/config``. If you do not have this file, :term:`cabal` will create
1111
it for you on the first call to ``cabal update``
1212
(details see `configuration file discovery`_).
13-
Alternatively, you can explicitly ask ``cabal`` to create it for you using
13+
Alternatively, you can explicitly ask :term:`cabal` to create it for you using
1414

1515
.. code-block:: console
1616
@@ -40,21 +40,21 @@ executables by default, you would change this line to
4040
executable-stripping: False
4141

4242
You can also use ``cabal user-config update`` to migrate configuration
43-
files created by older versions of ``cabal``.
43+
files created by older versions of :term:`cabal`.
4444

4545
Environment variables
4646
---------------------
4747

48-
Various environment variables affect ``cabal-install``.
48+
Various environment variables affect :term:`cabal-install:exe:cabal`.
4949

5050
``CABAL_CONFIG``
5151
The variable to find global configuration file.
5252

5353
``CABAL_DIR``
5454

55-
If set, *all* ``cabal-install`` content files will be stored as
55+
If set, *all* :term:`cabal-install:exe:cabal` content files will be stored as
5656
subdirectories of this directory, including the configuration file
57-
if ``CABAL_CONFIG`` is unset. If ``CABAL_DIR`` is unset, Cabal
57+
if ``CABAL_CONFIG`` is unset. If ``CABAL_DIR`` is unset, :term:`cabal`
5858
will store data files according to the XDG Base Directory
5959
Specification (see `directories`_).
6060

@@ -63,7 +63,7 @@ Various environment variables affect ``cabal-install``.
6363
For backwards compatibility, if the directory ``~/.cabal`` on
6464
Unix or ``%APPDATA%\cabal`` on Windows exists, and
6565
``$XDG_CONFIG_HOME/cabal/config`` does not exist, and
66-
``CABAL_DIR`` is unset, ``cabal-install`` will behave as if
66+
``CABAL_DIR`` is unset, :term:`cabal-install:exe:cabal` will behave as if
6767
``CABAL_DIR`` was set to point at this directory.
6868

6969
``CABAL_BUILDDIR``
@@ -87,7 +87,7 @@ The configuration file location is determined as follows:
8787

8888
If the configuration file does not exist, and it was not given
8989
explicitly via ``--config-file`` or ``$CABAL_CONFIG``, then
90-
``cabal-install`` will generate the default one, with directories
90+
:term:`cabal-install:exe:cabal` will generate the default one, with directories
9191
based on ``$CABAL_DIR`` (if set) or according to the XDG Base
9292
Directory Specification, as listed below.
9393

@@ -121,13 +121,13 @@ file:
121121
* ``~/.local/bin`` for executables installed with ``cabal install``.
122122

123123
You can run ``cabal path`` to see a list of the directories that
124-
``cabal`` will use with the active configuration.
124+
:term:`cabal` will use with the active configuration.
125125

126126
Repository specification
127127
------------------------
128128

129129
An important part of the configuration is the specification of the
130-
repository. When ``cabal`` creates a default config file, it configures
130+
repository. When :term:`cabal` creates a default config file, it configures
131131
the repository to be the central Hackage server:
132132

133133
::
@@ -140,7 +140,7 @@ anything; packages downloaded from this repository will be cached under
140140
``$XDG_CACHE_HOME/cabal/packages/hackage.haskell.org`` (or whatever name you specify;
141141
you can change the prefix by changing the value of
142142
:cfg-field:`remote-repo-cache`). If you want, you can configure multiple
143-
repositories, and ``cabal`` will combine them and be able to download
143+
repositories, and :term:`cabal` will combine them and be able to download
144144
packages from any of them.
145145

146146
Using secure repositories
@@ -166,21 +166,21 @@ The ``<root-key-IDs>`` and ``<key-threshold>`` values are used for
166166
bootstrapping. As part of the TUF infrastructure the repository will
167167
contain a file ``root.json`` (for instance,
168168
http://hackage.haskell.org/root.json) which the client needs to do
169-
verification. However, how can ``cabal`` verify the ``root.json`` file
169+
verification. However, how can :term:`cabal` verify the ``root.json`` file
170170
*itself*? This is known as bootstrapping: if you specify a list of root
171-
key IDs and a corresponding threshold, ``cabal`` will verify that the
171+
key IDs and a corresponding threshold, :term:`cabal` will verify that the
172172
downloaded ``root.json`` file has been signed with at least
173173
``<key-threshold>`` keys from your set of ``<root-key-IDs>``.
174174

175175
You can, but are not recommended to, omit these two fields. In that case
176-
``cabal`` will download the ``root.json`` field and use it without
176+
:term:`cabal` will download the ``root.json`` field and use it without
177177
verification. Although this bootstrapping step is then unsafe, all
178178
subsequent access is secure (provided that the downloaded ``root.json``
179179
was not tampered with). Of course, adding ``root-keys`` and
180180
``key-threshold`` to your repository specification only shifts the
181181
problem, because now you somehow need to make sure that the key IDs you
182182
received were the right ones. How that is done is however outside the
183-
scope of ``cabal`` proper.
183+
scope of :term:`cabal` proper.
184184

185185
More information about the security infrastructure can be found at
186186
https://github.com/haskell/hackage-security.
@@ -196,7 +196,7 @@ repository.
196196
repository my-local-repository
197197
url: file+noindex:///absolute/path/to/directory
198198

199-
``cabal`` will construct the index automatically from the
199+
:term:`cabal` will construct the index automatically from the
200200
``package-name-version.tar.gz`` files in the directory, and will use optional
201201
corresponding ``package-name-version.cabal`` files as new revisions.
202202

@@ -208,7 +208,7 @@ For example, if ``/absolute/path/to/directory`` looks like
208208
bar-0.2.0.0.tar.gz
209209
bar-0.2.0.0.cabal
210210

211-
then ``cabal`` will create an index with two packages:
211+
then :term:`cabal` will create an index with two packages:
212212

213213
- ``foo-0.1.0.0`` using the source and ``.cabal`` file inside
214214
``foo-0.1.0.0.tar.gz``
@@ -221,7 +221,7 @@ then the cache will be stored inside the :cfg-field:`remote-repo-cache` director
221221
The part of the path will be used to determine the cache key part.
222222

223223
.. note::
224-
``cabal-install`` creates a ``.cache`` file, and will aggressively use
224+
:term:`cabal-install:exe:cabal` creates a ``.cache`` file, and will aggressively use
225225
its contents if it exists. Therefore if you change the contents of
226226
the directory, remember to wipe the cache too.
227227

@@ -256,13 +256,13 @@ thus, looks similar to a ``package-name.cabal``'s ``build-depends`` section.
256256
certain versions or marking a specific version as deprecated. To achieve this, add a
257257
local no-index repository to your :ref:`configuration file <config-file-discovery>`,
258258
where the directory contains your custom
259-
``preferred-versions``. After running ``cabal update``, all ``cabal`` operations will honour the
259+
``preferred-versions``. After running ``cabal update``, all :term:`cabal` operations will honour the
260260
configuration.
261261

262262
Legacy repositories
263263
^^^^^^^^^^^^^^^^^^^
264264

265-
Currently ``cabal`` supports single kind of “legacy” repositories.
265+
Currently :term:`cabal` supports single kind of “legacy” repositories.
266266
It is specified using
267267

268268
::
@@ -303,8 +303,8 @@ can be used to create and manage such repositories.
303303
Program options
304304
---------------
305305

306-
Programs that ``cabal`` knows about can be provided with options that will be
307-
passed in whenever the program is invoked by ``cabal``. The configuration file
306+
Programs that :term:`cabal` knows about can be provided with options that will be
307+
passed in whenever the program is invoked by :term:`cabal`. The configuration file
308308
can contain a stanza of ``program-default-options`` with ``<prog>-options``
309309
fields to specify these.
310310

@@ -379,11 +379,11 @@ The list of known programs is:
379379

380380
.. warning::
381381

382-
These options will be used when ``cabal`` invokes the tool as part of the build process or as part of a
382+
These options will be used when :term:`cabal` invokes the tool as part of the build process or as part of a
383383
:pkg-field:`build-tool-depends` declaration, not whenever the tool is invoked by
384384
third parties.
385385

386-
In particular this means that for example ``gcc-options`` will be used when ``cabal``
386+
In particular this means that for example ``gcc-options`` will be used when :term:`cabal`
387387
invokes ``gcc``, which is **not** when C sources are compiled by GHC (even though GHC
388388
might invoke ``gcc`` internally). In order to provide options through GHC for those programs, one has to check the
389389
GHC User guide's `Section <https://downloads.haskell.org/ghc/latest/docs/users_guide/phases.html#forcing-options-to-a-particular-phase>`_.

doc/external-commands.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
External Commands
22
=================
33

4-
``cabal-install`` provides a system for external commands, akin to the ones used by tools like ``git`` or ``cargo``.
4+
:term:`cabal-install:exe:cabal` provides a system for external commands, akin to the ones used by tools like ``git`` or ``cargo``.
55

6-
If you execute ``cabal <cmd>``, ``cabal-install`` will search the path for an executable named ``cabal-<cmd>`` and execute it. The name of the command is passed as the first argument and
6+
If you execute ``cabal <cmd>``, :term:`cabal-install:exe:cabal` will search the path for an executable named ``cabal-<cmd>`` and execute it. The name of the command is passed as the first argument and
77
the remaining arguments are passed afterwards. An error will be thrown in case the custom command is not found. The exit code of cabal when calling an external command is the same as the exit code
88
of the command.
99

10-
The ``$CABAL`` environment variable is set to the path of the ``cabal-install`` executable
10+
The ``$CABAL`` environment variable is set to the path of the :term:`cabal-install:exe:cabal` executable
1111
which invoked the subcommand.
1212

1313
It is strongly recommended that you implement your custom commands by calling the
1414
CLI via the ``$CABAL`` variable rather than linking against the ``Cabal`` library.
1515
There is no guarantee that the subcommand will link against the same version of the
16-
``Cabal`` library as ``cabal-install`` so it would lead to unexpected results and
16+
``Cabal`` library as :term:`cabal-install:exe:cabal` so it would lead to unexpected results and
1717
incompatibilities.
1818

19-
``cabal-install`` can also display the help message of the external command.
19+
:term:`cabal-install:exe:cabal` can also display the help message of the external command.
2020
When ``cabal help <cmd>`` is invoked, then ``cabal-<cmd> <cmd> --help`` will be called so
2121
your external command can display a help message.
2222

doc/getting-started.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Getting Started
44
Installing Cabal
55
----------------
66

7-
The easiest and recommended way to install the ``cabal`` command-line tool
7+
The easiest and recommended way to install the :term:`cabal` command-line tool
88
on Linux, macOS, FreeBSD or Windows is through `ghcup <https://www.haskell.org/ghcup/>`__.
99
It installs the “Haskell toolchain”, which includes Cabal,
1010
the Haskell compiler `GHC <https://www.haskell.org/ghc/>`__
@@ -14,7 +14,7 @@ Creating a new application
1414
--------------------------
1515

1616
We create a minimal Haskell application to get a quick overview
17-
of the ``cabal`` command-line tool:
17+
of the :term:`cabal` command-line tool:
1818

1919
1. How to initialize a Haskell package.
2020
2. How files are organized inside a package.
@@ -125,7 +125,7 @@ In our application, we'll use a package called `haskell-say
125125
terminal with some embellishment.
126126

127127
.. TIP::
128-
If you installed ``cabal`` a while ago but haven't used it recently you may
128+
If you installed :term:`cabal` a while ago but haven't used it recently you may
129129
need to update the package index, you can do this by running ``cabal
130130
update``.
131131

0 commit comments

Comments
 (0)