Skip to content

Function names and quoted symbols lead to unused bindings in defmacro! #18

Description

@goose121

If a function name or a symbol in a quoted list in the body of defmacro! starts with g!, then defmacro! will generate a binding to a gensym for it, which will then be unused, leading to a warning from the compiler. The possible solutions I can think of are either to add ignorable declarations in the let statement for the generated symbols, or perhaps to walk through the body statements, finding the symbols which start with g! and defining each of them as symbol macros which append a clause to the let-statement which generates the symbols (perhaps by creating shared list structure in that let-statement using the ,. operator? I'm not sure.) and then returns the g! symbol itself. The second of these seems more "correct" at least to me, but also far more complicated and maybe completely misguided or impossible.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions