Skip to content

Commit 4b1b309

Browse files
committed
Corrections / concision atop #2185
1 parent 97563a0 commit 4b1b309

File tree

1 file changed

+16
-26
lines changed

1 file changed

+16
-26
lines changed

doc/yaml_configuration.md

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,24 @@ and [non-project-specific](#non-project-config) options in:
1616

1717
## Project-specific config
1818

19-
Project-specific options are only valid in the `stack.yaml` file local to a project, not in the user or global config files.
19+
Project-specific options are only valid in the `stack.yaml` file local to a
20+
project, not in the user or global config files.
2021

2122
> Note: We define **project** to mean a directory that contains a `stack.yaml`
22-
> file. We define **package** the same way that Cabal defines a package. (This
23-
> means a single `.cabal` file---which may contain a library, a test suite, and
24-
> multiple executables.) Note that a single **Stack project** may contain
25-
> several **packages**---which might be located in a directory on your
26-
> computer, on Hackage, in a remote Git or Mercurial repository, or even in a
27-
> tarball somewhere on the internet.
28-
29-
In your project-specific options, you specify both **which of your packages**
30-
to build and **which dependencies to use** when building these packages. Stack
31-
treats _packages_ and _dependencies_ differently. For dependencies, Stack only
32-
builds the library part, while for packages Stack builds the library, the
33-
executables, and the test suite.
34-
35-
The below sections will show you how to tell Stack where to find your packages
36-
and dependencies.
37-
38-
Note that, using the options described below, it **is possible** to specify in
39-
your `stack.yaml` multiple sources of the same package/dependency. For example,
40-
you might specify a version of a project on your local machine, a Stackage
41-
snapshot that contains the same package, as well as a version of the same
42-
package on Hackage. For simplicity, **Stack will only use one version of each
43-
package/dependency.** There are rules that dictate how Stack chooses which
44-
version to use. Read [the section on
45-
"shadowing"](http://docs.haskellstack.org/en/stable/architecture/#shadowing) to
46-
learn more about these rules.
23+
> file, which specifies how to build a set of packages. We define **package** to
24+
> be a package with a `.cabal file.
25+
26+
In your project-specific options, you specify both **which local packages** to
27+
build and **which dependencies to use** when building these packages. Unlike the
28+
user's local packages, these dependencies aren't built by default. They only get
29+
built when needed.
30+
31+
Shadowing semantics, described
32+
[here](http://docs.haskellstack.org/en/stable/architecture/#shadowing), are
33+
applied to your configuration. So, if you add a package to your `packages` list,
34+
it will be used even if you're using a snapshot that specifies a particular
35+
version. Similarly, `extra-deps` will shadow the version specified in the
36+
resolver.
4737

4838
### packages
4939

0 commit comments

Comments
 (0)