mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 21:10:27 +02:00
fix hygiene + modules + local macros
* module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/psyntax.scm (syntax-type): Look up the type of the car of a form relative to its module, if it is a syntax object. Fixes hygiene wrt modules and private macros. * module/ice-9/syncase.scm (sc-macro): Add a comment. * module/system/base/pmatch.scm: The big test case: just export pmatch, not ppat too.
This commit is contained in:
parent
196b40932e
commit
c5cc65ac0c
4 changed files with 17 additions and 9472 deletions
File diff suppressed because one or more lines are too long
|
@ -972,7 +972,9 @@
|
|||
(let ((first (car e)))
|
||||
(if (id? first)
|
||||
(let* ((n (id-var-name first w))
|
||||
(b (lookup n r mod))
|
||||
(b (lookup n r (or (and (syntax-object? first)
|
||||
(syntax-object-module first))
|
||||
mod)))
|
||||
(type (binding-type b)))
|
||||
(case type
|
||||
((lexical)
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
(lambda (exp env)
|
||||
(save-module-excursion
|
||||
(lambda ()
|
||||
;; Because memoization happens lazily, env's module isn't
|
||||
;; necessarily the current module.
|
||||
(set-current-module (eval-closure-module (car (last-pair env))))
|
||||
(strip-expansion-structures (sc-expand exp)))))))
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(define-module (system base pmatch)
|
||||
#:use-module (ice-9 syncase)
|
||||
#:export (pmatch ppat))
|
||||
#:export (pmatch))
|
||||
;; FIXME: shouldn't have to export ppat...
|
||||
|
||||
;; Originally written by Oleg Kiselyov. Taken from:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue