Update
151
GHCup.md
@ -4,17 +4,93 @@
|
||||
|
||||
# GHCup
|
||||
|
||||
## Intro
|
||||
## What is GHCup?
|
||||
|
||||
[Haskell Survey 2022](https://taylor.fausak.me/2022/11/18/haskell-survey-results/#s2q1)
|
||||
![](what.jpg)
|
||||
|
||||
![](survey.png)
|
||||
## State of 2019
|
||||
|
||||
## Intro (pt. 2)
|
||||
::: incremental
|
||||
|
||||
haskell.org:
|
||||
* stack is the only "Haskell Installer"
|
||||
* no unified alternative for cabal users
|
||||
* distro packages, nix, manual installs, ...
|
||||
* 🤮
|
||||
|
||||
![](downloads.png)
|
||||
:::
|
||||
|
||||
## How it started
|
||||
|
||||
::: incremental
|
||||
|
||||
* 🤹 small team at work (Capital Match), using different platforms
|
||||
- originally used stack
|
||||
- cabal distro packages constantly out of date
|
||||
* 🦾 first version was 165 LOC
|
||||
- Posix shell
|
||||
* ![](linux.png){#id .class height=32px} only supported linux and mac
|
||||
* ![](rust.png){#id .class height=32px} inspired by **rustup**
|
||||
|
||||
:::
|
||||
|
||||
## GHCup today
|
||||
|
||||
::: incremental
|
||||
|
||||
* [Haskell Survey 2022](https://taylor.fausak.me/2022/11/18/haskell-survey-results/#s2q1)
|
||||
* ![](survey.png)
|
||||
- over **17k** LOC Haskell
|
||||
- supports all platforms: Linux, Windows, macOS, FreeBSD
|
||||
|
||||
:::
|
||||
|
||||
## GHCup and haskell.org
|
||||
|
||||
::: incremental
|
||||
|
||||
* the default installer
|
||||
- ![](downloads.png)
|
||||
* provides infrastructure (home page, downloads)
|
||||
|
||||
:::
|
||||
|
||||
## GHCup and the Haskell Foundation
|
||||
|
||||
::: incremental
|
||||
|
||||
* affiliation: [https://haskell.foundation/affiliates/](https://haskell.foundation/affiliates/)
|
||||
* pays for CI
|
||||
* pays consultants to assist the project
|
||||
|
||||
:::
|
||||
|
||||
## What is a good installer?
|
||||
|
||||
::: incremental
|
||||
|
||||
* it installs (just that)
|
||||
- everywhere
|
||||
* intuitive interface
|
||||
- `ghcup install ghc`
|
||||
* good documentation
|
||||
- but you shouldn't have to read it
|
||||
* get out of the way
|
||||
- has no self-fulfilling purpose
|
||||
|
||||
:::
|
||||
|
||||
## Goals and principles
|
||||
|
||||
::: incremental
|
||||
|
||||
- ☮️ unification
|
||||
- unix principles
|
||||
- 🛠️ do one thing and do it well
|
||||
- ⚗️ pipes, compose stdout and stdin (re-usable)
|
||||
- 🎁 good re-distribution
|
||||
- 🛣️ user experience
|
||||
|
||||
:::
|
||||
|
||||
## What is GHCup (simplified)?
|
||||
|
||||
@ -27,29 +103,7 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l
|
||||
rm -rf /tmp/ghc-9.6.5-x86_64-unknown-linux/
|
||||
```
|
||||
|
||||
## How it started
|
||||
|
||||
::: incremental
|
||||
|
||||
* 🤹 small team at work on different platforms
|
||||
* 🧑💻 SHELL + POSIX
|
||||
* 🦾 first version was 165 LOC
|
||||
* 🙏 only installer at that time was stack
|
||||
|
||||
:::
|
||||
|
||||
## Goals
|
||||
|
||||
::: incremental
|
||||
|
||||
- ☮️ unification
|
||||
- unix principles
|
||||
- 🛠️ do one thing and do it well
|
||||
- ⚗️ pipes, compose stdout and stdin
|
||||
- 🎁 good re-distribution
|
||||
- 🛣️ user experience (get out of the way)
|
||||
|
||||
:::
|
||||
|
||||
## What is GHCup really?
|
||||
|
||||
@ -58,14 +112,12 @@ curl -s -L 'https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-fedora33-l
|
||||
::: incremental
|
||||
|
||||
* ![](open-box.png){#id .class width=32 height=32px} installer
|
||||
* ![](linux.png){#id .class width=32 height=32px} distribution channel
|
||||
* ![](debian.png){#id .class width=32 height=32px} distribution channel
|
||||
* ![](feedback.png){#id .class width=32 height=32px} feedback channel
|
||||
* ![](qa.png){#id .class width=32 height=32px} testing/QA gateway
|
||||
* ![](user.png){#id .class width=32 height=32px} provider of sane defaults (e.g. "recommended" GHC version)
|
||||
* ![](chain-saw.png){#id .class width=32 height=32px} glue for holistic toolchain experience
|
||||
- stack integration
|
||||
- VSCode integration
|
||||
- cabal-install integration
|
||||
- VSCode, stack, cabal-install integration
|
||||
* ![](ghaction.png){#id .class width=32 height=32px} CI provisioning (e.g. github actions)
|
||||
|
||||
:::
|
||||
@ -90,32 +142,30 @@ Users:
|
||||
::: incremental
|
||||
|
||||
- ![](haskell_logo.png){#id .class height=32px} Haskell developers
|
||||
- beginners / advanced
|
||||
- student courses
|
||||
- companies
|
||||
- beginners, advanced, students, companies
|
||||
- ![](person.png){#id .class width=32 height=32px} end users (e.g. compiling pandoc from source)
|
||||
- ![](ghaction.png){#id .class width=32 height=32px} GitHub CI
|
||||
- GitHub images
|
||||
- Haskell repos
|
||||
- GitHub images, Haskell repos
|
||||
- 🪞 mirrors
|
||||
- [sjtug](https://mirror.sjtu.edu.cn/docs/ghcup)
|
||||
- 🧰 tools
|
||||
- [vscode-haskell](https://github.com/haskell/vscode-haskell)
|
||||
- [Haskell playground](https://play.haskell.org/)
|
||||
- [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer)
|
||||
- [vscode-haskell](https://github.com/haskell/vscode-haskell), [Haskell playground](https://play.haskell.org/), [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer)
|
||||
|
||||
:::
|
||||
|
||||
## How does it work?
|
||||
|
||||
**Components:**
|
||||
|
||||
::: incremental
|
||||
|
||||
* **Architectural components**
|
||||
- ![](sh-file.png){#id .class height=32px} bootstrap scripts
|
||||
- ![](exe-file.png){#id .class height=32px} ghcup binary (compiled)
|
||||
- ![](config-file.png){#id .class height=32px} ghcup-metadata (configuration files)
|
||||
* **Logical components**
|
||||
- ![](terminal.png){#id .class height=32px} cli interface
|
||||
- ![](file.png){#id .class height=32px} file layout / installation destination
|
||||
- ![](tar.png){#id .class height=32px} bindist selection
|
||||
- 🧱 tui interface
|
||||
- ![](brick-final-clearbg.png){#id .class height=32px} tui interface
|
||||
|
||||
:::
|
||||
|
||||
@ -149,25 +199,26 @@ Users:
|
||||
* root dir
|
||||
```sh
|
||||
$ ls ~/.ghcup
|
||||
bin cache config.yaml db env ghc hls logs share tmp trash
|
||||
📁bin 📁ghc 📁hls
|
||||
📁cache 📁db 📁logs 📁tmp 🗑️trash 📄config.yaml 📄env
|
||||
```
|
||||
|
||||
* GHC and HLS are installed into sub-directories
|
||||
```sh
|
||||
$ ls ~/.ghcup/ghc
|
||||
8.10.7 9.0.2 9.2.8
|
||||
📁8.10.7 📁9.0.2 📁9.2.8
|
||||
```
|
||||
|
||||
* bin directory is mostly symbolic links
|
||||
* bin directory is mostly symbolic links (compare with [update-alternatives](https://man7.org/linux/man-pages/man1/update-alternatives.1.html))
|
||||
```sh
|
||||
$ ls ~/.ghcup/bin
|
||||
ghcup
|
||||
cabal cabal-3.10.3.0
|
||||
ghc ghc-8.10 ghc-8.10.7 ghc-9.0 ghc-9.0.2 ghc-9.2 ghc-9.2.8
|
||||
📄ghcup
|
||||
🔗cabal 📄cabal-3.10.3.0
|
||||
🔗ghc 🔗ghc-8.10 🔗ghc-8.10.7 🔗ghc-9.0 🔗ghc-9.0.2 🔗ghc-9.2 🔗ghc-9.2.8
|
||||
```
|
||||
:::
|
||||
|
||||
## Bindist selection
|
||||
|
||||
*
|
||||
* TODO
|
||||
|
||||
|
3
NOTES.md
@ -3,6 +3,9 @@
|
||||
|
||||
- cli interface
|
||||
|
||||
- role of the Haskell foundation
|
||||
|
||||
- bootstrap script
|
||||
- main GHCup types
|
||||
- metadata versions
|
||||
- metadata variants
|
||||
|
BIN
brick-final-clearbg.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
config-file.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
debian.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
exe-file.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
linux.png
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 4.0 KiB |
BIN
sh-file.png
Normal file
After Width: | Height: | Size: 1.7 KiB |