Skip to content

Joins with primitive projections declared by HB are not found in the canonical structure table #520

@Tragicus

Description

@Tragicus

When HB declares a join for structures with primitive projections, it uses the compatibility constants of the projections instead of the projections themselves. However, the canonical structure table differentiates them, so the instance is unusable.

From HB Require Import structures.

HB.mixin Record isA (T : Type) := {}.
HB.mixin Record isB (T : Type) := {}.

#[primitive]
HB.structure Definition A := {T of isA T}.
#[primitive]
HB.structure Definition B := {T of isB T}.

#[primitive]
HB.structure Definition C := {T of isA T & isB T}.

Fail Check fun (a : A.type) => a : B.type.

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