racket/racket/lib/collects/syntax/moddep.rkt
Sam Tobin-Hochstadt d54c1e4e49 Remove most uses of mzscheme in the core.
Remaining are:
 - parts of unit200 that Matthew plans to remove.
 - the `mzscheme` implementation itself.

The implementation of `mzscheme` has been moved
to the `mzscheme` collection (from the `racket` and
`scheme` collections). The `scheme/mzscheme`
language, which was undocumented, has been removed.

This is slightly backwards-incompatible, because
the `xform` handling of precompiled headers now
evaluates code in a `racket/base`-like namespace,
instead of in a `mzscheme`-like namespace.
2013-07-01 12:08:42 -04:00

34 lines
1.3 KiB
Racket

(module moddep scheme/base
(require "modread.rkt"
"modcode.rkt"
"modcollapse.rkt"
"modresolve.rkt")
(provide (all-from-out "modread.rkt")
(all-from-out "modcode.rkt")
(all-from-out "modcollapse.rkt")
(all-from-out "modresolve.rkt")
show-import-tree)
(define (show-import-tree module-path)
(let loop ([path (resolve-module-path module-path #f)][indent ""][fs ""])
(printf "~a~a~a\n" indent path fs)
(let ([code (get-module-code path)])
(let ([imports (module-compiled-imports code)])
(define ((mk-loop fs) i)
(let ([p (resolve-module-path-index i path)])
(unless (symbol? p)
(loop p
(format " ~a" indent)
fs))))
(for-each (lambda (i)
(for-each
(mk-loop (case (car i)
[(0) ""]
[(1) " [for-syntax]"]
[(-1) " [for-syntax]"]
[(#f) " [for-label]"]
[else (format " [for-meta ~a]" (car i))]))
(cdr i)))
imports))))))