-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds
optConfig
syntax for tactic configuration (#5883)
This PR adds a new syntax for tactic and command configurations. It also updates the elaborator construction command to be able to process this new syntax. We do not update core tactics yet. Once tactics switch over to it, rather than (for example) writing `simp (config := { contextual := true, maxSteps := 22})`, one can write `simp +contextual (maxSteps := 22)`. The new syntax is reverse compatible in the sense that `(config := ...)` still sets the entire configuration. Note to metaprogrammers: Use `optConfig` instead of `(config)?`. The elaborator generated by `declare_config_elab` accepts both old and new configurations. The elaborator has also been written to be tolerant to null nodes, so adapting to `optConfig` should be as easy as changing just the syntax for your tactics and deleting `mkOptionalNode`. Breaking change: The new system is mostly reverse compatible, however the type of the generated elaborator now lands in `TacticM` to make use of the current recovery state. Commands that wish to elaborate configurations should now use `declare_command_config_elab` instead of `declare_config_elab` to get an elaborator landing in `CommandElabM`.
- Loading branch information
Showing
6 changed files
with
429 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
1576.lean:1:35-1:38: error: unknown identifier 'non' | ||
1576.lean:1:41-1:46: error: unknown identifier 'sense' | ||
1576.lean:1:18-1:50: error: unsolved goals | ||
⊢ True |
Oops, something went wrong.