Open
Description
Motivation
Currently, the only way to define types is via def foo : type := ...
, which has some interesting ramifications regarding fibrancy. In particular, we can't define record types with fields of type I -> A
, and instead have to resort to some weird hacks like ext i => A with []
, which I think we can all agree is suboptimal. We should probably think about adding a way of defining honest-to-god types, rather than only codes.
Proposal
The proposed syntax is as follows
deftype <typename> <cells> := <definition>
The cells would then desugar to a pi type.
We can just inline these during elaboration to avoid having to change the core, but perhaps there's some value in adding these to the core with some unfolding rules.
Metadata
Metadata
Assignees
Labels
No labels
Activity