我正在尝试使用EuterpeaLite(https://github.com/Euterpea/EuterpeaLite),但不在Hackage上。
我像import EuterpeaLite as EL
这样导入它,然后像这样将其添加到我的集团文件中:
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.
非行李包裹是否有特殊流程?
我使用了以下步骤。
stack new myproject --resolver=14.27
。我需要指定一个较旧的解析器,因为EuterpeaLite无法使用lts-15.3
在myproject
目录中,将以下几行添加到stack.yaml
:
extra-deps:
- git: https://github.com/Euterpea/EuterpeaLite.git
commit: 5fe2d129bd3087dd78c0feaf4d35fc03ffd36215
也在myproject
目录中,我在package.yaml
中添加了以下依赖项:
dependencies:
- base >= 4.7 && < 5
- EuterpeaLite # <- added this line
stack build
目录中的myproject
。如上所述,您可以更改package.yaml
文件,而不用使用.cabal
。>