创建新项目后:
$cd myproject
$stack new workbench
$cd workbench/
$stack setup
我尝试通过更新workbench.cabal
:
$cat workbench.cabal
name: workbench
...
library
hs-source-dirs: src
exposed-modules: Lib
build-depends: base >= 4.7 && < 5 # my note: line 19
zeromq4-haskell
default-language: Haskell2010
但是,在运行stack clean
时,我会得到以下信息:
$stack clean
Unable to parse cabal file .../workbench/workbench.cabal: NoParse "build-depends" 19
我做错了什么?
答案 0 :(得分:2)
cabal文件中的任何列表必须以逗号分隔,而不是以空格分隔。有关.cabal
个文件are listed in the user guide *的规则:
library
hs-source-dirs: src
exposed-modules: Lib
build-depends: base >= 4.7 && < 5,
zeromq4-haskell
default-language: Haskell2010
*有趣的是,那里缺少x list
的定义。