[Haskell-community] [Haskell-cafe] technical thoughts on stack
Paolo Giarrusso
p.giarrusso at gmail.com
Tue Sep 13 20:01:28 UTC 2016
On Tuesday, September 13, 2016 at 9:47:20 PM UTC+2, Richard Eisenberg wrote:
>
> Thanks, many, for explaining better ways to interact directly with GHC
> after using a `stack setup`. Perhaps, then, all that’s stopping someone
> like me from liking the ease of `stack setup` is a little missing PR (as
> in, public relations). I understand that many people want to keep GHC
> cloistered away to ease version swapping, but others (like me) want GHC
> available front and center.
>
> Other minor points:
> `stack env` does not work for me: my version of stack does not know how to
> `env`.
>
That's correct—stack env was a feature request.
The warning on `stack ghci` doesn't happen usually, but I'd say that's a
bug (probably because it's a new install)?
I use stack (and have contributed a bit recently), but I agree there's a
few things stack could do better for this workflow.
And the transition has a rather annoying learning curve—stack ghci and
stack ghc are not the same as ghci/ghc. I think that's on purpose to
support a project-based workflow, and it has upsides, but it's a transition
pitfall.
Lots of things *are* explained in https://docs.haskellstack.org/en/latest/faq/,
but you do need learn a few things from scratch.
You want stack exec ghc and stack exec ghci, and arbitrary options require
a double dash `--` — use `stack ghc -- --version` or `stack exec -- ghc
--version`. And I'm afraid the command syntax is mostly frozen by now.
To support a compiler-based workflow, there are a few things planned—I
opened an issue to collect them, starting from Simon Marlow's recent email:
https://github.com/commercialhaskell/stack/issues/2546
BTW, a system-installed GHC already works if you stick to one (and only
build projects that need that). But I'd love to support multiple
system-installed GHCs and being able to pick the one you need.
As others already explained, giving access to stack-installed GHCs can be
problematic—they're going to work, in part, exactly because you can't
install in their package database.
Having stack install system-wide GHCs would IMHO risk opening a can of
worms—having working binaries for all Linux distros requires some work,
system installers would be harder and most users would dislike them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-community/attachments/20160913/1725420d/attachment.html>
More information about the Haskell-community
mailing list