Skip to content

Commit a39b98b

Browse files
committed
Update glossary for package and project. Refine online docs.
1 parent 5cda34c commit a39b98b

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

doc/glossary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ The following terms are used in Stack's documentation.
3636
|Make |A [build automation tool](https://www.gnu.org/software/make/).|
3737
|MSYS2 |The [MSYS2](https://www.msys2.org/) software distribution and building platform for Windows.|
3838
|Nix |A purely functional [package manager](https://nixos.org/), available for Linux and macOS.|
39+
|package |A Haskell package is an organised collection of Haskell code and related files. It is described by a Cabal file or a `package.yaml` file, which is itself part of the package.|
3940
|`package.yaml` |A file that describes a package in the Hpack format. |
4041
|Pantry |A library for content-addressable Haskell package management, provided by the [`pantry` package](https://hackage.haskell.org/package/pantry). A dependency of Stack.|
4142
|PATH |The `PATH` environment variable, specifying a list of directories searched for executable files.|
43+
|project |A Stack project is a local directory that contains a project-level configuration file (`stack.yaml`). A project may relate to more than one local package.|
4244
|PVP |The Haskell [Package Versioning Policy](https://pvp.haskell.org/), which tells developers of libraries how to set their version numbers.|
4345
|REPL |An interactive (run-eval-print loop) programming environment.|
4446
|resolver |A synonym for snapshot. |

doc/yaml_configuration.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
Stack is configured by the content of YAML files. Some Stack operations can also
66
be customised by the use of scripts.
77

8+
!!! note
9+
10+
A Haskell package is an organised collection of Haskell code and related
11+
files. It is described by a Cabal file or a `package.yaml` file (which can
12+
be used to generate a Cabal file). The package description is itself part of
13+
the package. Its file is located in the root directory of a local package.
14+
15+
A Stack project is a local directory that contains a Stack project-level
16+
configuration file (`stack.yaml`). A project may relate to more than one
17+
local package. A single-package project's directory will usually also be the
18+
package's root directory.
19+
820
## YAML configuration
921

1022
Stack's YAML configuration options break down into
@@ -69,12 +81,6 @@ Cabal file (named `<package_name>.cabal`), see the
6981
Project-specific configuration options are valid only in a project-level
7082
configuration file (`stack.yaml`).
7183

72-
!!! note
73-
74-
We define **project** to mean a directory that contains a `stack.yaml`
75-
file, which specifies how to build a set of packages. We define **package** to
76-
be a package with a Cabal file or an Hpack `package.yaml` file.
77-
7884
In your project-specific options, you specify both **which local packages** to
7985
build and **which dependencies to use** when building these packages. Unlike the
8086
user's local packages, these dependencies aren't built by default. They only get
@@ -269,11 +275,14 @@ drop-packages:
269275

270276
!!! info
271277

272-
In older snapshots, it used to be handy to drop Cabal for reasons listed in
273-
Stackage issue
274-
[#4425](https://github.com/commercialhaskell/stackage/issues/4425). However,
275-
since around February 2020 (LTS-14.27 and nightly-2020-02-08), Cabal is not
276-
directly included in snapshots, so dropping Cabal no longer has any effect.
278+
Stackage snapshots LTS Haskell 14.27 (GHC 8.6.5) and earlier, and Nightly
279+
2022-02-08 (GHC 8.8.2) and earlier, included directly the `Cabal` package.
280+
Later snapshots do not include directly that package (which is a GHC boot
281+
package).
282+
283+
For the older Stackage snapshots, it could be handy to drop the
284+
snapshot-specified `Cabal` package, to avoid building that version of the
285+
package. For the later snapshots, there is no package version to drop.
277286

278287
### user-message
279288

0 commit comments

Comments
 (0)