The Haskell Foundation would like to see Haskell installers installing both cabal-install
and stack
everywhere. That opens the issue of managing GHC installations as both ghcup
and stack
manage their own stash of bindists. To this end I propose a simple broker tool for reporting to the build managers (when asked) whether a given GHC bindist has been installed or not, and if so, where it is located.
According to configuration, hs
can query the user if they would like to install the missing tool chain or not, requesting the preferred installation manager (currently ghcup
or stack
) to install it accordingly.
I have a proof-of-concept stack integration on a private branch (This patch is Unix only for now — extending this to Windows should be straightforward.)
To achieve cabal-install
integration I have made up wrapper scripts that call out to hs
to locate and run the required tool.
With these setup on the PATH (hs
, the pathched stack
and the wrapper scripts) I see a unified environment with bindists being shared and control with the developer of who carries out the GHC bindist installations as the requirement arises with the build managers.
It would be ideal if we could patch cabal-install
, like stack, and do away with the wrapper scripts of course.
See this blog post for more details and let me know what you think.