使用Haskell初始化GHCJS项目需要做什么?
在堆栈文档之后,我尝试初始化一个GHCJS项目,以便将Haskell代码编译成JavaScript。
在执行stack templates之后,我看到有一个GHCJS模板
ghcjs - Haskell to JavaScript compiler, based on GHC当我尝试在这个模板中使用新命令时,如下所示:
stack new ghcjsSetup ghcjs
我收到以下错误消息:
Downloading template "ghcjs" to create project "ghcjsSetup" in ghcjsSetup/ ...
The following parameters were needed by the template but not provided: author-email, author-name, category, copyright, github-username
You can provide them in /home/u/.stack/config.yaml, like this:
templates:
params:
author-email: value
author-name: value
category: value
copyright: value
github-username: value
Or you can pass each one as parameters like this:
stack new ghcjsSetup ghcjs -p "author-email:value" -p "author-name:value" -p "category:value" -p "copyright:value" -p "github-username:value"
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ghcjsSetup/ghcjsSetup.cabal
Selecting the best among 11 snapshots...
* Partially matches lts-9.11
ghcjs-base not found
- ghcjsSetup requires -any
Downloaded nightly-2017-11-01 build plan.
Unable to parse cabal file: FromString "This package requires at least Cabal version 2.0" Nothing发布于 2017-11-02 18:26:58
我最近也犯了同样的错误。显然,你有一个旧版本的stack。您需要将其升级到>= 1.5.1版本。发生此错误是因为我认为Cabal ver. 2.0中的某些文件格式发生了更改。
https://stackoverflow.com/questions/47082079
复制相似问题