Skip to content

Commit e4bff7e

Browse files
committed
Merge remote-tracking branch 'origin/stable' into xxx
2 parents 740a15c + 959096a commit e4bff7e

File tree

7 files changed

+95
-57
lines changed

7 files changed

+95
-57
lines changed

doc/GUIDE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2030,6 +2030,23 @@ image:
20302030
and then run `stack image container` and then `docker images` to list
20312031
the images.
20322032

2033+
Note that the executable will be built in the development environment
2034+
and copied to the container, so the dev OS must match that of the
2035+
container OS. This is easily accomplished using [Docker integration](docker_integration.md),
2036+
under which the exe emitted by `stack build` will be built on the
2037+
Docker container, not the local OS.
2038+
2039+
The executable will be stored under `/usr/local/bin/<your-project>-exe`
2040+
in the running container.
2041+
2042+
If you want the container to run the executable immediately on startup
2043+
then set an entrypoint as follows:
2044+
2045+
```yaml
2046+
entrypoints:
2047+
- <your-project>-exe
2048+
```
2049+
20332050
### Nix
20342051
20352052
stack provides an integration with [Nix](http://nixos.org/nix),

doc/README.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,12 @@ or:
2323

2424
wget -qO- https://get.haskellstack.org/ | sh
2525

26-
For detailed instructions and downloads, instructions are available by
27-
operating system/distribution:
28-
29-
* [Windows](install_and_upgrade.md#windows)
30-
* [macOS](install_and_upgrade.md#macos)
31-
* [Ubuntu](install_and_upgrade.md#ubuntu)
32-
* [Debian](install_and_upgrade.md#debian)
33-
* [CentOS / Red Hat / Amazon Linux](install_and_upgrade.md#centos)
34-
* [Fedora](install_and_upgrade.md#fedora)
35-
* [openSUSE / SUSE Linux Enterprise](install_and_upgrade.md#suse)
36-
* [Arch Linux](install_and_upgrade.md#arch-linux)
37-
* [NixOS](install_and_upgrade.md#nixos)
38-
* [Linux (general)](install_and_upgrade.md#linux)
39-
* [FreeBSD](install_and_upgrade.md#freebsd)
40-
41-
[Upgrade instructions](install_and_upgrade.md#upgrade)
26+
On Windows, you can download and install the
27+
[Windows 64-bit Installer](https://www.stackage.org/stack/windows-x86_64-installer).
28+
29+
For detailed instructions and downloads, including many additional
30+
operating systems, check out the
31+
[install and upgrade page](install_and_upgrade.md).
4232

4333
#### Quick Start Guide
4434

@@ -154,23 +144,33 @@ This repository also contains a complete [user guide to using stack
154144
* When using Stack Overflow, please use [the haskell-stack
155145
tag](http://stackoverflow.com/questions/tagged/haskell-stack).
156146

157-
#### Why stack?
158-
159-
stack is a project of the [Commercial Haskell](http://commercialhaskell.com/)
160-
group, spearheaded by [FP Complete](https://www.fpcomplete.com/). It is
161-
designed to answer the needs of commercial Haskell users, hobbyist Haskellers,
162-
and individuals and companies thinking about starting to use Haskell. It is
163-
intended to be easy to use for newcomers, while providing the customizability
164-
and power experienced developers need.
165-
166-
While stack itself has been around since June of 2015, it is based on codebases
167-
used by FP Complete for its corporate customers and internally for years prior.
168-
stack is a refresh of that codebase combined with other open source efforts
169-
like [stackage-cli](https://github.com/fpco/stackage-cli) to meet the needs of
170-
users everywhere.
171-
172-
A large impetus for the work on stack was a [large survey of people interested
173-
in
174-
Haskell](https://www.fpcomplete.com/blog/2015/05/thousand-user-haskell-survey),
175-
which rated build issues as a major concern. The stack team hopes that stack
176-
can address these concerns.
147+
#### Why Stack?
148+
149+
Stack is a build tool for Haskell designed to answer the needs of
150+
Haskell users new and experienced alike. It has a strong focus on
151+
reproducible build plans, multi-package projects, and a consistent,
152+
easy-to-learn interface, while providing the customizability and
153+
power experienced developers need. As a build tool, Stack does not
154+
stand alone. It is built on the great work provided by:
155+
156+
* The __Glasgow Haskell Compiler__ (GHC), the premiere Haskell
157+
compiler. Stack will manage your GHC installations and automatically
158+
select the appropriate compiler version for your project.
159+
* The __Cabal build system__, a specification for defining Haskell
160+
packages, together with a library for performing builds.
161+
* The __Hackage package repository__, providing more than ten thousand
162+
open source libraries and applications to help you get your work
163+
done.
164+
* The __Stackage package collection__, a curated set of packages from
165+
Hackage which are regularly tested for compatibility. Stack defaults
166+
to using Stackage package sets to avoid dependency problems.
167+
168+
Stack is provided by a team of volunteers and companies under the
169+
auspices of the [Commercial Haskell](http://commercialhaskell.com/)
170+
group. The project was spearheaded by
171+
[FP Complete](https://www.fpcomplete.com/) to answer the needs of
172+
commercial Haskell users, and has since become a thriving open source
173+
project meeting the needs of Haskell users of all stripes.
174+
175+
If you'd like to get involved with Stack, check out the
176+
[newcomers label on the Github issue tracker](https://github.com/commercialhaskell/stack/issues?q=is%3Aopen+is%3Aissue+label%3Anewcomer).

doc/custom_snapshot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ it enables the `developer` cabal flag:
113113
resolver: lts-7.1
114114
packages:
115115
- text-1.2.2.1
116-
ghc-options:
116+
flags:
117117
text:
118118
developer: true
119119
```

doc/docker_integration.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Docker integration
22
===============================================================================
33

4+
**Note:** This page is mainly about building Haskell packages inside docker containers.
5+
If you want to deploy your built Haskell programs into a docker container,
6+
look [here](GUIDE.md#docker) instead.
7+
48
`stack` has support for automatically performing builds inside a Docker
59
container, using volume mounts and user ID switching to make it mostly seamless.
610
FP Complete provides images for use with stack that include GHC, tools, and

doc/faq.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ So that this doesn't become repetitive: for the reasons behind the answers
44
below, see the [Architecture](architecture.md) page. The goal of the answers
55
here is to be as helpful and concise as possible.
66

7+
## What version of GHC is used when I run something like `stack ghci`?
8+
9+
The version of GHC, as well as which packages can be installed, are
10+
specified by the _resolver_. This may be something like `lts-8.12`,
11+
which is from the
12+
[Long Term Support (LTS) Haskell](https://github.com/fpco/lts-haskell/)
13+
project. The [user guide](GUIDE.md) discusses resolvers in more
14+
detail.
15+
16+
Which resolver is used is determined by finding the relevant
17+
`stack.yaml` configuration file for the directory you're running the
18+
command from. This essentially works by:
19+
20+
1. Check for a `STACK_YAML` environment variable or the `--stack-yaml`
21+
command line argument
22+
2. If none present, check for a `stack.yaml` file in the current
23+
directory or any parents
24+
3. If no `stack.yaml` was found, use the _implicit global_
25+
26+
The implicit global is a shared project used whenever you're outside
27+
of another project. It's a sort of "mutable shared state" that you
28+
should be aware of when working with Stack. The most recent request
29+
when working with the implicit global is how to move to a more recent
30+
LTS snapshot. You can do this by running the following from outside of
31+
a project:
32+
33+
stack config set resolver lts
34+
735
## Where is stack installed and will it interfere with `ghc` (etc) I already have installed?
836

937
Stack itself is installed in normal system locations based on the mechanism you

doc/install_and_upgrade.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,42 +24,26 @@ find links that always point to the latest bindists
2424

2525
## Windows
2626

27-
*Note*: Due to specific Windows limitations,
28-
[some temporary workarounds](https://www.fpcomplete.com/blog/2015/08/stack-ghc-windows)
29-
may be required. It is strongly advised to set your `STACK_ROOT` environment
30-
variable similarly to your root (e.g., `set STACK_ROOT=c:\stack_root`) *before*
31-
running `stack`.
32-
33-
*Note:* while generally 32-bit GHC is better tested on Windows, there are
34-
reports that recent versions of Windows only work with the 64-bit version of
35-
Stack (see
36-
[issue #393](https://github.com/commercialhaskell/stack/issues/393)).
37-
38-
### Installer
39-
4027
We recommend installing to the default location with these installers, as that
4128
will make `stack install` and `stack upgrade` work correctly out of the box.
4229

43-
* [Windows 32-bit Installer](https://www.stackage.org/stack/windows-i386-installer)
4430
* [Windows 64-bit Installer](https://www.stackage.org/stack/windows-x86_64-installer)
31+
* [Windows 32-bit Installer](https://www.stackage.org/stack/windows-i386-installer)
32+
33+
If in doubt: you should prefer the 64-bit installer.
4534

4635
### Manual download
4736

4837
* Download the latest release:
4938

50-
* [Windows 32-bit](https://www.stackage.org/stack/windows-i386)
5139
* [Windows 64-bit](https://www.stackage.org/stack/windows-x86_64)
40+
* [Windows 32-bit](https://www.stackage.org/stack/windows-i386)
5241

5342
* Unpack the archive and place `stack.exe` somewhere on your `%PATH%` (see
5443
[Path section below](#path)) and you can then run `stack` on the command line.
5544

5645
* Now you can run `stack` from the terminal.
5746

58-
NOTE: These executables have been built and tested on a Windows 7, 8.1, and 10
59-
64-bit machines. They should run on older Windows installs as well, but have not
60-
been tested. If you do test, please edit and update this page to indicate as
61-
such.
62-
6347
## macOS
6448

6549
We generally test on the current version of macOS, but Stack is known to work

doc/yaml_configuration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ packages:
128128
- wai
129129
```
130130

131+
If unspecified, `subdirs` defaults to `['.']` (i.e. look only in the top-level
132+
directory). Note that if you specify a value of `subdirs`, then `'.'` is _not_
133+
included by default and needs to be explicitly specified if a required package
134+
is found in the top-level directory of the repository.
135+
131136
#### Local dependency packages (`extra-dep`)
132137
A `location` key can be accompanied by an `extra-dep` key. When the
133138
`extra-dep` key is set to `true` it indicates that the package should be

0 commit comments

Comments
 (0)