我的以下代码片段将给出 SB-INT:SIMPLE-READER-PACKAGE-ERROR; 我知道这是因为 REPL 读取代码时尚未定义包“quicklisp-quickstart”;但是包是在“quicklisp.lisp”中定义的。
如何使以下代码工作?或者我如何告诉普通的 lisp 阅读器这个包将在动态加载的文件中定义?
* (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(if (probe-file quicklisp-init)
(load quicklisp-init)
(progn
(load "quicklisp.lisp")
(quicklisp-quickstart:install))))
debugger invoked on a SB-INT:SIMPLE-READER-PACKAGE-ERROR in thread
#<THREAD "main thread" RUNNING {100299C6A3}>:
Package QUICKLISP-QUICKSTART does not exist.
Stream: #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {100017F893}>
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.