mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
finish transition to bare/hygiene/public/private
* module/ice-9/boot-9.scm (make-module-ref): Remove the transition support. * module/ice-9/psyntax.scm (get-global-definition-hook): Remove transition support. Also remove support for guile-macro. (build-global-reference, build-global-assignment): Remove transition support. * module/ice-9/psyntax-pp.scm: Regenerated.
This commit is contained in:
parent
a2716cbe1e
commit
d6ebfd7226
3 changed files with 20 additions and 28 deletions
|
@ -134,8 +134,8 @@
|
|||
(define sc-macro 'sc-macro)
|
||||
(define (make-module-ref mod var kind)
|
||||
(case kind
|
||||
((public #t) (if mod `(@ ,mod ,var) var))
|
||||
((private #f) (if (and mod (not (equal? mod (module-name (current-module)))))
|
||||
((public) (if mod `(@ ,mod ,var) var))
|
||||
((private) (if (and mod (not (equal? mod (module-name (current-module)))))
|
||||
`(@@ ,mod ,var)
|
||||
var))
|
||||
((bare) var)
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -357,19 +357,13 @@
|
|||
(define get-global-definition-hook
|
||||
(lambda (symbol module)
|
||||
(let* ((module (if module
|
||||
(resolve-module (if (memq (car module) '(#f hygiene public private bare))
|
||||
(cdr module)
|
||||
module))
|
||||
(resolve-module (cdr module))
|
||||
(let ((mod (current-module)))
|
||||
(if mod (warn "wha" symbol))
|
||||
mod)))
|
||||
(v (module-variable module symbol)))
|
||||
(and v
|
||||
(or (object-property v '*sc-expander*)
|
||||
(and (variable-bound? v)
|
||||
(macro? (variable-ref v))
|
||||
(macro-transformer (variable-ref v)) ;non-primitive
|
||||
guile-macro))))))
|
||||
(and v (object-property v '*sc-expander*)))))
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
@ -404,19 +398,17 @@
|
|||
((_ source var mod)
|
||||
(build-annotated
|
||||
source
|
||||
(cond ((not mod) (make-module-ref mod var 'bare))
|
||||
((not (car mod)) (make-module-ref (cdr mod) var 'public))
|
||||
((memq (car mod) '(bare public private hygiene)) (make-module-ref (cdr mod) var (car mod)))
|
||||
(else (make-module-ref mod var 'private)))))))
|
||||
(if mod
|
||||
(make-module-ref (cdr mod) var (car mod))
|
||||
(make-module-ref mod var 'bare))))))
|
||||
|
||||
(define-syntax build-global-assignment
|
||||
(syntax-rules ()
|
||||
((_ source var exp mod)
|
||||
(build-annotated source
|
||||
`(set! ,(cond ((not mod) (make-module-ref mod var 'bare))
|
||||
((not (car mod)) (make-module-ref (cdr mod) var 'public))
|
||||
((memq (car mod) '(bare public private hygiene)) (make-module-ref (cdr mod) var (car mod)))
|
||||
(else (make-module-ref mod var 'private)))
|
||||
`(set! ,(if mod
|
||||
(make-module-ref (cdr mod) var (car mod))
|
||||
(make-module-ref mod var 'bare))
|
||||
,exp)))))
|
||||
|
||||
(define-syntax build-global-definition
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue