mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
fix load for syncase-in-boot-9; compile-psyntax works again
* module/ice-9/r4rs.scm: * module/ice-9/boot-9.scm (%load-verbosely, assert-load-verbosity) (%load-announce, %load-hook, load): Move these from r4rs.scm to boot-9.scm. * module/ice-9/compile-psyntax.scm: Update to work with syncase-in-boot-9. * module/ice-9/psyntax-pp.scm: Recompiled with syncase-in-boot-9.
This commit is contained in:
parent
64e5d08d3e
commit
85e95b4710
4 changed files with 34 additions and 42 deletions
|
@ -761,6 +761,26 @@
|
||||||
(start-stack 'load-stack
|
(start-stack 'load-stack
|
||||||
(primitive-load-path name)))
|
(primitive-load-path name)))
|
||||||
|
|
||||||
|
(define %load-verbosely #f)
|
||||||
|
(define (assert-load-verbosity v) (set! %load-verbosely v))
|
||||||
|
|
||||||
|
(define (%load-announce file)
|
||||||
|
(if %load-verbosely
|
||||||
|
(with-output-to-port (current-error-port)
|
||||||
|
(lambda ()
|
||||||
|
(display ";;; ")
|
||||||
|
(display "loading ")
|
||||||
|
(display file)
|
||||||
|
(newline)
|
||||||
|
(force-output)))))
|
||||||
|
|
||||||
|
(set! %load-hook %load-announce)
|
||||||
|
|
||||||
|
(define (load name . reader)
|
||||||
|
(with-fluid* current-reader (and (pair? reader) (car reader))
|
||||||
|
(lambda ()
|
||||||
|
(start-stack 'load-stack
|
||||||
|
(primitive-load name)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
(use-modules (ice-9 syncase))
|
;; XXX - We need to be inside (guile) since psyntax.ss calls
|
||||||
|
|
||||||
;; XXX - We need to be inside (ice-9 syncase) since psyntax.ss calls
|
|
||||||
;; `eval' int he `interaction-environment' aka the current module and
|
;; `eval' int he `interaction-environment' aka the current module and
|
||||||
;; it expects to have `andmap' there. The reason for this escapes me
|
;; it expects to have `andmap' there. The reason for this escapes me
|
||||||
;; at the moment.
|
;; at the moment.
|
||||||
;;
|
;;
|
||||||
(define-module (ice-9 syncase))
|
(define-module (guile))
|
||||||
|
|
||||||
(define source (list-ref (command-line) 1))
|
(define source (list-ref (command-line) 1))
|
||||||
(define target (list-ref (command-line) 2))
|
(define target (list-ref (command-line) 2))
|
||||||
|
@ -18,8 +16,7 @@
|
||||||
(close-port out)
|
(close-port out)
|
||||||
(close-port in))
|
(close-port in))
|
||||||
(begin
|
(begin
|
||||||
(write (strip-expansion-structures
|
(write (sc-expand3 x 'c '(compile load eval))
|
||||||
(sc-expand3 x 'c '(compile load eval)))
|
|
||||||
out)
|
out)
|
||||||
(newline out)
|
(newline out)
|
||||||
(loop (read in))))))
|
(loop (read in))))))
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -186,28 +186,3 @@ procedures, their behavior is implementation dependent."
|
||||||
(lambda (p) (with-error-to-port p thunk))))
|
(lambda (p) (with-error-to-port p thunk))))
|
||||||
|
|
||||||
(define the-eof-object (call-with-input-string "" (lambda (p) (read-char p))))
|
(define the-eof-object (call-with-input-string "" (lambda (p) (read-char p))))
|
||||||
|
|
||||||
|
|
||||||
;;;; Loading
|
|
||||||
|
|
||||||
(if (not (defined? '%load-verbosely))
|
|
||||||
(define %load-verbosely #f))
|
|
||||||
(define (assert-load-verbosity v) (set! %load-verbosely v))
|
|
||||||
|
|
||||||
(define (%load-announce file)
|
|
||||||
(if %load-verbosely
|
|
||||||
(with-output-to-port (current-error-port)
|
|
||||||
(lambda ()
|
|
||||||
(display ";;; ")
|
|
||||||
(display "loading ")
|
|
||||||
(display file)
|
|
||||||
(newline)
|
|
||||||
(force-output)))))
|
|
||||||
|
|
||||||
(set! %load-hook %load-announce)
|
|
||||||
|
|
||||||
(define (load name . reader)
|
|
||||||
(with-fluid* current-reader (and (pair? reader) (car reader))
|
|
||||||
(lambda ()
|
|
||||||
(start-stack 'load-stack
|
|
||||||
(primitive-load name)))))
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue