{"size": 1609, "ext": "scrbl", "max_stars_repo_path": "pkgs/racket-doc/syntax/scribblings/moddep.scrbl", "max_stars_repo_name": "lkh01/racket", "max_stars_repo_stars_event_min_datetime": "2018-07-29T04:13:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-14T16:11:17.000Z", "max_issues_repo_path": "pkgs/racket-doc/syntax/scribblings/moddep.scrbl", "max_issues_repo_name": "lkh01/racket", "max_issues_repo_issues_event_min_datetime": "2017-08-25T20:26:37.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T17:48:40.000Z", "max_forks_repo_path": "pkgs/racket-doc/syntax/scribblings/moddep.scrbl", "max_forks_repo_name": "lkh01/racket", "max_forks_repo_forks_event_min_datetime": "2016-04-25T11:47:57.000Z", "max_forks_repo_forks_event_max_datetime": "2017-05-09T14:52:48.000Z"}
{"max_stars_count": 10, "max_issues_count": 15, "max_forks_count": 3, "avg_line_length": 44.6944444444, "max_line_length": 94, "alphanum_fraction": 0.6221255438}
#lang scribble/doc
@(require "common.rkt" (for-label syntax/moddep))

@title[#:tag "moddep"]{Inspecting Modules and Module Dependencies}

@defmodule[syntax/moddep]

Re-exports @racketmodname[syntax/modread],
@racketmodname[syntax/modcode], @racketmodname[syntax/modcollapse],
and @racketmodname[syntax/modresolve], in addition to the following:

@defproc[(show-import-tree [module-path-v module-path?]
                           [#:dag? dag? any/c #f]
                           [#:path-to path-to-module-path-v (or/c #f module-path?) #f]
                           [#:show show
                                   (string? any/c string? (or/c #f exact-integer?) . -> . any)
                                   (lambda (indent path require-mode phase)
                                     (printf "~a~a~a ~a\n" indent path require-mode phase))])
         void?]{

A debugging aid that prints (by default) the import hierarchy starting
from a given module path. Supply an alternate @racket[show] function
to handle each path instead of having it printed; the second argument
is a result of @racket[resolved-module-path-name].

If @racket[dag?] is true, then a module is passed to @racket[show]
only the first time is encountered in the hierarchy at a given phase.

If @racket[path-to-module-path-v] is a module path, then only the
spines of the tree that reach @racket[path-to-module-path-v] are
shown.

@history[#:changed "6.12.0.4" @elem{Added the @racket[#:dag?] and
                                    @racket[#:path-to] arguments.}
         #:changed "7.0.0.10" @elem{Added the @racket[#:show] argument.}]}
