Refactor to avoid duplicated code.
original commit: 05d9e1a871de7d68d5ae878b7dc1b3bdd7be28fb
This commit is contained in:
parent
0c42c44942
commit
d5d338ad2f
|
@ -3,8 +3,8 @@
|
|||
(require (for-syntax racket/base
|
||||
;; these requires are needed since their code
|
||||
;; appears in the residual program
|
||||
"typecheck/renamer.rkt" "types/type-table.rkt")
|
||||
"private/base-special-env.rkt")
|
||||
"typecheck/renamer.rkt" "types/type-table.rkt" profile)
|
||||
"private/base-special-env.rkt" )
|
||||
|
||||
(provide (rename-out [module-begin #%module-begin]
|
||||
[top-interaction #%top-interaction]
|
||||
|
@ -21,14 +21,11 @@
|
|||
((dynamic-require 'typed-scheme/private/base-env 'init))
|
||||
((dynamic-require 'typed-scheme/private/base-env-numeric 'init)))
|
||||
|
||||
(define-syntax (module-begin stx)
|
||||
(do-standard-inits)
|
||||
((dynamic-require 'typed-scheme/core 'mb-core) stx))
|
||||
(define-syntax-rule (drivers [name sym] ...)
|
||||
(begin
|
||||
(define-syntax (name stx)
|
||||
(do-standard-inits)
|
||||
((dynamic-require 'typed-scheme/core 'sym) stx))
|
||||
...))
|
||||
|
||||
(define-syntax (top-interaction stx)
|
||||
(do-standard-inits)
|
||||
((dynamic-require 'typed-scheme/core 'ti-core) stx))
|
||||
|
||||
(define-syntax (with-type stx)
|
||||
(do-standard-inits)
|
||||
((dynamic-require 'typed-scheme/core 'wt-core) stx))
|
||||
(drivers [module-begin mb-core] [top-interaction ti-core] [with-type wt-core])
|
||||
|
|
Loading…
Reference in New Issue
Block a user