as per https://docs.haskellstack.org/en/stable/README/,
in my VPS,i ran:
curl -sSL https://get.haskellstack.org/ | sh
stack setup
but the Installed GHC's version is 7.10.3.
if i want to install 7.10.2 or 7.8.4, what should i do?
thank u.
You could specify the GHC_VERSION to stack setup, e.g.
stack --resolver ghc-7.10.2 setup
and specify the desired GHC version in your project's config file.
@0xmohit is right. You can also use as resolver (on the command line and especially in your project's stack.yaml) Stackage snapshots using the right GHC version, like lts-3.22 for 7.10.2 or lts-2.22 for 7.8.4.
https://www.stackage.org/lts-2
https://www.stackage.org/lts-3
However, probably the docs there should have a forward link to the docs explaining this — they don't even acknowledge that multiple compilers exist. That's probably _correct_ at the beginning, but a link there would still be good.
Incidentally, stack --compiler ghc-7.10.2 setup will also work (you probably want 7.10.3 though)
u can also run such as "stack --resolver ghc-7.10.2 init" to specify GHC's version when u run "stack init" after u finish running "stack setup".
@Blaisorblade ,i try to install hakyll3 as follows:
git clone -b hakyll3 https://github.com/jaspervdj/hakyll/ hakyll3
cd hakyll3
root@AR:~/hakyll3# ls
cabal.sandbox.config LICENSE Makefile Setup.hs tests
data hakyll.cabal logo.svg README.markdown src web
root@AR:~/hakyll3#
root@AR:~/hakyll3# stack --resolver lts-1.15 init
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
Selected resolver: lts-1.15
Resolver 'lts-1.15' does not have all the packages to match your requirements.
QuickCheck version 2.7.6 found
- hakyll requires >=2.4 && <2.6
binary version 0.7.1.0 found
- hakyll requires >=0.5 && <0.7
blaze-html version 0.7.1.0 found
- hakyll requires ==0.5.*
blaze-markup version 0.6.3.0 found
- hakyll requires >=0.5.1 && <0.6
citeproc-hs not found
- hakyll requires >=0.3.2 && <0.4
cryptohash version 0.11.6 found
- hakyll requires >=0.7 && <0.9
hamlet not found
- hakyll requires >=1.0 && <1.2
lrucache not found
- hakyll requires >=1.1.1 && <1.2
pandoc version 1.13.2 found
- hakyll requires >=1.9.3 && <1.10
process version 1.2.0.0 found
- hakyll requires >=1.0 && <1.2
regex-tdfa version 1.2.0 found
- hakyll requires ==1.1.*
tagsoup version 0.13.3 found
- hakyll requires >=0.12.6 && <0.13
test-framework version 0.8.1.1 found
- hakyll requires >=0.4 && <0.7
test-framework-hunit version 0.3.0.1 found
- hakyll requires >=0.2 && <0.3
test-framework-quickcheck2 version 0.3.0.3 found
- hakyll requires >=0.2 && <0.3
unix version 2.7.0.1 found
- hakyll requires >=2.4 && <2.7
Using package flags:
- hakyll: previewserver = True
This may be resolved by:
- Using '--omit-packages to exclude mismatching package(s).
- Using '--resolver' to specify a matching snapshot/resolver
root@AR:~/hakyll3#
so which lts version should i choose to install hakyll3 successfully?
thank u for ur help!
If picking a resolver doesn't work, it can be better to give a try to stack init.
But here, since some packages are older than that snapshot and some newer, you should try using the solver with stack init --solver.
(But FWIW, this does not really fit in this issue).
Most helpful comment
You could specify the GHC_VERSION to
stack setup, e.g.and specify the desired GHC version in your project's config file.