Skip to content

Let defn.sequence_macro cooperate with an “enclosing” form #581

Open

Description

@usaoc

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.)

Activity

  1. usaoc commented on Jan 31, 2025

    @usaoc
    CollaboratorAuthor

    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.

  2. changed the title [-]Let `defn.sequence_macro` cooperate with user-defined `#%body` bindings[/-] [+]Let `defn.sequence_macro` cooperate with an “enclosing” form[/+] on Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions