gpt4 book ai didi

haskell - Yesod脚手架项目: Stack Build automatic removal of my package in cabal file

转载 作者:行者123 更新时间:2023-12-02 18:30:45 25 4
gpt4 key购买 nike

在项目 cabal 文件中,我添加了一个包。但是每当我运行 stack build 或 stack exec -- yesod devel 时,该包就会自动从 cabal 中删除。

这是为什么?

最佳答案

使用 hpack 时不应编辑 .cabal 文件。 Yesod 脚手架使用 stack 和 hpack。 hpack 通过读取 package.yaml 文件来生成 .cabal 文件。将您的包添加到 package.yaml 文件中的 dependencies 部分,然后在构建过程中将其添加到 .cabal 文件中。

关于haskell - Yesod脚手架项目: Stack Build automatic removal of my package in cabal file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45001259/

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