Improving the "Get Haskell Experience"

Heinrich Apfelmus apfelmus at quantentunnel.de
Fri Jul 24 18:16:50 UTC 2015


Michael Snoyman wrote:
> 
>> Hopefully, they come with suitable documentation. For instance, one
>> thing I don't understand about  stack  yet is in which location it
>> "magically" installs GHC and packages, and how I can invoke `ghci` from
>> these locations. Somehow, I was unable to understand this from the FAQ.
>>
>>
> I think this FAQ entry should help[1] on the first question:
>
> [1]: https://github.com/commercialhaskell/stack/wiki/FAQ [..]
> 
>> Note that stack setup installs GHC into
> ~/.stack/programs/$platform/ghc-$version/ and not a global location.

Ah, ok. Can I assume that the non-sandboxed packages are also installed
in the ~/.stack directory? That's the other part I didn't understand.

> For the second question: either `stack ghci` or `stack exec ghci` should
> achieve what you're looking for. The former is a bit more experimental, and
> does more intelligent stuff at the project level as far as loading up your
> code. The latter simply runs the ghci command with appropriate PATH and
> GHC_PACKAGE_PATH environment variables set.

`stack ghci` sounds good to me, then. I really like the short startup
times of ghci and never use `cabal exec ghci` for that reason.


Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com




More information about the Libraries mailing list