我想导入Data.Map
。在将映射添加到package.yaml
到我的项目中之后,我正在使用堆栈,如下所示:
name: space-age
version: 1.2.0.6
dependencies:
- base
library:
exposed-modules: SpaceAge
source-dirs: src
ghc-options: -Wall
dependencies:
- map
# - foo # List here the packages you
# - bar # want to use in your solution.
tests:
test:
main: Tests.hs
source-dirs: test
dependencies:
- space-age
- hspec
但是执行stack ghci
时仍然出现以下错误:
In the dependencies for space-age-1.2.0.6:
map 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 space-age is a build target.
这里是项目的stack.yaml
:
resolver: lts-15.8
我的印象是,在正确指定所需模块的情况下,堆栈应为我的项目安装Data.Map
。
您能给我一些如何解决此问题的指示吗?