Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell 堆栈无法解析正确的包版本_Haskell_Haskell Stack_Template Haskell - Fatal编程技术网

Haskell 堆栈无法解析正确的包版本

Haskell 堆栈无法解析正确的包版本,haskell,haskell-stack,template-haskell,Haskell,Haskell Stack,Template Haskell,我试图在哈斯克尔使用手榴弹。使用stack作为配置工具,我 # stack.yaml extra-deps: - diagrams-solve-0.1.1 - dual-tree-0.2.2 - SVGFonts-1.6.0.3 - diagrams-core-1.4.1 - diagrams-lib-1.4.2.2 - diagrams-postscript-1.4.1 - diagrams-svg-1.4.2 - Chart-diagrams-1.8.3 - hip-1.5.3.0 - s

我试图在哈斯克尔使用手榴弹。使用
stack
作为配置工具,我

# stack.yaml

extra-deps:
- diagrams-solve-0.1.1
- dual-tree-0.2.2
- SVGFonts-1.6.0.3
- diagrams-core-1.4.1
- diagrams-lib-1.4.2.2
- diagrams-postscript-1.4.1
- diagrams-svg-1.4.2
- Chart-diagrams-1.8.3
- hip-1.5.3.0
- singletons-2.2
- template-haskell-2.11.1.0
- th-desugar-1.6
- grenade-0.1.0
但是当我执行
堆栈构建
时,它给出了以下错误

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for th-desugar-1.6:
    template-haskell-2.12.0.0 from stack configuration does not match <2.12  (latest
                              matching version is 2.11.1.0)
needed due to Brain-0.1.0.0 -> th-desugar-1.6

Some different approaches to resolving this:

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to
    find some working build configuration. This can be convenient when dealing with
    many complicated constraint errors, but results may be unpredictable.

  * Recommended action: try adding the following to your extra-deps
    in [Project directory]/stack.yaml:

- template-haskell-2.11.1.0

Plan construction failed.
错误:构造生成计划时遇到以下异常:
在th-desugar-1.6的依赖项中:
堆栈配置中的模板-haskell-2.12.0.0与th-desugar-1.6不匹配
解决此问题的一些不同方法:
*设置“allow newer:true”忽略所有版本约束并无论如何生成。
*考虑尝试“堆栈求解器”,它使用阴谋集团安装求解器来尝试
找到一些工作的构建配置。这在处理问题时很方便
许多复杂的约束错误,但结果可能不可预测。
*建议的操作:尝试将以下内容添加到您的额外DEP中
在[Project directory]/stack.yaml中:
-模板-haskell-2.11.1.0
计划建设失败了。

即使我把
-template-haskell-2.11.1.0
放在
图表求解之前,stack仍然会给我同样的错误。允许更新的版本是不可行的,因为它破坏了看起来有很多额外DEP的desugar。我建议先找出一个好的解析器。最好的方法是使用原始回购协议:

git clone git@github.com:HuwCampbell/grenade.git
cd grenade
stack init
这将为您提供以下输出:

Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
- examples/

Selecting the best among 13 snapshots...

* Partially matches lts-11.13
    criterion version 1.3.0.0 found
        - grenade requires ==1.1.*

Downloaded nightly-2018-06-16 build plan.    
* Partially matches nightly-2018-06-16
    criterion version 1.4.1.0 found
        - grenade requires ==1.1.*
    hmatrix version 0.19.0.0 found
        - grenade requires ==0.18.*
        - grenade-examples requires ==0.18.*
    singletons version 2.4.1 found
        - grenade requires >=2.1 && <2.4

* Partially matches lts-10.10
    criterion version 1.2.6.0 found
        - grenade requires ==1.1.*

Downloaded lts-9.21 build plan.    
* Matches lts-9.21

Selected resolver: lts-9.21
Initialising configuration using resolver: lts-9.21
Total number of user packages considered: 2
Writing configuration to file: stack.yaml
All done.
查找用于初始化项目的.cabal或package.yaml文件。
使用阴谋集团软件包:
- ./
-例子/
从13个快照中选择最佳快照。。。
*部分匹配lts-11.13
找到标准版本1.3.0.0
-手榴弹需要==1.1*
下载《2018年6月16日夜间建造计划》。
*部分比赛每晚-2018-06-16
找到标准版本1.4.1.0
-手榴弹需要==1.1*
找到hmatrix版本0.19.0.0
-手榴弹需要==0.18*
-手榴弹示例要求==0.18*
找到单例版本2.4.1

-手榴弹需要>=2.1&,看起来需要很多额外的dep。我建议先找出一个好的解析器。最好的方法是使用原始回购协议:

git clone git@github.com:HuwCampbell/grenade.git
cd grenade
stack init
这将为您提供以下输出:

Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
- examples/

Selecting the best among 13 snapshots...

* Partially matches lts-11.13
    criterion version 1.3.0.0 found
        - grenade requires ==1.1.*

Downloaded nightly-2018-06-16 build plan.    
* Partially matches nightly-2018-06-16
    criterion version 1.4.1.0 found
        - grenade requires ==1.1.*
    hmatrix version 0.19.0.0 found
        - grenade requires ==0.18.*
        - grenade-examples requires ==0.18.*
    singletons version 2.4.1 found
        - grenade requires >=2.1 && <2.4

* Partially matches lts-10.10
    criterion version 1.2.6.0 found
        - grenade requires ==1.1.*

Downloaded lts-9.21 build plan.    
* Matches lts-9.21

Selected resolver: lts-9.21
Initialising configuration using resolver: lts-9.21
Total number of user packages considered: 2
Writing configuration to file: stack.yaml
All done.
查找用于初始化项目的.cabal或package.yaml文件。
使用阴谋集团软件包:
- ./
-例子/
从13个快照中选择最佳快照。。。
*部分匹配lts-11.13
找到标准版本1.3.0.0
-手榴弹需要==1.1*
下载《2018年6月16日夜间建造计划》。
*部分比赛每晚-2018-06-16
找到标准版本1.4.1.0
-手榴弹需要==1.1*
找到hmatrix版本0.19.0.0
-手榴弹需要==0.18*
-手榴弹示例要求==0.18*
找到单例版本2.4.1

-手榴弹需要>=2.1&&您不能在额外的dep中指定
模板haskell
。它随GHC(以及base等包)一起提供@Sibi那么我如何告诉stack使用相应的GHC版本?您的解析器控制GHC版本。您可以从主页上获得合适的参数:您不能在额外的dep中指定
template haskell
。它随GHC(以及base等包)一起提供@Sibi那么我如何告诉stack使用相应的GHC版本?您的解析器控制GHC版本。您可以从主页上获得合适的: