我正在尝试使用GHCJS作为编译器按照http://docs.haskellstack.org/en/stable/ghcjs.html
上的说明在NixOS上设置一个新的Stack项目我在stack.yaml文件中包含了以下几行代码(所有这些都在一行上,因为制表符空格似乎有问题):
# Compiler specifying the GHCJS compiler for this project (using improved base).
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2
compiler-check: match-exact
setup-info:
ghcjs: source:
ghcjs-0.2.0.20151230.3_ghc7.10.2:
url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz"
我在运行stack setup
Could not parse '/home/lorkaan/pandocJS/stack.yaml':
InvalidYaml (Just (YamlParseException {yamlProblem = "mapping values are not allowed in this context", yamlContext = "", yamlProblemMark = YamlMark {yamlIndex = 487, yamlLine = 12, yamlColumn = 17}}))
See https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md.
此外,我尝试删除setup-info
字段,因为Stack抱怨它,留下我的stack.yaml
文件:
# Compiler specifying the GHCJS compiler for this project (using improved base).
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2
compiler-check: match-exact
使用堆栈设置命令生成此输出:
Warning: /home/lorkaan/pandocJS/stack.yaml: Unrecognized field in ProjectAndConfigMonoid: compiler
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
The following executables are missing and must be installed: make
有人知道为什么会这样吗?
答案 0 :(得分:4)
setup-info:
ghcjs:
source:
ghcjs-0.2.0.20151230.3_ghc7.10.2:
url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz"
make
实用程序。您需要使用Linux发行版的软件包管理系统来安装make
。由于我不知道你所使用的是哪个发行版,我只能建议只执行$ make
命令并查看环境是否足够智能指出它可以找到哪个包.Ubuntu通常会这样做。然后它只是apt-get install
- 包裹的问题,或者可能是yum install
- 例如CentOS和Fedora等P.S。像你这样的问题通常会因为没有在诊断问题方面做出足够的努力(或者在一个问题下放置2个完全独立的问题)而得到了一个帮助,但是我给了你怀疑的好处,只是希望你能做到这一点。下次会更整洁。