fix a syntax-object problem related to module bindings
The immediate symptom was that `(provide (all-defined-out))' didn't work in a `module+'-based submodule, but there were also non-submodule ways to expose the problem.
This commit is contained in:
parent
69899c33fc
commit
f301838511
|
@ -659,6 +659,28 @@
|
||||||
(require 'post-ex-rename-example-1)
|
(require 'post-ex-rename-example-1)
|
||||||
(go))
|
(go))
|
||||||
|
|
||||||
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Check interaction of binding-context and mark:
|
||||||
|
|
||||||
|
(module binding-context-a racket
|
||||||
|
(provide q)
|
||||||
|
|
||||||
|
(define-syntax (q stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
[(_ f) (with-syntax ([x (syntax-local-introduce #'x)])
|
||||||
|
#'(f x))])))
|
||||||
|
|
||||||
|
(module binding-context-b racket
|
||||||
|
(require 'binding-context-a)
|
||||||
|
|
||||||
|
(define-syntax-rule (go id)
|
||||||
|
(begin
|
||||||
|
(define id 5)
|
||||||
|
(define-syntax-rule (prov)
|
||||||
|
(provide id))
|
||||||
|
(prov)))
|
||||||
|
|
||||||
|
(q go))
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
|
|
@ -447,6 +447,16 @@
|
||||||
(test 'c (dynamic-require '(submod 'subm-example-20 third) 'third) '(a b c))
|
(test 'c (dynamic-require '(submod 'subm-example-20 third) 'third) '(a b c))
|
||||||
(test 'c (dynamic-require '(submod 'subm-example-20 third) 't) '(a b c))
|
(test 'c (dynamic-require '(submod 'subm-example-20 third) 't) '(a b c))
|
||||||
|
|
||||||
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Check `all-defined-out':
|
||||||
|
|
||||||
|
(module subm-all-defined-1 racket/base
|
||||||
|
(module+ main
|
||||||
|
(define x 10)
|
||||||
|
(provide (all-defined-out))))
|
||||||
|
|
||||||
|
(test 10 dynamic-require '(submod 'subm-all-defined-1 main) 'x)
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(report-errs)
|
(report-errs)
|
||||||
|
|
|
@ -1085,7 +1085,9 @@ Scheme_Object *scheme_tl_id_sym(Scheme_Env *env, Scheme_Object *id, Scheme_Objec
|
||||||
marks = SCHEME_CAR(marks);
|
marks = SCHEME_CAR(marks);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SCHEME_TRUEP(bdg))
|
/* Treat #f and void values of bdg the same, since a void value is
|
||||||
|
the same #f, but ensure that we get this far: */
|
||||||
|
if (SCHEME_FALSEP(bdg) || SCHEME_VOIDP(bdg))
|
||||||
bdg = NULL;
|
bdg = NULL;
|
||||||
|
|
||||||
/* Find a mapping that matches the longest tail of marks */
|
/* Find a mapping that matches the longest tail of marks */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user