我通过堆栈安装了 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
#
{}
我只想ghcjs
用堆栈安装。