Skip to content

Commit c6d212f

Browse files
imba-tjdghuntley
andauthored
Try to add Gitpod (kowainik#452)
* Create .gitpod.yml * Readme: add Gitpod * Update README.md * Update .gitpod.yml * Update README.md * Update README.md * Update .gitpod.yml * Update .gitpod.yml * Update README.md * add button Co-authored-by: Geoffrey Huntley <[email protected]> * Update README.md Co-authored-by: Geoffrey Huntley <[email protected]>
1 parent e2d30d8 commit c6d212f

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.gitpod.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# from https://github.com/haskell/haskell-language-server/blob/master/.gitpod.yml
2+
tasks:
3+
- before: |
4+
# Only the /workspace folder is persistent
5+
export XDG_DATA_HOME=/workspace/.local/share
6+
export XDG_CONFIG_HOME=/workspace/.local/config
7+
export XDG_STATE_HOME=/workspace/.local/state
8+
export XDG_CACHE_HOME=/workspace/.cache
9+
export CABAL_DIR=/workspace/.cabal
10+
export STACK_ROOT=/workspace/.stack
11+
12+
# install ghcup, ghc and cabal
13+
export GHCUP_INSTALL_BASE_PREFIX=/workspace
14+
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
15+
export BOOTSTRAP_HASKELL_MINIMAL=1
16+
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
17+
/workspace/.ghcup/bin/ghcup install ghc --set
18+
/workspace/.ghcup/bin/ghcup install cabal
19+
20+
# Add ghcup binaries to the PATH since VSCode does not see 'source .ghcup/env'
21+
pushd /usr/local/bin
22+
sudo ln -s /workspace/.ghcup/bin/* /usr/local/bin
23+
popd
24+
25+
# Fix the Cabal dir since VSCode does not see CABAL_DIR
26+
cabal update
27+
echo "Symlinking /workspace/.cabal to ~/.cabal"
28+
ln -s /workspace/.cabal ~
29+
init: |
30+
cabal update
31+
32+
vscode:
33+
extensions:
34+
- haskell.haskell
35+
- justusadam.language-haskell

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,18 @@ If you don't have any IDE preferences, we recommend installing
200200
[Haskell plugin](https://marketplace.visualstudio.com/items?itemName=haskell.haskell).
201201
The mentioned plugin would give you everything required to immediately start coding with Haskell.
202202
203+
### Gitpod
204+
205+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/kowainik/learn4haskell)
206+
207+
[Gitpod](https://www.gitpod.io/) is a VSCode-based Web IDE.
208+
With it, you can get a Haskell environment out-of-the-box.
209+
It's free to use up to 50 hours per month.
210+
211+
Just prepend `gitpod.io#` to your repo URL and you are ready to go.
212+
It will take some time to initialize the workspace for the first time it opens.
213+
It only keeps changes under `/workspace`, and it will be deleted after a period of inactivity unless it's pinned.
214+
203215
### How to develop
204216
205217
The course assumes that you install Haskell tooling (GHC and Cabal), edit code

0 commit comments

Comments
 (0)