【发布时间】:2020-03-14 02:18:04
【问题描述】:
我正在尝试使用 EuterpeaLite (https://github.com/Euterpea/EuterpeaLite),但它不在 Hackage 上。
我像 import EuterpeaLite as EL 这样导入它,然后像这样将它添加到我的 cabal 文件中:
build-depends:
base >=4.7 && <5
, postgresql-simple
, EuterpeaLite
但是当我运行stack build 或stack ghci 时,我得到了这个错误:
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for engine-0.1.0.0:
EuterpeaLite needed, but the stack configuration has no specified version (no package with that name found, perhaps there
is a typo in a package's build-depends or an omission from the stack.yaml packages list?)
needed since engine is a build target.
Some different approaches to resolving this:
Plan construction failed.
对于非 Hackage 包有特殊处理吗?
【问题讨论】:
-
我试过这个:
packages: - deepseq-1.4.4.0 - Euterpea-2.0.7@sha256:81d583a47d483bf83ac07df7b764138f1aa52a56db4e7c7f685d070dbac4b388,2661 - location: git: https://github.com/Euterpea/EuterpeaLite.git commit: 5fe2d129bd3087dd78c0feaf4d35fc03ffd36215并收到同样的错误。 -
@LevelChart8 你需要把它放在
extra-deps,而不是packages。packages用于列出您的 Stack 项目中的包;extra-deps用于列出不在您的堆栈解析器中的任何额外依赖项。
标签: haskell haskell-stack