Summary
The hierarchy API is publicly registered but mostly consists of stubs:
derive and underive return nil without updating a hierarchy.
ancestors and descendants return empty sets.
parents always returns nil.
isa? checks equality only and supports only two arguments.
The gap is also listed in TODO.md Phase 14.
Reproduction
(derive :example/child :example/parent)
(isa? :example/child :example/parent)
;; actual: false
;; expected: true
(ancestors :example/child)
;; actual: #{}
;; expected: #{:example/parent}
Existing foundation
make-hierarchy already returns the standard-shaped map:
{:parents {} :descendants {} :ancestors {}}
The compatibility suite already contains substantial ancestors, descendants, and underive coverage, but those sections are skipped for the :rust platform.
Suggested scope
- Implement explicit hierarchy operations:
(derive h tag parent)
(underive h tag parent)
(isa? h child parent)
- two-argument
parents, ancestors, and descendants
- Implement the global hierarchy arities.
- Maintain transitive ancestor and descendant closures.
- Reject cycles and invalid hierarchy shapes.
- Preserve Clojure behavior for vector dispatch values if supported by the current multimethod implementation.
Acceptance criteria
- Global and explicit-hierarchy arities match Clojure for keyword and symbol tags.
- Derivation cycles are rejected.
- Removing an edge correctly recomputes transitive closure, including diamond hierarchies.
- Relevant
:rust skips in the compatibility suite are removed.
- Multimethod dispatch continues to pass existing tests.
Summary
The hierarchy API is publicly registered but mostly consists of stubs:
deriveandunderivereturnnilwithout updating a hierarchy.ancestorsanddescendantsreturn empty sets.parentsalways returnsnil.isa?checks equality only and supports only two arguments.The gap is also listed in
TODO.mdPhase 14.Reproduction
Existing foundation
make-hierarchyalready returns the standard-shaped map:{:parents {} :descendants {} :ancestors {}}The compatibility suite already contains substantial
ancestors,descendants, andunderivecoverage, but those sections are skipped for the:rustplatform.Suggested scope
(derive h tag parent)(underive h tag parent)(isa? h child parent)parents,ancestors, anddescendantsAcceptance criteria
:rustskips in the compatibility suite are removed.