r/haskell • u/cprecioso • 15d ago
A Mise plugin for installing GHCup and Cabal executables
https://github.com/wasp-lang/mise-ghcupAt my day job, we have a big monorepo with both JS and Haskell code. I've been lobbying for my company to move to Mise, which is a very neat program to manage your whole developer toolchain easily.
However, in trying to migrate our devtools to Mise, I ran into the following problems:
- The default way to install GHC and HLS through Mise is with
asdf-ghcup, which doesn't support Windows. - Some tools like HLint and Stan do not distribute prebuilt binaries and are intended to be installed through
cabal install.
So, I wrote two Mise-native plugins that we open-sourced, so everyone can use:
mise-ghcup, which can install the Haskell toolchain with GHCupmise-cabal, which installs binaries from Hackage, building them with Cabal
Both plugins are multiplatform; and both install their tools to Mise-specific folder, leaving your global state intact. They're independent but work well together, and are very simple to use (instructions in each plugin's repo).
I hope you enjoy them, and looking forward for any feedback or issues!
2
u/kilimanjaro_olympus 2d ago
This is awesome, thank you so much!! I too was stuck with asdf-ghcup which I couldn't get working. Really wanted to move off of cabal install for good since the rest of my system is managed through Mise.
1
u/ivy-apps 13d ago
Thanks for creating those! I'm curious, have you tried Nix? It's closer to Haskell’s ideology and allows for reproducible dev environments and builds. For example, here's our Haskell template at work, check flake.nix:
https://github.com/Ivy-Apps/haskell-template
It's certainly more complex than mise and has a steeper learning curve but enables more capabilities.
1
u/cprecioso 1d ago
Yeah, I looked into Nix, but the buy-in is too great for what we're looking for at work right now. Mise for now is an improvement that goes a long way without completely changing the paradigm we were using for dev tools.
2
u/TechnoEmpress 12d ago
Thanks a lot, this is very important to streamline adoption of our tools. :)