Skip to content

Structural equality #29

Open
Open
@lcnr

Description

@lcnr

What is this

This is a design document for const generics. Any discussions about its content should be on zulip. The conclusions of these discussions should then be edited back into this issue. Please do not post any comments directly in this issue.

Content

Structural equality describes what is necessary for two constants to be considered equal.
The lower bound is that we at least consider constants equal to themselves, while we must not consider two constants to be equal if their differences can be observed in any way during CTFE. Types for which this cannot be guaranteed must not be used as const parameter types.

TODO: explore what exactly this means, reasoning about references and what not, strongly related to #24. Requires us to find a solution for #20

Using the above definition of structural equality, we ended up with a better representation for constants used in the type system, valtrees.

TODO: explain valtrees

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-param-typesConst parameter typesA-unificationUnifying constants in the type systemC-design-docsCategory: This is part of our design documentationK-behaviorDocument Kind: regarding user visible behaviorK-implDocument Kind: regarding implementationP-necessaryPriority: will be needed at some pointS-active

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions