[Haskell-beginners] How to install new GHC ?

Baa aquagnu at gmail.com
Tue Dec 12 12:53:47 UTC 2017

@Francesco: unfortunately nightly misses some package. So, I tried:

  $ stack --resolver=ghc-8.2.2 setup --reinstall
  Preparing to install GHC (tinfo6) to an isolated location. This will not
  interfere with any system-level installation. Already downloaded.                       
  Installed GHC.

  stack will use a sandboxed GHC it installed
  For more information on paths, see 'stack path' and 'stack exec env'
  To use this GHC and packages outside of a project, consider using:
  stack ghc, stack ghci, stack runghc, or stack exec

So seems that 8.2.2 was installed, right? But how to build the project
with new GHC now? I never used cabal before, `stack ghci` still runs
8.0.2 instead of 8.2.2. Installed GHC 8.2.2 does not correspond
to .yaml file LTS - maybe this is a reason why old 8.0.2 is stil used...

When I try cabal build/new-build/repl I get:

  cabal: The program 'ghc' version >=6.4 is required but it could not be

So, cabal does not know about installed GHC versions (at least 8.0.2,
used by stack). I tried --require-sandbox but without success.

> On Tue, Dec 12, 2017 at 01:56:03PM +0200, Baa wrote:
> > Would somebody explain me what is wrong here and how I can test a
> > project with new 8.2.2 GHC?  
> Hello Paul, I don't think stack lts has 8.2.2 just yet. Use a
> nightly or download/install ghc from here and compile your project
> with the new `cabal new-build`.
> [1] https://www.haskell.org/ghc/download_ghc_8_2_2.html#binaries
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

More information about the Beginners mailing list