-
Notifications
You must be signed in to change notification settings - Fork 13
Qi Compiler Sync Nov 11 2022
Qi Compiler Sync Nov 11 2022
Adjacent meetings: Previous | Up | Next
We picked up on the implementation of bindings in the compiler, and discussed some syntax considerations in syntax-spec (i.e. the meta-DSL formerly known as bindingspec).
The last time we worked on bindings, there were a few lingering issues, including "anaphoric references" in the implementation and "unbounded nesting" of the bindings transformation. We addressed some of these this time. We also considered a few different alternative syntaxes for declaring the host language interface in syntax-spec.
Previously, we rewrote the compilation of partial application to use lambdas instead of currying, because the latter evaluates its references immediately while the former delays evaluation until invocation time. This was necessary because the bindings are only available at runtime. But the new implementation does not automatically inherit the support for keyword arguments that curry
and curryr
already have.
We restored support for keyword arguments by modifying the implementation to use make-keyword-procedure and keyword-apply.
Not the best name -- better might be "indiscriminate application of bindings transformation" (the bindings transformation being rewriting to let
+set!
etc. -- covered in previous meeting notes). We didn't get to this one this time, but Michael mentioned he had an idea to make it easier to tackle next time, where the expanded code would include a tag like ($%host-language-expression ...)
that we could use to delimit the bindings transformation.
Currently, specifying the host interface (i.e. interface macro like flow
) is done separately from specifying the nonterminal grammar of the DSL (i.e. a flow expression, what we're calling floe
(and pronouncing "flow-e"/"flowy") in the code). Michael brought up some alternatives here, some of which seem cleaner and which allow all the DSL specification to be done using a single syntax-spec
macro. Coming soon to a meta-DSL near you!
- Address the unbounded nesting problem
- Migrate to the new syntax-spec syntax whenever that's ready
Michael, Sid
Home | Developer's Guide | Calendar | Events | Projects | Meeting Notes