a number of small compilation fixes
* ice-9/boot-9.scm: Allow a compiled load of posix, networking, and deprecated files. * module/language/scheme/translate.scm (lookup-transformer): Lookup the sc-macro by value, not by name. Works around the fact that compiled macros don't have names, which is probably a bug. * module/system/base/compile.scm (syntax-error) (call-with-compile-error-catch): Throw and catch a key that's not used by anyone else. Write error messages to the error port. * module/system/repl/repl.scm (default-catch-handler): Call display-error with the correct number of arguments. * module/system/vm/frame.scm (frame-program-name): Guard against unbound variables. * ice-9/optargs.scm (let-keywords-template): Don't unquote in a helper procedure. A bit irritating. I suppose we should fix the modules + syncase situation at some point, and then switch to syncase.
This commit is contained in:
parent
5ba9d84978
commit
1e6ebf54db
6 changed files with 20 additions and 16 deletions
|
|
@ -38,15 +38,17 @@
|
|||
;;;
|
||||
|
||||
(define (syntax-error loc msg exp)
|
||||
(throw 'syntax-error loc msg exp))
|
||||
(throw 'syntax-error-compile-time loc msg exp))
|
||||
|
||||
(define-macro (call-with-compile-error-catch thunk)
|
||||
`(catch 'syntax-error
|
||||
`(catch 'syntax-error-compile-time
|
||||
,thunk
|
||||
(lambda (key loc msg exp)
|
||||
(if (pair? loc)
|
||||
(format #t "~A:~A: ~A: ~A~%" (car loc) (cdr loc) msg exp)
|
||||
(format #t "unknown location: ~A: ~A~%" msg exp)))))
|
||||
(format (current-error-port)
|
||||
"~A:~A: ~A: ~A~%" (car loc) (cdr loc) msg exp)
|
||||
(format (current-error-port)
|
||||
"unknown location: ~A: ~A~%" msg exp)))))
|
||||
|
||||
(export-syntax call-with-compile-error-catch)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue