An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

[![Unmaintained as of 2017,](https://img.shields.io/maintenance/no/2016.svg)](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.