[Haskell-cafe] Batteries included (Was: GHC is a monopoly compiler)

Theodore Lief Gannon tanuki at gmail.com
Sat Oct 1 02:51:41 UTC 2016


On Fri, Sep 30, 2016 at 6:05 PM, Tillmann Rendel <
rendel at informatik.uni-tuebingen.de> wrote:

> So I think my question is: Could stack be persuaded somehow to make `stack
> install gtk3` "just work" by doing all the necessary incantations? I'm
> aware why `cabal install gtk3` can neither install gtk2hs-buildtools nor
> install the C library, but maybe stack could make a different tradeoff
> there.


I've actually put direct thought into this. I'm partially responsible for
the relative ease on Windows now -- previously Stack wasn't setting up the
environment correctly for MinGW -- it was providing an MSYS environment
instead, which means full POSIX emulation rather than just a
mostly-sufficient translation layer. This distinction is also why there are
separate 'pkg-config' and 'mingw-w64-x86_64-pkg-config' (and unfortunately
you want the latter, here).

I almost added the system update and pkg-config (since .cabal files
directly reference it) to the msys installation process in my PR, but I was
dissuaded from it by some comments about issues they had trying to do the
same with git:

1. it can fail due to network issues, and getting a consistent state with
good user feedback out of a return code inside a sub-shell is more work
than anyone's wanted to do yet.

2. the fact that msys includes an arbitrary set of packages, and in fact
can upgrade itself without stack's permission or even knowledge, is
damaging to the intended promise of reproducible builds.

On top of that, this is solely a Windows concern -- stack doesn't have any
desire or reason to be a system package manager elsewhere. So I decided the
better option is a separate windows-specific tool, which knows how to deal
with stack environments (that's in public library code, so yay) and
provides a convenience wrapper for pacman which, among other things,
attaches the correct big ugly prefix to package names for you.

I got as far as deciding that it would either be named "stacman" or "Jenga"
and then put it on the shelf because, with the environment stuff worked
out, plain stack is no longer too much of a hassle for me personally. But,
I'm certain it's a plausible and not even particularly difficult project.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160930/a1f8c708/attachment.html>


More information about the Haskell-Cafe mailing list