mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +02:00
module-name returns '(guile) during boot; psyntax tweak
* module/ice-9/boot-9.scm (module-name): Return '(guile) before the module system is booted, for syncase's benefit. Defer redefinition until the module system is booted. * module/ice-9/psyntax.scm (put-global-definition-hook): Only set a variable if it's unbound. * module/ice-9/psyntax.scm: Regenerated.
This commit is contained in:
parent
757937c290
commit
a26934a850
3 changed files with 7 additions and 8 deletions
|
@ -128,7 +128,7 @@
|
|||
;; Before the module system boots, there are no module names. But
|
||||
;; psyntax does want a module-name definition, so give it one.
|
||||
(define (module-name x)
|
||||
#f)
|
||||
'(guile))
|
||||
(define (module-add! module sym var)
|
||||
(hashq-set! (%get-pre-modules-obarray) sym var))
|
||||
|
||||
|
@ -1221,7 +1221,7 @@
|
|||
|
||||
(define module-transformer (record-accessor module-type 'transformer))
|
||||
(define set-module-transformer! (record-modifier module-type 'transformer))
|
||||
(define module-name (record-accessor module-type 'name))
|
||||
;; (define module-name (record-accessor module-type 'name)) wait until mods are booted
|
||||
(define set-module-name! (record-modifier module-type 'name))
|
||||
(define module-kind (record-accessor module-type 'kind))
|
||||
(define set-module-kind! (record-modifier module-type 'kind))
|
||||
|
@ -1864,6 +1864,8 @@
|
|||
;; must have been defined by now.
|
||||
;;
|
||||
(set-current-module the-root-module)
|
||||
;; definition deferred for syncase's benefit
|
||||
(define module-name (record-accessor module-type 'name))
|
||||
|
||||
;; (define-special-value '(%app modules new-ws) (lambda () (make-scm-module)))
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -345,11 +345,8 @@
|
|||
(let ((v (make-variable 'sc-macro)))
|
||||
(module-add! module symbol v)
|
||||
v))))
|
||||
;; Don't destroy Guile macros corresponding to primitive syntax
|
||||
;; when syncase boots.
|
||||
(if (not (and (symbol-property symbol 'primitive-syntax)
|
||||
(eq? module the-syncase-module)))
|
||||
(variable-set! v sc-macro))
|
||||
(if (not (variable-bound? v))
|
||||
(variable-set! v (gensym)))
|
||||
;; Properties are tied to variable objects
|
||||
(set-object-property! v '*sc-expander* binding))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue