3 Macros and Syntax Transformers
For short definitions for simple macros, mischief/shorthand provides a set of convenient definition forms.
- For writing macros of moderate complexity, there are two modules:
mischief/transform provides functions that operate on syntax objects; and
mischief/parse provides syntax classes and macros for use with syntax-parse.
For more complicated macros, there are some new abstractions:
mischief/scope provides tools for automatic management of local expansion and internal definition contexts;
mischief/dye-pack provides tools for protecting syntax objects;
mischief/id-table provides a comparison and dictionaries for identifiers based on their symbolic name and marks, but irrespective of their bindings;
mischief/kernel-syntax provides functions that operate on fully expanded programs; and
mischief/preserve-expensive-metadata provides an alternative to quote-syntax that preserves source locations and properties that are normally discarded by compilation.
For debugging macros, mischief/stepper gives a programmatic interface to the Macro Stepper.