例如,
test/Spec.hs:42:18: error:
• No instance for (genvalidity-0.8.0.0:Data.GenValidity.GenUnchecked
(Decl UnkindedType Identifier Location))
arising from a use of ‘forAllUnchecked’
• In the second argument of ‘it’, namely
‘(forAllUnchecked
(\ decls
-> shouldBe
(either
(const ())
(const ())
... 50 (literally) more lines ...
Run Code Online (Sandbox Code Playgroud)
太长了,我必须向上滚动我的终端/消息查看器才能看到发生了什么。我只需要行号和列。
是否有一个 GHC 标志让它输出这个?
test/Spec.hs:42:18: error:
• No instance for (genvalidity-0.8.0.0:Data.GenValidity.GenUnchecked
(Decl UnkindedType Identifier Location))
arising from a use of ‘forAllUnchecked’
Run Code Online (Sandbox Code Playgroud)
这给了我我需要的一切。
到目前为止,我想出的最好的是:
-dppr-user-length=0 -dppr-cols=10000
Run Code Online (Sandbox Code Playgroud)
产生
test/Spec.hs:42:18: error:
• No instance for (genvalidity-0.8.0.0:Data.GenValidity.GenUnchecked (Decl UnkindedType Identifier Location)) arising from a use of ‘forAllUnchecked’
• In the second argument of ‘it’, namely ‘(forAllUnchecked (\ decls -> ...))’
In a stmt of a 'do' block: it "Compiler terminates" (forAllUnchecked (\ decls -> ...))
In the second argument of ‘describe’, namely ‘(do ...)’
|
42 | (forAllUnchecked
| ^^^^^^^^^^^^^^^...
Run Code Online (Sandbox Code Playgroud)
它仍然占用空间,但比以前少得多。我会接受更好的答案。