set include-extra-requires? in require/opaque-type

This commit is contained in:
AlexKnauth 2016-07-09 15:50:15 -04:00
parent 50aab9806f
commit 8a3400eeee

View File

@ -85,6 +85,7 @@
"../utils/tc-utils.rkt"
"../private/syntax-properties.rkt"
"../private/cast-table.rkt"
"../private/type-contract.rkt"
"../typecheck/internal-forms.rkt"
;; struct-extraction is actually used at both of these phases
"../utils/struct-extraction.rkt"
@ -375,6 +376,9 @@
#`(begin #,stx (begin))]
[(_ ty:id pred:id lib (~optional ne:name-exists-kw) ...)
(with-syntax ([hidden (generate-temporary #'pred)])
;; this is needed because this expands to the contract directly without
;; going through the normal `make-contract-def-rhs` function.
(set-box! include-extra-requires? #t)
(quasisyntax/loc stx
(begin
;; register the identifier for the top-level (see require/typed)