Skip to content

Commit 2cd4094

Browse files
committed
Add other admonitions
1 parent c1de703 commit 2cd4094

File tree

2 files changed

+45
-27
lines changed

2 files changed

+45
-27
lines changed

doc/GUIDE.md

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ using the `stack setup` command.
118118
You'll get intermediate download percentage statistics while the download is
119119
occurring. This command may take some time, depending on download speeds.
120120

121-
__NOTE__: GHC will be installed to your Stack programs directory, so calling
122-
`ghc` on the command line won't work. See the `stack exec`, `stack ghc`, and
123-
`stack runghc` commands below for more information.
121+
!!! note
122+
123+
GHC will be installed to your Stack programs directory, so calling `ghc` on
124+
the command line won't work. See the `stack exec`, `stack ghc`, and
125+
`stack runghc` commands below for more information.
124126

125127
Once a version of GHC is installed, Stack will then build your project.
126128

@@ -323,10 +325,11 @@ the remainder of this guide will cover more advanced `build` functions and
323325
features, such as building test and Haddocks at the same time, or constantly
324326
rebuilding blocking on file changes.
325327

326-
*On a philosophical note:* Running the `build` command twice with the same
327-
options and arguments should generally be a no-op (besides things like rerunning
328-
test suites), and should, in general, produce a reproducible result between
329-
different runs.
328+
!!! note
329+
330+
Using the `build` command twice with the same options and arguments should
331+
generally do nothing (besides things like rerunning test suites), and
332+
should, in general, produce a reproducible result between different runs.
330333

331334
## Adding dependencies
332335

@@ -610,8 +613,10 @@ stack init
610613
Assuming it finds a match, it will write your `stack.yaml` file, and everything
611614
will work.
612615

613-
(Note: `yackage` does not currently support Hpack, but you can also use
614-
`hpack-convert` should you need to generate a `package.yaml`.)
616+
!!! note
617+
618+
The `yackage` package does not currently support Hpack, but you can also use
619+
`hpack-convert` should you need to generate a `package.yaml` file.
615620

616621
#### Excluded Packages
617622

@@ -984,7 +989,7 @@ Completed 2 action(s).
984989
~~~
985990

986991
We first cleaned our project to clear old results so we know exactly what Stack
987-
is trying to do. Note that is says it is building all executables for
992+
is trying to do. Note that it says it is building all executables for
988993
`helloworld` once, and that after a successful build of all of them, only
989994
specified executables will be rebuilt. If we change the source code of
990995
`test/Spec.hs`, say to:
@@ -1039,9 +1044,11 @@ You can use the `--no-run-tests` and `--no-run-benchmarks` flags to disable
10391044
running of these components. You can also use `--no-rerun-tests` to prevent
10401045
running a test suite which has already passed and has not changed.
10411046

1042-
NOTE: Stack doesn't build or run test suites and benchmarks for non-local
1043-
packages. This is done so that running a command like `stack test` doesn't need
1044-
to run 200 test suites!
1047+
!!! note
1048+
1049+
Stack doesn't build or run test suites and benchmarks for non-local
1050+
packages. This is done so that a command like `stack test` doesn't need to
1051+
run 200 test suites!
10451052

10461053
## Multi-package projects
10471054

@@ -1097,10 +1104,12 @@ In addition to local directories, you can also refer to packages available in a
10971104
Git repository or in a tarball over HTTP/HTTPS. This can be useful for using a
10981105
modified version of a dependency that hasn't yet been released upstream.
10991106

1100-
Please note that when adding upstream packages directly to your project it is
1101-
important to distinguish _local packages_ from the upstream _dependency
1102-
packages_. Otherwise you may have trouble running `stack ghci`. See
1103-
[stack.yaml documentation](yaml_configuration.md#packages) for more details.
1107+
!!! note
1108+
1109+
When adding upstream packages directly to your project it is important to
1110+
distinguish _local packages_ from the upstream _dependency packages_.
1111+
Otherwise you may have trouble running `stack ghci`. See
1112+
[stack.yaml documentation](yaml_configuration.md#packages) for more details.
11041113

11051114
## Flags and GHC options
11061115

@@ -1197,10 +1206,12 @@ packages, you can add them to your `stack.yaml` file. See the
11971206
[documentation section on ghc-options](yaml_configuration.md#ghc-options)
11981207
for more information.
11991208

1200-
## The `stack path` command
1209+
!!! note
12011210

1202-
NOTE: That's it, the heavy content of this guide is done! Everything from here
1203-
on out is simple explanations of commands. Congratulations!
1211+
That's it, the heavy content of this guide is done! Everything from here on
1212+
out is simple explanations of commands. Congratulations!
1213+
1214+
## The `stack path` command
12041215

12051216
Generally, you don't need to worry about where Stack stores various files. But
12061217
some people like to know this stuff. That's when the `stack path` command is
@@ -1294,6 +1305,11 @@ follows the Unix convention of `--` to separate these. For example, command:
12941305

12951306
~~~text
12961307
stack exec --package stm -- echo I installed the stm package via --package stm
1308+
~~~
1309+
1310+
yields ouput like:
1311+
1312+
~~~text
12971313
Run from outside a project, using implicit global project config
12981314
Using latest snapshot resolver: lts-18.3
12991315
Writing global (non-project-specific) config file to: /home/michael/.stack/global/stack.yaml

doc/maintainers/archive/releases.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ any Linux distribution.
1919

2020
- Add nh2's cache:
2121

22-
~~~sh
23-
cachix use static-haskell-nix
24-
~~~
22+
~~~sh
23+
cachix use static-haskell-nix
24+
~~~
25+
26+
!!! note
2527

26-
NOTE: to clear cache index, use `rm $HOME/.cache/nix/binary-cache-v5.sqlite*`
27-
(useful if someone else uploads new stuff to the cache and you want to use it
28-
right away). The recent `narinfo-cache-positive`/`negative-ttl` options might
29-
also help.
28+
To clear cache index, use `rm $HOME/.cache/nix/binary-cache-v5.sqlite*`
29+
(useful if someone else uploads new stuff to the cache and you want to use
30+
it right away). The recent `narinfo-cache-positive`/`negative-ttl` options
31+
might also help.
3032

3133
- Check out Stack commit to be released to `~/stack-release` (or elsewhere, in
3234
which case adjust following instructions)

0 commit comments

Comments
 (0)