Skip to content

Commit 45b2c34

Browse files
authored
Merge pull request #8182 from ulysses4ever/t8177
docs: move Configuration chapter to cabal-install reference
2 parents bccbb94 + 53b6ea7 commit 45b2c34

9 files changed

+16
-40
lines changed

doc/cabal-commands.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cabal-install Commands
2-
======================
1+
Commands
2+
========
33

44
``cabal help`` groups commands into global, package, new-style project and
55
legacy sections. We talk in detail about some global and package commands.

doc/cabal-config-and-commands.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cabal-install Configuration and Commands
2+
****************************************
3+
4+
.. toctree::
5+
config
6+
cabal-commands

doc/cabal-package.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ directory of the package:
5252

5353
:file:`Setup.hs`
5454
a single-module Haskell program to perform various setup tasks (with
55-
the interface described in the section on :ref:`installing-packages`).
55+
the interface described in the section on :ref:`setup-commands`).
5656
This module should import only modules that will be present in all Haskell
5757
implementations, including modules of the Cabal library. The content of
5858
this file is determined by the :pkg-field:`build-type` setting in the
5959
``.cabal`` file. In most cases it will be trivial, calling on the Cabal
6060
library to do most of the work.
6161

6262
Once you have these, you can create a source bundle of this directory
63-
for distribution. Building of the package is discussed in the section on
64-
:ref:`installing-packages`.
63+
for distribution. Building of the package is demonstrated in the section
64+
:ref:`building-packages`.
6565

6666
One of the purposes of Cabal is to make it easier to build a package
6767
with different Haskell implementations. So it provides abstractions of
@@ -3389,9 +3389,7 @@ a few options:
33893389
sysconfdir=$(destdir)/$(sysconfdir) \
33903390
33913391
- Finally, with the :pkg-field:`build-type` ``Custom``, you can also write your
3392-
own setup script from scratch. It must conform to the interface
3393-
described in the section on :doc:`building and installing
3394-
packages <installing-packages>`, and you may use the Cabal
3392+
own setup script from scratch, and you may use the Cabal
33953393
library for all or part of the work. One option is to copy the source
33963394
of ``Distribution.Simple``, and alter it for your needs. Good luck.
33973395

doc/config-and-install.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

doc/installing-packages.rst renamed to doc/config.rst

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -256,25 +256,3 @@ recommended instead to use a *secure* local repository:
256256
The layout of these secure local repos matches the layout of remote
257257
repositories exactly; the :hackage-pkg:`hackage-repo-tool`
258258
can be used to create and manage such repositories.
259-
260-
.. _installing-packages:
261-
262-
Building and installing packages
263-
================================
264-
265-
To be written
266-
267-
Installing packages from Hackage
268-
--------------------------------
269-
270-
The ``cabal`` tool also can download, configure, build and install a
271-
`Hackage`_ package and all of its
272-
dependencies in a single step. To do this, run:
273-
274-
::
275-
276-
$ cabal install [PACKAGE...]
277-
278-
To browse the list of available packages, visit the `Hackage`_ web site.
279-
280-
.. _Hackage: https://hackage.haskell.org/

doc/developing-packages.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ your libraries and executable sections. For example:
259259
Note that the ``import`` **must** be the first thing in the stanza. For more
260260
information see the :ref:`common-stanzas` section.
261261

262+
.. _building-packages:
262263

263264
Building the package
264265
--------------------

doc/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ Welcome to the Cabal User Guide
88

99
getting-started
1010
intro
11-
config-and-install
1211
concepts-and-development
1312
nix-local-build-overview
14-
cabal-commands
13+
cabal-config-and-commands
1514
cabal-package
1615
cabal-project
1716
setup-commands

doc/intro.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ 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-
For full details, see the section on :doc:`building and installing
106-
packages <installing-packages>`.
107-
108105
Note that ``cabal`` is not the only tool for working with Cabal
109106
packages. Due to the standardised format and a library for reading
110107
``.cabal`` files, there are several other special-purpose tools.

doc/setup-commands.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _setup-commands:
2+
13
Setup.hs Commands
24
=================
35

0 commit comments

Comments
 (0)