gpt4 book ai didi

haskell - 从堆栈安装 ghcjs

转载 作者:行者123 更新时间:2023-12-02 21:22:03 24 4
gpt4 key购买 nike

我通过堆栈安装了 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 并更改它。

To use GHCJS with stack >= 0.1.8, place a GHCJS version in the compiler field of stack.yaml ... then 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

最佳答案

看看这个页面:http://docs.haskellstack.org/en/stable/ghcjs/

我会尝试:

  1. 开始一个新的堆栈项目,例如堆栈新的 js-test

  2. 通过添加此节(取自上述链接)来修改 stack.yaml 文件:

    compiler: ghcjs-0.2.0.20160414_ghc-7.10.3
    compiler-check: match-exact
    setup-info:
    ghcjs:
    source:
    ghcjs-0.2.0.20160414_ghc-7.10.3:
    url: https://s3.amazonaws.com/ghcjs/ghcjs-0.2.0.20160414_ghc-7.10.3.tar.gz
    sha1: 6d6f307503be9e94e0c96ef1308c7cf224d06be3
  3. resolver: 更改为 lts-5.12 - 这与上面的节匹配。

  4. 运行stack setup以安装编译器。

第 4 步将需要一段时间。

关于haskell - 从堆栈安装 ghcjs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37254692/

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