rhombus-prototype icon indicating copy to clipboard operation
rhombus-prototype copied to clipboard

Let `defn.sequence_macro` cooperate with user-defined `#%body` bindings

Open usaoc opened this issue 1 year ago • 1 comments

A defn.sequence_macro can be used to hook into the partial expansion for block and alter how the following forms should be evaluated, while #%body can be redefined to alter how the whole block is interpreted at all. Currently, we have Closeable.let as a defn.sequence_macro, but it just assumes that it and the following forms should be interpreted as in the default #%body. Is there a good way to let defn.sequence_macro cooperate with user-defined #%body bindings? (This change may need a more refined definition macro protocol, for example, to allow proper partial expansion.)

usaoc avatar Nov 22 '24 04:11 usaoc

The original issue is no longer relevant due to 6da9a74. I’ll keep this open as one thing to consider in the definition macro protocol, i.e., cooperation with an “enclosing” form.

usaoc avatar Jan 31 '25 09:01 usaoc