我设置了一个简单的堆栈项目,以及一个用于基准测试的 .cabal 条目:
benchmark leaves-of-a-tree-bench
type: exitcode-stdio-1.0
hs-source-dirs: src, bench
main-is: MainBenchmarkSuite.hs
build-depends: base
, criterion
, random
, leaves-of-a-tree
ghc-options: -Wall
-O2
default-language: Haskell2010
但是运行后stack bench
出现以下错误:
setup-Simple-Cabal-1.22.5.0-ghc-7.10.3: Error: Could not find benchmark program
".stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/leaves-of-a-tree-bench/leaves-of-a-tree-bench".
Did you build the package first?
我错过了什么吗?
编辑:我将项目上传到github 存储库