move contract submodules to start of enclosing module
Putting the contract submodules early enough allows them to be used for `module*` submodules. Repairs a problem reported by Alexander: http://lists.racket-lang.org/users/archive/2015-March/066164.html
This commit is contained in:
parent
4866ff825b
commit
011649a654
|
@ -420,8 +420,8 @@
|
|||
(match-define (list from to) a)
|
||||
#`(add-alias (quote-syntax #,from) (quote-syntax #,to))))))
|
||||
(begin-for-syntax (add-mod! (variable-reference->module-path-index
|
||||
(#%variable-reference)))))
|
||||
#`(begin
|
||||
(#%variable-reference))))
|
||||
|
||||
;; FIXME: share this variable reference with the one below
|
||||
(define the-variable-reference (quote-module-name))
|
||||
;; Here we construct the redirector for the #%contract-defs
|
||||
|
@ -471,8 +471,8 @@
|
|||
(module* #%contract-defs #f
|
||||
(#%plain-module-begin
|
||||
#,extra-requires
|
||||
new-defs ...))
|
||||
|
||||
new-defs ...)))
|
||||
#`(begin
|
||||
;; Now we create definitions that are actually provided
|
||||
;; from the module itself. There are two levels of
|
||||
;; indirection here (see the implementation in
|
||||
|
|
6
typed-racket-test/succeed/unyuped-submod.rkt
Normal file
6
typed-racket-test/succeed/unyuped-submod.rkt
Normal file
|
@ -0,0 +1,6 @@
|
|||
#lang typed/racket/base
|
||||
(provide x)
|
||||
(define x : Integer 1)
|
||||
(module* test racket/base
|
||||
(require (submod ".."))
|
||||
x)
|
Loading…
Reference in New Issue
Block a user