Remarks:
- Some tests do not produce error messages anymore because they can be
processed using the new equation compiler preprocessor.
- Some error messages got worse because of the preprocessing step.
We use metavariables in the preprocessing step. This information
may "leak" to users. Another problem is that some variable names
are lost. Example: in the following definition
def to_nat : ∀ {n}, fi n → nat
| (succ n) f0 := 0
| (succ n) (fs i) := succ (to_nat i)
The preprocessing step uses metavariables for pattern variables.
Thus, we have
def to_nat : ∀ {n}, fi n → nat
| (succ ?n) (@f0 ?x) := 0
| (succ ?n) (@fs ?x ?i) := succ (to_nat i)
when solving the constraint `succ ?n =?= succ ?x`, Lean assigns
?n := ?x
after solving these constraints, the preprocessor converts
metavariables into pattern variables again, and we have
def to_nat : ∀ {n}, fi n → nat
| (succ x) (@f0 x) := 0
| (succ x) (@fs x i) := succ (to_nat i)
So, we get the following equation lemmas:
to_nat.equations._eqn_1 : ∀ (x : ℕ), @to_nat (succ x) (@f0 x) = 0
to_nat.equations._eqn_2 : ∀ (x : ℕ) (i : fi x), @to_nat (succ x) (@fs x i) = succ (@to_nat x i)
instead of
to_nat.equations._eqn_1 : ∀ (n : ℕ), @to_nat (succ n) (@f0 n) = 0
to_nat.equations._eqn_2 : ∀ (n : ℕ) (i : fi n), @to_nat (succ n) (@fs n i) = succ (@to_nat n i)
18 lines
906 B
Text
18 lines
906 B
Text
string_imp.lean:2:2: error: invalid constructor ⟨...⟩, type is a private inductive datatype
|
|
string_imp.lean:2:3: error: don't know how to synthesize placeholder
|
|
context:
|
|
f : string → list char
|
|
⊢ list char
|
|
string_imp.lean:1:4: error: equation compiler failed (use 'set_option trace.eqn_compiler.elim_match true' for additional details)
|
|
string_imp.lean:5:3: error: invalid pattern: variable, constructor or constant tagged as pattern expected
|
|
string_imp.lean:5:3: error: function expected at
|
|
string_imp.mk
|
|
term has type
|
|
_
|
|
string_imp.lean:5:17: error: don't know how to synthesize placeholder
|
|
context:
|
|
g : string → list char
|
|
⊢ list char
|
|
string_imp.lean:4:4: error: equation compiler failed (use 'set_option trace.eqn_compiler.elim_match true' for additional details)
|
|
string_imp.lean:8:0: error: unknown identifier 'string_imp.cases_on'
|
|
string_imp.lean:7:0: warning: declaration 'h' uses sorry
|