forked from leanprover/lean4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: detail error message about invalid mutual blocks (leanprover#2949)
To prevent user confusion as in this [Zulip message](https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Matching.20on.20prop/near/341456011)
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/-! Test invalid mutual block error message -/ | ||
|
||
inductive Foo : Type where | ||
| foo0 : Nat → Foo | ||
| foo1 : Foo → Foo | ||
| foo2 : Foo → Foo → Foo | ||
|
||
mutual | ||
|
||
inductive Bar1 : Foo → Prop where | ||
| mk {f : Foo} : Bar f → Bar1 (.foo1 f) | ||
|
||
def Bar : Foo → Prop | ||
| .foo1 f => Bar1 f | ||
| _ => True | ||
|
||
end |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
invalidMutualError.lean:8:0-17:3: error: invalid mutual block: either all elements of the block must be inductive declarations, or they must all be definitions/theorems/abbrevs |