Skip to content

Soundness: ensure datatypes are inhabited #306

@joscoh

Description

@joscoh

Now that the destructors are automatically generated per datatype, it is important to ensure that every type is inhabited, or else we can generate inconsistent axioms. For example:

datatype Empty
datatype List = Nil | Cons (hd: Empty) (tl: List)

generates the destructor hd: List -> Empty, which can be used to produce an instance of type Empty. To fix this, we need a proper check to ensure that datatypes are inhabited.

Metadata

Metadata

Assignees

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