Skip to content

Commit e517fcb

Browse files
committed
Be consistent about Cabal field/value and YAML key/value pairs in docs
Changes are also made to the change log to use consistent terminology.
1 parent cd6dce4 commit e517fcb

7 files changed

+45
-47
lines changed

ChangeLog.md

+30-33
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ Behavior changes:
405405
* Drop support for `Cabal` versions before 1.22 and, consequently, GHC versions
406406
before 7.10.
407407
* `stack ghci` and `stack repl` now take into account the values of
408-
`default-language` keys in Cabal files, like they take into account the values
409-
of `default-extensions` keys.
408+
`default-language` fields in Cabal files, like they take into account the
409+
values of `default-extensions` fields.
410410
* Removed `--ghc-paths`, `--global-stack-root` and `--local-bin-path` flags for
411411
`stack path`, deprecated in Stack 1.1.0 in favour of `--programs`,
412412
`--stack-root` and `local-bin` respectively.
@@ -512,7 +512,7 @@ Other enhancements:
512512
user-specific global YAML configuration file (`config.yaml`).
513513
* Experimental: Add option `allow-newer-deps`, which allows users to specify a
514514
subset of dependencies for which version bounds should be ignored
515-
(`allow-newer-deps: ['foo', 'bar']`). This field has no effect unless
515+
(`allow-newer-deps: ['foo', 'bar']`). This key has no effect unless
516516
`allow-newer` is enabled.
517517

518518
Bug fixes:
@@ -739,8 +739,8 @@ Behavior changes:
739739

740740
Other enhancements:
741741

742-
* `stack ls dependencies json` now includes fields `sha256` and `size` for
743-
dependencies of `type` `archive` in `location`.
742+
* The output of `stack ls dependencies json` now includes keys `sha256` and
743+
`size` for dependencies of `type` `archive` in `location`.
744744
[#5280](https://github.com/commercialhaskell/stack/issues/5280)
745745
* Build failures now show a hint to scroll up to the corresponding section
746746
[#5279](https://github.com/commercialhaskell/stack/issues/5279)
@@ -1013,9 +1013,9 @@ Major changes:
10131013
* Drop support for multiple package indices and legacy
10141014
`00-index.tar` style indices. See
10151015
[#4137](https://github.com/commercialhaskell/stack/issues/4137).
1016-
* Support for archives and repos in the `packages` section has
1017-
been removed. Instead, you must use `extra-deps` for such
1018-
dependencies. `packages` now only supports local filepaths.
1016+
* Support for archives and repos in values of the `packages` key has been
1017+
removed. Instead, you must use the `extra-deps` key for such dependencies.
1018+
`packages` now only supports local filepaths.
10191019
* Add support for Git repositories containing (recursive) submodules.
10201020
* Addition of new configuration options for specifying a "pantry
10211021
tree" key, which provides more reproducibility around builds,
@@ -1078,7 +1078,7 @@ Behavior changes:
10781078
* When using `stack script`, custom snapshot files will be resolved
10791079
relative to the directory containing the script.
10801080
* Remove the deprecated `--upgrade-cabal` flag to `stack setup`.
1081-
* Support the `drop-packages` field in `stack.yaml`
1081+
* Support the `drop-packages` key in `stack.yaml`
10821082
* Remove the GPG signing code during uploads. The GPG signatures have
10831083
never been used yet, and there are no plans to implement signature
10841084
verification.
@@ -1190,13 +1190,11 @@ Other enhancements:
11901190
variables. See [#620](https://github.com/commercialhaskell/stack/issues/620).
11911191
* Less verbose output from `stack setup` on Windows. See
11921192
[#1212](https://github.com/commercialhaskell/stack/issues/1212).
1193-
* Add an optional `ignore-expiry` flag to the `hackage-security`
1194-
section of the `~/.stack/config.yaml`. It allows to disable timestamp
1195-
expiration verification just like `cabal --ignore-expiry` does.
1196-
The flag is not enabled by default so that the default functionality
1197-
is not changed.
1198-
* Include default values for most command line flags in the `--help`
1199-
output. See
1193+
* Add an optional `ignore-expiry` key to the `hackage-security` key of
1194+
`~/.stack/config.yaml`. It allows disabling of timestamp expiration
1195+
verification just like `cabal --ignore-expiry` does. The flag is not enabled
1196+
by default so that the default functionality is not changed.
1197+
* Include default values for most command line flags in the `--help` output. See
12001198
[#893](https://github.com/commercialhaskell/stack/issues/893).
12011199
* Set the `GHC_ENVIRONMENT` environment variable to specify dependency
12021200
packages explicitly when running test. This is done to prevent
@@ -1664,7 +1662,7 @@ newer dependency versions).
16641662
Major changes:
16651663

16661664
* Complete overhaul of how snapshots are defined, the `packages` and
1667-
`extra-deps` fields, and a number of related items. For full
1665+
`extra-deps` keys, and a number of related items. For full
16681666
details, please see the
16691667
[writeup](https://www.fpcomplete.com/blog/2017/07/stacks-new-extensible-snapshots)
16701668
on these changes.
@@ -1750,7 +1748,7 @@ Other enhancements:
17501748
Sometimes GHC's heuristics would work fine even before this change,
17511749
for example in `stack ghci`, but this override's GHC's heuristics
17521750
when they're broken by our collecting and processing GHC's output.
1753-
* Extended the `ghc-options` field to support `$locals`, `$targets`,
1751+
* Extended the `ghc-options` key to support `$locals`, `$targets`,
17541752
and `$everything`. See:
17551753
[#3329](https://github.com/commercialhaskell/stack/issues/3329)
17561754
* Better error message for case that `stack ghci` file targets are
@@ -2043,7 +2041,7 @@ Other enhancements:
20432041
([#2384](https://github.com/commercialhaskell/stack/issues/2384))
20442042
* `stack haddock` now shows index.html paths when documentation is already up to
20452043
date. Resolved [#781](https://github.com/commercialhaskell/stack/issues/781)
2046-
* Respects the `custom-setup` field introduced in Cabal 1.24. This supercedes
2044+
* Respects the `custom-setup` stanza introduced in Cabal 1.24. This supercedes
20472045
any `explicit-setup-deps` settings in your `stack.yaml` and trusts the
20482046
package's Cabal file to explicitly state all its dependencies.
20492047
* If system package installation fails, `get-stack.sh` will fail as well. Also
@@ -2174,8 +2172,8 @@ Other enhancements:
21742172

21752173
* `stack haddock` now supports `--haddock-internal`. See
21762174
[#2229](https://github.com/commercialhaskell/stack/issues/2229)
2177-
* Add support for `system-ghc` and `install-ghc` fields to `stack config set`
2178-
command.
2175+
* Add support for `system-ghc` and `install-ghc` subcommands to
2176+
`stack config set` command.
21792177
* Add `ghc-build` option to override autodetected GHC build to use (e.g. gmp4,
21802178
tinfo6, nopie) on Linux.
21812179
* `stack setup` detects systems where gcc enables PIE by default (such as Ubuntu
@@ -2193,7 +2191,7 @@ Other enhancements:
21932191
* Add the `--open` option to "stack hpc report" command, causing the report to
21942192
be opened in the browser.
21952193
* The `stack config set` command now accepts a `--global` flag for suitable
2196-
fields which causes it to modify the global user configuration
2194+
subcommands which causes it to modify the global user configuration
21972195
(`~/.stack/config.yaml`) instead of the project configuration.
21982196
[#2675](https://github.com/commercialhaskell/stack/pull/2675)
21992197
* Information on the latest available snapshots is now downloaded from S3
@@ -2303,8 +2301,7 @@ Major changes:
23032301

23042302
* Add `stack hoogle` command.
23052303
[#55](https://github.com/commercialhaskell/stack/issues/55)
2306-
* Support for absolute file path in `url` field of `setup-info` or
2307-
`--ghc-bindist`
2304+
* Support for absolute file path in `url` key of `setup-info` or `--ghc-bindist`
23082305
* Add support for rendering GHCi scripts targeting different GHCi like
23092306
applications
23102307
[#2457](https://github.com/commercialhaskell/stack/pull/2457)
@@ -2539,11 +2536,11 @@ Behavior changes:
25392536
package version - it is treated as an extra-dep. `stack build local-pkg-1.2.3`
25402537
is an error even if the version number matches the local package
25412538
[#2028](https://github.com/commercialhaskell/stack/issues/2028).
2542-
* Having a `nix:` section no longer implies enabling nix build. This allows the
2543-
user to globally configure whether nix is used (unless the project overrides
2544-
the default explicitly). See
2539+
* A `nix` key in a Stack YAML configuration file no longer implies enabling a
2540+
Nix build. This allows the user to globally configure whether Nix is used
2541+
(unless the project overrides the default explicitly). See
25452542
[#1924](https://github.com/commercialhaskell/stack/issues/1924).
2546-
* Remove deprecated valid-wanted field.
2543+
* Remove deprecated `valid-wanted` key.
25472544
* Docker: mount home directory in container
25482545
[#1949](https://github.com/commercialhaskell/stack/issues/1949).
25492546
* Deprecate `stack path --local-bin-path`; instead use `--local-bin`.
@@ -2931,7 +2928,7 @@ Bug fixes:
29312928

29322929
Major changes:
29332930

2934-
* GHCJS can now be used with stackage snapshots via the new `compiler` field.
2931+
* GHCJS can now be used with stackage snapshots via the new `compiler` key.
29352932
* Windows installers are now available:
29362933
[download them here](http://docs.haskellstack.org/en/stable/install_and_upgrade/#windows)
29372934
[#613](https://github.com/commercialhaskell/stack/issues/613)
@@ -3176,9 +3173,9 @@ Other enhancements:
31763173
[#824](https://github.com/commercialhaskell/stack/issues/824)
31773174
* By default, `stack upgrade` automatically installs GHC as necessary
31783175
[#797](https://github.com/commercialhaskell/stack/issues/797)
3179-
* Added the `ghc-options` field to `stack.yaml`
3176+
* Added the `ghc-options` key to `stack.yaml`
31803177
[#796](https://github.com/commercialhaskell/stack/issues/796)
3181-
* Added the `extra-path` field to `stack.yaml`
3178+
* Added the `extra-path` key to `stack.yaml`
31823179
* Code page changes on Windows only apply to the build command (and its
31833180
synonyms), and can be controlled via a command line flag (still defaults to
31843181
on) [#757](https://github.com/commercialhaskell/stack/issues/757)
@@ -3286,8 +3283,8 @@ Other enhancements:
32863283

32873284
Bug fixes:
32883285

3289-
* Extensions from the `other-extensions` field no longer enabled by default
3290-
[#449](https://github.com/commercialhaskell/stack/issues/449)
3286+
* Extensions from the Cabal `other-extensions` field no longer enabled by
3287+
default [#449](https://github.com/commercialhaskell/stack/issues/449)
32913288
* Fix: haddock forces rebuild of empty packages
32923289
[#452](https://github.com/commercialhaskell/stack/issues/452)
32933290
* Don't copy over executables excluded by component selection

doc/build_overview.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ Given these inputs, Stack attempts the following process when performing a build
5959

6060
This file is parsed to provide the following config values:
6161

62-
* `snapshot` (or, alternatively, `resolver`) (required field)
63-
* `compiler` (optional field)
64-
* `packages` (optional field, defaults to `["."]`)
65-
* `extra-deps` (optional field, defaults to `[]`)
66-
* `flags` (optional field, defaults to `{}`)
67-
* `ghc-options` (optional field, defaults to `{}`)
62+
* `snapshot` (or, alternatively, `resolver`) (required key)
63+
* `compiler` (optional key)
64+
* `packages` (optional key, value defaults to `["."]`)
65+
* `extra-deps` (optional key, value defaults to `[]`)
66+
* `flags` (optional key, value defaults to `{}`)
67+
* `ghc-options` (optional key, value defaults to `{}`)
6868

6969
`flags` and `ghc-options` break down into both _by name_ (applied to a
7070
specific package) and _general_ (general option `*` for flags is only available

doc/glossary.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The following terms are used in Stack's documentation.
77
|Term |Meaning |
88
|--------------------|---------------------------------------------------------|
99
|Cabal |The Haskell Common Architecture for Building Applications and Libraries, provided by the [`Cabal` package](https://hackage.haskell.org/package/Cabal). Also referred to as Cabal (the library) to distinguish it from Cabal (the tool).|
10-
|Cabal file |A file containing a [package description](https://cabal.readthedocs.io/en/stable/cabal-package-description-file.html) used by Cabal, named `<package_name>.cabal`.|
10+
|Cabal file |A file containing a [package description](https://cabal.readthedocs.io/en/stable/cabal-package-description-file.html) used by Cabal, named `<package_name>.cabal`. A Cabal file specifies properties in the form of field/value pairs.|
1111
|Cabal (the tool) |The Haskell tool used for building provided by the [`cabal-install` package](https://hackage.haskell.org/package/cabal-install).|
1212
|CI |Continuous integration. |
1313
|CMake |A [system](https://cmake.org/) for managing build processes.|
@@ -60,4 +60,4 @@ The following terms are used in Stack's documentation.
6060
|Windows |A group of operating systems developed by Microsoft. |
6161
|WSL |[Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/). Provides a Linux environment on Windows.|
6262
|XDG Base Directory Specification|A [specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) of directories relative to which files should be located.|
63-
|YAML |A human-friendly [data serialization language](https://yaml.org/).|
63+
|YAML |A human-friendly [data serialization language](https://yaml.org/). The YAML syntax allows for key/value pairs.|

doc/topics/custom_snapshot.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ ghc-options:
112112
text: -O1
113113
~~~
114114

115-
This works somewhat differently than the stack.yaml `ghc-options` field, in that
115+
This works somewhat differently than the stack.yaml `ghc-options` key, in that
116116
options can only be specified for packages that are mentioned in the custom
117117
snapshot's `packages` list. It sets the ghc-options, rather than extending those
118118
specified in the snapshot being extended.

doc/tutorial/building_existing_projects.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ stack init --force --omit-packages
7979
~~~
8080

8181
Looking at `stack.yaml`, you will see that the excluded packages have been
82-
commented out under the `packages` field. In case wrong packages are excluded
82+
commented out under the `packages` key. In case wrong packages are excluded
8383
you can uncomment the right one and comment the other one.
8484

8585
Packages may get excluded due to conflicting requirements among user packages or
@@ -123,7 +123,7 @@ _Cabal warnings_: `stack init` will show warnings if there were issues in
123123
reading a Cabal file. You may want to pay attention to the warnings as sometimes
124124
they may result in incomprehensible errors later on during dependency solving.
125125

126-
_Package naming_: If the `Name` field defined in a Cabal file does not match
126+
_Package naming_: If the `name` field defined in a Cabal file does not match
127127
with the Cabal file name then `stack init` will refuse to continue.
128128

129129
_User warnings_: When packages are excluded or external dependencies added Stack

doc/tutorial/executing_commands.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ yields output like:
3333
~~~text
3434
Writing the configuration file for the implicit global project to:
3535
.../global-project/stack.yaml. Note: You can change the snapshot via the
36-
snapshot field there.
36+
snapshot key there.
3737
Using the latest snapshot lts-22.31.
3838
I installed the stm package via --package stm
3939
~~~

doc/tutorial/package_description.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,9 @@ may be present in the package's root directory:
136136

137137
A `package.yaml` file can be more concise and less repetitive than the Cabal
138138
file that is generated from it. That is because the Hpack format uses
139-
defaults and top-level fields common to sections. The YAML syntax, which may
140-
already be familiar for some users, can also avoid repetition.
139+
defaults and top-level keys common to other parts of the format. The YAML
140+
syntax, which may already be familiar for some users, can also avoid
141+
repetition.
141142

142143
In particular, the format's defaults can infer the names of exposed and
143144
other modules.

0 commit comments

Comments
 (0)