gpt4 book ai didi

haskell - Cabal 安装在构建 Yesod 项目时抛出 ExitFailure 1

转载 作者:行者123 更新时间:2023-12-02 17:20:47 26 4
gpt4 key购买 nike

我是 Haskell Web 开发和框架的新手,我一直在关注 this tutorial 。我已经运行 yesod init 来创建一个项目。然后我进入项目文件夹并运行:

$ cabal sandbox init
$ cabal install --enable-tests --reorder-goals --max-backjumps=-1 -j

我到处遇到了一些依赖问题,但到目前为止已经解决了所有这些问题。现在我在构建过程中遇到了一个错误,我似乎找不到任何答案或修复。构建过程突然结束并出现 ExitFailure 1

以下是完整的错误消息:

Model.hs:13:1:
Illegal instance declaration for
‘ToBackendKey
persistent-2.0.8:Database.Persist.Sql.Types.SqlBackend Email’
(All instance types must be of the form (T t1 ... tn)
where T is not a synonym.
Use TypeSynonymInstances if you want to disable this.)
In the instance declaration for
‘ToBackendKey persistent-2.0.8:Database.Persist.Sql.Types.SqlBackend Email’

Model.hs:13:1:
Illegal instance declaration for
‘ToBackendKey
persistent-2.0.8:Database.Persist.Sql.Types.SqlBackend User’
(All instance types must be of the form (T t1 ... tn)
where T is not a synonym.
Use TypeSynonymInstances if you want to disable this.)
In the instance declaration for
‘ToBackendKey persistent-2.0.8:Database.Persist.Sql.Types.SqlBackend User’
cabal: Error: some packages failed to install:
Wordscape-0.0.0 failed during the building phase. The exception was:
ExitFailure 1

还有其他人遇到过这样的错误/知道如何补救吗?任何帮助,将不胜感激。谢谢!

最佳答案

添加

{-# LANGUAGE TypeSynonymInstances #-}

Model.hs 顶部应该修复它,也应该升级到 persist-2.1(尽管您可能要到明天才能做到这一点)。

关于haskell - Cabal 安装在构建 Yesod 项目时抛出 ExitFailure 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26112050/

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