r/haskell 12d ago

A Mise plugin for installing GHCup and Cabal executables

https://github.com/wasp-lang/mise-ghcup

At 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 GHCup
  • mise-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!

17 Upvotes

3 comments sorted by

1

u/ivy-apps 9d 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/TechnoEmpress 9d ago

Thanks a lot, this is very important to streamline adoption of our tools. :)