https://github.com/suzannesoy/preexpanded
Some pre-expanded macros. Use them when your macro is generating macros.
https://github.com/suzannesoy/preexpanded
macros racket-library
Last synced: 5 months ago
JSON representation
Some pre-expanded macros. Use them when your macro is generating macros.
- Host: GitHub
- URL: https://github.com/suzannesoy/preexpanded
- Owner: SuzanneSoy
- License: other
- Created: 2016-04-07T12:52:29.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2021-03-04T21:21:53.000Z (over 5 years ago)
- Last Synced: 2025-01-30T11:42:19.224Z (over 1 year ago)
- Topics: macros, racket-library
- Language: Racket
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://github.com/jsmaniac/preexpanded/issues)
preexpanded
===========
This project was an attempt at making it possible to write efficient macros which produce code using other macros.
The goal was to statically pre-expand parts the generated code within the generator, so that the produced code consists mostly of primitives (`let-values`, `if`, …), but can still be specified in a concise way (`let`, `cond`, …).
To do this properly, one would need to consider the generated macros as source-to-source functions which can be partially applied.
This attempt however only consisted in hard-coding the expanded form of a few common macros, in a way which could easily and efficiently be injected in the generated code.