gpt4 book ai didi

Haskell 堆栈与全局 ghc

转载 作者:行者123 更新时间:2023-12-03 23:23:34 26 4
gpt4 key购买 nike

是否可以使用 stack已安装 ghc没有 stack安装 ghc 的本地副本或 cabal ?

最佳答案

是的。如果ghcPATH是所选快照的正确版本,stack会愉快地使用它。

% ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.4

% stack --resolver=lts-2.22 install packdeps
Run from outside a project, using implicit global project config
Using resolver: lts-2.22 specified on command line
packdeps-0.4.1: unregistering
packdeps-0.4.2: download
...

% stack --resolver=nightly-2015-12-25 install packdeps
Run from outside a project, using implicit global project config
Using resolver: nightly-2015-12-25 specified on command line
Compiler version mismatched, found ghc-7.8.4 (x86_64), but expected minor version match with ghc-7.10.3 (x86_64) (based on resolver setting in /Users/phadej/.stack/global/stack.yaml).
Try running "stack setup" to install the correct GHC into /Users/phadej/.stack/programs/x86_64-osx/

您也可以跳过 ghc 检查 --skip-ghc-check :
% stack --resolver=nightly-2015-12-25 --skip-ghc-check install packdeps
Run from outside a project, using implicit global project config
Using resolver: nightly-2015-12-25 specified on command line
split-0.2.2: configure
...

但这可能是 主意

关于Haskell 堆栈与全局 ghc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34469955/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com