diff --git a/src/frontends/lean/builtin_cmds.cpp b/src/frontends/lean/builtin_cmds.cpp index 65f586bf67..e35008e17d 100644 --- a/src/frontends/lean/builtin_cmds.cpp +++ b/src/frontends/lean/builtin_cmds.cpp @@ -551,7 +551,8 @@ static environment run_command_cmd(parser & p) { tactic = mk_app(mk_constant(get_has_bind_and_then_name()), tactic, try_triv); expr val = mk_typed_expr(mk_true(), mk_by(tactic)); bool check_unassigned = false; - elaborate(env, opts, "_run_command", mctx, local_context(), val, check_unassigned); + bool recover_from_errors = true; + elaborate(env, opts, "_run_command", mctx, local_context(), val, check_unassigned, recover_from_errors); return env; } diff --git a/src/frontends/lean/elaborator.cpp b/src/frontends/lean/elaborator.cpp index 3da35e9984..e7f623dab7 100644 --- a/src/frontends/lean/elaborator.cpp +++ b/src/frontends/lean/elaborator.cpp @@ -3660,8 +3660,7 @@ expr elaborator::finalize_theorem_proof(expr const & val, theorem_finalization_i pair elaborate(environment & env, options const & opts, name const & decl_name, metavar_context & mctx, local_context const & lctx, expr const & e, - bool check_unassigned) { - bool recover_from_errors = false; + bool check_unassigned, bool recover_from_errors) { elaborator elab(env, opts, decl_name, mctx, lctx, recover_from_errors); expr r = elab.elaborate(e); auto p = elab.finalize(r, check_unassigned, true); diff --git a/src/frontends/lean/elaborator.h b/src/frontends/lean/elaborator.h index 799a8e0ac3..d172c6e2ce 100644 --- a/src/frontends/lean/elaborator.h +++ b/src/frontends/lean/elaborator.h @@ -335,7 +335,7 @@ public: pair elaborate(environment & env, options const & opts, name const & decl_name, metavar_context & mctx, local_context const & lctx, - expr const & e, bool check_unassigend); + expr const & e, bool check_unassigned, bool recover_from_errors); /** \brief Translated local constants (and undefined constants) occurring in \c e into local constants provided by \c ctx. diff --git a/src/frontends/lean/parser.cpp b/src/frontends/lean/parser.cpp index 32491eae08..dac62b8035 100644 --- a/src/frontends/lean/parser.cpp +++ b/src/frontends/lean/parser.cpp @@ -753,7 +753,7 @@ pair parser::elaborate(name const & decl_name, expr const & e, bool check_unassigned) { expr tmp_e = adapter.translate_to(e); pair r = - ::lean::elaborate(m_env, get_options(), decl_name, mctx, adapter.lctx(), tmp_e, check_unassigned); + ::lean::elaborate(m_env, get_options(), decl_name, mctx, adapter.lctx(), tmp_e, check_unassigned, m_error_recovery); expr new_e = r.first; new_e = adapter.translate_from(new_e); return mk_pair(new_e, r.second); diff --git a/tests/lean/1279.lean.expected.out b/tests/lean/1279.lean.expected.out index 96706aa67a..0095aadb4e 100644 --- a/tests/lean/1279.lean.expected.out +++ b/tests/lean/1279.lean.expected.out @@ -6,3 +6,20 @@ has type source.Hom A B but is expected to have type source.Hom C ?m_1 +1279.lean:12:55: error: type mismatch at application + target.compose (onMorphisms g) (onMorphisms f) +term + onMorphisms f +has type + target.Hom (onObjects A) (onObjects B) +but is expected to have type + target.Hom (onObjects C) (onObjects ?m_1) +1279.lean:12:33: error: don't know how to synthesize placeholder +context: +source target : Category, +onObjects : source.Obj → target.Obj, +onMorphisms : Π ⦃A B : source.Obj⦄, source.Hom A B → target.Hom (onObjects A) (onObjects B), +A B C : source.Obj, +f : source.Hom A B, +g : source.Hom B C +⊢ source.Obj diff --git a/tests/lean/choice_expl.lean.expected.out b/tests/lean/choice_expl.lean.expected.out index 362aab759a..17287b6b37 100644 --- a/tests/lean/choice_expl.lean.expected.out +++ b/tests/lean/choice_expl.lean.expected.out @@ -5,3 +5,4 @@ choice_expl.lean:15:7: error: ambiguous overload, possible interpretations N1.pr a b Additional information: choice_expl.lean:15:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 diff --git a/tests/lean/coe1.lean.expected.out b/tests/lean/coe1.lean.expected.out index bc5249e4c7..5f5f73e08c 100644 --- a/tests/lean/coe1.lean.expected.out +++ b/tests/lean/coe1.lean.expected.out @@ -11,6 +11,7 @@ has type real but is expected to have type int +⁇ : ?M_1 ↑i + x : real x + ↑n : real coe1.lean:35:9: error: type mismatch at application @@ -21,6 +22,7 @@ has type real but is expected to have type ℕ +⁇ : ?M_1 ↑n + x : real ↑i + x : real ↑n + x : real diff --git a/tests/lean/coe2.lean.expected.out b/tests/lean/coe2.lean.expected.out index af71e818b8..170a72da12 100644 --- a/tests/lean/coe2.lean.expected.out +++ b/tests/lean/coe2.lean.expected.out @@ -11,6 +11,7 @@ has type real but is expected to have type int +⁇ : ?M_1 i + x : real x + n : real coe2.lean:37:9: error: type mismatch at application @@ -21,4 +22,5 @@ has type real but is expected to have type ℕ +⁇ : ?M_1 n + x : real diff --git a/tests/lean/def4.lean.expected.out b/tests/lean/def4.lean.expected.out index d246e3e7a4..a769333a58 100644 --- a/tests/lean/def4.lean.expected.out +++ b/tests/lean/def4.lean.expected.out @@ -7,6 +7,7 @@ has type ℕ but is expected to have type A +⁇ : ?M_1 g : A → A def4.lean:17:9: error: type mismatch at application g 0 @@ -16,6 +17,7 @@ has type ℕ but is expected to have type A +⁇ : ?M_1 f : Π (A : Type u_1), A → A f ℕ 0 : ℕ g 0 : ℕ diff --git a/tests/lean/elab1.lean.expected.out b/tests/lean/elab1.lean.expected.out index ec6956041f..f73bb86c5e 100644 --- a/tests/lean/elab1.lean.expected.out +++ b/tests/lean/elab1.lean.expected.out @@ -3,4 +3,6 @@ elab1.lean:13:7: error: invalid '@', function is overloaded, use fully qualified names (overloads: boo.subst, foo.subst) elab1.lean:15:7: error: invalid '@@', function is overloaded, use fully qualified names (overloads: boo.subst, foo.subst) elab1.lean:19:7: error: invalid overloaded application, elaborator has special support for 'eq.subst' (it is handled as an "eliminator"), but this kind of constant cannot be overloaded (solution: use fully qualified names) (overloads: eq.subst, boo.subst, foo.subst) +⁇ : ?M_1 elab1.lean:25:7: error: invalid 'eq.subst' application, elaborator has special support for this kind of application (it is handled as an "eliminator"), but the expected type must be known +⁇ : ?M_1 diff --git a/tests/lean/elab11.lean.expected.out b/tests/lean/elab11.lean.expected.out index 5a8de89f82..3ab20d59ae 100644 --- a/tests/lean/elab11.lean.expected.out +++ b/tests/lean/elab11.lean.expected.out @@ -3,6 +3,7 @@ elab11.lean:6:7: error: ambiguous overload, possible interpretations boo.f 1 Additional information: elab11.lean:6:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 bla.f 1 : ℕ boo.f 1 : bool elab11.lean:16:8: error: none of the overloads are applicable @@ -41,3 +42,4 @@ has type bool but is expected to have type string +⁇ : string diff --git a/tests/lean/elab12.lean.expected.out b/tests/lean/elab12.lean.expected.out index 1989ab672e..9f4632c385 100644 --- a/tests/lean/elab12.lean.expected.out +++ b/tests/lean/elab12.lean.expected.out @@ -1,16 +1,31 @@ elab12.lean:1:31: error: type expected at 0 +elab12.lean:1:39: error: function expected at + rfl +Additional information: +elab12.lean:1:39: context: switched to simple application elaboration procedure because failed to use expected type to elaborate it, error message + too many arguments +elab12.lean:2:2: error: function expected at + H +λ (a : ℕ), have H : ⁇, from ⁇, ⁇ : ∀ (a : ℕ), a = a elab12.lean:4:43: error: function expected at rfl Additional information: elab12.lean:4:43: context: switched to simple application elaboration procedure because failed to use expected type to elaborate it, error message too many arguments +elab12.lean:5:2: error: function expected at + H +λ (a : ℕ), have H : a = a, from ⁇, ⁇ : ∀ (a : ℕ), a = a elab12.lean:7:45: error: invalid have-expression, expression a + 0 has type ℕ but is expected to have type a = a +elab12.lean:8:2: error: function expected at + H +λ (a : ℕ), have H : a = a, from ⁇, ⁇ : ∀ (a : ℕ), a = a elab12.lean:11:2: error: function expected at H +λ (a : ℕ), have H : a = a, from rfl, ⁇ : ∀ (a : ℕ), a = a λ (a : ℕ), have H : a = a, from rfl, H : ∀ (a : ℕ), a = a diff --git a/tests/lean/elab2.lean.expected.out b/tests/lean/elab2.lean.expected.out index 22431f4f8d..24dd5c2238 100644 --- a/tests/lean/elab2.lean.expected.out +++ b/tests/lean/elab2.lean.expected.out @@ -7,4 +7,5 @@ has type bool but is expected to have type nat +⁇ : ?M_1 @bla.{0 0} nat bool (@has_zero.zero.{0} nat nat.has_zero) (@has_zero.zero.{0} nat nat.has_zero) bool.tt : nat diff --git a/tests/lean/elab4.lean.expected.out b/tests/lean/elab4.lean.expected.out index 799236aa58..fd170b06f5 100644 --- a/tests/lean/elab4.lean.expected.out +++ b/tests/lean/elab4.lean.expected.out @@ -13,11 +13,13 @@ function expected at boo.f 0 1 2 Additional information: elab4.lean:13:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 elab4.lean:15:7: error: ambiguous overload, possible interpretations foo.f 0 1 boo.f 0 1 Additional information: elab4.lean:15:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 foo.f bool.tt 2 : bool bla.f bool.tt bool.ff bool.tt : bool → bool elab4.lean:21:7: error: ambiguous overload, possible interpretations @@ -25,4 +27,5 @@ elab4.lean:21:7: error: ambiguous overload, possible interpretations foo.f bool.tt bool.ff Additional information: elab4.lean:21:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 foo.f 0 1 : ℕ diff --git a/tests/lean/elab4b.lean.expected.out b/tests/lean/elab4b.lean.expected.out index db239203d8..bf058ac9d1 100644 --- a/tests/lean/elab4b.lean.expected.out +++ b/tests/lean/elab4b.lean.expected.out @@ -12,13 +12,16 @@ function expected at f 0 1 2 Additional information: elab4b.lean:9:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 elab4b.lean:11:7: error: ambiguous overload, possible interpretations foo.f 0 1 boo.f 0 1 Additional information: elab4b.lean:11:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 elab4b.lean:13:7: error: ambiguous overload, possible interpretations bla.f bool.tt bool.ff foo.f bool.tt bool.ff Additional information: elab4b.lean:13:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 diff --git a/tests/lean/elab_error_recovery.lean.expected.out b/tests/lean/elab_error_recovery.lean.expected.out index fe429101d1..f683b46b75 100644 --- a/tests/lean/elab_error_recovery.lean.expected.out +++ b/tests/lean/elab_error_recovery.lean.expected.out @@ -39,3 +39,4 @@ nat.succ (nat.succ (nat.succ (nat.succ ⁇))) 2 elab_error_recovery.lean:21:13: error: type expected at 0 +∀ (x : ⁇), x = x : Prop diff --git a/tests/lean/error_full_names.lean.expected.out b/tests/lean/error_full_names.lean.expected.out index fc25342e8d..9391b49120 100644 --- a/tests/lean/error_full_names.lean.expected.out +++ b/tests/lean/error_full_names.lean.expected.out @@ -1,5 +1,8 @@ error_full_names.lean:4:7: error: failed to synthesize type class instance for ⊢ has_zero nat +error_full_names.lean:4:9: error: failed to synthesize type class instance for +⊢ has_add nat +0 + nat.zero : nat error_full_names.lean:8:7: error: type mismatch at application nat.succ nat.zero term @@ -8,3 +11,4 @@ has type nat but is expected to have type ℕ +⁇ : ?M_1 diff --git a/tests/lean/error_pos.lean.expected.out b/tests/lean/error_pos.lean.expected.out index 73a9f90ce1..60f74b46fa 100644 --- a/tests/lean/error_pos.lean.expected.out +++ b/tests/lean/error_pos.lean.expected.out @@ -5,10 +5,13 @@ error_pos.lean:4:43: error: type expected at B error_pos.lean:9:40: error: type expected at B +λ (A : Type) (B : A → Type) (b : ⁇), true : Π (A : Type), (A → Type) → ⁇ → Prop error_pos.lean:11:36: error: type expected at B +λ (A : Type) (B : A → Type), ⁇ → true : Π (A : Type), (A → Type) → Prop error_pos.lean:13:43: error: type expected at B +λ (A : Type) (B : A → Type) (b : ⁇), b : Π (A : Type), (A → Type) → ⁇ → ⁇ error_pos.lean:15:105: error: invalid let-expression, expression a₁ has type diff --git a/tests/lean/field_access.lean.expected.out b/tests/lean/field_access.lean.expected.out index 9320ce4078..22c33e4c8d 100644 --- a/tests/lean/field_access.lean.expected.out +++ b/tests/lean/field_access.lean.expected.out @@ -3,10 +3,12 @@ field_access.lean:5:8: error: invalid projection, structure expected l has type list ℕ +⁇ : ?M_1 field_access.lean:7:13: error: invalid projection, structure has only 2 field(s) (1, 2) which has type ?m_1 × ?m_2 +⁇ : ?M_1 field_access.lean:10:1: error: invalid field notation, 'forr' is not a valid "field" because environment does not contain 'list.forr' l which has type diff --git a/tests/lean/inst_error.lean.expected.out b/tests/lean/inst_error.lean.expected.out index 8912b26026..580577defb 100644 --- a/tests/lean/inst_error.lean.expected.out +++ b/tests/lean/inst_error.lean.expected.out @@ -2,3 +2,4 @@ inst_error.lean:1:39: error: failed to synthesize type class instance for A : Type, a b c : A ⊢ decidable (a = b ∧ a = c) +λ (A : Type) (a b c : A), ite (a = b ∧ a = c) tt ff : Π (A : Type), A → A → A → bool diff --git a/tests/lean/instance_cache_bug1.lean.expected.out b/tests/lean/instance_cache_bug1.lean.expected.out index fe99bce2f2..4ee1207edc 100644 --- a/tests/lean/instance_cache_bug1.lean.expected.out +++ b/tests/lean/instance_cache_bug1.lean.expected.out @@ -1,3 +1,4 @@ instance_cache_bug1.lean:5:9: error: failed to synthesize type class instance for ⊢ has_add A a + a : A +a + a : A diff --git a/tests/lean/interactive/info_id_pre_elab.lean.expected.out b/tests/lean/interactive/info_id_pre_elab.lean.expected.out index 6bff823109..fbeb8fc46c 100644 --- a/tests/lean/interactive/info_id_pre_elab.lean.expected.out +++ b/tests/lean/interactive/info_id_pre_elab.lean.expected.out @@ -1,7 +1,8 @@ {"msgs":[{"caption":"","file_name":"f","pos_col":0,"pos_line":6,"severity":"error","text":"invalid expression, `)` expected"}],"response":"all_messages"} {"msgs":[{"caption":"","file_name":"f","pos_col":0,"pos_line":6,"severity":"error","text":"invalid expression, `)` expected"},{"caption":"","file_name":"f","pos_col":8,"pos_line":3,"severity":"error","text":"ambiguous overload, possible interpretations\n trace\n tactic.trace\nAdditional information:\nf:3:8: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available"}],"response":"all_messages"} -{"msgs":[{"caption":"","file_name":"f","pos_col":0,"pos_line":6,"severity":"error","text":"invalid expression, `)` expected"},{"caption":"","file_name":"f","pos_col":8,"pos_line":3,"severity":"error","text":"ambiguous overload, possible interpretations\n trace\n tactic.trace\nAdditional information:\nf:3:8: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available"},{"caption":"","file_name":"f","pos_col":27,"pos_line":7,"severity":"error","text":"invalid expression, `)` expected"}],"response":"all_messages"} -{"msgs":[{"caption":"","file_name":"f","pos_col":0,"pos_line":6,"severity":"error","text":"invalid expression, `)` expected"},{"caption":"","file_name":"f","pos_col":8,"pos_line":3,"severity":"error","text":"ambiguous overload, possible interpretations\n trace\n tactic.trace\nAdditional information:\nf:3:8: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available"},{"caption":"","file_name":"f","pos_col":27,"pos_line":7,"severity":"error","text":"invalid expression, `)` expected"},{"caption":"check result","file_name":"f","pos_col":0,"pos_line":6,"severity":"information","text":"λ (tac : tactic unit), (abstract tac none) : tactic unit → tactic unit"}],"response":"all_messages"} +{"msgs":[{"caption":"","file_name":"f","pos_col":0,"pos_line":6,"severity":"error","text":"invalid expression, `)` expected"},{"caption":"","file_name":"f","pos_col":8,"pos_line":3,"severity":"error","text":"ambiguous overload, possible interpretations\n trace\n tactic.trace\nAdditional information:\nf:3:8: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available"},{"caption":"check result","file_name":"f","pos_col":0,"pos_line":3,"severity":"information","text":"⁇ : ?M_1"}],"response":"all_messages"} +{"msgs":[{"caption":"","file_name":"f","pos_col":0,"pos_line":6,"severity":"error","text":"invalid expression, `)` expected"},{"caption":"","file_name":"f","pos_col":8,"pos_line":3,"severity":"error","text":"ambiguous overload, possible interpretations\n trace\n tactic.trace\nAdditional information:\nf:3:8: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available"},{"caption":"check result","file_name":"f","pos_col":0,"pos_line":3,"severity":"information","text":"⁇ : ?M_1"},{"caption":"","file_name":"f","pos_col":27,"pos_line":7,"severity":"error","text":"invalid expression, `)` expected"}],"response":"all_messages"} +{"msgs":[{"caption":"","file_name":"f","pos_col":0,"pos_line":6,"severity":"error","text":"invalid expression, `)` expected"},{"caption":"","file_name":"f","pos_col":8,"pos_line":3,"severity":"error","text":"ambiguous overload, possible interpretations\n trace\n tactic.trace\nAdditional information:\nf:3:8: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available"},{"caption":"check result","file_name":"f","pos_col":0,"pos_line":3,"severity":"information","text":"⁇ : ?M_1"},{"caption":"","file_name":"f","pos_col":27,"pos_line":7,"severity":"error","text":"invalid expression, `)` expected"},{"caption":"check result","file_name":"f","pos_col":0,"pos_line":6,"severity":"information","text":"λ (tac : tactic unit), (abstract tac none) : tactic unit → tactic unit"}],"response":"all_messages"} {"message":"file invalidated","response":"ok","seq_num":0} {"response":"ok","seq_num":4} {"record":{"full-id":"tactic.abstract","source":,"type":"tactic unit → opt_param (option name) none → opt_param bool tt → tactic unit"},"response":"ok","seq_num":7} diff --git a/tests/lean/let1.lean.expected.out b/tests/lean/let1.lean.expected.out index 94a862d745..46ff213041 100644 --- a/tests/lean/let1.lean.expected.out +++ b/tests/lean/let1.lean.expected.out @@ -12,3 +12,10 @@ has type Π (p q : bool), p → q → Π (c : bool), (p → q → c) → c but is expected to have type Π (p q : bool), p → q → and q p +let bool : Type := Prop, + and : bool → bool → Prop := λ (p q : bool), Π (c : bool), (p → q → c) → c, + and_intro : Π (p q : bool), p → q → and q p := ⁇, + and_elim_left : Π (p q : bool), and p q → p := λ (p q : bool) (H : and p q), H p (λ (H1 : p) (H2 : q), H1), + and_elim_right : Π (p q : bool), and p q → q := λ (p q : bool) (H : and p q), H q (λ (H1 : p) (H2 : q), H2) +in and_intro : + ∀ (p q : Prop), p → q → (λ (p q : Prop), ∀ (c : Prop), (p → q → c) → c) q p diff --git a/tests/lean/mismatch.lean.expected.out b/tests/lean/mismatch.lean.expected.out index a703d5c055..4109513b6e 100644 --- a/tests/lean/mismatch.lean.expected.out +++ b/tests/lean/mismatch.lean.expected.out @@ -6,3 +6,4 @@ has type num but is expected to have type ℕ +⁇ : ?M_1 diff --git a/tests/lean/nary_overload.lean.expected.out b/tests/lean/nary_overload.lean.expected.out index 4b93f917fa..b2109a88e9 100644 --- a/tests/lean/nary_overload.lean.expected.out +++ b/tests/lean/nary_overload.lean.expected.out @@ -3,6 +3,7 @@ nary_overload.lean:16:7: error: ambiguous overload, possible interpretations [a, b, c] Additional information: nary_overload.lean:16:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 [a, b, c] : vec A [a, b, c] : lst A @vec.cons A a (@vec.cons A b (@vec.cons A c (@vec.nil A))) : vec.{0} A diff --git a/tests/lean/no_coe.lean.expected.out b/tests/lean/no_coe.lean.expected.out index bd6ffb145d..9f2369cd71 100644 --- a/tests/lean/no_coe.lean.expected.out +++ b/tests/lean/no_coe.lean.expected.out @@ -7,3 +7,4 @@ has type bool but is expected to have type Prop +⁇ : ?M_1 diff --git a/tests/lean/notation_error_pos.lean.expected.out b/tests/lean/notation_error_pos.lean.expected.out index c3b8747ac7..899a1e590f 100644 --- a/tests/lean/notation_error_pos.lean.expected.out +++ b/tests/lean/notation_error_pos.lean.expected.out @@ -1,9 +1,19 @@ notation_error_pos.lean:6:7: error: failed to synthesize type class instance for ⊢ has_one string +notation_error_pos.lean:6:7: error: failed to synthesize type class instance for +⊢ has_add string +"a" + 1 : string notation_error_pos.lean:8:7: error: failed to synthesize type class instance for ⊢ has_one string +notation_error_pos.lean:8:7: error: failed to synthesize type class instance for +⊢ has_add string +"a" + 1 : string notation_error_pos.lean:10:7: error: failed to synthesize type class instance for ⊢ has_one string +notation_error_pos.lean:10:7: error: failed to synthesize type class instance for +⊢ has_add string +1 + "a" : string notation_error_pos.lean:12:7: error: failed to synthesize type class instance for x : string ⊢ has_add string +λ (x : string), x + "b" : string → string diff --git a/tests/lean/num2.lean.expected.out b/tests/lean/num2.lean.expected.out index 9adf3b4a0d..5b904ef1bb 100644 --- a/tests/lean/num2.lean.expected.out +++ b/tests/lean/num2.lean.expected.out @@ -1,5 +1,11 @@ o : N z : N eq a gz : Prop +num2.lean:24:8: error: failed to synthesize type class instance for +⊢ has_zero G +num2.lean:24:8: error: invalid type ascription, expression has type + N +but is expected to have type + G eq gz a : Prop eq b z : Prop diff --git a/tests/lean/num3.lean.expected.out b/tests/lean/num3.lean.expected.out index 3c1ba29c9e..123d76c69c 100644 --- a/tests/lean/num3.lean.expected.out +++ b/tests/lean/num3.lean.expected.out @@ -1,3 +1,7 @@ @eq N a z : Prop +num3.lean:14:12: error: invalid type ascription, expression has type + N +but is expected to have type + num @eq num 2 1 : Prop @eq num 2 1 : Prop diff --git a/tests/lean/over_notation.lean.expected.out b/tests/lean/over_notation.lean.expected.out index 3838b1e0fc..91bc42d1bf 100644 --- a/tests/lean/over_notation.lean.expected.out +++ b/tests/lean/over_notation.lean.expected.out @@ -22,5 +22,6 @@ but is expected to have type nat Additional information: over_notation.lean:11:10: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +⁇ : ?M_1 f 1 (f 2 (f 3 0)) : nat g "a" (g "b" (g "c" "")) : string diff --git a/tests/lean/private_structure.lean.expected.out b/tests/lean/private_structure.lean.expected.out index cada7bdeb0..5e335b5c79 100644 --- a/tests/lean/private_structure.lean.expected.out +++ b/tests/lean/private_structure.lean.expected.out @@ -26,4 +26,5 @@ private_structure.lean:30:7: error: unknown identifier 'point.y' def foo.bla : Type := point private_structure.lean:35:8: error: invalid constructor ⟨...⟩, type is a private inductive datatype +⁇ : foo.bla foo.mk : foo.bla diff --git a/tests/lean/proj_notation.lean.expected.out b/tests/lean/proj_notation.lean.expected.out index 8f1bd91311..d399b76ff6 100644 --- a/tests/lean/proj_notation.lean.expected.out +++ b/tests/lean/proj_notation.lean.expected.out @@ -9,15 +9,18 @@ proj_notation.lean:29:19: error: invalid field notation, 'fst' is not a valid "f c which has type car +λ (c : car), ⁇ : car → ?M_1 proj_notation.lean:31:21: error: invalid projection, index must be greater than 0 proj_notation.lean:33:19: error: invalid projection, structure has only 2 field(s) c which has type car +λ (c : car), ⁇ : car → ?M_1 proj_notation.lean:35:19: error: invalid projection, structure expected n has type ℕ +λ (n : ℕ), ⁇ : ℕ → ?M_1 p.fst : ℕ p.snd : ℕ λ (c : car), (c.pos).y : car → ℕ diff --git a/tests/lean/slow_error.lean.expected.out b/tests/lean/slow_error.lean.expected.out index 6bcd5537ba..3614524f13 100644 --- a/tests/lean/slow_error.lean.expected.out +++ b/tests/lean/slow_error.lean.expected.out @@ -6,3 +6,4 @@ has type string but is expected to have type caching_user_attribute string +⁇ : ?M_1 diff --git a/tests/lean/t10.lean.expected.out b/tests/lean/t10.lean.expected.out index cfbb81a723..3243bb7732 100644 --- a/tests/lean/t10.lean.expected.out +++ b/tests/lean/t10.lean.expected.out @@ -7,6 +7,7 @@ has type B but is expected to have type N +⁇ : ?M_1 [x, y, z, x, y, y] : list [x] : list [] : list diff --git a/tests/lean/t12.lean.expected.out b/tests/lean/t12.lean.expected.out index 5f59b38a1f..3fd8c0df5e 100644 --- a/tests/lean/t12.lean.expected.out +++ b/tests/lean/t12.lean.expected.out @@ -1,3 +1,5 @@ λ (f g : N → N → N) (x y : N), f x (g x y) : (N → N → N) → (N → N → N) → N → N → N t12.lean:7:7: error: function expected at a +⁇ : ?M_1 +t12.lean:7:8: error: command expected