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: site/get-started.markdown
+17-29Lines changed: 17 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,8 @@ isGettingStarted: true
5
5
---
6
6
7
7
# Get started
8
-
Welcome, new Haskeller! Read on to quickly set up your Haskell dev environment, execute your first lines of code, and get directions for further learning!
8
+
9
+
Welcome, new Haskeller! Read on to quickly set up your Haskell dev environment, execute your first lines of code, and get directions for further learning.
9
10
10
11
## Content
11
12
-[Set up Haskell dev environment](#set-up-haskell-dev-environment)
@@ -18,7 +19,7 @@ Welcome, new Haskeller! Read on to quickly set up your Haskell dev environment,
18
19
19
20
## Set up Haskell dev environment
20
21
21
-
Complete Haskell dev environment consists of Haskell toolchain (compiler, language server, build tool) and editor with good haskell support. The quickest way to get this set up is to:
22
+
A complete Haskell dev environment consists of the Haskell toolchain (compiler, language server, build tool) and an editor with good Haskell support. The quickest way to get this set up is to:
22
23
23
24
1. Use GHCup to install and manage Haskell toolchain.
24
25
2. Use VSCode as the editor, with the Haskell extension installed.
@@ -27,33 +28,27 @@ Complete Haskell dev environment consists of Haskell toolchain (compiler, langua
27
28
28
29
[GHCup](https://www.haskell.org/ghcup/#) is a universal installer for Haskell that will install for you everything you need to program in Haskell, and then will also help you manage those installations in the future (update, switch versions, ...).
29
30
30
-
Follow instructions at [GHCup webpage](https://www.haskell.org/ghcup/#) to install GHCup. Then, use it to install the Haskell Toolchain, which consists of:
31
-
32
-
1.**GHC** -> Haskell compiler. We will use it below to run our examples, but in practice, you will mostly be using a build tool like `cabal` or `Stack` to build your code, instead of `GHC` directly.
33
-
2.**HLS** -> Haskell Language Server -> You won't use this directly, instead your code editor will use it in the background to provide you with a great experience while editing Haskell code.
34
-
3.**cabal** -> Haskell build tool -> You will use this to structure your Haskell projects, build them, run them, define dependencies, ...
35
-
4.**Stack** -> Haskell build tool -> alternative to `cabal`
31
+
Follow the instructions on [the GHCup webpage](https://www.haskell.org/ghcup/#) to install GHCup. Then use it to install the Haskell Toolchain, which consists of:
36
32
33
+
1.**GHC** -> The Haskell compiler. We will use it below to run our examples, but in practice, you will mostly be using a build tool like Cabal or Stack to build your code, instead of GHC directly.
34
+
2.**HLS** -> The Haskell Language Server -> You won't use this directly, instead your code editor will use it in the background to provide you with a great experience while editing Haskell code.
35
+
3.**Cabal** -> A Haskell build tool -> You will use this to structure your Haskell projects, build them, run them, define dependencies, ...
36
+
4.**Stack** -> A Haskell build tool -> an alternative to Cabal
37
37
38
38
<divclass="bs-callout bs-callout-info">
39
39
<p>
40
-
<h4>cabal and Stack -> which one should I install?</h4>
41
-
We recommend installing both. Most Haskell projects can be built using Cabal, but some might require Stack. Installing both guarantees that you can use either, and while following the tutorial/book you can use whatever they recommend.
40
+
<h4>Cabal and Stack -> which one should I install?</h4>
41
+
We recommend installing both. Most Haskell projects can be built using Cabal, but some might require Stack. Installing both guarantees that you can use either, and while following a tutorial or book you can use whatever they recommend.
42
42
</p>
43
43
</div>
44
44
45
45
### Editor
46
-
**Visual Studio Code** is a popular choice with well supported editor integration. Install the [Haskell extension](https://marketplace.visualstudio.com/items?itemName=haskell.haskell) and you are all set. It should work out of the box and use your installation of HLS.
47
-
48
-
To learn about support for other editors, check out [HLS docs for editor configuration](https://haskell-language-server.readthedocs.io/en/latest/configuration.html#configuring-your-editor).
49
-
50
-
## Running first lines of code
51
46
52
-
We have everything set up, let's use it!
47
+
**Visual Studio Code** is a popular choice with well-supported Haskell integration. Install the [Haskell extension](https://marketplace.visualstudio.com/items?itemName=haskell.haskell) and you are all set. It should work out of the box and use your installation of HLS. To learn about support for other editors, check out [HLS docs for editor configuration](https://haskell-language-server.readthedocs.io/en/latest/configuration.html#configuring-your-editor).
53
48
54
-
`GHC` brings an interactive interpreter called `GHCi` together with it, which is great for playing with Haskell and trying things out, so let's give it a spin.
49
+
## Running your first lines of code
55
50
56
-
Run `ghci`, which should start a new prompt for you.
51
+
We have everything set up, let's use it! The Haskell compiler, GHC, comes with an interactive interpreter called GHCi which is great for playing with Haskell and trying things out, so let's give it a spin. Run `ghci` at your command prompt, which will start a new GHCi prompt for you.
57
52
58
53
Let's do a simple calculation to check Haskell's computing capabilities:
59
54
```
@@ -78,9 +73,8 @@ Great, you got the first taste of Haskell! Now let's get to running a real progr
78
73
79
74
## Writing your first Haskell program
80
75
81
-
In your editor, create a new file named `hello.hs`.
76
+
In your editor, create a new file named `hello.hs`. Write the following in it:
82
77
83
-
Write the following in it:
84
78
```hs
85
79
main =do
86
80
putStrLn"Hello, everybody!"
@@ -117,17 +111,13 @@ Please look at my favorite odd numbers: [11,13,15,17,19]
117
111
118
112
## Join the community
119
113
120
-
By joining the Haskell community you will find a great place to ask for help and learn about new developments in the Haskell ecosystem.
121
-
122
-
Some of the most popular communities are:
114
+
By joining the Haskell community you will find a great place to ask for help and learn about new developments in the Haskell ecosystem. Some of the most popular communities are:
We recommend joining right now, and don't be shy to ask for help!
129
-
130
-
Check [https://www.haskell.org/community](https://www.haskell.org/community) for a full list of Haskell communities.
120
+
We recommend joining right now, and don't be shy to ask for help! Check [https://www.haskell.org/community](https://www.haskell.org/community) for a full list of Haskell communities.
131
121
132
122
## Next steps
133
123
@@ -137,6 +127,4 @@ Popular free learning resources for beginners:
137
127
-[Learn You a Haskell for Great Good!](http://learnyouahaskell.com/) (book)
138
128
-[Learn Haskell by building a blog generator](https://lhbg-book.link) (book)
139
129
140
-
This is just the tip of the iceberg though: check [Documentation](https://www.haskell.org/documentation/) for the full list of learning resources.
141
-
142
-
That is it, fellow Haskeller! Enjoy learning Haskell, do (not?) be lazy and see you in the community!
130
+
This is just the tip of the iceberg though: check [Documentation](https://www.haskell.org/documentation/) for the full list of learning resources. That is it, fellow Haskeller! Enjoy learning Haskell, do (not?) be lazy and see you in the community!
0 commit comments