Matthias,
Thank you for the reference. It turns out that I should have looked into
local-expand rather than expand-syntax.
Out of the two options (inserting type info into syntax or keeping
it in the syntax-property) I chose the latter, because I like
thinking of them as properties rather than
Here's a version of your program that performs as you specified:
http://pasterack.org/pastes/91460
But do take a look at the paper, docs [1], or codebase [2], which
turns this idea into complete languages.
[1]: http://docs.racket-lang.org/turnstile/index.html
[2]:
You want to look at Stephen's Turnstile, a DSL for making typed DSLs and
macros. Like all type systems, this is exactly what it does.
Here is the link to the paper:
https://www2.ccs.neu.edu/racket/pubs/#popl17-ckg
It obscures what you need, which is a combination of local-expand,
Hello,
I am looking for an advice on how to write a macro that is aware of the
information extracted from syntax objects from another macro that is
called "inside" the first one. For instance, let it be the (this) macro
that detects if its argument is an integer or float, and let it be the
4 matches
Mail list logo