Skip to content

Commit 70e6795

Browse files
committed
Use terms for cabal and cabal-install
1 parent 8eb8239 commit 70e6795

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
@@ -261,7 +261,7 @@ cabal user-config
261261

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

266266
- ``cabal user-config init`` creates a new configuration file.
267267

@@ -672,7 +672,7 @@ Examples:
672672
Read dependency version bounds from the v2-style freeze file
673673
(by default, ``cabal.project.freeze``) instead of the package
674674
description file. ``--new-freeze-file`` is an alias for this flag
675-
that can be used with pre-2.4 ``cabal``.
675+
that can be used with pre-2.4 :term:`cabal`.
676676

677677
.. option:: --project-file=FILE
678678

@@ -714,7 +714,7 @@ Examples:
714714
cabal path
715715
^^^^^^^^^^
716716

717-
``cabal path`` allows to query for paths used by ``cabal``.
717+
``cabal path`` allows to query for paths used by :term:`cabal`.
718718
For example, it allows to query for the directories of the cache, store,
719719
installed binaries, and so on.
720720

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

885-
For example this command will build the latest ``cabal-install`` and symlink
886-
its ``cabal`` executable:
885+
For example this command will build the latest :term:`cabal-install:exe:cabal` and symlink
886+
its :term:`cabal` executable:
887887

888888
::
889889

@@ -892,7 +892,7 @@ its ``cabal`` executable:
892892
In addition, it's possible to use ``cabal install`` to install components
893893
of a local project. For example, with an up-to-date Git clone of the Cabal
894894
repository, this command will build cabal-install HEAD and symlink the
895-
``cabal`` executable:
895+
:term:`cabal` executable:
896896

897897
::
898898

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
@@ -367,7 +367,7 @@ describe the package as a whole:
367367
what syntax to expect and what each part means.
368368

369369
The version number you specify will affect both compatibility and
370-
behaviour. Most tools (including the Cabal library and the ``cabal``
370+
behaviour. Most tools (including the Cabal library and the :term:`cabal`
371371
program) understand a range of versions of the Cabal specification.
372372
Older tools will of course only work with older versions of the
373373
Cabal specification that was known at the time. Most of the time,
@@ -443,7 +443,7 @@ describe the package as a whole:
443443

444444
If the build type is anything other than ``Custom``, then the
445445
``Setup.hs`` file *must* be exactly the standardized content
446-
discussed below. This is because in these cases, ``cabal`` will
446+
discussed below. This is because in these cases, :term:`cabal` will
447447
ignore the ``Setup.hs`` file completely, whereas other methods of
448448
package management, such as ``runhaskell Setup.hs [CMD]``, still
449449
rely on the ``Setup.hs`` file.
@@ -481,7 +481,7 @@ describe the package as a whole:
481481
main = defaultMain
482482
483483
For build type ``Custom``, the file ``Setup.hs`` can be customized,
484-
and will be used both by ``cabal`` and other tools.
484+
and will be used both by :term:`cabal` and other tools.
485485

486486
For most packages, the build type ``Simple`` is sufficient. For more exotic
487487
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::
@@ -102,7 +102,7 @@ You *must* provide a non-empty list of local packages in your project, filling
102102
out either a ``packages`` field or an ``optional-packages`` field or both to
103103
satisfy this requirement.
104104

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

@@ -325,7 +325,7 @@ package, and thus apply globally:
325325

326326
:default: 1
327327

328-
Control the verbosity of ``cabal`` commands, valid values are from 0
328+
Control the verbosity of :term:`cabal` commands, valid values are from 0
329329
to 3.
330330

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

361361
Requires ``ghc >= 9.8``.
362362

@@ -430,9 +430,9 @@ package, and thus apply globally:
430430
:since: 3.7
431431

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

437437
There are three package databases involved with most builds:
438438

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``
@@ -89,7 +89,7 @@ The configuration file location is determined as follows:
8989

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

@@ -123,13 +123,13 @@ file:
123123
* ``~/.local/bin`` for executables installed with ``cabal install``.
124124

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

128128
Repository specification
129129
------------------------
130130

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

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

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

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

187187
More information about the security infrastructure can be found at
188188
https://github.com/haskell/hackage-security.
@@ -198,7 +198,7 @@ repository.
198198
repository my-local-repository
199199
url: file+noindex:///absolute/path/to/directory
200200

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

@@ -214,7 +214,7 @@ For example, if ``/absolute/path/to/directory`` looks like
214214
bar-0.2.0.0.tar.gz
215215
bar-0.2.0.0.cabal
216216

217-
then ``cabal`` will create an index with two packages:
217+
then :term:`cabal` will create an index with two packages:
218218

219219
- ``foo-0.1.0.0`` using the source and ``.cabal`` file inside
220220
``foo-0.1.0.0.tar.gz``
@@ -227,7 +227,7 @@ then the cache will be stored inside the :cfg-field:`remote-repo-cache` director
227227
The part of the path will be used to determine the cache key part.
228228

229229
.. note::
230-
``cabal-install`` creates a ``.cache`` file, and will aggressively use
230+
:term:`cabal-install:exe:cabal` creates a ``.cache`` file, and will aggressively use
231231
its contents if it exists. Therefore if you change the contents of
232232
the directory, remember to wipe the cache too.
233233

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

268268
Legacy repositories
269269
^^^^^^^^^^^^^^^^^^^
270270

271-
Currently ``cabal`` supports single kind of “legacy” repositories.
271+
Currently :term:`cabal` supports single kind of “legacy” repositories.
272272
It is specified using
273273

274274
::
@@ -309,8 +309,8 @@ can be used to create and manage such repositories.
309309
Program options
310310
---------------
311311

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

@@ -377,11 +377,11 @@ The list of known programs is:
377377

378378
.. warning::
379379

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

384-
In particular this means that for example ``gcc-options`` will be used when ``cabal``
384+
In particular this means that for example ``gcc-options`` will be used when :term:`cabal`
385385
invokes ``gcc``, which is **not** when C sources are compiled by GHC (even though GHC
386386
might invoke ``gcc`` internally). In order to provide options through GHC for those programs, one has to check the
387387
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)