<div dir="ltr"><div>You can see how to configure stack here: <a href="https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md">https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md</a><br><br></div>The short of it is that to have stack ghci choose a particular version of ghc, you probably need to modify ~/.stack/global/stack.yaml, change resolver to something here <a href="https://www.stackage.org/snapshots">https://www.stackage.org/snapshots</a> that has your version of ghc and dependencies similar to what your project wants. For example 'nightly-2017-12-10'.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 12, 2017 at 7:53 AM, Baa <span dir="ltr"><<a href="mailto:aquagnu@gmail.com" target="_blank">aquagnu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">@Francesco: unfortunately nightly misses some package. So, I tried:<br>
<br>
$ stack --resolver=ghc-8.2.2 setup --reinstall<br>
Preparing to install GHC (tinfo6) to an isolated location. This will not<br>
interfere with any system-level installation. Already downloaded.<br>
Installed GHC.<br>
<span class=""><br>
stack will use a sandboxed GHC it installed<br>
For more information on paths, see 'stack path' and 'stack exec env'<br>
To use this GHC and packages outside of a project, consider using:<br>
stack ghc, stack ghci, stack runghc, or stack exec<br>
<br>
</span>So seems that 8.2.2 was installed, right? But how to build the project<br>
with new GHC now? I never used cabal before, `stack ghci` still runs<br>
8.0.2 instead of 8.2.2. Installed GHC 8.2.2 does not correspond<br>
to .yaml file LTS - maybe this is a reason why old 8.0.2 is stil used...<br>
<br>
When I try cabal build/new-build/repl I get:<br>
<br>
cabal: The program 'ghc' version >=6.4 is required but it could not be<br>
found.<br>
<br>
So, cabal does not know about installed GHC versions (at least 8.0.2,<br>
used by stack). I tried --require-sandbox but without success.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> On Tue, Dec 12, 2017 at 01:56:03PM +0200, Baa wrote:<br>
> > Would somebody explain me what is wrong here and how I can test a<br>
> > project with new 8.2.2 GHC?<br>
><br>
> Hello Paul, I don't think stack lts has 8.2.2 just yet. Use a<br>
> nightly or download/install ghc from here and compile your project<br>
> with the new `cabal new-build`.<br>
><br>
> [1] <a href="https://www.haskell.org/ghc/download_ghc_8_2_2.html#binaries" rel="noreferrer" target="_blank">https://www.haskell.org/ghc/<wbr>download_ghc_8_2_2.html#<wbr>binaries</a><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Beginners mailing list<br>
> <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/beginners</a><br>
<br>
______________________________<wbr>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>