Refactors the `structure` command to support recursive structures. These are disabled for now, pending additional elaborator support in #5822. This refactor is also a step toward `structure` appearing in `mutual` blocks. Error reporting is now more precise, and this fixes an issue where general errors could appear on the last field. Adds "don't know how to synthesize placeholder" errors for default values. Closes #2512
16 lines
588 B
Text
16 lines
588 B
Text
structure Foo.{v, u_1} : {α : Sort u_1} → (α → Type v) → Sort (max u_1 (v + 1))
|
||
number of parameters: 2
|
||
constructor:
|
||
Foo.mk : {α : Sort u_1} → {β : α → Type v} → (a : α) → β a → Foo β
|
||
fields:
|
||
a : α
|
||
b : β self.a
|
||
structAutoBound.lean:9:15-9:16: error: a universe level named 'u' has already been declared
|
||
structure Boo.{u, v} : Type u → Type v → Type (max u v)
|
||
number of parameters: 2
|
||
constructor:
|
||
Boo.mk : {α : Type u} → {β : Type v} → α → β → Boo α β
|
||
fields:
|
||
a : α
|
||
b : β
|
||
structAutoBound.lean:18:10-18:44: error: unused universe parameter 'w'
|