Skip to content

Feature request: show installed `GHC` and `cabal` versions in the `ghcup list` command

Thanks for implementing such an amazing tool! I find it extremely easy to manage ghc versions locally with it 😊

I have an idea for possible improvement. There's ghcup list command that shows all available upstream packages:

$ ghcup list
ghc		8.0.2
ghc		8.2.2
ghc		8.4.3
ghc		8.4.4
ghc		8.6.1	bad
ghc		8.6.2
ghc		8.6.3	recommended
ghc		8.6.4	latest
cabal-install	2.2.0.0
cabal-install	2.4.0.0
cabal-install	2.4.1.0	latest,recommended

And there is ghcup show command that shows locally installed ones:

$ ghcup show
Installed GHCs:
    8.6.3
    8.6.4

Current GHC
    8.6.4

NOTE: ghcup show doesn't show currently installed version of cabal-install, but that's separate issue.

I think it can be convenient to show installed ghc and cabal-install version directly in the output of the gchup list command. Something like that:

$ ghcup list
❌ ghc              8.0.2
❌ ghc              8.2.2
❌ ghc              8.4.3
❌ ghc              8.4.4
❌ ghc              8.6.1      bad
❌ ghc              8.6.2
✅ ghc              8.6.3      recommended
✅ ghc              8.6.4      latest
❌ cabal-install    2.2.0.0
❌ cabal-install    2.4.0.0
✅ cabal-install    2.4.1.0    latest,recommended

The particular design of the output is a subject to discussion, I just proposed one single option.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information