You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: resources/haskell-stack-notes.md
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
## Installation
4
4
5
+
**Do not ever install the Haskell Platform!**
6
+
7
+
Install the Haskell language compiler, REPL, and build tool using [Stack](https://docs.haskellstack.org/en/stable/README/).
8
+
5
9
Visit the [Get Started page on haskell-lang.org](https://haskell-lang.org/get-started) or read the [Stack documentation](https://docs.haskellstack.org/en/stable/README/) for the most up-to-date instructions for installing Haskell using the Stack platform. Avoid using other installation solutions, including any variant of the Haskell Platform.
6
10
7
11
On other Unix and Unix-like systems, you can generally install directly by using one of the following commands:
@@ -27,23 +31,22 @@ To set up a full project, enter the following commands:
27
31
28
32
1.`stack new project-name` where `project-name` is whatever you want to call your project
29
33
2.`cd project-name` to switch to the new directory that Stack will have created for your project
30
-
3.`stack setup` to create a basic project framework
31
-
4.`stack build` to compile the project
32
-
5.`stack exec project-name-exe` to run the compiled output
34
+
3.`stack build` to compile the project
35
+
4.`stack exec project-name-exe` to run the compiled output
33
36
34
37
## Upgrading Stack or GHC
35
38
36
39
-`stack update` will update your packages, but you don't generally need to do this manually.
37
40
-`stack upgrade` will reinstall Stack from source, including GHC.
38
41
-`stack config set resolver lts` will update Stack (globally or locally within a project) to the latest LTS
39
-
-`stack config set resolver lts-9.3` will set Stack to use a specific LTS
42
+
-`stack config set resolver lts-11.3` will set Stack to use a specific LTS
40
43
-`stack exec -- ghc --version` will tell you what version of GHC you are using.
41
44
42
45
If you want to use a specific version of GHC for your global Stack installation, edit your `~/.stack/global-project/stack.yaml` file, and set the resolver to whichever version prefer, for example:
43
46
44
47
-`resolver: lts-6.11` for GHC 7.10.3
45
-
-`resolver: lts-7.16` for GHC 8.0.1
46
48
-`resolver: lts-9.5` for GHC 8.0.2
49
+
-`resolver: lts-11.3` for GHC 8.2.2
47
50
48
51
For project-specific installations of Stack, edit your project's local `stack.yaml` file instead.
0 commit comments