我已经通过stack安装了GHC(因此stack ghc -- --version
显示GHC-7.10.3)
$ stack install ghcjs
Run from outside a project, using implicit global project config
Using resolver: lts-5.2 from implicit global project's config file: /home/john/.stack/global-project/stack.yaml
The following target packages were not found: ghcjs
一些资源表明,
ghcjs
稍微有些实验性(尽管在更进一步的阶段)。
查看http://docs.haskellstack.org/en/stable/ghcjs/后,我想也许我可以找到
stack.yaml
并进行更改。
要使用 GHCJS 和 stack >= 0.1.8,请将 GHCJS 版本放置于 stack.yaml 的编译器字段中...然后运行
stack setup
$ cat ~/.stack/global-project/stack.yaml
# This is the implicit global project's config file, which is only used when
# 'stack' is run outside of a real project. Settings here do _not_ act as
# defaults for all projects. To change stack's default settings, edit
# '/home/john/.stack/config.yaml' instead.
#
# For more information about stack's configuration, see
# http://docs.haskellstack.org/en/stable/yaml_configuration.html
#
flags: {}
extra-package-dbs: []
packages: []
extra-deps: []
resolver: lts-5.2
我们被告知查看config.yaml
,但它看起来同样空白。这是正确的吗?我是不是走上了一条死路?
$ cat ~/.stack/config.yaml
# This file contains default non-project-specific settings for 'stack', used
# in all projects. For more information about stack's configuration, see
# http://docs.haskellstack.org/en/stable/yaml_configuration.html
#
{}
我只想使用stack安装ghcjs
。
stack setup
刚刚完成,稍等片刻! - ErikR