Skip to content

Commit f13961a

Browse files
committed
Use terms for cabal and cabal-install
1 parent f7d7586 commit f13961a

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

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

641641
.. option:: --project-file=FILE
642642

@@ -678,7 +678,7 @@ Examples:
678678
cabal path
679679
^^^^^^^^^^
680680

681-
``cabal path`` allows to query for paths used by ``cabal``.
681+
``cabal path`` allows to query for paths used by :term:`cabal`.
682682
For example, it allows to query for the directories of the cache, store,
683683
installed binaries, and so on.
684684

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

849-
For example this command will build the latest ``cabal-install`` and symlink
850-
its ``cabal`` executable:
849+
For example this command will build the latest :term:`cabal-install:exe:cabal` and symlink
850+
its :term:`cabal` executable:
851851

852852
::
853853

@@ -856,7 +856,7 @@ its ``cabal`` executable:
856856
In addition, it's possible to use ``cabal install`` to install components
857857
of a local project. For example, with an up-to-date Git clone of the Cabal
858858
repository, this command will build cabal-install HEAD and symlink the
859-
``cabal`` executable:
859+
:term:`cabal` executable:
860860

861861
::
862862

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::
@@ -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

@@ -212,7 +212,7 @@ For example, if ``/absolute/path/to/directory`` looks like
212212
bar-0.2.0.0.tar.gz
213213
bar-0.2.0.0.cabal
214214

215-
then ``cabal`` will create an index with two packages:
215+
then :term:`cabal` will create an index with two packages:
216216

217217
- ``foo-0.1.0.0`` using the source and ``.cabal`` file inside
218218
``foo-0.1.0.0.tar.gz``
@@ -225,7 +225,7 @@ then the cache will be stored inside the :cfg-field:`remote-repo-cache` director
225225
The part of the path will be used to determine the cache key part.
226226

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

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

266266
Legacy repositories
267267
^^^^^^^^^^^^^^^^^^^
268268

269-
Currently ``cabal`` supports single kind of “legacy” repositories.
269+
Currently :term:`cabal` supports single kind of “legacy” repositories.
270270
It is specified using
271271

272272
::
@@ -307,8 +307,8 @@ can be used to create and manage such repositories.
307307
Program options
308308
---------------
309309

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

@@ -375,11 +375,11 @@ The list of known programs is:
375375

376376
.. warning::
377377

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

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