chore: update stage0

This commit is contained in:
Leonardo de Moura 2021-09-30 20:34:56 -07:00
parent 88c73f1daa
commit 2aa190ec6a
4 changed files with 1264 additions and 2247 deletions

View file

@ -137,10 +137,6 @@ infixr:100 " <$> " => Functor.map
macro_rules | `($x <|> $y) => `(binop_lazy% HOrElse.hOrElse $x $y)
macro_rules | `($x >> $y) => `(binop_lazy% HAndThen.hAndThen $x $y)
syntax (name := termDepIfThenElse) (priority := low) ppGroup(ppDedent("if " ident " : " term " then" ppSpace term ppDedent(ppSpace "else") ppSpace term)) : term
syntax (name := termIfThenElse) (priority := low) ppGroup(ppDedent("if " term " then" ppSpace term ppDedent(ppSpace "else") ppSpace term)) : term
macro "if " "let " pat:term " := " d:term " then " t:term " else " e:term : term =>
`(match $d:term with | $pat:term => $t | _ => $e)

View file

@ -64,25 +64,6 @@ open Meta
`(dite $c (fun $h:ident => $t) (fun $h:ident => $e))
withMacroExpansion stx newStx <| elabTerm newStx expectedType?
-- TODO: delete
@[builtinTermElab termDepIfThenElse] def elabIfOld1 : TermElab := fun stx expectedType? => do
/- "if " ident " : " term " then" term "else" term -/
let h := stx[1]
let c := stx[3]
let t := stx[5]
let e := stx[7]
let newStx ← `(dite $c (fun $h:ident => $t) (fun $h:ident => $e))
withMacroExpansion stx newStx <| elabTerm newStx expectedType?
-- TODO: delete
@[builtinTermElab termIfThenElse] def elabIfOld2 : TermElab := fun stx expectedType? => do
/- "if " term " then" term "else" term -/
let c := stx[1]
let t := stx[3]
let e := stx[5]
let newStx ← `(ite $c $t $e)
withMacroExpansion stx newStx <| elabTerm newStx expectedType?
@[builtinTermElab borrowed] def elabBorrowed : TermElab := fun stx expectedType? =>
match stx with
| `(@& $e) => return markBorrowed (← elabTerm e expectedType?)

File diff suppressed because it is too large Load diff

View file

@ -25,7 +25,6 @@ static lean_object* l_Lean_Elab_Term_elabIf___closed__2;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIf___closed__5;
lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_myMacro____x40_Init_Notation___hyg_72____spec__1(lean_object*, lean_object*);
lean_object* l_Lean_extractMacroScopes(lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__3;
lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabForall___spec__1___rarg(lean_object*);
size_t l_USize_add(size_t, size_t);
lean_object* l_List_forM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -42,14 +41,12 @@ LEAN_EXPORT lean_object* l_Lean_Elab_getRefPos___at_Lean_Elab_Term_elabPanic___s
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAnonymousCtor___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_expandShow___closed__18;
lean_object* l_Lean_mkSort(lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__2;
static lean_object* l_Lean_Elab_Term_elabCDotFunctionAlias_x3f___closed__1;
lean_object* l_Lean_Syntax_getHeadInfo_x3f(lean_object*);
static lean_object* l_Lean_Elab_Term_expandShow___closed__12;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_expandSuffices___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_expandHave___closed__2;
static lean_object* l_Lean_Elab_Term_expandDbgTrace___closed__4;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__1;
extern lean_object* l_Lean_nullKind;
static lean_object* l_Lean_Elab_Term_elabCDotFunctionAlias_x3f___closed__2;
static lean_object* l_Lean_Elab_Term_expandDbgTrace___closed__17;
@ -76,7 +73,6 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabIf___closed__3;
static lean_object* l_Lean_Elab_Term_elabPanic___closed__3;
static lean_object* l_Lean_Elab_Term_expandHave___closed__8;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabSorry(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__5;
static lean_object* l_Lean_Elab_Term_expandSuffices___closed__3;
static lean_object* l_Lean_Elab_Term_expandHave___lambda__5___closed__1;
static lean_object* l_Lean_Elab_Term_expandParen___closed__14;
@ -135,7 +131,6 @@ static lean_object* l_Lean_Elab_Term_elabSubst___closed__7;
static lean_object* l_Lean_Elab_Term_elabPanic___closed__6;
LEAN_EXPORT uint8_t l_Array_isEqvAux___at_Lean_Elab_Term_elabCDotFunctionAlias_x3f___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabParen(lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__2;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_expandDbgTrace___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_mkPairs_loop___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabSorry(lean_object*);
@ -144,7 +139,6 @@ LEAN_EXPORT lean_object* l_Array_isEqvAux___at_Lean_Elab_Term_elabCDotFunctionAl
static lean_object* l_Lean_Elab_Term_expandDbgTrace___closed__1;
static lean_object* l_Lean_Elab_Term_elabTrailingParserMacro___closed__1;
static lean_object* l___regBuiltin_Lean_Elab_Term_expandParen___closed__1;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__4;
lean_object* lean_string_utf8_byte_size(lean_object*);
static lean_object* l_Lean_Elab_Term_elabIf___closed__17;
static lean_object* l___regBuiltin_Lean_Elab_Term_expandHave___closed__3;
@ -189,7 +183,6 @@ static lean_object* l_Lean_Elab_Term_expandShow___closed__21;
lean_object* l_Lean_throwError___at___private_Lean_Elab_Term_0__Lean_Elab_Term_applyAttributesCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_elabIf___closed__24;
static lean_object* l_Lean_Elab_Term_elabSorry___closed__13;
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld2(lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabNoindex___closed__3;
static lean_object* l_Lean_Elab_Term_expandShow___closed__24;
static lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__24;
@ -197,10 +190,8 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_expandParen(lean_object*);
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_expandHave(lean_object*);
static lean_object* l_Lean_Elab_Term_elabStateRefT___lambda__1___closed__5;
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld1(lean_object*);
lean_object* l_Lean_Syntax_SepArray_getElems___rarg(lean_object*);
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabPanic(lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__1;
lean_object* l_Lean_Elab_Term_tryPostponeIfNoneOrMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_ResolveName_resolveNamespace_x3f(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAnonymousCtor___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
@ -212,7 +203,6 @@ static lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elab
lean_object* lean_array_fget(lean_object*, lean_object*);
static lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__10;
lean_object* l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__5;
static lean_object* l_Lean_Elab_Term_elabIf___closed__3;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAnonymousCtor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_elabStateRefT___lambda__1___closed__3;
@ -220,7 +210,6 @@ uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_elabIf___closed__15;
LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_elabSubst___closed__10;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabIfOld1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_elabAnonymousCtor___lambda__3___closed__14;
static lean_object* l_Lean_Elab_Term_expandShow___closed__7;
static lean_object* l___regBuiltin_Lean_Elab_Term_expandShow___closed__2;
@ -234,7 +223,6 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_expandHave___closed__1;
static lean_object* l_Lean_Elab_Term_expandDbgTrace___closed__6;
extern lean_object* l_Lean_numLitKind;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabBorrowed___closed__3;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__3;
lean_object* lean_nat_sub(lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_expandParen___closed__2;
static lean_object* l___regBuiltin_Lean_Elab_Term_expandSuffices___closed__3;
@ -402,7 +390,6 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_expandHave(lean_object*, lean_object*,
static lean_object* l_Lean_Elab_Term_expandShow___closed__23;
LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_hasCDot___boxed(lean_object*);
lean_object* l_Lean_Syntax_getPos_x3f(lean_object*, uint8_t);
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabIfOld2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro___closed__3;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabPanic(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_String_intercalate(lean_object*, lean_object*);
@ -615,7 +602,6 @@ LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_
static lean_object* l_Lean_Elab_Term_expandUnreachable___rarg___closed__3;
lean_object* l_Lean_Meta_kabstract(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lean_Elab_Term_expandDbgTrace___closed__19;
static lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__4;
LEAN_EXPORT lean_object* l_Lean_Elab_Term_expandHave___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_mkConst(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabStateRefT(lean_object*);
@ -2706,325 +2692,6 @@ x_6 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_5, x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabIfOld1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86;
x_10 = lean_unsigned_to_nat(1u);
x_11 = l_Lean_Syntax_getArg(x_1, x_10);
x_12 = lean_unsigned_to_nat(3u);
x_13 = l_Lean_Syntax_getArg(x_1, x_12);
x_14 = lean_unsigned_to_nat(5u);
x_15 = l_Lean_Syntax_getArg(x_1, x_14);
x_16 = lean_unsigned_to_nat(7u);
x_17 = l_Lean_Syntax_getArg(x_1, x_16);
lean_inc(x_7);
x_18 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_quoteAutoTactic___spec__2___rarg(x_7, x_8, x_9);
x_19 = lean_ctor_get(x_18, 0);
lean_inc(x_19);
x_20 = lean_ctor_get(x_18, 1);
lean_inc(x_20);
lean_dec(x_18);
x_21 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_20);
x_22 = lean_ctor_get(x_21, 0);
lean_inc(x_22);
x_23 = lean_ctor_get(x_21, 1);
lean_inc(x_23);
lean_dec(x_21);
x_24 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_23);
x_25 = lean_ctor_get(x_24, 0);
lean_inc(x_25);
x_26 = lean_ctor_get(x_24, 1);
lean_inc(x_26);
lean_dec(x_24);
x_27 = l_Lean_Elab_Term_elabIf___closed__5;
x_28 = l_Lean_addMacroScope(x_25, x_27, x_22);
x_29 = l_Lean_Elab_Term_elabIf___closed__4;
x_30 = l_Lean_Elab_Term_elabIf___closed__7;
lean_inc(x_19);
x_31 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_31, 0, x_19);
lean_ctor_set(x_31, 1, x_29);
lean_ctor_set(x_31, 2, x_28);
lean_ctor_set(x_31, 3, x_30);
x_32 = l_Lean_Elab_Term_elabIf___closed__10;
lean_inc(x_19);
x_33 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_33, 0, x_19);
lean_ctor_set(x_33, 1, x_32);
x_34 = l_Lean_Elab_Term_elabIf___closed__11;
lean_inc(x_19);
x_35 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_35, 0, x_19);
lean_ctor_set(x_35, 1, x_34);
x_36 = l_Lean_Elab_Term_elabIf___closed__15;
x_37 = lean_array_push(x_36, x_11);
x_38 = l_Lean_Elab_Term_elabAnonymousCtor___lambda__3___closed__3;
x_39 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_39, 0, x_38);
lean_ctor_set(x_39, 1, x_37);
x_40 = l_Lean_Elab_Term_elabIf___closed__16;
lean_inc(x_19);
x_41 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_41, 0, x_19);
lean_ctor_set(x_41, 1, x_40);
x_42 = l_Lean_Elab_Term_elabAnonymousCtor___lambda__3___closed__8;
x_43 = lean_array_push(x_42, x_39);
x_44 = lean_array_push(x_43, x_41);
lean_inc(x_44);
x_45 = lean_array_push(x_44, x_15);
x_46 = l_Lean_Elab_Term_elabIf___closed__14;
x_47 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_47, 0, x_46);
lean_ctor_set(x_47, 1, x_45);
x_48 = l_Lean_Elab_Term_elabAnonymousCtor___lambda__3___closed__10;
x_49 = lean_array_push(x_48, x_35);
lean_inc(x_49);
x_50 = lean_array_push(x_49, x_47);
x_51 = l_Lean_Elab_Term_elabIf___closed__12;
x_52 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_52, 0, x_51);
lean_ctor_set(x_52, 1, x_50);
x_53 = lean_array_push(x_48, x_52);
x_54 = l_Lean_Elab_Term_elabIf___closed__17;
x_55 = lean_array_push(x_53, x_54);
x_56 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_56, 0, x_38);
lean_ctor_set(x_56, 1, x_55);
x_57 = l_Lean_Elab_Term_elabIf___closed__18;
x_58 = lean_alloc_ctor(2, 2, 0);
lean_ctor_set(x_58, 0, x_19);
lean_ctor_set(x_58, 1, x_57);
x_59 = lean_array_push(x_42, x_33);
lean_inc(x_59);
x_60 = lean_array_push(x_59, x_56);
lean_inc(x_58);
x_61 = lean_array_push(x_60, x_58);
x_62 = l_Lean_Elab_Term_elabIf___closed__9;
x_63 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_63, 0, x_62);
lean_ctor_set(x_63, 1, x_61);
x_64 = lean_array_push(x_44, x_17);
x_65 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_65, 0, x_46);
lean_ctor_set(x_65, 1, x_64);
x_66 = lean_array_push(x_49, x_65);
x_67 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_67, 0, x_51);
lean_ctor_set(x_67, 1, x_66);
x_68 = lean_array_push(x_48, x_67);
x_69 = lean_array_push(x_68, x_54);
x_70 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_70, 0, x_38);
lean_ctor_set(x_70, 1, x_69);
x_71 = lean_array_push(x_59, x_70);
x_72 = lean_array_push(x_71, x_58);
x_73 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_73, 0, x_62);
lean_ctor_set(x_73, 1, x_72);
x_74 = lean_array_push(x_42, x_13);
x_75 = lean_array_push(x_74, x_63);
x_76 = lean_array_push(x_75, x_73);
x_77 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_77, 0, x_38);
lean_ctor_set(x_77, 1, x_76);
x_78 = lean_array_push(x_48, x_31);
x_79 = lean_array_push(x_78, x_77);
x_80 = l_Lean_Elab_Term_elabIf___closed__1;
x_81 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_81, 0, x_80);
lean_ctor_set(x_81, 1, x_79);
x_82 = 1;
x_83 = lean_box(x_82);
x_84 = lean_box(x_82);
lean_inc(x_81);
x_85 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTerm___boxed), 11, 4);
lean_closure_set(x_85, 0, x_81);
lean_closure_set(x_85, 1, x_2);
lean_closure_set(x_85, 2, x_83);
lean_closure_set(x_85, 3, x_84);
x_86 = l_Lean_Elab_Term_withMacroExpansion___rarg(x_1, x_81, x_85, x_3, x_4, x_5, x_6, x_7, x_8, x_26);
return x_86;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("termDepIfThenElse");
return x_1;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__3() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("elabIfOld1");
return x_1;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l___regBuiltin_Lean_Elab_Term_elabAnonymousCtor___closed__3;
x_2 = l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__3;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__5() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabIfOld1), 9, 0);
return x_1;
}
}
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld1(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
x_2 = l_Lean_Elab_Term_termElabAttribute;
x_3 = l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__2;
x_4 = l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__4;
x_5 = l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__5;
x_6 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_5, x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabIfOld2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45;
x_10 = lean_unsigned_to_nat(1u);
x_11 = l_Lean_Syntax_getArg(x_1, x_10);
x_12 = lean_unsigned_to_nat(3u);
x_13 = l_Lean_Syntax_getArg(x_1, x_12);
x_14 = lean_unsigned_to_nat(5u);
x_15 = l_Lean_Syntax_getArg(x_1, x_14);
lean_inc(x_7);
x_16 = l_Lean_MonadRef_mkInfoFromRefPos___at_Lean_Elab_Term_quoteAutoTactic___spec__2___rarg(x_7, x_8, x_9);
x_17 = lean_ctor_get(x_16, 0);
lean_inc(x_17);
x_18 = lean_ctor_get(x_16, 1);
lean_inc(x_18);
lean_dec(x_16);
x_19 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4, x_5, x_6, x_7, x_8, x_18);
x_20 = lean_ctor_get(x_19, 0);
lean_inc(x_20);
x_21 = lean_ctor_get(x_19, 1);
lean_inc(x_21);
lean_dec(x_19);
x_22 = l_Lean_Elab_Term_getMainModule___rarg(x_8, x_21);
x_23 = lean_ctor_get(x_22, 0);
lean_inc(x_23);
x_24 = lean_ctor_get(x_22, 1);
lean_inc(x_24);
lean_dec(x_22);
x_25 = l_Lean_Elab_Term_elabIf___closed__22;
x_26 = l_Lean_addMacroScope(x_23, x_25, x_20);
x_27 = l_Lean_Elab_Term_elabIf___closed__21;
x_28 = l_Lean_Elab_Term_elabIf___closed__24;
x_29 = lean_alloc_ctor(3, 4, 0);
lean_ctor_set(x_29, 0, x_17);
lean_ctor_set(x_29, 1, x_27);
lean_ctor_set(x_29, 2, x_26);
lean_ctor_set(x_29, 3, x_28);
x_30 = l_Lean_Elab_Term_elabAnonymousCtor___lambda__3___closed__8;
x_31 = lean_array_push(x_30, x_11);
x_32 = lean_array_push(x_31, x_13);
x_33 = lean_array_push(x_32, x_15);
x_34 = l_Lean_Elab_Term_elabAnonymousCtor___lambda__3___closed__3;
x_35 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_35, 0, x_34);
lean_ctor_set(x_35, 1, x_33);
x_36 = l_Lean_Elab_Term_elabAnonymousCtor___lambda__3___closed__10;
x_37 = lean_array_push(x_36, x_29);
x_38 = lean_array_push(x_37, x_35);
x_39 = l_Lean_Elab_Term_elabIf___closed__1;
x_40 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_40, 0, x_39);
lean_ctor_set(x_40, 1, x_38);
x_41 = 1;
x_42 = lean_box(x_41);
x_43 = lean_box(x_41);
lean_inc(x_40);
x_44 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTerm___boxed), 11, 4);
lean_closure_set(x_44, 0, x_40);
lean_closure_set(x_44, 1, x_2);
lean_closure_set(x_44, 2, x_42);
lean_closure_set(x_44, 3, x_43);
x_45 = l_Lean_Elab_Term_withMacroExpansion___rarg(x_1, x_40, x_44, x_3, x_4, x_5, x_6, x_7, x_8, x_24);
return x_45;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__1() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("termIfThenElse");
return x_1;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = lean_box(0);
x_2 = l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__1;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__3() {
_start:
{
lean_object* x_1;
x_1 = lean_mk_string("elabIfOld2");
return x_1;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3;
x_1 = l___regBuiltin_Lean_Elab_Term_elabAnonymousCtor___closed__3;
x_2 = l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__3;
x_3 = lean_name_mk_string(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__5() {
_start:
{
lean_object* x_1;
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabIfOld2), 9, 0);
return x_1;
}
}
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabIfOld2(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
x_2 = l_Lean_Elab_Term_termElabAttribute;
x_3 = l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__2;
x_4 = l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__4;
x_5 = l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__5;
x_6 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_5, x_1);
return x_6;
}
}
static lean_object* _init_l_Lean_Elab_Term_elabBorrowed___closed__1() {
_start:
{
@ -17253,32 +16920,6 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIf___closed__5);
res = l___regBuiltin_Lean_Elab_Term_elabIf(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__1);
l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__2 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__2();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__2);
l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__3 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__3();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__3);
l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__4 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__4();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__4);
l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__5 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__5();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld1___closed__5);
res = l___regBuiltin_Lean_Elab_Term_elabIfOld1(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__1();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__1);
l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__2 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__2();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__2);
l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__3 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__3();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__3);
l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__4 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__4();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__4);
l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__5 = _init_l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__5();
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabIfOld2___closed__5);
res = l___regBuiltin_Lean_Elab_Term_elabIfOld2(lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lean_Elab_Term_elabBorrowed___closed__1 = _init_l_Lean_Elab_Term_elabBorrowed___closed__1();
lean_mark_persistent(l_Lean_Elab_Term_elabBorrowed___closed__1);
l_Lean_Elab_Term_elabBorrowed___closed__2 = _init_l_Lean_Elab_Term_elabBorrowed___closed__2();