1#lang racket/base
2
3(require
4 (for-syntax racket/base racket/lazy-require
5             "standard-inits.rkt")
6 ;; these need to be available to the generated code
7 "typecheck/renamer.rkt" syntax/location
8 (for-syntax "utils/struct-info.rkt")
9 (for-syntax "typecheck/renamer.rkt")
10 ;; only for timing/debugging
11 (for-syntax "utils/timing.rkt"))
12
13(provide (rename-out [module-begin #%module-begin]
14                     [top-interaction #%top-interaction])
15         with-type
16         (for-syntax do-standard-inits))
17
18(define-syntax-rule (drivers [name sym] ...)
19  (begin
20    (begin-for-syntax
21      (lazy-require (typed-racket/core (sym ...))))
22    (define-syntax (name stx)
23      (do-time (format "Calling ~a driver" 'name))
24      (do-time (format "Loaded core ~a" 'sym))
25      (begin0 (sym stx)
26              (do-time "Finished, returning to Racket")))
27    ...))
28
29(drivers [module-begin mb-core] [top-interaction ti-core] [with-type wt-core])
30