Skip to content

Commit 11e9737

Browse files
authored
Merge pull request #5806 from commercialhaskell/stable
Stable
2 parents 6288417 + 7eb5b18 commit 11e9737

File tree

10 files changed

+267
-193
lines changed

10 files changed

+267
-193
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,24 +116,36 @@ confirmation and we will close it.
116116

117117
## Documentation
118118

119-
If you would like to help with documentation, please note that for most cases
120-
the Wiki has been deprecated in favor of markdown files placed in a new `/doc`
121-
subdirectory of the repository itself. Please submit a
119+
The files which make up Stack's documentation are located in the `doc`
120+
directory of the repository. They are formatted in the
121+
[Markdown syntax](https://daringfireball.net/projects/markdown/), with some
122+
extensions.
123+
124+
Those files are rendered on [haskellstack.org](http://haskellstack.org) by
125+
[Read the Docs](https://readthedocs.org/) using
126+
[MkDocs](https://www.mkdocs.org/). The `stable` branch of the repository
127+
provides the 'stable' version of the online documentation. The `master` branch
128+
provides the 'latest' version of the documentation.
129+
130+
The 'stable' version of the online documentation is intended to be applicable to
131+
the latest released version of Stack. If you would like to help with that
132+
documentation, please submit a
122133
[pull request](https://help.github.com/articles/using-pull-requests/) with your
123134
changes/additions based off the
124-
[the stable branch](https://github.com/commercialhaskell/stack/tree/stable).
135+
[stable branch](https://github.com/commercialhaskell/stack/tree/stable).
125136

126-
The documentation is rendered on [haskellstack.org](http://haskellstack.org) by
127-
readthedocs.org using Sphinx and CommonMark. Since links and formatting vary
128-
from GFM, please check the documentation there before submitting a PR to fix
129-
those.
137+
The specific versions of the online documentation (eg `v: v2.7.5`) are generated
138+
from the content of files at the point in the responsitory's history specified
139+
by the corresponding release tag. Consequently, that content is fixed once
140+
released.
130141

131-
If your changes move or rename files, or subsume Wiki content, please continue
132-
to leave a file/page in the old location temporarily, in addition to the new
133-
location. This will allow users time to update any shared links to the old
134-
location. Please also update any links in other files, or on the Wiki, to point
135-
to the new file location.
142+
The Markdown syntax supported by MkDocs can differ from the GitHub Flavored
143+
Markdown ([GFM](https://github.github.com/gfm/)) supported for content on
144+
GitHub.com. Please refer to the
145+
[MkDocs documentation](https://www.mkdocs.org/user-guide/writing-your-docs/#writing-with-markdown)
146+
to ensure your pull request will achieve the desired rendering.
136147

148+
The configuration file for MkDocs is `mkdocs.yml`.
137149

138150
## Code
139151

doc/GUIDE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ We've already used `stack exec` multiple times in this guide. As you've likely
11461146
already guessed, it allows you to run executables, but with a slightly modified
11471147
environment. In particular: `stack exec` looks for executables on Stack's bin
11481148
paths, and sets a few additional environment variables (like adding those paths
1149-
to `PATH`, and setting `GHC_PACKAGE_PATH`, which tells GHC which package
1149+
to the PATH, and setting `GHC_PACKAGE_PATH`, which tells GHC which package
11501150
databases to use).
11511151
11521152
If you want to see exactly what the modified environment looks like, try:
@@ -1830,7 +1830,6 @@ There are lots of resources available for learning more about Stack:
18301830
* The [home page](http://haskellstack.org)
18311831
* The [Stack mailing list](https://groups.google.com/d/forum/haskell-stack)
18321832
* The [FAQ](faq.md)
1833-
* The [Stack wiki](https://github.com/commercialhaskell/stack/wiki)
18341833
* The [haskell-stack tag on Stack Overflow](http://stackoverflow.com/questions/tagged/haskell-stack)
18351834
* [Another getting started with Stack tutorial](http://seanhess.github.io/2015/08/04/practical-haskell-getting-started.html)
18361835
* [Why is Stack not Cabal?](https://www.fpcomplete.com/blog/2015/06/why-is-stack-not-cabal)

doc/developing_on_windows.md

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,53 +19,51 @@ commands](https://github.com/msys2/msys2/wiki/Using-packages) that work with
1919
tools — should be started with `stack exec -- pacman`.
2020

2121
The Stack-supplied MSYS2 can itself be updated with the Stack-supplied `pacman`.
22-
See the MSYS2 guide ['III. Updating packages'](https://www.msys2.org/wiki/MSYS2-installation/). If the Stack-supplied `pacman` has a version that is
23-
5.0.1.6403 or greater (see `stack exec -- pacman --version`) then the command to
24-
update is simply:
22+
See the MSYS2 guide
23+
['III. Updating packages'](https://www.msys2.org/wiki/MSYS2-installation/). If
24+
the Stack-supplied `pacman` has a version that is 5.0.1.6403 or greater (see
25+
`stack exec -- pacman --version`) then the command to update is simply:
2526

2627
stack exec -- pacman -Syuu
2728

28-
This command may need to be run more than once, until everything is reported by `pacman` as 'up to date' and 'nothing to do'.
29+
This command may need to be run more than once, until everything is reported by
30+
`pacman` as 'up to date' and 'nothing to do'.
2931

3032
## Setup.hs ##
3133

32-
`Setup.hs` is automatically run inside the stack environment. So when
33-
you need to launch another tool you don't need to prefix the command
34-
with `stack exec --` within the custom `Setup.hs` file.
34+
`Setup.hs` is automatically run inside the Stack environment. So when you need
35+
to launch another tool you don't need to prefix the command with `stack exec --`
36+
within the custom `Setup.hs` file.
3537

3638
## Pacman packages to install for common Haskell packages ##
3739

38-
The following lists MSYS2 packages known to allow the installation of
39-
some common Haskell packages on Windows. Feel free to submit
40-
additional entries via a pull request.
40+
The following lists MSYS2 packages known to allow the installation of some
41+
common Haskell packages on Windows. Feel free to submit additional entries via a
42+
pull request.
4143

42-
* For [text-icu](https://github.com/bos/text-icu) install `mingw64/mingw-w64-x86_64-icu`
44+
* For [text-icu](https://github.com/bos/text-icu) install
45+
`mingw64/mingw-w64-x86_64-icu`
4346

44-
## Cmake ##
47+
## CMake ##
4548

46-
Cmake has trouble finding other tools even if they are available on
47-
the `PATH`. Likely this is not a cmake problem but one of the
48-
environment not fully integrating. For example GHC comes with a copy
49-
of GCC which is not installed by MSYS2 itself. If you want to use this
50-
GCC you can provide a full path to it, or find it first with
51-
`System.Directory.findExecutable` if you want to launch GCC from a
52-
Haskell file such as `Setup.hs`.
49+
CMake has trouble finding other tools even if they are available on the PATH.
50+
Likely this is not a CMake problem but one of the environment not fully
51+
integrating. For example GHC comes with a copy of GCC which is not installed by
52+
MSYS2 itself. If you want to use this GCC you can provide a full path to it, or
53+
find it first with `System.Directory.findExecutable` if you want to launch GCC
54+
from a Haskell file such as `Setup.hs`.
5355

54-
Experience tells that the `mingw-w64` versions of make and cmake are
55-
most likely to work. Though there are other versions available through
56-
pacman, so have a look to see what works for you. Both tools can be
57-
installed with the commands:
56+
Experience tells that the `mingw-w64` versions of Make and CMake are most
57+
likely to work. Though there are other versions available through `pacman`, so
58+
have a look to see what works for you. Both tools can be installed with the
59+
commands:
5860

59-
```
60-
stack exec -- pacman -S mingw-w64-x86_64-make
61-
stack exec -- pacman -S mingw-w64-x86_64-cmake
62-
```
61+
stack exec -- pacman -S mingw-w64-x86_64-make
62+
stack exec -- pacman -S mingw-w64-x86_64-cmake
6363

64-
Even though make and cmake are then both installed into the same
65-
environment. Cmake still seems to have trouble to find make. To help
66-
cmake find GCC and make supply the following flags:
64+
Even though Make and CMake are then both installed into the same environment,
65+
CMake still seems to have trouble to find Make. To help CMake find GCC and Make
66+
supply the following flags:
6767

68-
```
69-
-DCMAKE_C_COMPILER=path
70-
-DCMAKE_MAKE_PROGRAM=path
71-
```
68+
-DCMAKE_C_COMPILER=path
69+
-DCMAKE_MAKE_PROGRAM=path

doc/faq.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -196,41 +196,40 @@ the following line to your .cabal file:
196196

197197
You could also use the [`--custom-preprocessor-extensions` flag](yaml_configuration.md#custom-preprocessor-extensions)
198198

199-
## I already have GHC installed, can I still use stack?
199+
## I already have GHC installed, can I still use Stack?
200200

201-
Yes. In its default configuration, stack will simply ignore any system GHC
202-
installation and use a sandboxed GHC that it has installed itself (typically
203-
via the `stack setup` command). You can find these sandboxed GHC installations
204-
in `~/.stack/programs/$platform/ghc-$version/`.
201+
Yes. In its default configuration, Stack will simply ignore any system GHC
202+
installation and use a sandboxed GHC that it has installed itself. You can find
203+
these sandboxed GHC installations in the `ghc-*` directories in the
204+
`stack path --programs` directory.
205205

206-
If you would like stack to use your system GHC installation, use the
206+
If you would like Stack to use your system GHC installation, use the
207207
[`--system-ghc` flag](yaml_configuration.md#system-ghc) or run
208-
`stack config set system-ghc --global true` to make stack check your
209-
`PATH` for a suitable GHC by default.
208+
`stack config set system-ghc --global true` to make Stack check your PATH for a
209+
suitable GHC by default.
210210

211-
Note that stack can only use a system GHC installation if its version is
212-
compatible with the configuration of the current project, particularly the
213-
[`resolver` setting](yaml_configuration.md#resolver).
211+
Stack can only use a system GHC installation if its version is compatible with
212+
the configuration of the current project, particularly the
213+
[`resolver` or `snapshot` setting](yaml_configuration.md#resolver).
214214

215-
Note that GHC installation doesn't work for all OSes, so in some cases you
215+
GHC installation doesn't work for all operating systems, so in some cases you
216216
will need to use `system-ghc` and install GHC yourself.
217217

218-
## How does stack determine what GHC to use?
218+
## How does Stack determine what GHC to use?
219219

220-
In its default configuration, stack determines from the current project which
221-
GHC version, architecture etc. it needs. It then looks in
222-
`~/.stack/programs/$platform/ghc-$version/` for a compatible GHC, requesting
223-
to install one via `stack setup` if none is found.
220+
In its default configuration, Stack determines from the current project which
221+
GHC version, architecture etc it needs. It then looks in the `ghc-<version>`
222+
subdirectory of the `stack path --programs` directory for a compatible GHC,
223+
requesting to install one via `stack setup` if none is found.
224224

225225
If you are using the [`--system-ghc` flag](yaml_configuration.md/#system-ghc) or
226-
have configured `system-ghc: true` either in the project `stack.yaml`
227-
or the global `~/.stack/config.yaml`, stack will use the first GHC that it finds
228-
on your `PATH`, falling back on its sandboxed installations only if the found GHC
229-
doesn't comply with the various requirements (version, architecture) that your
230-
project needs.
226+
have configured `system-ghc: true` either in the project `stack.yaml` or the
227+
global `config.yaml`, Stack will use the first GHC that it finds on your PATH,
228+
falling back on its sandboxed installations only if the found GHC doesn't comply
229+
with the various requirements (version, architecture) that your project needs.
231230

232231
See [this issue](https://github.com/commercialhaskell/stack/issues/420) for a
233-
detailed discussion of stack's behavior when `system-ghc` is enabled.
232+
detailed discussion of Stack's behavior when `system-ghc` is enabled.
234233

235234
## How do I upgrade to GHC 7.10.2 with stack?
236235

@@ -563,12 +562,12 @@ Yes:
563562
564563
## How do I resolve linker errors when running `stack setup` or `stack build` on macOS?
565564
566-
This is likely to be caused by having a LLVM installation and default Apple
567-
Clang compiler both under the `PATH`. The symptom of this issue is a linker
568-
error "bad relocation (Invalid pointer diff)". The compiler picks up
569-
inconsistent versions of binaries and the mysterious error occurs.
565+
This is likely to be caused by having both a LLVM installation and default Apple
566+
Clang compiler on the PATH. The symptom of this issue is a linker error "bad
567+
relocation (Invalid pointer diff)". The compiler picks up inconsistent versions
568+
of binaries and the mysterious error occurs.
570569
571-
The workaround is to remove LLVM binaries from the `PATH`.
570+
The workaround is to remove LLVM binaries from the PATH.
572571
573572
## How do I suppress `'-nopie'` warnings with `stack build` on macOS?
574573

doc/glossary.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The following terms are used in Stack's documentation.
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).|
1010
|Cabal file|A file containing a [package description](https://cabal.readthedocs.io/en/stable/cabal-package.html) used by Cabal, named `<package_name>.cabal`.|
1111
|Cabal (the tool)|The Haskell build tool provided by the [`cabal-install` package](https://hackage.haskell.org/package/cabal-install).|
12+
|CMake |A [system](https://cmake.org/) for managing build processes.|
1213
|`config.yaml` |A non-project-specific configuration file used by Stack. |
1314
|Docker |A [platform](https://www.docker.com/) for developing, shipping, and running applications. It can package and run an application in a loosely isolated environment called a _container_.|
1415
|Emacs |[GNU Emacs](https://www.gnu.org/software/emacs/), an extensible, customisable text editor.|
@@ -21,11 +22,14 @@ The following terms are used in Stack's documentation.
2122
|GHCup |An [installer](https://www.haskell.org/ghcup/) for Haskell.
2223
|Git |A [distributed version control system](https://git-scm.com/).|
2324
|Hackage |The [Haskell Package Repository](https://hackage.haskell.org/).
25+
|Haddock |The [document generation tool](https://hackage.haskell.org/package/haddock) for Haskell libraries.|
2426
|'Haskell' extension|The ['Haskell' extension]() for VS Code. |
2527
|HLS |[Haskell Language Server](https://haskell-language-server.readthedocs.io/en/latest/), an implementation of the Language Server Protocol for Haskell.|
28+
|Homebrew |A [package manager](https://brew.sh/) for macOS or Linux, or its executable `brew`.|
2629
|Hpack |A [format](https://github.com/sol/hpack) for Haskell packages or the executable `hpack` that produces a Cabal file from `package.yaml`.|
2730
|Linux |A family of operating systems based on the Linux kernal. |
2831
|macOS |The primary operating system for Apple's Mac computers. Previously known as Mac OS X or OS X.|
32+
|Make |A [build automation tool](https://www.gnu.org/software/make/).|
2933
|MSYS2 |The [MSYS2](https://www.msys2.org/) software distribution and building platform for Windows.|
3034
|Nix |A purely functional [package manager](https://nixos.org/), available for Linux and macOS.|
3135
|`package.yaml` |A file that describes a package in the Hpack format. |

0 commit comments

Comments
 (0)