<div dir="ltr"><div><div>This is just trending into how to a stack tutorial.<br><br></div>But to use stack in your project you generate a stack.yaml file.  In that file you can put in the extra-deps stanza something like this:<br><br>extra-deps:<br>  - process-streaming-0.9.1.2<br>  - conceit-0.4.0.0<br>  - pipes-transduce-0.4<br>  - haskell-asterisk-types-0.1.0.0<br>  - haskell-asterisk-0.2.0.0<br>  - haskell-restapi-spec-0.1.0.0<br><br></div>Basically you list specific versions of programs that are not in stackage, and they will be pulled from hackage, if they exist.  But you are still at the mercy of version bounds.  If a package you need doesn't work with a newer ghc (which would explain why it isn't in nightly) or some other package you are using, you are out of luck.<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 12, 2017 at 8:43 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">@David: I tried to switch to nightly but in project's .yaml file and<br>
got error about missing of some library (as I understand, it is missing<br>
in last nightly). So, if I try to do it through .yaml file then how to<br>
use new GHC (8.2.2) but with LTS for 8.0.2? Is it possible? I need last<br>
stable LTS where all libraries (using in the projects) exist, but with<br>
new GHC 8.2.2 which is too new for stable LTS. As I read somewhere, GHC<br>
version and Stackage version are linked together hardly in stack tool,<br>
or?<br>
<div class="HOEnZb"><div class="h5"><br>
> You can see how to configure stack here:<br>
> <a href="https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md" rel="noreferrer" target="_blank">https://github.com/<wbr>commercialhaskell/stack/blob/<wbr>release/doc/yaml_<wbr>configuration.md</a><br>
><br>
> The short of it is that to have stack ghci choose a particular<br>
> version of ghc, you probably need to modify<br>
> ~/.stack/global/stack.yaml, change resolver to something here<br>
> <a href="https://www.stackage.org/snapshots" rel="noreferrer" target="_blank">https://www.stackage.org/<wbr>snapshots</a> that has your version of ghc and<br>
> dependencies similar to what your project wants.  For example<br>
> 'nightly-2017-12-10'.<br>
><br>
> On Tue, Dec 12, 2017 at 7:53 AM, Baa <<a href="mailto:aquagnu@gmail.com">aquagnu@gmail.com</a>> wrote:<br>
><br>
> > @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<br>
> > will not interfere with any system-level installation. Already<br>
> > downloaded. Installed GHC.<br>
> ><br>
> >   stack will use a sandboxed GHC it installed<br>
> >   For more information on paths, see 'stack path' and 'stack exec<br>
> > env' To use this GHC and packages outside of a project, consider<br>
> > using: stack ghc, stack ghci, stack runghc, or stack exec<br>
> ><br>
> > So seems that 8.2.2 was installed, right? But how to build the<br>
> > project with new GHC now? I never used cabal before, `stack ghci`<br>
> > still runs 8.0.2 instead of 8.2.2. Installed GHC 8.2.2 does not<br>
> > correspond to .yaml file LTS - maybe this is a reason why old 8.0.2<br>
> > 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<br>
> > not be found.<br>
> ><br>
> > So, cabal does not know about installed GHC versions (at least<br>
> > 8.0.2, used by stack). I tried --require-sandbox but without<br>
> > success.<br>
> ><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<br>
> > > > a 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>
> ><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>