Skip to content

No duplicate-binding diagnostics: trait/spec/import registries are silent last-write-wins #67

Description

@hierophantos

Found by the Numerics N6d-i grounding-audit (2026-07-02, HEAD c8a425f).

Every name-collision surface fails SILENTLY:

  • trait registry: hash-set overwrite (macros.rkt:6228-6231)
  • spec store: hash-set overwrite (macros.rkt:480-482; see the companion spec-store issue)
  • import shadowing: last-write-wins by design (namespace.rkt:833 "MUST BE LAST — shadowing depends on ordering")

There is no duplicate-binding error or warning anywhere, so collisions manifest as wrong behavior far downstream. An opt-in (or default-on) duplicate-registration diagnostic would have made the N6d-i collision census mechanical instead of forensic. The method-wrapper derive's cross-trait-duplicate warning (modeled on HKT-9's ambiguity check, elaborator.rkt:165-176) is a first slice.

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