[Haskell-cafe] [Haskell-community] technical thoughts on stack

Sean Leather sean.leather at gmail.com
Mon Sep 26 13:36:10 UTC 2016

Hi Michael,

On Mon, Sep 26, 2016 at 12:32 PM, Michael Snoyman wrote:

> For those wanting to have direct access to GHC and other such tools,
> without needing to prefix calls with `stack exec -- `, the following added
> to your ~/.bashrc (or equivalent) will do the trick:
>     export PATH=`stack path --bin-path`

This is not the side-effect-free function I expected it to be. I just tried
it on a Mac after a new install of stack:

    $ stack path --bin-path
    Run from outside a project, using implicit global project config
    Using resolver: lts-7.0 from implicit global project's config file:
    Fetched package index.
    Populated index cache.
    No compiler found, expected minor version match with ghc-8.0.1 (x86_64)
(based on resolver setting in
    Try running "stack setup" to install the correct GHC into

The above took nearly 10 minutes and failed. I would not recommend doing
that in a ~/.bashrc.

See https://github.com/commercialhaskell/stack/issues/2325 for the issue I
reported in July.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160926/8dc88b98/attachment.html>

More information about the Haskell-Cafe mailing list