www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

README.md (2139B)


      1 [![Build Status,](https://img.shields.io/travis/jsmaniac/debug-scopes/main.svg)](https://travis-ci.org/jsmaniac/debug-scopes)
      2 [![Coverage Status,](https://img.shields.io/codecov/c/github/jsmaniac/debug-scopes/main.svg)](https://codecov.io/gh/jsmaniac/debug-scopes)
      3 [![Build Stats,](https://img.shields.io/badge/build-stats-blue.svg)](http://jsmaniac.github.io/travis-stats/#jsmaniac/debug-scopes)
      4 [![Online Documentation,](https://img.shields.io/badge/docs-online-blue.svg)](http://docs.racket-lang.org/debug-scopes/)
      5 [![Maintained as of 2021,](https://img.shields.io/maintenance/yes/2021.svg)](https://github.com/jsmaniac/debug-scopes/issues)
      6 [![License: CC0 v1.0.](https://img.shields.io/badge/license-CC0-blue.svg)](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.