首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我试图运行阴谋构建,并得到以下错误

我试图运行阴谋构建,并得到以下错误
EN

Stack Overflow用户
提问于 2021-10-17 15:07:32
回答 2查看 75关注 0票数 1
代码语言:javascript
复制
Build profile: -w ghc-9.0.1 -O1
In order, the following will be built (use -v for more details):
 - csound-expression-dynamic-0.3.8 (lib) (requires build)
 - csound-expression-typed-0.2.7 (lib) (requires build)
 - csound-expression-opcodes-0.0.5.1 (lib) (requires build)
 - csound-expression-5.3.4 (lib) (requires build)
 - csound-sampler-0.0.10.0 (lib) (requires build)
 - csound-catalog-0.7.4 (lib) (requires build)
 - solve-0.2.0.0 (exe:solve) (first run)
Starting     csound-expression-dynamic-0.3.8 (lib)
Building     csound-expression-dynamic-0.3.8 (lib)

Failed to build csound-expression-dynamic-0.3.8.
Build log (
C:\Users\Shiro\AppData\Roaming\cabal\logs\ghc-9.0.1\csound-expres_-0.3.8-3e9f98bb37e846ae1dd789bc6c80c4d50504a214.log
):
Preprocessing library for csound-expression-dynamic-0.3.8..
Building library for csound-expression-dynamic-0.3.8..
[ 1 of 15] Compiling Csound.Dynamic.Tfm.DeduceTypes ( src\Csound\Dynamic\Tfm\DeduceTypes.hs, dist\build\Csound\Dynamic\Tfm\DeduceTypes.o )
[ 2 of 15] Compiling Csound.Dynamic.Tfm.UnfoldMultiOuts ( src\Csound\Dynamic\Tfm\UnfoldMultiOuts.hs, dist\build\Csound\Dynamic\Tfm\UnfoldMultiOuts.o )
[ 3 of 15] Compiling Csound.Dynamic.Types.Exp ( src\Csound\Dynamic\Types\Exp.hs, dist\build\Csound\Dynamic\Types\Exp.o )

src\Csound\Dynamic\Types\Exp.hs:202:66: error:
    * No instance for (Data.Functor.Classes.Eq1 RatedExp)
        arising from a use of `=='
    * In the second argument of `(&&)', namely
        `(ratedExpExp re == EmptyExp)'
      In the expression:
        isNothing (ratedExpDepends re) && (ratedExpExp re == EmptyExp)
      In an equation for `isEmptyExp':
          isEmptyExp e
            = isNothing (ratedExpDepends re) && (ratedExpExp re == EmptyExp)
            where
                re = unFix e
    |
202 | isEmptyExp e = isNothing (ratedExpDepends re) && (ratedExpExp re == EmptyExp)
    |                                                                  ^^
cabal.exe: Failed to build csound-expression-dynamic-0.3.8 (which is required
by exe:solve from solve-0.2.0.0). See the build log above for details.

这是我第一次接触Haskell和Cabal。所以,据我所知,我需要solve.exe,它需要一些其他的东西。我怎么才能让它起作用?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2021-10-18 03:20:08

问题是,ratedExpExp re == EmptyExp在文件中出现的时间比$(deriveEq1 ''RatedExp)早。GHC 9.0.1发行说明说:

  • 破坏更改:模板Haskell剪接现在充当约束解决传递之间的分离点。再也不可能在拼接之前使用类的实例,并在拼接之后定义该实例。例如,这段代码现在报告了C Bool缺少的实例: 类C a,其中foo ::a bar ::Bool bar = foo $(返回[])实例C Bool,其中foo = True

可以通过将isEmptyExp方法移动到$(deriveEq1 ''RatedExp)剪接之后来解决这个问题。一旦这样做,您将遇到另一个关于重复实例的错误。可以通过将instance Hashable1 IM.IntMap包装到#if !MIN_VERSION_hashable(1,3,4)中来解决这个问题,之后它将在GHC9.0.1上编译。我打开https://github.com/spell-music/csound-expression-dynamic/pull/3是为了在上游进行这些更改,但是在它们被接受之前,您可以手动地让它们来构建。

UPDATE:我的公关来解决这个问题被合并了,一个新的版本被上传到了黑客。在执行cabal update之后,在GHC 9的基础上构建应该会成功,而不需要对项目进行任何更改。

票数 0
EN

Stack Overflow用户

发布于 2021-10-17 15:16:45

csound-expression-dynamic似乎还不能与GHC9.0.1兼容。试试GHC 8.10.7,它仍然是推荐的通用版本。

我在他们的GitHub页面上打开了一个关于这个的问题:https://github.com/spell-music/csound-expression-dynamic/issues/2

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69605645

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档