lean4-htt/tests/lean/inductive1.lean.expected.out
Joachim Breitner 8424ddbb3e
feat: prettier expected type mismatch error message (#9099)
This PR improves the “expected type mismatch” error message by omitting
the type's types when they are defeq, and putting them into separate
lines when not.

I found it rather tediuos to parse the error message when the expected
type is long, because I had to find the `:` in the middle of a large
expression somewhere. Also, when both are of sort `Prop` or `Type` it
doesn't add much value to print the sort (and it’s only one hover away
anyways).
2025-07-01 07:50:53 +00:00

31 lines
1.9 KiB
Text

inductive1.lean:4:15-4:18: error: invalid resulting type, expecting 'Sort _' or an indexed family of sorts
inductive1.lean:12:0-12:19: error: invalid mutually inductive types, resulting universe mismatch, given
Type
expected type
Prop
inductive1.lean:22:0-22:37: error: invalid mutually inductive types, resulting universe mismatch, given
Type v
expected type
Type u
inductive1.lean:31:0-31:41: error: invalid mutually inductive types, parameter 'x' has type
Bool
but is expected to have type
Nat
inductive1.lean:40:0-40:30: error: invalid inductive type, number of parameters mismatch in mutually inductive datatypes
inductive1.lean:49:0-49:40: error: invalid mutually inductive types, binder annotation mismatch at parameter 'x'
inductive1.lean:59:0-59:45: error: invalid inductive type, universe parameters mismatch in mutually inductive datatypes
inductive1.lean:69:2-69:5: error: 'Boo.T1.bla' has already been declared
inductive1.lean:73:10-73:12: error: 'Boo.T1' has already been declared
inductive1.lean:80:0-80:27: error: invalid use of 'partial' in inductive declaration
inductive1.lean:81:0-81:33: error: invalid use of 'noncomputable' in inductive declaration
inductive1.lean:82:2-82:8: error: declaration is not a definition 'T1''
inductive1.lean:85:0-85:17: error: invalid 'private' constructor in a 'private' inductive datatype
inductive1.lean:93:7-93:26: error: invalid inductive type, cannot mix unsafe and safe declarations in mutually inductive datatypes
inductive1.lean:100:0-100:4: error: Missing resulting type for constructor 'T1.z2': Its resulting type must be specified because it is part of an inductive family declaration
inductive1.lean:105:7-105:9: error: type expected, got
(T1 : Nat → Type)
inductive1.lean:108:7-108:10: error(lean.ctorResultingTypeMismatch): Unexpected resulting type for constructor 'T1.z1': Expected an application of
T1
but found
Nat
inductive1.lean:118:7-118:11: error: unknown identifier 'cons'