Skip to content

Commit 530e73c

Browse files
committed
Don't use newlines inside backticks
Line breaks inside backticks are preserved in output.
1 parent 046245a commit 530e73c

9 files changed

Lines changed: 60 additions & 67 deletions

doc/GUIDE.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Haskell tooling you need. This guide will follow that stack-centric approach.
1616

1717
### What makes stack special?
1818

19-
The primary stack design point is __reproducible builds__. If you run `stack
20-
build` today, you should get the same result running `stack build` tomorrow.
19+
The primary stack design point is __reproducible builds__. If you run `stack build`
20+
today, you should get the same result running `stack build` tomorrow.
2121
There are some cases that can break that rule (changes in your operating system
2222
configuration, for example), but, overall, stack follows this design philosophy
2323
closely. To make this a simple process, stack uses curated package sets
@@ -1047,8 +1047,8 @@ project. To do that you can fix those versions by specifying them in the
10471047
extra-deps section and then use `stack solver` to figure out whether it is
10481048
feasible to use those or what other dependencies are needed as a result.
10491049

1050-
If you want to change the resolver for your project, you can run `stack solver
1051-
--resolver <resolver name>` and it will figure out the changes needed for you.
1050+
If you want to change the resolver for your project, you can run
1051+
`stack solver --resolver <resolver name>` and it will figure out the changes needed for you.
10521052

10531053
Let's see what happens if we change the resolver to lts-2.22:
10541054

@@ -1626,8 +1626,8 @@ a package as a *dependency package*.
16261626
## ghc/runghc
16271627
16281628
You'll sometimes want to just compile (or run) a single Haskell source file,
1629-
instead of creating an entire Cabal package for it. You can use `stack exec
1630-
ghc` or `stack exec runghc` for that. As simple helpers, we also provide the
1629+
instead of creating an entire Cabal package for it. You can use `stack exec ghc`
1630+
or `stack exec runghc` for that. As simple helpers, we also provide the
16311631
`stack ghc` and `stack runghc` commands, for these common cases.
16321632
16331633
## script interpreter
@@ -1759,8 +1759,8 @@ algorithm stack uses to find this is:
17591759
The first two provide a convenient method for using an alternate configuration.
17601760
For example: `stack build --stack-yaml stack-7.8.yaml` can be used by your CI
17611761
system to check your code against GHC 7.8. Setting the `STACK_YAML` environment
1762-
variable can be convenient if you're going to be running commands like `stack
1763-
ghc` in other directories, but you want to use the configuration you defined in
1762+
variable can be convenient if you're going to be running commands like `stack ghc`
1763+
in other directories, but you want to use the configuration you defined in
17641764
a specific project.
17651765
17661766
If stack does not find a `stack.yaml` in any of the three specified locations,
@@ -1839,8 +1839,8 @@ Now the differences:
18391839
packages. So for example, in stack, `stack test` does the same job as
18401840
`cabal install --run-tests`, though the latter *additionally* performs an
18411841
installation that you may not want. The closer command equivalent is
1842-
`cabal install --enable-tests --only-dependencies && cabal configure
1843-
--enable-tests && cabal build && cabal test` (newer versions of
1842+
`cabal install --enable-tests --only-dependencies && cabal configure --enable-tests && cabal build && cabal test`
1843+
(newer versions of
18441844
cabal-install may make this command shorter).
18451845
* __Isolated by default__.
18461846
* This has been a pain point for new stack users. In cabal, the

doc/MAINTAINER_GUIDE.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
* Update `stack-nightly.yaml` with latest nightly and remove extra-deps
1010
* Run `stack --stack-yaml=stack-nightly.yaml test`
1111
* Ensure integration tests pass on a representative Windows, macOS, and Linux (Linux
12-
is handled by Jenkins automatically): `stack install --pedantic && stack test
13-
--pedantic --flag stack:integration-tests` . The actual release script will
14-
perform a more thorough test for every platform/variant prior to uploading, so
15-
this is just a pre-check
12+
is handled by Jenkins automatically):
13+
`stack install --pedantic && stack test --pedantic --flag stack:integration-tests`.
14+
The actual release script will perform a more thorough test for every platform/variant
15+
prior to uploading, so this is just a pre-check
1616
* Ensure `stack haddock` works (Travis CI now does this)
1717
* Stack builds with `stack-7.8.yaml` (Travis CI now does this)
1818
* stack can build the wai repo
@@ -73,8 +73,8 @@ for requirements to perform the release, and more details about the tool.
7373

7474
A note about the `etc/scripts/*-releases.sh` scripts: if you run them from a
7575
different working tree than the scripts themselves (e.g. if you have `stack1`
76-
and `stack2` trees, and run `cd stack1;
77-
../stack2/etc/scripts/vagrant-release.sh`) the scripts and Vagrantfiles from the
76+
and `stack2` trees, and run `cd stack1; ../stack2/etc/scripts/vagrant-release.sh`)
77+
the scripts and Vagrantfiles from the
7878
tree containing the script will be used to build the stack code in the current
7979
directory. That allows you to iterate on the release process while building a
8080
consistent and clean stack version.
@@ -110,8 +110,8 @@ consistent and clean stack version.
110110
* Build sdist using `stack sdist . --pvp-bounds=both`, and upload it to the
111111
Github release with a name like `stack-X.Y.Z-sdist-0.tar.gz`.
112112

113-
* Publish Github release. Use e.g. `git shortlog -s v1.1.2..rc/v1.2.0|sed
114-
's/^[0-9 ]*/* /'|sort -f` to get the list of contributors.
113+
* Publish Github release. Use e.g. `git shortlog -s v1.1.2..rc/v1.2.0|sed 's/^[0-9 ]*/* /'|sort -f`
114+
to get the list of contributors.
115115

116116
* Upload package to Hackage: `stack upload . --pvp-bounds=both`
117117

@@ -126,11 +126,9 @@ consistent and clean stack version.
126126

127127
* (SKIP) [Flag the Arch Linux package as out-of-date](https://www.archlinux.org/packages/community/x86_64/stack/flag/)
128128

129-
* Push signed Git tag, matching Github release tag name, e.g.: `git tag -d vX.Y.Z; git tag -u
130-
0x575159689BEFB442 vX.Y.Z && git push -f origin vX.Y.Z`
129+
* Push signed Git tag, matching Github release tag name, e.g.: `git tag -d vX.Y.Z; git tag -u 0x575159689BEFB442 vX.Y.Z && git push -f origin vX.Y.Z`
131130

132-
* Reset the `release` branch to the released commit, e.g.: `git checkout release
133-
&& git merge --ff-only vX.Y.Z && git push origin release`
131+
* Reset the `release` branch to the released commit, e.g.: `git checkout release && git merge --ff-only vX.Y.Z && git push origin release`
134132

135133
* Update the `stable` branch similarly
136134

doc/build_command.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ synonyms in the `--help` output. These commands are:
2222
* `stack install` is the same as `stack build --copy-bins`
2323

2424
The advantage of the synonym commands is that they're convenient and short. The
25-
advantage of the options is that they compose. For example, `stack build --test
26-
--copy-bins` will build libraries, executables, and test suites, run the test
25+
advantage of the options is that they compose. For example, `stack build --test --copy-bins`
26+
will build libraries, executables, and test suites, run the test
2727
suites, and then copy the executables to your local bin path (more on this
2828
below).
2929

@@ -56,8 +56,8 @@ benchmarks. If you want more control over a package, you must add it to your
5656

5757
## Target syntax
5858

59-
In addition to a number of options (like the aforementioned `--test`), `stack
60-
build` takes a list of zero or more *targets* to be built. There are a number
59+
In addition to a number of options (like the aforementioned `--test`), `stack build`
60+
takes a list of zero or more *targets* to be built. There are a number
6161
of different syntaxes supported for this list:
6262

6363
* *package*, e.g. `stack build foobar`, is the most commonly used target. It
@@ -94,8 +94,7 @@ of different syntaxes supported for this list:
9494
have a component with the same name. To continue the above example,
9595
`stack build :mytestsuite`.
9696
* Side note: the commonly requested `run` command is not available
97-
because it's a simple combination of `stack build :exename && stack
98-
exec exename`
97+
because it's a simple combination of `stack build :exename && stack exec exename`
9998

10099
* *directory*, e.g. `stack build foo/bar`, will find all local packages that
101100
exist in the given directory hierarchy and then follow the same procedure as
@@ -106,8 +105,7 @@ of different syntaxes supported for this list:
106105

107106
Finally: if you provide no targets (e.g., running `stack build`), stack will
108107
implicitly pass in all of your local packages. If you only want to target
109-
packages in the current directory or deeper, you can pass in `.`, e.g. `stack
110-
build .`.
108+
packages in the current directory or deeper, you can pass in `.`, e.g. `stack build .`.
111109

112110
To get a list of the available targets in your project, use `stack ide targets`.
113111

doc/coverage.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ When your project has these properties, you will get the following:
2222
2) A unified textual and HTML report, considering the coverage on all local
2323
libraries, based on all of the tests that were run.
2424

25-
3) An index of all generated HTML reports, at `$(stack path
26-
--local-hpc-root)/index.html`.
25+
3) An index of all generated HTML reports, at
26+
`$(stack path --local-hpc-root)/index.html`.
2727

2828
## "stack hpc report" command
2929

@@ -81,17 +81,17 @@ However, advanced users may want to understand exactly how `--coverage` works:
8181
When switching on this flag, it will usually cause all local packages to be
8282
rebuilt (see [#1940](https://github.com/commercialhaskell/stack/issues/1940).
8383

84-
2. Before the build runs with `--coverage`, the contents of `stack path
85-
--local-hpc-root` gets deleted. This prevents old reports from getting mixed
84+
2. Before the build runs with `--coverage`, the contents of `stack path --local-hpc-root`
85+
gets deleted. This prevents old reports from getting mixed
8686
with new reports. If you want to preserve report information from multiple
8787
runs, copy the contents of this path to a new folder.
8888

8989
3. Before a test run, if a `test-name.tix` file exists in the package directory,
9090
it will be deleted.
9191

9292
4. After a test run, it will expect a `test-name.tix` file to exist. This file
93-
will then get loaded, modified, and outputted to `$(stack path
94-
--local-hpc-root)/pkg-name/test-name/test-name.tix)`.
93+
will then get loaded, modified, and outputted to
94+
`$(stack path --local-hpc-root)/pkg-name/test-name/test-name.tix)`.
9595

9696
The `.tix` file gets modified to remove coverage file that isn't associated
9797
with a library. So, this means that you won't get coverage information for
@@ -107,14 +107,13 @@ However, advanced users may want to understand exactly how `--coverage` works:
107107

108108
5. Once we have a `.tix` file for a test, we also generate a textual and HTML
109109
report for it. The textual report is sent to the terminal. The index of the
110-
test-specific HTML report is available at `$(stack path
111-
--local-hpc-root)/pkg-name/test-name/index.html`
110+
test-specific HTML report is available at
111+
`$(stack path --local-hpc-root)/pkg-name/test-name/index.html`
112112

113113
6. After the build completes, if there are multiple output `*.tix` files, they
114114
get combined into a unified report. The index of this report will be
115115
available at `$(stack path --local-hpc-root)/combined/all/index.html`
116116

117117
7. Finally, an index of the resulting coverage reports is generated. It links to
118118
the individual coverage reports (one for each test-suite), as well as the
119-
unified report. This index is available at `$(stack path
120-
--local-hpc-root)/index.html`
119+
unified report. This index is available at `$(stack path --local-hpc-root)/index.html`

doc/docker_integration.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ behaviour.
137137
### reset - Reset the Docker "sandbox"
138138

139139
In order to preserve the contents of the in-container home directory between
140-
runs, a special "sandbox" directory is volume-mounted into the container. `stack
141-
docker reset` will reset that sandbox to its defaults.
140+
runs, a special "sandbox" directory is volume-mounted into the container.
141+
`stack docker reset` will reset that sandbox to its defaults.
142142

143143
Note: `~/.stack` is separately volume-mounted, and is left alone during reset.
144144

@@ -323,8 +323,8 @@ Additional notes
323323
### Volume-mounts and ephemeral containers
324324

325325
Since filesystem changes outside of the volume-mounted project directory are not
326-
persisted across runs, this means that if you `stack exec sudo apt-get install
327-
some-ubuntu-package`, that package will be installed but then the container it's
326+
persisted across runs, this means that if you `stack exec sudo apt-get install some-ubuntu-package`,
327+
that package will be installed but then the container it's
328328
installed in will disappear, thus causing it to have no effect. If you wish to
329329
make this kind of change permanent, see later instructions for how to create a
330330
[derivative Docker image](#derivative-image).
@@ -353,8 +353,8 @@ and publish port 3000.
353353

354354
If you do want to do all your work, including editing, in the container, it
355355
might be better to use a persistent container in which you can install Ubuntu
356-
packages. You could get that by running something like `stack
357-
--docker-container-name=NAME --docker-persist exec --plain bash`. This
356+
packages. You could get that by running something like
357+
`stack --docker-container-name=NAME --docker-persist exec --plain bash`. This
358358
means when the container exits, it won't be deleted. You can then restart it
359359
using `docker start -a -i NAME`. It's also possible to detach from a container
360360
while it continues running in the background using by pressing Ctrl-P Ctrl-Q,
@@ -419,8 +419,8 @@ Troubleshooting
419419
### "No Space Left on Device", but 'df' shows plenty of disk space
420420

421421
This is likely due to the storage driver Docker is using, in combination with
422-
the large size and number of files in these images. Use `docker info|grep
423-
'Storage Driver'` to determine the current storage driver.
422+
the large size and number of files in these images. Use `docker info|grep 'Storage Driver'`
423+
to determine the current storage driver.
424424

425425
We recommend using either the `overlay` or `aufs` storage driver for stack, as
426426
they are least likely to give you trouble. On Ubuntu, `aufs` is the default for
@@ -467,9 +467,8 @@ change to take effect:
467467
<small>
468468
The above commands turn off `dnsmasq` usage in NetworkManager
469469
configuration and restart network manager. They can be reversed by executing
470-
`sudo sed 's@#dns=dnsmasq@dns=dnsmasq@' -i
471-
/etc/NetworkManager/NetworkManager.conf && sudo service network-manager
472-
restart`. These instructions are adapted from
470+
`sudo sed 's@#dns=dnsmasq@dns=dnsmasq@' -i /etc/NetworkManager/NetworkManager.conf && sudo service network-manager restart`.
471+
These instructions are adapted from
473472
[the Shipyard Project's QuickStart guide](https://github.com/shipyard/shipyard/wiki/QuickStart#127011-dns-server-problem-on-ubuntu).
474473
</small>
475474

doc/faq.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,17 @@ detailed discussion of stack's behavior when `system-ghc` is enabled.
191191

192192
## How do I upgrade to GHC 7.10.2 with stack?
193193

194-
If you already have a prior version of GHC use `stack --resolver ghc-7.10 setup
195-
--reinstall`. If you don't have any GHC installed, you can skip the
196-
`--reinstall`.
194+
If you already have a prior version of GHC use `stack --resolver ghc-7.10 setup --reinstall`.
195+
If you don't have any GHC installed, you can skip the `--reinstall`.
197196

198197
## How do I get extra build tools?
199198

200199
stack will automatically install build tools required by your packages or their
201200
dependencies, in particular alex and happy.
202201

203202
__NOTE__: This works when using lts or nightly resolvers, not with ghc or
204-
custom resolvers. You can manually install build tools by running, e.g., `stack
205-
build alex happy`.
203+
custom resolvers. You can manually install build tools by running, e.g.,
204+
`stack build alex happy`.
206205

207206
## How does stack choose which snapshot to use when creating a new config file?
208207

@@ -418,8 +417,8 @@ If you manage to work around this in other distributions, please include instruc
418417
## Where does the output from `--ghc-options=-ddump-splices` (and other `-ddump*` options) go?
419418
420419
These are written to `*.dump-*` files inside the package's `.stack-work`
421-
directory. Specifically, they will be available at `PKG-DIR/$(stack path
422-
--dist-dir)/build/SOURCE-PATH`, where `SOURCE-PATH` is the path to the source
420+
directory. Specifically, they will be available at
421+
`PKG-DIR/$(stack path --dist-dir)/build/SOURCE-PATH`, where `SOURCE-PATH` is the path to the source
423422
file, relative to the location of the `*.cabal` file. When building named
424423
components such as test-suites, `SOURCE-PATH` will also include
425424
`COMPONENT/COMPONENT-tmp`, where `COMPONENT` is the name of the component.

doc/ghcjs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ To use GHCJS with stack, place a GHCJS version in the [`compiler`](yaml_configur
99
You can also build existing stack projects which target GHC, and instead build
1010
them with GHCJS. For example: `stack build --compiler ghcjs-0.2.0.9006020_ghc-7.10.3`
1111

12-
Sidenote: If you receive a message like `The program 'ghcjs' version >=0.1 is
13-
required but the version of .../ghcjs could not be determined.`, then you may
14-
need to install a different version of `node`. See
12+
Sidenote: If you receive a message like
13+
`The program 'ghcjs' version >=0.1 is required but the version of .../ghcjs could not be determined.`,
14+
then you may need to install a different version of `node`. See
1515
[issue #1496](https://github.com/commercialhaskell/stack/issues/1496).
1616

1717
## Example Configurations

doc/nonstandard_project_init.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ flags:
3636
manual: true
3737
```
3838

39-
It is also possible to pass the same flag to multiple packages, i.e. `stack
40-
build --flag *:necessary`
39+
It is also possible to pass the same flag to multiple packages, i.e.
40+
`stack build --flag *:necessary`
4141

4242
Currently one needs to list all of your modules that interpret flags in the
4343
`other-modules` section of a cabal file. `cabal-install` has a different

doc/yaml_configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ Packages that come from the snapshot global database are not affected.
206206

207207
### image
208208

209-
The image settings are used for the creation of container images using `stack
210-
image container`, e.g.
209+
The image settings are used for the creation of container images using
210+
`stack image container`, e.g.
211211

212212
```yaml
213213
image:
@@ -665,8 +665,8 @@ The 5 parameters are: `author-email`, `author-name`, `category`, `copyright` and
665665
name of the holder of the copyright on the package and the year(s) from which
666666
copyright is claimed. For example: `Copyright: (c) 2006-2007 Joe Bloggs`
667667
* _github-username_ - used to generate `homepage` and `source-repository` in
668-
cabal. For instance `github-username: myusername` and `stack new my-project
669-
new-template` would result:
668+
cabal. For instance `github-username: myusername` and `stack new my-project new-template`
669+
would result:
670670

671671
```yaml
672672
homepage: http://github.com/myusername/my-project#readme

0 commit comments

Comments
 (0)