如果我错了,请纠正我,但您的特定问题似乎是install-deriv-package
在您的 Geiser 环境中未定义的问题,但在您的 DrRacket 环境中未定义。无论如何,在我看来,在 Geiser REPL、geiser-compile-file
输出和 DrRacket 输出中生成的消息非常相似(至少在使用assoc
而不是massoc
可变列表的情况下):
Geiser REPL 错误:
racket@> (assoc 3 (mlist (mlist 1 2) (mlist 3 4) (mlist 5 6)))
assoc: not a proper list: (mcons (mcons 1 (mcons 2)) (mcons (mcons 3 (mcons 4)) (mcons (mcons 5 (mcons 6)))))
context...:
/Applications/Racket v6.5/collects/racket/private/misc.rkt:87:7
Geiser REPL 无错误:
racket@> (massoc 3 (mlist (mlist 1 2) (mlist 3 4) (mlist 5 6)))
(mcons 3 (mcons 4 '()))
geiser-compile-file
错误:
Compiling ~/development/lisp/racket/error_testing.rkt ...
Error: struct:exn:fail:contract <- THIS TEXT IS ACTUALLY LINKED TO THE GEISER DOCS PAGE
assoc: not a proper list: (mcons (mcons 1 (mcons 2)) (mcons (mcons 3 (mcons 4)) (mcons (mcons 5 (mcons 6)))))
geiser-compile-file
没有错误:
Compiling ~/development/lisp/racket/error_testing.rkt ...
(mcons 3 (mcons 4 '()))
DrRacket 错误:
(assoc 3 (mlist (mlist 1 2) (mlist 3 4) (mlist 5 6)))
. . assoc: not a proper list: (mcons (mcons 1 (mcons 2 '())) (mcons (mcons 3 (mcons 4 '())) (mcons (mcons 5 (mcons 6 '())) '())))
DrRacket 无错误:
(mcons 3 (mcons 4 '()))
如您所见,所有这些输出看起来都非常相似。但是,为了回答您的问题,我认为这geiser-compile-file
是在这里使用的最佳 Geiser 选项,因为它提供的有关错误的信息比 Geiser REPL 输出略多。此外,geiser-compile-file
缓冲区默认为geiser-debug-mode
,因此可能有助于调试。最后,您可能还想在 Geiser 网站上查看此部分。