Skip to content

Commit d5ecca9

Browse files
authored
chore: update some error explanations (#11225)
This PR updates some of the Error Explanations that had gotten out of sync with actual error messages
1 parent f81e649 commit d5ecca9

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/Lean/ErrorExplanations/CtorResultingTypeMismatch.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ inductive Tree (α : Type) where
2727
| node : α → Tree α → Treee α
2828
```
2929
```output
30-
Unexpected resulting type for constructor 'Tree.node': Expected an application of
30+
Unexpected resulting type for constructor `Tree.node`: Expected an application of
3131
Tree
3232
but found
33-
?m.22
33+
?m.2
3434
```
3535
```lean fixed
3636
inductive Tree (α : Type) where
@@ -46,7 +46,7 @@ inductive Credential where
4646
| password : String
4747
```
4848
```output
49-
Unexpected resulting type for constructor 'Credential.pin': Expected
49+
Unexpected resulting type for constructor `Credential.pin`: Expected
5050
Credential
5151
but found
5252
Nat

src/Lean/ErrorExplanations/DependsOnNoncomputable.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def transformIfZero : Nat → Nat
3636
| n => n
3737
```
3838
```output
39-
axiom 'transform' not supported by code generator; consider marking definition as 'noncomputable'
39+
`transform` not supported by code generator; consider marking definition as `noncomputable`
4040
```
4141
```lean fixed
4242
axiom transform : Nat → Nat
@@ -63,7 +63,7 @@ def endsOrDefault (ns : List Nat) : Nat × Nat :=
6363
(head, tail)
6464
```
6565
```output
66-
failed to compile definition, consider marking it as 'noncomputable' because it depends on 'getOrDefault', which is 'noncomputable'
66+
failed to compile definition, consider marking it as 'noncomputable' because it depends on 'propDecidable', which is 'noncomputable'
6767
```
6868
```lean fixed (title := "Fixed (computable)")
6969
def getOrDefault [Inhabited α] : Option α → α

src/Lean/ErrorExplanations/InductiveParamMismatch.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The provided argument
4141
is not definitionally equal to the expected parameter
4242
n
4343
44-
Note: The value of parameter 'n' must be fixed throughout the inductive declaration. Consider making this parameter an index if it must vary.
44+
Note: The value of parameter `n` must be fixed throughout the inductive declaration. Consider making this parameter an index if it must vary.
4545
```
4646
```lean fixed
4747
inductive Vec (α : Type) : Nat → Type where

src/Lean/ErrorExplanations/PropRecLargeElim.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Tactic `cases` failed with a nested error:
4444
Tactic `induction` failed: recursor `Nonempty.casesOn` can only eliminate into `Prop`
4545
4646
α : Type
47-
motive : Nonempty α → Sort ?u.1416
47+
motive : Nonempty α → Sort ?u.52
4848
h_1 : (x : α) → motive ⋯
4949
inst✝ : Nonempty α
5050
⊢ motive inst✝
@@ -81,7 +81,7 @@ Tactic `induction` failed: recursor `Exists.casesOn` can only eliminate into `Pr
8181
8282
α : Type u
8383
p : α → Prop
84-
motive : (∃ x, p x) → Sort ?u.1419
84+
motive : (∃ x, p x) → Sort ?u.48
8585
h_1 : (x : α) → (h : p x) → motive ⋯
8686
h✝ : ∃ x, p x
8787
⊢ motive h✝

src/Lean/ErrorExplanations/UnknownIdentifier.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def inventory :=
4242
Std.HashSet.ofList [("apples", 3), ("bananas", 4)]
4343
```
4444
```output
45-
Unknown constant `Std.HashSet.ofList`
45+
Unknown identifier `Std.HashSet.ofList`
4646
```
4747
```lean fixed
4848
public import Std.Data.HashSet.Basic
@@ -163,7 +163,7 @@ def disjoinToNat (b₁ b₂ : Bool) : Nat :=
163163
.toNat (b₁ || b₂)
164164
```
165165
```output
166-
Unknown identifier `Nat.toNat`
166+
Unknown constant `Nat.toNat`
167167
168168
Note: Inferred this name from the expected resulting type of `.toNat`:
169169
Nat

0 commit comments

Comments
 (0)