Skip to content

Commit 2beb2a7

Browse files
Martinsostomjaguarpaw
authored andcommitted
main content done!
1 parent cff9989 commit 2beb2a7

File tree

3 files changed

+88
-14
lines changed

3 files changed

+88
-14
lines changed

site/css/hl.css

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4667,3 +4667,64 @@ pre .hs-keyglyph {
46674667
min-width: 292.5px;
46684668
width:100%
46694669
}
4670+
4671+
/* Boostrap-style callouts (nice informational boxes),
4672+
taken from https://codepen.io/chrisdpratt/pen/QWBqKY .
4673+
*/
4674+
4675+
.bs-callout {
4676+
padding: 0px 0px 10px 20px;
4677+
margin: 20px 0;
4678+
border: 1px solid #eee;
4679+
border-left-width: 5px;
4680+
border-radius: 3px;
4681+
}
4682+
.bs-callout h4 {
4683+
margin-top: 0;
4684+
margin-bottom: 5px;
4685+
}
4686+
.bs-callout p:last-child {
4687+
margin-bottom: 0;
4688+
}
4689+
.bs-callout code {
4690+
border-radius: 3px;
4691+
}
4692+
.bs-callout+.bs-callout {
4693+
margin-top: -5px;
4694+
}
4695+
.bs-callout-default {
4696+
border-left-color: #777;
4697+
}
4698+
.bs-callout-default h4 {
4699+
color: #777;
4700+
}
4701+
.bs-callout-primary {
4702+
border-left-color: #9E358F;
4703+
}
4704+
.bs-callout-primary h4 {
4705+
color: #9E358F;
4706+
}
4707+
.bs-callout-success {
4708+
border-left-color: #5cb85c;
4709+
}
4710+
.bs-callout-success h4 {
4711+
color: #5cb85c;
4712+
}
4713+
.bs-callout-danger {
4714+
border-left-color: #d9534f;
4715+
}
4716+
.bs-callout-danger h4 {
4717+
color: #d9534f;
4718+
}
4719+
.bs-callout-warning {
4720+
border-left-color: #f0ad4e;
4721+
}
4722+
.bs-callout-warning h4 {
4723+
color: #f0ad4e;
4724+
}
4725+
.bs-callout-info {
4726+
border-left-color: #5bc0de;
4727+
}
4728+
.bs-callout-info h4 {
4729+
color: #5bc0de;
4730+
}

site/downloads.markdown

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ page: downloads
44
isDownloads: true
55
---
66

7+
<div class="bs-callout bs-callout-info" style="padding: 0px 0px 10px 20px">
8+
<p>
9+
<h4>Psssst!</h4>
10+
Looking to get started with Haskell? If so, check out the [Get Started](/get-started) page!
11+
</p>
12+
</div>
13+
714
# Downloads
815

916
## Recommended installation instructions
@@ -12,6 +19,8 @@ isDownloads: true
1219

1320
* Use [GHCup](https://www.haskell.org/ghcup/) to install GHC, cabal-install, Stack and haskell-language-server
1421

22+
<br/>
23+
1524
* * *
1625

1726
### Find out more about the Haskell toolchain
@@ -25,9 +34,9 @@ The Haskell toolchain consists of the following tools:
2534

2635
### Installation via native OS package manager
2736

28-
Alternatively, many operating systems provide GHC, cabal and Stack through their native package manager. The packages are often out-of-date but if you prefer to use this method of installation then you will find useful links below.
37+
Alternatively, many operating systems provide GHC, cabal and Stack through their native package manager. The packages are often out-of-date and we don't recommend this method of installation, but if you prefer to use this method then you will find useful links below.
2938

30-
<p><a data-toggle="collapse" href="#collapse-linux" class="btn btn-xs btn-primary">Show Linux distros</a></p>
39+
<p><a data-toggle="collapse" href="#collapse-linux" class="btn btn-xs">Show Linux distros</a></p>
3140

3241
<div id="collapse-linux" class="collapse">
3342

@@ -73,7 +82,7 @@ Alternatively, many operating systems provide GHC, cabal and Stack through their
7382
**Do not use the Haskell development tools provided by Arch, they are broken.** For more information see [[1]](https://dixonary.co.uk/blog/haskell/cabal-2020) [[2]](https://stackoverflow.com/questions/65643699/what-is-the-suggested-way-of-setting-up-haskell-on-archlinux/65644318#65644318).
7483
</div>
7584

76-
<p><a data-toggle="collapse" href="#collapse-nixos" class="btn btn-xs btn-primary">Show Nix/NixOS instructions</a></p>
85+
<p><a data-toggle="collapse" href="#collapse-nixos" class="btn btn-xs">Show Nix/NixOS instructions</a></p>
7786

7887
<div id="collapse-nixos" class="collapse">
7988
<!-- This installation method is owned by @maralorn -->
@@ -90,7 +99,7 @@ Alternatively, many operating systems provide GHC, cabal and Stack through their
9099

91100
</div>
92101

93-
<p><a data-toggle="collapse" href="#collapse-freebsd" class="btn btn-xs btn-primary">Show FreeBSD packages</a></p>
102+
<p><a data-toggle="collapse" href="#collapse-freebsd" class="btn btn-xs">Show FreeBSD packages</a></p>
94103

95104
<div id="collapse-freebsd" class="collapse">
96105

@@ -100,7 +109,7 @@ Alternatively, many operating systems provide GHC, cabal and Stack through their
100109
[Stack](https://www.freshports.org/devel/stack/)
101110
</div>
102111

103-
<p><a data-toggle="collapse" href="#collapse-windows" class="btn btn-xs btn-primary">Show Windows packages</a></p>
112+
<p><a data-toggle="collapse" href="#collapse-windows" class="btn btn-xs">Show Windows packages</a></p>
104113

105114
<div id="collapse-windows" class="collapse">
106115

site/get-started.markdown

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ Follow instructions at [GHCup webpage](https://www.haskell.org/ghcup/#) to perfo
2222
3. **cabal** -> Haskell build tool -> You will use this to structure your Haskell projects, build them, run them, define dependencies, ....
2323
4. **Stack** -> Haskell build tool -> alternative to `cabal`
2424

25-
**Q**: `cabal` vs `Stack` -> which one should I install?
2625

27-
**A**: `cabal` is the original build tool, while `Stack` was created as an alternative to `cabal` a time ago to solve some of the problems that `cabal` had and provide more user-friendly experience. In the meantime, `cabal` solved most of those issues and caught up with `Stack` regarding user experience, so main difference between them at the moment is how they resolve dependencies, which for you as a beginner isn't really a concern. Therefore, both are good choice, and if not sure, you can install both and then use whatever the learning resources you will later use point you to.
26+
<div class="bs-callout bs-callout-info">
27+
<p>
28+
<h4>cabal and Stack -> which one should I install?</h4>
29+
cabal is the original build tool, while Stack was created as an alternative to cabal a time ago to solve some of the problems that cabal had and provide more user-friendly experience. In the meantime, cabal solved most of those issues (including "cabal hell") and caught up with Stack regarding user experience, so main difference between them at the moment is how they resolve dependencies, which for you as a beginner isn't really a concern. Therefore, both are good choice, and if not sure, you can install both and then use whatever the learning resources you will later use will point you to.
30+
</p>
31+
</div>
2832

29-
To confirm it is all installed correctly, you can run following commands:
33+
To confirm it is all installed correctly, you can run the following commands:
3034
```
3135
> ghc --version
3236
> haskell-language-server-wrapper --version
@@ -46,7 +50,7 @@ Of other editors that have good Haskell extensions, most popular ones are Vim an
4650
We have everything set up, let's use it!
4751

4852
`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-
So even though Haskell is a compiled language, it comes with an interpreter also -> how cool is that?
53+
So even though Haskell is a compiled language, it comes with an interpreter too -> how cool is that?
5054

5155
Run `ghci`, which should start a new prompt for you.
5256

@@ -55,18 +59,18 @@ Let's do a simple calculation to check Haskell's computing capabilities:
5559
> 6 + 3^2 * 4
5660
42
5761
```
58-
Hey, they call Haskell lazy, but that was quick :D!
62+
Hey, they call Haskell lazy, but that was quick!
5963

60-
42 is a nice even number, but what about the even numbers before it? Let's get first 10 even numbers.
64+
42 is a nice even number, but what about the even numbers after it? Let's get first 10 even numbers after 42.
6165
```
62-
> take 10 $$ filter even [1..]
63-
[2,4,6,8,10,12,14,16,18,20]
66+
> take 10 $$ filter even [43..]
67+
[44,46,48,50,52,54,56,58,60,62]
6468
```
6569

6670
What is the sum of those?
6771
```
6872
> sum it
69-
110
73+
530
7074
```
7175
**NOTE**: We used a special feature of GHCi here, which is a special `it` variable that remembers the result of last expression.
7276

0 commit comments

Comments
 (0)