Skip to content

Add an option to pattern match using structural equality instead of definitional equality. #82

@abdoo8080

Description

@abdoo8080

Add a way to opt into pure structural Expr equality for ~q-style pattern matching instead of definitional equality. Currently ~q silently unfolds definitions and performs expensive reductions when matching, which in my benchmarks is over 100× slower than a straightforward AST comparison. Because I only need exact structural matches in my use case, it would be helpful to have either a new macro (for example ~q!) or a configuration flag that skips definitional checks and only compares expressions directly. This change would let users opt in to a much faster matching mode whenever unfolding isn't required.

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