README.md (2139B)
1 [](https://travis-ci.org/jsmaniac/debug-scopes) 2 [](https://codecov.io/gh/jsmaniac/debug-scopes) 3 [](http://jsmaniac.github.io/travis-stats/#jsmaniac/debug-scopes) 4 [](http://docs.racket-lang.org/debug-scopes/) 5 [](https://github.com/jsmaniac/debug-scopes/issues) 6 [](https://creativecommons.org/publicdomain/zero/1.0/) 7 8 debug-scopes 9 ============ 10 11 Some utilities which help debugging scope-related issues with Racket 12 unhygienic macros (hygienic macros in Racket will likely not need these 13 utilities). 14 15 First, run: 16 17 raco pkg install debug-scopes 18 19 Then, require one or several of the following modules: 20 21 (require debug-scopes) 22 23 * `(+scopes stx)` returns a string with a succinct representation of which 24 scopes are present on each identifier. 25 * `(print-full-scopes)` prints the long version of the scope information for 26 the scopes used in preceeding calls to `+scopes`. 27 28 ```racket 29 (require debug-scopes/named-scopes) 30 ``` 31 32 * (make-named-scope string-or-symbol) creates a scope similarly to 33 `make-syntax-introducer`, but annotates it with a name. This is a hack which 34 creates a module with that name, and extracts the module scope (since these 35 scopes have names attached to them in Racket). As a result, with the current 36 implementation, this returns a module scope instead of a macro scope like 37 `make-syntax-introducer`. 38 39 ```racket 40 (require debug-scopes/named-scopes/override) 41 ``` 42 43 * Overrides `define-syntax` and `syntax-local-introduce`. The overridden 44 `syntax-local-introduce` works with the overridden `define-syntax` to flip a 45 named scope instead of the usual macro scope. The use-site scope which may 46 be flipped by `syntax-local-introduce` is left unchanged.