Haskell 如何在ghcid中与cabal一起运行测试套件?
我在stack in中找到了一个用于执行此操作的参考资料,在这里有一些提及: 我所尝试的:Haskell 如何在ghcid中与cabal一起运行测试套件?,haskell,cabal,ghcid,Haskell,Cabal,Ghcid,我在stack in中找到了一个用于执行此操作的参考资料,在这里有一些提及: 我所尝试的: [nix-shell:~/NewProjects/orgmode-parse]$ cabal v2-repl test cabal: Cannot open a repl for the package test, it is not in this project (either directly or indirectly). If you want to add it to the project
[nix-shell:~/NewProjects/orgmode-parse]$ cabal v2-repl test
cabal: Cannot open a repl for the package test, it is not in this project
(either directly or indirectly). If you want to add it to the project then
edit the cabal.project file.
[nix-shell:~/NewProjects/orgmode-parse]$ cabal v2-repl Test.test
cabal: Unknown target 'Test.test'.
There is no component 'Test.test'.
[nix-shell:~/NewProjects/orgmode-parse]$ cabal v2-repl Test.test
cabal: Unknown target 'Test.test'.
There is no component 'Test.test'.
其中
tests
是cabal文件中定义的测试套件的名称。而Main.Main
指的是Main
模块的Main
功能。实际上,这似乎有一个限制,即它只会在对测试文件本身而不是相关的可执行文件/库进行更改时重新加载。
ghcid --command='cabal v2-repl test:tests' --test 'Main.main'