我正在尝试使用stack构建一个测试项目:
我跑了:
stack new test simple
然后我将Main.hs文件修改为:
module Main where
import Database.MongoDB as M
main :: IO ()
main = do
putStrLn "hello world"
test.cabal文件为:
executable test
hs-source-dirs: src
main-is: Main.hs
default-language: Haskell2010
build-depends: base >= 4.7 && < 5
,mongodb
stack.yaml文件为:
resolver: lts-8.5
packages:
- '.'
extra-deps:
- mongodb-2.1.1.1
当我运行“堆栈构建”时,它显示以下错误消息:
Warning: Some extra-deps are neither installed nor in the index:
* mongodb-2.1.1.1
Didn't see mongodb-2.1.1.1 in your package indices.
Updating and trying again.
Fetched package index.
The following package identifiers were not found in your indices: mongodb-2.1.1.1
我已经检查过我使用lts-8.5快照安装了mongodb-2.1.1.1。
我哪里做错了?