lean4-htt/tests
Kyle Miller 6cf22b32aa
feat: custom structure constructors can update binder kinds of parameters (#9480)
This PR adds a feature where `structure` constructors can override the
inferred binder kinds of the type's parameters. In the following, the
`(p)` binder on `toLp` causes `p` to be an explicit parameter to
`WithLp.toLp`:
```lean
structure WithLp (p : Nat) (V : Type) where toLp (p) ::
  ofLp : V
```
This reflects the syntax of the feature added in #7742 for overriding
binder kinds of structure projections. Similarly, only those parameters
in the header of the `structure` may be updated; it is an error to try
to update binder kinds of parameters included via `variable`.

Closes #9072.

Fixes a possible bug from stale caches when creating the type of the
constructor.
2025-07-23 16:33:34 +00:00
..
bench chore: benchmark using USE_LAKE (#9361) 2025-07-17 18:44:29 +00:00
compiler
elabissues
ir
lean feat: custom structure constructors can update binder kinds of parameters (#9480) 2025-07-23 16:33:34 +00:00
pkg perf: do not export specializations (#9465) 2025-07-23 13:12:15 +00:00
playground refactor: migrate all usages of old slice notation (#9000) 2025-06-27 18:52:07 +00:00
plugin
simpperf
.gitignore
common.sh
lakefile.toml
lean-toolchain