# Get a Haskell development environment in Three Steps

**URL:** <https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822>\
**Category:** Show and Tell\
**Created:** [July 22, 2022, 6:21pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822 "2022-07-22T18:21:59Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lsmor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/lsmor/32/3302_2.png) [@Lsmor](https://discourse.haskell.org/u/Lsmor)\
**Post date:** [July 22, 2022, 6:21pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/1 "2022-07-22T18:21:59Z")

</div>

Recently I’ve seen a few questions (a.k.a complaints) about how difficult is to set up a Haskell development environment. The paradox is that It isn’t difficult at all, and actually `ghcup` home page makes a decent effort to get a comprehensive guide. So I decided to write a [simple guide](https://gist.github.com/lsmor/bb632565cd96be9da589b6e91f80f9ba) on markdown format. Hopefully this guide can help to improve current status.

## contex

I’ve been helping some newcomers to get a Haskell environment up and running, so I know this instructions work in windows and linux (Haven’t tested MacOS but should be similar to linux) and also work for cabal and stack users. Although, the guide is cabal oriented (because stack integrates poorly with `hls`). Also, I am using this guide to update the [gitpod template](https://github.com/gitpod-io/template-haskell/pull/4) for Haskell.

## Problem with current status

I think the problem has roots in communication and misleading documentation.

Communication issues has been discussed in this very same place over the past few days.

I would like to point out about documentation. GHCup home page is good, but It has two major problems:

- It does not provide a clear, opinionated path to get things up and running.
- it is too long

In general what I’ve seen can be summarize in: “At least with python I can download pycharm and that’s it”. Most newcomers I’ve attended have either a python or javascript background (or they are students using laboratory machines with everything already prepared). For these two languages all you need to do is literally install pycharm or vscode. Many of them don’t know what a language server is because they all used to one-tool-solves-all, they don’t give a \*\*\*\*\* for unix-philosophy and they just want to follow some step by step guide reading the least possible text. Clearly `ghcup` documentation do not hold this (which I don’t think is bad, but I am just stating what I’ve found out)

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [July 22, 2022, 6:37pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/2 "2022-07-22T18:37:37Z")

</div>

> [@Lsmor](#):
>
> It does not provide a clear, opinionated path to get things up and running.

You mean in term of editor setup? Yes, that’s on purpose. Instead, I would like to link to guides that explain editor setups (like yours). I have no interest in maintaining those things on ghcup homepage myself. A wiki might be a better place, but wikis tend to bitrot.

In fact, the [“First steps guide”](https://www.haskell.org/ghcup/steps/#where-to-go-from-here) at the end has a big button “Editor setup with HLS”, which leads to HLS docs: [https://haskell-language-server.readthedocs.io/en/stable/installation.html](https://haskell-language-server.readthedocs.io/en/stable/installation.html)

And that link also explains the vscode-haskell extension. So to me it appears all information is already in place. It might just have to be structured better to be more accessible.

This restructuring is **really** hard, especially if you already know all the ins and outs of tooling… it’s hard to put yourself into a newcomers position.

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [July 22, 2022, 6:38pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/3 "2022-07-22T18:38:55Z")

</div>

I think it is a very good idea to prominently suggest VSCode and the Haskell plugin (maybe on GHCup’s home page right below the main installation command?). It would be even better if we could get a single installer that installs VSCode + Haskell plugin + GHCup (+ ghc + cabal + hls) in one go.

I suspect it is hard or even impossible for GHCup to install VSCode with the Haskell plugin, but I don’t actually know. Maybe that is an option?

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [July 22, 2022, 6:44pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/4 "2022-07-22T18:44:29Z")

</div>

> [@jaror](#):
>
> I suspect it is hard or even impossible for GHCup to install VSCode with the Haskell plugin, but I don’t actually know. Maybe that is an option?

Installing plugins via command line is easy:

```haskell
code --install-extension haskell.haskell

```

ghcup install script could easily check whether VSCode is installed and then offer to install the haskell extension.

Installing VSCode itself via ghcup is… both not easy and definitely out of scope.

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [July 22, 2022, 6:53pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/5 "2022-07-22T18:53:45Z")

</div>

Maybe the easiest solution would be for GHCup to show a link to the download page for VSCode if it is not yet installed and the user tries to install the plugin? Would that also be out of scope?

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [July 22, 2022, 6:56pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/6 "2022-07-22T18:56:32Z")

</div>

That would be making a statement about editors. Then in a month, someone will demand to put a link to neovim, emacs, …

I don’t know if this is a good idea. Again: linking to a page that has instructions for multiple popular editors and lets you easily navigate those would be ok. This could be the HLS documentation.

---

<div class="post-metadata">

**Author:** ![ChShersh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/chshersh/32/2551_2.png) [@ChShersh](https://discourse.haskell.org/u/ChShersh)\
**Post date:** [July 22, 2022, 7:09pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/7 "2022-07-22T19:09:33Z")

</div>

The provided instructions in the markdown post are indeed quite clear and this is how I recommended installing Haskell as well for newcomers 👏

- I have these instructions in my [Haskell Beginners 2022](https://github.com/haskell-beginners-2022/exercises#installing-haskell) course.
- And before that, in the [Learn4Haskell](https://github.com/kowainik/learn4haskell#installing-haskell) course.

More than 500 people completed these courses on a variety of operating systems (Ubuntu, Windows, macOS, ArchLinux, Fedora, Debian, Pop!\_OS and whatnot). so I can add they work more or less reliably across different systems 🙂

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [July 22, 2022, 7:11pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/8 "2022-07-22T19:11:39Z")

</div>

As a (neo)vim and emacs user myself, I think there is broad consensus that VSCode is the path of least resistance for newcomers, especially for those who need the most guidance and for whom even reading a long page with all possible editors can already be a barrier. I wouldn’t consider that preferential treatment or a statement about editors.

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [July 22, 2022, 7:14pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/9 "2022-07-22T19:14:51Z")

</div>

Just to be clear: I think it’s totally fine if the HLS documentation is biased towards VSCode (in the sense that it’s more prominently suggested). There are two reasons:

1. VSCode basically is the reference implementation of an LSP client. If it doesn’t work… what else does?
2. we (HLS and ghcup contributors) maintain the vscode-haskell extension… so it’s tightly integrated

But this really is a matter of HLS, not of ghcup.

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [July 22, 2022, 7:37pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/10 "2022-07-22T19:37:16Z")

</div>

Just for reference, 45% of Haskellers seem to use VSCode, but 40% use VI-like editors: [https://taylor.fausak.me/2021/11/16/haskell-survey-results/#s3q1](https://taylor.fausak.me/2021/11/16/haskell-survey-results/#s3q1). I think that’s a very clear argument that we want a proper page that says more than “install VSCode”. Editors are also not like build tools and “less is better” doesn’t really apply.

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [July 22, 2022, 7:41pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/11 "2022-07-22T19:41:04Z")

</div>

I don’t think it is productive to argue about whose responsibility it is. As mentioned at the top of this thread:

> [@Lsmor](#):
>
> “At least with python I can download pycharm and that’s it”

The question I’m trying to answer is: how can we achieve a similar installation experience for a Haskell IDE solution?

Having an all-in-one guide as the one linked at the top of this thread gets us part of the way there, but an installation tool would be even better. And GHCup already seems like it is more than 80% of the way there (you have done some great work already!).

I would understand it if your argument is that the maintenance cost is too high or that it is too hard to implement, but I don’t agree that delegating part of the installation procedure to the HLS documentation is sufficient. Or am I mischaracterizing your point?

Of course I’m also not suggesting that we should throw away all the other documentation and only suggest VS Code. I think we can have both a streamlined installation procedure for people who don’t want to think about editors (and who just want to start programming Haskell in an IDE) and extensive documentation for people who do want to spend time configuring their favorite editor.

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [July 22, 2022, 7:58pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/12 "2022-07-22T19:58:28Z")

</div>

> [@jaror](#):
>
> I don’t think it is productive to argue about whose responsibility it is. As mentioned at the top of this thread:

It absolutely is productive to decide where to put documentation. GHCup installs toolchain and has very little to do with editors. We already link to HLS docs in 2 places during GHCup installation:

- [Screenshot - Imgur](https://imgur.com/vgnXig0.png)
- [Screenshot - Imgur](https://i.imgur.com/JTBmHPD.png)

And we link to it in the First steps guide (which strictly speaking also has no place on ghcup homepage… I added it, because I found [haskell.org](http://haskell.org) to be too slow and reluctant about changes, which lead to PRs going stale). HLS is the go-to implementation for IDE workflows. It makes sense to put documentation about editor configuration there. Or somewhere on [haskell.org](http://haskell.org).

> [@jaror](#):
>
> I would understand it if your argument is that the maintenance cost is too high

Since I’m also a contributor to HLS and maintainer of vscode-haskell, I think this doesn’t matter, because I’ll very likely end up contributing to that documentation anyway.

This is about structuring documentation well. I’m starting to feel ghcup page is becoming a silent alternative to [haskell.org](http://haskell.org). This is concerning.

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [July 22, 2022, 8:04pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/13 "2022-07-22T20:04:46Z")

</div>

> [@hasufell](#):
>
> It absolutely is productive to decide where to put documentation.

> [@hasufell](#):
>
> GHCup installs toolchain and has very little to do with editors.

I think we have a bit of a misunderstanding. I’m considering a streamlined installation tool (not just documentation!) for getting started with Haskell development (not just installing the toolchain!). I’m suggesting that GHCup could do more in that regard, but I guess the alternative is to build yet another layer on top of GHCup that _really_ provides an all-in-one installation process. Do you think that is a better idea?

---

<div class="post-metadata">

**Author:** ![Lsmor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/lsmor/32/3302_2.png) [@Lsmor](https://discourse.haskell.org/u/Lsmor)\
**Post date:** [July 22, 2022, 10:16pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/14 "2022-07-22T22:16:14Z")

</div>

Great! Why didn’t I know about this before?? 😅 I would have refer to your instructions instead of building my own haha.

---

<div class="post-metadata">

**Author:** ![Lsmor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/lsmor/32/3302_2.png) [@Lsmor](https://discourse.haskell.org/u/Lsmor)\
**Post date:** [July 22, 2022, 10:56pm UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/15 "2022-07-22T22:56:53Z")

</div>

> [@hasufell](#):
>
> You mean in term of editor setup? Yes, that’s on purpose. Instead, I would like to link to guides that explain editor setups (like yours). I have no interest in maintaining those things on ghcup homepage myself. A wiki might be a better place, but wikis tend to bitrot.

Yes. I mean that. The reason I posted this guide here instead of opening an issue on `ghcup-hs` is precisely because I don’t know where this kind of documentation should be placed. But I think it should be placed somewhere

> [@jaror](#):
>
> The question I’m trying to answer is: how can we achieve a similar installation experience for a Haskell IDE solution?

Having one click instalation would be very newcommer friendly but I don’t think is the way to go. The mantaince cost is high and a link to vscode is sufficiently easy for newcommers, so the relation value-cost isn’t that high. In other words having a three step guide is close enough to pycharm experience IMO. The problem is that currently there is no “official” resource pointing in this direction.

To clarify a little bit more. The scenario this guide comes from is:

- Alice has very little experience configuring programming environments. Her programming background is a running Jupyter notebook hosted in her company’s server.
- Alice is not willing to navegate across multiple pages, reading nuances about chosing one editor or another, one building tool or another, etc…
- Alice wants a straighfoward short guide telling her exactly what to do to start her Haskell’s adventure

The core part of the guide is design to be 5 lines. Each step is very easy to follow: Installing `ghcup` is copy pasting a comand, installing vscode is one click, and installing the haskell extension is again one click/command.

The rest of the guide is actually provide for completeness, but it isn’t necessary for getting the job done. Personally I recommend against stack (being a stack user myself) and other editors. Nevertheless, there will be users willing to use stack or another editor so instructions should be clear and point to the right resources, but yes `ghcup` + `ghc` + `cabal` + `vscode` is by far the best default as in 2022.

The reason I am posting here is to try to find the best place to PR this guide or something very similar like @ChShersh 's. Ideally in html format and in an “official” web page, not a random github repo. Any help is appreciated

---

<div class="post-metadata">

**Author:** ![Abab9579](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/abab9579/32/2163_2.png) [@Abab9579](https://discourse.haskell.org/u/Abab9579)\
**Post date:** [July 23, 2022, 1:57am UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/16 "2022-07-23T01:57:04Z")

</div>

> [@jaror](#):
>
> The question I’m trying to answer is: how can we achieve a similar installation experience for a Haskell IDE solution?

Tbh, I do not think haskell community is big enough to support and maintain out-of-the-box solutions like that. IIRC something like Pycharm requires lots of manpower, but we do not even have enough haskell people out there to maintain critical infrastructure.

In the end, we should focus on somewhat niche populace, shouldn’t we?

---

<div class="post-metadata">

**Author:** ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)\
**Post date:** [July 23, 2022, 5:52am UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/17 "2022-07-23T05:52:01Z")

</div>

> [@Lsmor](#):
>
> because I don’t know where this kind of documentation should be placed

Either:

1. HLS documentation, which already contains VSCode instructions
2. haskell dot org (e.g. in a dedicated quickstart guide or so… but haskell dot org has very low traction wrt such changes)

---

<div class="post-metadata">

**Author:** ![Lsmor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/lsmor/32/3302_2.png) [@Lsmor](https://discourse.haskell.org/u/Lsmor)\
**Post date:** [July 23, 2022, 10:42am UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/18 "2022-07-23T10:42:44Z")

</div>

> [@hasufell](#):
>
> HLS documentation, which already contains VSCode instructions

I agree it should be place, but It is very unlikely newcommers will search for `hls` documentation considering that there is a high change of them not knowing what a language server is.

> [@hasufell](#):
>
> haskell dot org (e.g. in a dedicated quickstart guide or so… but haskell dot org has very low traction wrt such changes)

um… what a pity. Maybe a quickstart guide in haskell org pointing to hls.

Well, I think I am just opening a few drafts to move this forwards. Thanks for the help.

---

<div class="post-metadata">

**Author:** ![sketch3364](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/sketch3364/32/4962_2.png) [@sketch3364](https://discourse.haskell.org/u/sketch3364)\
**Post date:** [February 23, 2025, 7:17am UTC](https://discourse.haskell.org/t/get-a-haskell-development-environment-in-three-steps/4822/19 "2025-02-23T07:17:57Z")

</div>

Just had a dev environment that broke itself (even without ghcup involved), and your two tips (add `system-ghc: true` to the `stack.yaml`, and correct the resolver URL to the one that’s compatible with the current GHC) fixed it. It’s a bit frustrating to have to deal with the innards of stack just to get HLS working, but I appreciate your guide!
