Declare require/typed internal identifier first

Uses the `define-syntaxes` trick to declare the identifier
so that its binding symbol doesn't change later.
This commit is contained in:
Asumu Takikawa 2015-08-12 19:21:31 -04:00
parent e031d6c47e
commit d85a267c42

View File

@ -158,6 +158,10 @@
(make-contract-def-rhs #'ty #f (attribute parent))))
(quasisyntax/loc stx
(begin
;; register the identifier so that it has a binding (for top-level)
#,@(if (eq? (syntax-local-context) 'top-level)
(list #'(define-syntaxes (hidden) (values)))
null)
#,(internal #'(require/typed-internal hidden ty . sm))
#,(ignore #`(require/contract nm.spec hidden #,cnt* lib))))]))
(values (r/t-maker #t) (r/t-maker #f))))