Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell 如何在ghcid中与cabal一起运行测试套件?_Haskell_Cabal_Ghcid - Fatal编程技术网

Haskell 如何在ghcid中与cabal一起运行测试套件?

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

我在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 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'