@@ -6,62 +6,54 @@ Title: Getting started
66
77# Getting started
88
9- Stack is a modern, cross-platform tool for building Haskell code.
10-
11- This introductory guide takes a new Stack user through the typical workflows.
12- This guide will not teach Haskell or involve much code, and it requires no prior
13- experience with the Haskell packaging system or other tools used for, or during,
14- building Haskell code. Terms used in the guide are defined in the
15- [ glossary] ( ../glossary.md ) .
16-
17- Some of Stack's features will not be needed regularly or by all users. See
18- Stack's [ commands] ( ../commands/index.md ) and
19- [ configuration] ( ../configure/index.md ) for information about those
20- features.
21-
22- ## Stack's functions
23-
24- Stack handles the management of your toolchain (including GHC — the Glasgow
25- Haskell Compiler — and, for Windows users, MSYS2), building and registering
26- libraries, building dependencies on tools used during building, and more. While
27- it can use existing tools on your system, Stack has the capacity to be your
28- one-stop shop for all Haskell tooling you need. This guide will follow that
29- Stack-centric approach.
30-
31- ## What makes Stack special?
32-
33- The primary Stack design point is __ reproducible builds__ . If you run
34- ` stack build ` today, you should get the same result running ` stack build `
35- tomorrow. There are some cases that can break that rule (changes in your
36- operating system configuration, for example), but, overall, Stack follows this
37- design philosophy closely. To make this a simple process, Stack uses curated
38- package sets called __ snapshots__ .
39-
40- Stack has also been designed from the ground up to be user friendly, with an
41- intuitive, discoverable command line interface. For many users, simply
42- downloading Stack and reading ` stack --help ` will be enough to get up and
43- running. This guide provides a more gradual tour for users who prefer that
44- learning style.
45-
46- To build your project, Stack uses a project-level configuration file, named
47- ` stack.yaml ` , in the root directory of your project as a sort of blueprint. That
48- file contains a reference to the snapshot (also known as a __ resolver__ ) which
49- your package will be built against.
50-
51- Finally, Stack is __ isolated__ : it will not make changes outside of specific
52- Stack directories. Stack-built files generally go in either the Stack root
53- directory or ` ./.stack-work ` directories local to each project. The
54- [ Stack root] ( ../topics/stack_root.md ) directory holds packages belonging to
55- snapshots and any Stack-installed versions of GHC. Stack will not tamper with
56- any system version of GHC or interfere with packages installed by other tools
57- used for building Haskell code, such as Cabal (the tool).
58-
59- ## Downloading and Installation
60-
61- The [ documentation dedicated to downloading Stack] ( ../install_and_upgrade.md )
62- has the most up-to-date information for a variety of operating systems. Instead
63- of repeating that content here, please go check out that page and come back here
64- when you can successfully run ` stack --version ` .
65-
66- We also assume that the directory reported by ` stack path --local-bin ` has been
67- added to the PATH.
9+ Stack is a program for developing [ Haskell] ( https://www.haskell.org/ ) projects.
10+
11+ This guide to getting started takes a new Stack user through the ways that Stack
12+ is typically used. It will not teach Haskell or involve much code, and it
13+ requires no prior experience of Stack or other Haskell tools.
14+
15+ ??? question "What are other Haskell tools?"
16+
17+ Haskell code is compiled by the
18+ [Glasgow Haskell Compiler](https://www.haskell.org/ghc/) (GHC), which can
19+ also be used interactively. Stack can manage versions of GHC. GHC provides
20+ commands such as `ghc`, `ghci`, `runghc` and `ghc-pkg`.
21+
22+ Cabal (the tool) is a tool provided by the
23+ [`cabal-install`](https://hackage.haskell.org/package/cabal-install) Haskell
24+ package. It aims to simplify the process of managing Haskell software by
25+ automating the fetching, configuration, compilation and installation of
26+ Haskell libraries and programs. These are goals that Stack shares. Stack can
27+ be used independently of Cabal (the tool) but users can also use both, if
28+ they wish.
29+
30+ Haskell Language Server (HLS) is an implementation of the Language Server
31+ Protocol for Haskell and used by Haskell extensions for code editors.
32+
33+ [GHCup](https://www.haskell.org/ghcup/) is a tool that can manage other
34+ Haskell tools, including Stack, GHC, HLS and Cabal (the tool). Stack can use
35+ GHCup to manage versions of GHC, as well as manage GHC directly.
36+
37+ Terms used in the guide will be explained as they are introduced and are also
38+ defined in the [ glossary] ( ../glossary.md ) .
39+
40+ Some of Stack's features will not be needed regularly or by all users. Other
41+ parts of Stack's documentation include its [ commands] ( ../commands/index.md ) and
42+ its [ configuration] ( ../configure/index.md ) .
43+
44+ ## Setting up
45+
46+ The goal of setting up is a ` stack ` executable on the PATH. As we will see, when
47+ Stack is used, it sets other things up as needed.
48+
49+ * [ PATH] : An environment variable that specifies a list of directories searched for executable files.
50+
51+ For further information about setting up, see the
52+ [ documentation] ( ../install_and_upgrade.md ) on that topic. Return here when you
53+ know that Stack is on the PATH.
54+
55+ This guide assumes that the directory where Stack install executables (the
56+ location reported by ` stack path --local-bin ` ) has been added to the PATH.
57+
58+ This guide assumes that your computer's operating system is one of Linux, macOS
59+ or Windows. Stack's commands are the same on all operating systems.
0 commit comments