Repository navigation
Conversation
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
Contributor
Author
|
!bench |
|
Benchmark results for 6d10b27 against bb3c22f are in. There are significant results. @Rob23oba
Large changes (6✅, 34🟥)
Medium changes (9✅, 142🟥)
Small changes (35✅, 1823🟥)
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the compiler to allow for overriding which types the compiler perceives as inductive types and which constructors it thinks they have. These overrides come in different forms:
First, you can mark an inductive type as a non-runtime inductive, i.e. override it to make the compiler see it as a simple type. As a consequence, all constructors, projections and matchers will become noncomputable by default. You can however reimplement them using
csimp. This replaces the previousruntimeBuiltinTypeshardcoding: The types that were previously hardcoded now simply have the attribute@[override_runtime_type].Second, you can change which declarations the compiler perceives as constructors of an inductive type or even make a non-inductive into an inductive type. The is now used to implement computed fields, but it can also be used for much more: In fact, I believe that you can implement everything mentioned in #9508 using this feature in a way that the compiler understands directly.