chore: update stage0
This commit is contained in:
parent
61d4290fa8
commit
65f004ebcd
8 changed files with 1099 additions and 2 deletions
|
|
@ -127,4 +127,9 @@ def allM {m : Type → Type u} [Monad m] {α : Type v} (f : α → m Bool) : Lis
|
|||
| true => allM as
|
||||
| false => pure false
|
||||
|
||||
@[specialize]
|
||||
def findM? {m : Type → Type} [Monad m] {α : Type} (p : α → m Bool) : List α → m (Option α)
|
||||
| [] => pure none
|
||||
| a::as => condM (p a) (pure (some a)) (findM? as)
|
||||
|
||||
end List
|
||||
|
|
|
|||
|
|
@ -65,6 +65,13 @@ def isPrefixOf : Name → Name → Bool
|
|||
| p, n@(num p' _ _) => p == n || isPrefixOf p p'
|
||||
| p, n@(str p' _ _) => p == n || isPrefixOf p p'
|
||||
|
||||
|
||||
def isSuffixOf : Name → Name → Bool
|
||||
| anonymous, _ => true
|
||||
| str p₁ s₁ _, str p₂ s₂ _ => s₁ == s₂ && isSuffixOf p₁ p₂
|
||||
| num p₁ n₁ _, num p₂ n₂ _ => n₁ == n₂ && isSuffixOf p₁ p₂
|
||||
| _, _ => false
|
||||
|
||||
def lt : Name → Name → Bool
|
||||
| anonymous, anonymous => false
|
||||
| anonymous, _ => true
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ fun stx => match_syntax stx with
|
|||
assignExprMVar g val
|
||||
};
|
||||
setGoals gs
|
||||
| _ => throwUnsupportedSyntax
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[builtinTactic «refine»] def evalRefine : Tactic :=
|
||||
fun stx => match_syntax stx with
|
||||
|
|
@ -278,7 +278,7 @@ fun stx => match_syntax stx with
|
|||
collectMVars ref val
|
||||
};
|
||||
setGoals (gs' ++ gs)
|
||||
| _ => throwUnsupportedSyntax
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[builtinTactic nestedTacticBlock] def evalNestedTacticBlock : Tactic :=
|
||||
fun stx => focus stx (evalTactic (stx.getArg 1))
|
||||
|
|
@ -286,6 +286,19 @@ fun stx => focus stx (evalTactic (stx.getArg 1))
|
|||
@[builtinTactic nestedTacticBlockCurly] def evalNestedTacticBlockCurly : Tactic :=
|
||||
evalNestedTacticBlock
|
||||
|
||||
@[builtinTactic «case»] def evalCase : Tactic :=
|
||||
fun stx => match_syntax stx with
|
||||
| `(tactic| case $tag $tac) => do
|
||||
let tag := tag.getId;
|
||||
gs ← getUnsolvedGoals;
|
||||
some g ← gs.findM? (fun g => do mvarDecl ← getMVarDecl g; pure $ tag.isSuffixOf mvarDecl.userName) | throwError stx "tag not found";
|
||||
let gs := gs.erase g;
|
||||
setGoals [g];
|
||||
evalTactic tac;
|
||||
done stx;
|
||||
setGoals gs
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[init] private def regTraceClasses : IO Unit := do
|
||||
registerTraceClass `Elab.tactic;
|
||||
pure ()
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ def seq := parser! sepBy tacticParser "; " true
|
|||
@[builtinTacticParser] def «exact» := parser! nonReservedSymbol "exact " >> termParser
|
||||
@[builtinTacticParser] def «refine» := parser! nonReservedSymbol "refine " >> termParser
|
||||
@[builtinTacticParser] def «case» := parser! nonReservedSymbol "case " >> ident >> tacticParser
|
||||
@[builtinTacticParser] def paren := parser! "(" >> seq >> ")"
|
||||
@[builtinTacticParser] def nestedTacticBlock := parser! "begin " >> seq >> "end"
|
||||
@[builtinTacticParser] def nestedTacticBlockCurly := parser! "{" >> seq >> "}"
|
||||
@[builtinTacticParser] def orelse := tparser! pushLeading >> " <|> " >> tacticParser 1
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ lean_object* l_List_mapA___main(lean_object*);
|
|||
lean_object* l_List_filterAuxM___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_mapM_u2082___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_anyM___main___boxed(lean_object*);
|
||||
lean_object* l_List_findM_x3f___main___boxed(lean_object*);
|
||||
lean_object* l_List_forA___main___boxed(lean_object*);
|
||||
lean_object* l_List_forA___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_mapA___main___rarg___lambda__1(lean_object*, lean_object*);
|
||||
|
|
@ -45,6 +46,7 @@ lean_object* l_List_anyM(lean_object*);
|
|||
lean_object* l_List_allM___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_firstM___main___boxed(lean_object*);
|
||||
lean_object* l_List_mapA_u2082___boxed(lean_object*);
|
||||
lean_object* l_List_findM_x3f___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_firstM___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_forM_u2082___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_forM_u2082(lean_object*);
|
||||
|
|
@ -64,6 +66,7 @@ lean_object* l_List_foldlM___boxed(lean_object*);
|
|||
lean_object* l_List_filterAuxM___boxed(lean_object*);
|
||||
lean_object* l_List_allM___main___boxed(lean_object*);
|
||||
lean_object* l_List_foldrM___main___boxed(lean_object*);
|
||||
lean_object* l_List_findM_x3f___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_filterAuxM___main(lean_object*);
|
||||
lean_object* l_List_mapM___boxed(lean_object*);
|
||||
lean_object* l_List_mapA_u2082___main___boxed(lean_object*);
|
||||
|
|
@ -86,6 +89,7 @@ lean_object* l_List_mapM_u2082___rarg(lean_object*, lean_object*, lean_object*,
|
|||
lean_object* l_List_forM___main___boxed(lean_object*);
|
||||
lean_object* l_List_mapA_u2082___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_mapA___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_findM_x3f___main(lean_object*);
|
||||
lean_object* l_List_forM___main(lean_object*);
|
||||
lean_object* l_List_forA___main(lean_object*);
|
||||
lean_object* l_List_forM___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -101,10 +105,13 @@ lean_object* l_List_mapA___main___boxed(lean_object*);
|
|||
lean_object* l_List_mapA_u2082(lean_object*);
|
||||
lean_object* l_List_foldrM___boxed(lean_object*);
|
||||
lean_object* l_List_forA(lean_object*);
|
||||
lean_object* l_List_findM_x3f___boxed(lean_object*);
|
||||
lean_object* l_List_mapA_u2082___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_filterAuxM(lean_object*);
|
||||
lean_object* l_List_mapA___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_findM_x3f___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_forM___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_findM_x3f___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t);
|
||||
lean_object* l_List_anyM___boxed(lean_object*);
|
||||
lean_object* l_List_forM_u2082___boxed(lean_object*);
|
||||
lean_object* l_List_firstM___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -115,6 +122,7 @@ lean_object* l_List_filterRevM(lean_object*);
|
|||
lean_object* l_List_filterM(lean_object*);
|
||||
lean_object* l_List_anyM___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t);
|
||||
lean_object* l_List_foldrM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_findM_x3f(lean_object*);
|
||||
lean_object* l_List_forM(lean_object*);
|
||||
lean_object* l_List_foldrM(lean_object*);
|
||||
lean_object* l_List_mapM___main___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1612,6 +1620,126 @@ lean_dec(x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f___main___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5) {
|
||||
_start:
|
||||
{
|
||||
if (x_5 == 0)
|
||||
{
|
||||
lean_object* x_6;
|
||||
lean_dec(x_4);
|
||||
x_6 = l_List_findM_x3f___main___rarg(x_1, lean_box(0), x_2, x_3);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_7 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_1);
|
||||
x_8 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_7);
|
||||
x_9 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_9, 0, x_4);
|
||||
x_10 = lean_apply_2(x_8, lean_box(0), x_9);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_4) == 0)
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
|
||||
lean_dec(x_3);
|
||||
x_5 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_5);
|
||||
lean_dec(x_1);
|
||||
x_6 = lean_ctor_get(x_5, 1);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_5);
|
||||
x_7 = lean_box(0);
|
||||
x_8 = lean_apply_2(x_6, lean_box(0), x_7);
|
||||
return x_8;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
x_9 = lean_ctor_get(x_4, 0);
|
||||
lean_inc(x_9);
|
||||
x_10 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_4);
|
||||
x_11 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_11);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_9);
|
||||
x_12 = lean_apply_1(x_3, x_9);
|
||||
x_13 = lean_alloc_closure((void*)(l_List_findM_x3f___main___rarg___lambda__1___boxed), 5, 4);
|
||||
lean_closure_set(x_13, 0, x_1);
|
||||
lean_closure_set(x_13, 1, x_3);
|
||||
lean_closure_set(x_13, 2, x_10);
|
||||
lean_closure_set(x_13, 3, x_9);
|
||||
x_14 = lean_apply_4(x_11, lean_box(0), lean_box(0), x_12, x_13);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f___main(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_List_findM_x3f___main___rarg), 4, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f___main___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_6; lean_object* x_7;
|
||||
x_6 = lean_unbox(x_5);
|
||||
lean_dec(x_5);
|
||||
x_7 = l_List_findM_x3f___main___rarg___lambda__1(x_1, x_2, x_3, x_4, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f___main___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = l_List_findM_x3f___main(x_1);
|
||||
lean_dec(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_List_findM_x3f___main___rarg(x_1, lean_box(0), x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_List_findM_x3f___rarg), 4, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = l_List_findM_x3f(x_1);
|
||||
lean_dec(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* initialize_Init_Control_Monad(lean_object*);
|
||||
lean_object* initialize_Init_Control_Alternative(lean_object*);
|
||||
lean_object* initialize_Init_Data_List_Basic(lean_object*);
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ lean_object* l_RBNode_find___main___at_Lean_NameMap_contains___spec__1___rarg___
|
|||
lean_object* l_Nat_repr(lean_object*);
|
||||
lean_object* l_Lean_Name_HasToString;
|
||||
lean_object* l_Lean_Name_eqStr___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Name_isSuffixOf___main___boxed(lean_object*, lean_object*);
|
||||
lean_object* lean_name_mk_string(lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Name_isAtomic(lean_object*);
|
||||
uint32_t lean_string_utf8_get(lean_object*, lean_object*);
|
||||
|
|
@ -102,12 +103,15 @@ lean_object* l_RBNode_find___main___at_Lean_NameMap_find___spec__1(lean_object*)
|
|||
lean_object* l_Lean_Name_getPrefix___boxed(lean_object*);
|
||||
lean_object* l_Lean_Name_append(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Name_components_x27___main(lean_object*);
|
||||
uint8_t l_Lean_Name_isSuffixOf(lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Name_isAnonymous(lean_object*);
|
||||
lean_object* l_RBNode_ins___main___at_Lean_NameSet_insert___spec__2(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_NameSet_Inhabited;
|
||||
lean_object* l_Lean_NameMap_find(lean_object*);
|
||||
lean_object* l_Lean_Name_replacePrefix___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_foldl___main___at_String_toName___spec__1(lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Name_isSuffixOf___main(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Name_isSuffixOf___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Name_getPrefix(lean_object*);
|
||||
lean_object* l_RBNode_setBlack___rarg(lean_object*);
|
||||
lean_object* l_Lean_Name_append___main___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -582,6 +586,109 @@ x_4 = lean_box(x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
uint8_t l_Lean_Name_isSuffixOf___main(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
switch (lean_obj_tag(x_1)) {
|
||||
case 0:
|
||||
{
|
||||
uint8_t x_3;
|
||||
x_3 = 1;
|
||||
return x_3;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
if (lean_obj_tag(x_2) == 1)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8;
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
x_5 = lean_ctor_get(x_1, 1);
|
||||
x_6 = lean_ctor_get(x_2, 0);
|
||||
x_7 = lean_ctor_get(x_2, 1);
|
||||
x_8 = lean_string_dec_eq(x_5, x_7);
|
||||
if (x_8 == 0)
|
||||
{
|
||||
uint8_t x_9;
|
||||
x_9 = 0;
|
||||
return x_9;
|
||||
}
|
||||
else
|
||||
{
|
||||
x_1 = x_4;
|
||||
x_2 = x_6;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_11;
|
||||
x_11 = 0;
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
if (lean_obj_tag(x_2) == 2)
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16;
|
||||
x_12 = lean_ctor_get(x_1, 0);
|
||||
x_13 = lean_ctor_get(x_1, 1);
|
||||
x_14 = lean_ctor_get(x_2, 0);
|
||||
x_15 = lean_ctor_get(x_2, 1);
|
||||
x_16 = lean_nat_dec_eq(x_13, x_15);
|
||||
if (x_16 == 0)
|
||||
{
|
||||
uint8_t x_17;
|
||||
x_17 = 0;
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
{
|
||||
x_1 = x_12;
|
||||
x_2 = x_14;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_19;
|
||||
x_19 = 0;
|
||||
return x_19;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Name_isSuffixOf___main___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_3; lean_object* x_4;
|
||||
x_3 = l_Lean_Name_isSuffixOf___main(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_4 = lean_box(x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
uint8_t l_Lean_Name_isSuffixOf(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_3;
|
||||
x_3 = l_Lean_Name_isSuffixOf___main(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Name_isSuffixOf___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_3; lean_object* x_4;
|
||||
x_3 = l_Lean_Name_isSuffixOf(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_4 = lean_box(x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
uint8_t l_Lean_Name_lt___main(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ lean_object* l_Lean_Elab_Tactic_getMCtx___rarg(lean_object*);
|
|||
extern lean_object* l_Lean_MessageData_ofList___closed__3;
|
||||
lean_object* lean_array_uget(lean_object*, size_t);
|
||||
lean_object* l_Lean_Elab_Term_assignExprMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_pruneSolvedGoals(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_registerBuiltinTacticAttr___lambda__1___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_evalIntro___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -59,6 +60,7 @@ extern uint8_t l___private_Init_Lean_Elab_Term_4__isCDot___closed__1;
|
|||
lean_object* l_Lean_Elab_Tactic_evalIntro___lambda__2___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalRefine___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_liftMetaM___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalCase___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_done(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_declareBuiltinTactic(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_filterAuxM___main___at_Lean_Elab_Tactic_pruneSolvedGoals___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -66,6 +68,7 @@ extern lean_object* l_Array_empty___closed__1;
|
|||
lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__5___boxed(lean_object*, lean_object*);
|
||||
lean_object* lean_environment_find(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_resettingSynthInstanceCacheWhen(lean_object*);
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalCase(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_monadQuotation___closed__1;
|
||||
lean_object* lean_dbg_trace(lean_object*, lean_object*);
|
||||
lean_object* lean_io_mk_ref(lean_object*, lean_object*);
|
||||
|
|
@ -83,6 +86,7 @@ lean_object* l_Lean_Elab_Tactic_resettingSynthInstanceCacheWhen___rarg___boxed(l
|
|||
lean_object* l_Lean_Elab_Tactic_evalIntro(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalSeq___closed__1;
|
||||
lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Tactic_evalTactic___main___spec__3(lean_object*, size_t, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalCase___closed__3;
|
||||
lean_object* l_Lean_Meta_assumption___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_push(lean_object*, lean_object*);
|
||||
lean_object* lean_array_get_size(lean_object*);
|
||||
|
|
@ -127,12 +131,17 @@ extern lean_object* l_Lean_Parser_Tactic_intro___elambda__1___closed__1;
|
|||
extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__1;
|
||||
lean_object* l_Lean_Meta_intro(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Meta_Exception_toMessageData___closed__45;
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__2;
|
||||
lean_object* l_Lean_Syntax_getTailWithInfo___main(lean_object*);
|
||||
lean_object* l_List_findM_x3f___main___at_Lean_Elab_Tactic_evalCase___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_isEqvAux___main___at_Lean_Elab_Tactic_withMVarContext___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_declareBuiltinTactic___closed__7;
|
||||
extern lean_object* l_Lean_Meta_dbgTrace___rarg___closed__1;
|
||||
lean_object* l_List_findM_x3f___main___at_Lean_Elab_Tactic_evalCase___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalCase___closed__4;
|
||||
lean_object* l_Lean_Elab_Tactic_evalTactic___main___closed__2;
|
||||
extern lean_object* l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_evalCase(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Tactic_evalTactic___main___spec__1___boxed(lean_object*, lean_object*);
|
||||
lean_object* lean_array_fget(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_declareBuiltinTactic___closed__5;
|
||||
|
|
@ -191,6 +200,7 @@ lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalSeq___closed__2;
|
|||
lean_object* l_Lean_Elab_Tactic_monadLog___lambda__2___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_throwUnsupportedSyntax___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_getMainGoal(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__3;
|
||||
extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__7;
|
||||
lean_object* l_Lean_Elab_Tactic_monadLog___closed__8;
|
||||
extern lean_object* l_Lean_Options_empty;
|
||||
|
|
@ -213,6 +223,7 @@ lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalIntro___closed__3;
|
|||
lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_declareBuiltinTactic___closed__6;
|
||||
lean_object* l_Lean_Elab_Term_reportUnsolvedGoals___closed__4;
|
||||
extern lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__1;
|
||||
extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3;
|
||||
lean_object* l_Lean_Elab_Tactic_liftMetaM(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalNestedTacticBlock(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -233,6 +244,7 @@ lean_object* l_Lean_Elab_Tactic_liftMetaTactic___lambda__1(lean_object*, lean_ob
|
|||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalAssumption(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_registerBuiltinTacticAttr___closed__3;
|
||||
lean_object* l_Lean_Elab_Tactic_registerBuiltinTacticAttr___lambda__1___closed__5;
|
||||
lean_object* l_List_erase___main___at_Lean_Elab_Tactic_evalCase___spec__2(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalExact___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_traceAtCmdPos___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalRefine___closed__1;
|
||||
|
|
@ -280,6 +292,7 @@ lean_object* l_Lean_Elab_Tactic_evalIntro___closed__1;
|
|||
lean_object* l_Lean_Elab_Tactic_evalRefine___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalAssumption(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_save(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalCase___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_monadLog___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_setGoals(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_addBuiltinTactic(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -287,6 +300,7 @@ lean_object* l_Lean_Elab_Term_elabTerm___boxed(lean_object*, lean_object*, lean_
|
|||
lean_object* l_Lean_Elab_Tactic_getOptions___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_declareBuiltinTactic___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_withMVarContext___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Name_isSuffixOf___main(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_logTrace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_io_ref_reset(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_withFreshMacroScope___rarg(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -300,6 +314,7 @@ lean_object* l_Lean_SMap_empty___at_Lean_Elab_Tactic_mkBuiltinTacticTable___spec
|
|||
lean_object* l_Lean_Elab_Tactic_addBuiltinTactic___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_ensureHasNoMVars(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_erase___main___at_Lean_Elab_Tactic_evalCase___spec__2___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_instantiateMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_EStateM_Backtrackable___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_elabTerm(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -12551,6 +12566,431 @@ x_5 = l_Lean_Elab_Tactic_addBuiltinTactic(x_2, x_3, x_4, x_1);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f___main___at_Lean_Elab_Tactic_evalCase___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_2) == 0)
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6;
|
||||
x_5 = lean_box(0);
|
||||
x_6 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_6, 0, x_5);
|
||||
lean_ctor_set(x_6, 1, x_4);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10;
|
||||
x_7 = lean_ctor_get(x_2, 0);
|
||||
x_8 = lean_ctor_get(x_2, 1);
|
||||
x_9 = l_Lean_Elab_Tactic_getMVarDecl(x_7, x_3, x_4);
|
||||
x_10 = !lean_is_exclusive(x_9);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14;
|
||||
x_11 = lean_ctor_get(x_9, 0);
|
||||
x_12 = lean_ctor_get(x_9, 1);
|
||||
x_13 = lean_ctor_get(x_11, 0);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_11);
|
||||
x_14 = l_Lean_Name_isSuffixOf___main(x_1, x_13);
|
||||
lean_dec(x_13);
|
||||
if (x_14 == 0)
|
||||
{
|
||||
lean_free_object(x_9);
|
||||
x_2 = x_8;
|
||||
x_4 = x_12;
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_16;
|
||||
lean_inc(x_7);
|
||||
x_16 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_16, 0, x_7);
|
||||
lean_ctor_set(x_9, 0, x_16);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20;
|
||||
x_17 = lean_ctor_get(x_9, 0);
|
||||
x_18 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_18);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_9);
|
||||
x_19 = lean_ctor_get(x_17, 0);
|
||||
lean_inc(x_19);
|
||||
lean_dec(x_17);
|
||||
x_20 = l_Lean_Name_isSuffixOf___main(x_1, x_19);
|
||||
lean_dec(x_19);
|
||||
if (x_20 == 0)
|
||||
{
|
||||
x_2 = x_8;
|
||||
x_4 = x_18;
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_22; lean_object* x_23;
|
||||
lean_inc(x_7);
|
||||
x_22 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_22, 0, x_7);
|
||||
x_23 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_23, 0, x_22);
|
||||
lean_ctor_set(x_23, 1, x_18);
|
||||
return x_23;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_List_erase___main___at_Lean_Elab_Tactic_evalCase___spec__2(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_3;
|
||||
x_3 = !lean_is_exclusive(x_1);
|
||||
if (x_3 == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; uint8_t x_6;
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
x_5 = lean_ctor_get(x_1, 1);
|
||||
x_6 = lean_name_eq(x_4, x_2);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = l_List_erase___main___at_Lean_Elab_Tactic_evalCase___spec__2(x_5, x_2);
|
||||
lean_ctor_set(x_1, 1, x_7);
|
||||
return x_1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_free_object(x_1);
|
||||
lean_dec(x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; uint8_t x_10;
|
||||
x_8 = lean_ctor_get(x_1, 0);
|
||||
x_9 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_1);
|
||||
x_10 = lean_name_eq(x_8, x_2);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12;
|
||||
x_11 = l_List_erase___main___at_Lean_Elab_Tactic_evalCase___spec__2(x_9, x_2);
|
||||
x_12 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_12, 0, x_8);
|
||||
lean_ctor_set(x_12, 1, x_11);
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_8);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Tactic_evalCase___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("tag not found");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Tactic_evalCase___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Tactic_evalCase___closed__1;
|
||||
x_2 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Tactic_evalCase___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_Tactic_evalCase___closed__2;
|
||||
x_2 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Tactic_evalCase___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_Tactic_registerBuiltinTacticAttr___lambda__1___closed__3;
|
||||
x_2 = l_Lean_Parser_Tactic_case___elambda__1___closed__1;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Tactic_evalCase(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_4; lean_object* x_45; uint8_t x_46;
|
||||
x_45 = l_Lean_Elab_Tactic_evalCase___closed__4;
|
||||
lean_inc(x_1);
|
||||
x_46 = l_Lean_Syntax_isOfKind(x_1, x_45);
|
||||
if (x_46 == 0)
|
||||
{
|
||||
uint8_t x_47;
|
||||
x_47 = 0;
|
||||
x_4 = x_47;
|
||||
goto block_44;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51;
|
||||
x_48 = l_Lean_Syntax_getArgs(x_1);
|
||||
x_49 = lean_array_get_size(x_48);
|
||||
lean_dec(x_48);
|
||||
x_50 = lean_unsigned_to_nat(3u);
|
||||
x_51 = lean_nat_dec_eq(x_49, x_50);
|
||||
lean_dec(x_49);
|
||||
x_4 = x_51;
|
||||
goto block_44;
|
||||
}
|
||||
block_44:
|
||||
{
|
||||
uint8_t x_5;
|
||||
x_5 = l_coeDecidableEq(x_4);
|
||||
if (x_5 == 0)
|
||||
{
|
||||
lean_object* x_6;
|
||||
lean_dec(x_1);
|
||||
x_6 = l_Lean_Elab_Tactic_throwUnsupportedSyntax___rarg(x_2, x_3);
|
||||
return x_6;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_7 = lean_unsigned_to_nat(1u);
|
||||
x_8 = l_Lean_Syntax_getArg(x_1, x_7);
|
||||
x_9 = lean_unsigned_to_nat(2u);
|
||||
x_10 = l_Lean_Syntax_getArg(x_1, x_9);
|
||||
x_11 = l_Lean_Syntax_getId(x_8);
|
||||
lean_dec(x_8);
|
||||
lean_inc(x_2);
|
||||
x_12 = l_Lean_Elab_Tactic_getUnsolvedGoals(x_2, x_3);
|
||||
if (lean_obj_tag(x_12) == 0)
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16;
|
||||
x_13 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_13);
|
||||
x_14 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_14);
|
||||
lean_dec(x_12);
|
||||
x_15 = l_List_findM_x3f___main___at_Lean_Elab_Tactic_evalCase___spec__1(x_11, x_13, x_2, x_14);
|
||||
lean_dec(x_11);
|
||||
x_16 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_16);
|
||||
if (lean_obj_tag(x_16) == 0)
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_10);
|
||||
x_17 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_15);
|
||||
x_18 = l_Lean_Elab_Tactic_evalCase___closed__3;
|
||||
x_19 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_18, x_2, x_17);
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
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;
|
||||
x_20 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_15);
|
||||
x_21 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_16);
|
||||
x_22 = l_List_erase___main___at_Lean_Elab_Tactic_evalCase___spec__2(x_13, x_21);
|
||||
x_23 = lean_box(0);
|
||||
x_24 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_24, 0, x_21);
|
||||
lean_ctor_set(x_24, 1, x_23);
|
||||
x_25 = l_Lean_Elab_Tactic_setGoals(x_24, x_2, x_20);
|
||||
x_26 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_25);
|
||||
lean_inc(x_2);
|
||||
x_27 = l_Lean_Elab_Tactic_evalTactic___main(x_10, x_2, x_26);
|
||||
if (lean_obj_tag(x_27) == 0)
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29;
|
||||
x_28 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_28);
|
||||
lean_dec(x_27);
|
||||
lean_inc(x_2);
|
||||
x_29 = l_Lean_Elab_Tactic_done(x_1, x_2, x_28);
|
||||
if (lean_obj_tag(x_29) == 0)
|
||||
{
|
||||
lean_object* x_30; lean_object* x_31;
|
||||
x_30 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_30);
|
||||
lean_dec(x_29);
|
||||
x_31 = l_Lean_Elab_Tactic_setGoals(x_22, x_2, x_30);
|
||||
lean_dec(x_2);
|
||||
return x_31;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_32;
|
||||
lean_dec(x_22);
|
||||
lean_dec(x_2);
|
||||
x_32 = !lean_is_exclusive(x_29);
|
||||
if (x_32 == 0)
|
||||
{
|
||||
return x_29;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_33 = lean_ctor_get(x_29, 0);
|
||||
x_34 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_34);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_29);
|
||||
x_35 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_33);
|
||||
lean_ctor_set(x_35, 1, x_34);
|
||||
return x_35;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_36;
|
||||
lean_dec(x_22);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_36 = !lean_is_exclusive(x_27);
|
||||
if (x_36 == 0)
|
||||
{
|
||||
return x_27;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_37 = lean_ctor_get(x_27, 0);
|
||||
x_38 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_37);
|
||||
lean_dec(x_27);
|
||||
x_39 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_37);
|
||||
lean_ctor_set(x_39, 1, x_38);
|
||||
return x_39;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_40;
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_40 = !lean_is_exclusive(x_12);
|
||||
if (x_40 == 0)
|
||||
{
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_41 = lean_ctor_get(x_12, 0);
|
||||
x_42 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_42);
|
||||
lean_inc(x_41);
|
||||
lean_dec(x_12);
|
||||
x_43 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_41);
|
||||
lean_ctor_set(x_43, 1, x_42);
|
||||
return x_43;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_List_findM_x3f___main___at_Lean_Elab_Tactic_evalCase___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_List_findM_x3f___main___at_Lean_Elab_Tactic_evalCase___spec__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_List_erase___main___at_Lean_Elab_Tactic_evalCase___spec__2___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l_List_erase___main___at_Lean_Elab_Tactic_evalCase___spec__2(x_1, x_2);
|
||||
lean_dec(x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("evalCase");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Elab_Tactic_declareBuiltinTactic___closed__3;
|
||||
x_2 = l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__1;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalCase), 3, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalCase(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_2 = l_Lean_Elab_Tactic_evalCase___closed__4;
|
||||
x_3 = l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__2;
|
||||
x_4 = l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__3;
|
||||
x_5 = l_Lean_Elab_Tactic_addBuiltinTactic(x_2, x_3, x_4, x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l___private_Init_Lean_Elab_Tactic_Basic_2__regTraceClasses___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -12872,6 +13312,23 @@ lean_mark_persistent(l___regBuiltinTactic_Lean_Elab_Tactic_evalNestedTacticBlock
|
|||
res = l___regBuiltinTactic_Lean_Elab_Tactic_evalNestedTacticBlockCurly(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Tactic_evalCase___closed__1 = _init_l_Lean_Elab_Tactic_evalCase___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_evalCase___closed__1);
|
||||
l_Lean_Elab_Tactic_evalCase___closed__2 = _init_l_Lean_Elab_Tactic_evalCase___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_evalCase___closed__2);
|
||||
l_Lean_Elab_Tactic_evalCase___closed__3 = _init_l_Lean_Elab_Tactic_evalCase___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_evalCase___closed__3);
|
||||
l_Lean_Elab_Tactic_evalCase___closed__4 = _init_l_Lean_Elab_Tactic_evalCase___closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_Tactic_evalCase___closed__4);
|
||||
l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__1 = _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__1();
|
||||
lean_mark_persistent(l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__1);
|
||||
l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__2 = _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__2();
|
||||
lean_mark_persistent(l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__2);
|
||||
l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__3 = _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__3();
|
||||
lean_mark_persistent(l___regBuiltinTactic_Lean_Elab_Tactic_evalCase___closed__3);
|
||||
res = l___regBuiltinTactic_Lean_Elab_Tactic_evalCase(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l___private_Init_Lean_Elab_Tactic_Basic_2__regTraceClasses___closed__1 = _init_l___private_Init_Lean_Elab_Tactic_Basic_2__regTraceClasses___closed__1();
|
||||
lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Basic_2__regTraceClasses___closed__1);
|
||||
res = l___private_Init_Lean_Elab_Tactic_Basic_2__regTraceClasses(lean_io_mk_world());
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Parser_registerBuiltinDynamicParserAttribute(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_regBuiltinTacticParserAttr(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_Tactic_paren___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_underscoreFn___rarg___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__9;
|
||||
lean_object* l_Lean_Parser_Tactic_refine___closed__5;
|
||||
|
|
@ -139,6 +140,7 @@ lean_object* l_Lean_Parser_nodeInfo(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Parser_Tactic_seq___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_apply___closed__3;
|
||||
extern lean_object* l_Lean_Parser_Level_paren___elambda__1___closed__7;
|
||||
lean_object* lean_nat_sub(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_noFirstTokenInfo(lean_object*);
|
||||
|
|
@ -177,15 +179,18 @@ lean_object* l_Lean_Parser_Tactic_apply___elambda__1___closed__7;
|
|||
extern lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_seq___elambda__1___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_exact___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_paren___closed__5;
|
||||
extern lean_object* l_Lean_Parser_Level_paren___elambda__1___closed__11;
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_exact___elambda__1___closed__8;
|
||||
lean_object* l_Lean_Parser_Tactic_ident_x27;
|
||||
lean_object* l_Lean_Parser_Tactic_exact___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_exact___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_paren___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_intro___elambda__1___closed__8;
|
||||
lean_object* l_Lean_Parser_Tactic_intro___closed__7;
|
||||
lean_object* l_Lean_Parser_Tactic_exact___elambda__1___closed__5;
|
||||
extern lean_object* l_Lean_Parser_Term_explicitBinder___closed__1;
|
||||
lean_object* l_Lean_Parser_registerBuiltinParserAttribute(lean_object*, lean_object*, uint8_t, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_tacticBlock___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock;
|
||||
|
|
@ -193,6 +198,7 @@ extern lean_object* l_Lean_Parser_Term_explicitUniv___closed__4;
|
|||
lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_apply___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_refine___elambda__1___closed__7;
|
||||
lean_object* l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_refine___closed__6;
|
||||
lean_object* l_Lean_Parser_Term_tacticBlock___closed__2;
|
||||
lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1___closed__2;
|
||||
|
|
@ -203,8 +209,11 @@ lean_object* l_Lean_Parser_Tactic_apply;
|
|||
lean_object* l_Lean_Parser_Tactic_assumption___closed__5;
|
||||
lean_object* l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(lean_object*);
|
||||
lean_object* l_Lean_Parser_ParserState_restore(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_paren___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1___closed__7;
|
||||
lean_object* l_Lean_Parser_Tactic_paren___closed__2;
|
||||
lean_object* l_Lean_Parser_ParserState_popSyntax(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_paren___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__1;
|
||||
extern lean_object* l_Lean_Parser_Level_paren___closed__4;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Term_tacticStxQuot___closed__1;
|
||||
|
|
@ -226,10 +235,12 @@ extern lean_object* l_Lean_Parser_regBuiltinTermParserAttr___closed__4;
|
|||
lean_object* l_Lean_Parser_Tactic_underscoreFn(uint8_t, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_case___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_refine___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_paren___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_refine___closed__2;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Tactic_exact(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_assumption___elambda__1___closed__1;
|
||||
extern lean_object* l_Lean_Parser_Level_paren___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_case___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_underscoreFn___rarg___closed__3;
|
||||
lean_object* l_Lean_Parser_mergeOrElseErrors(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -239,6 +250,7 @@ lean_object* l_Lean_Parser_Tactic_exact;
|
|||
lean_object* l_Lean_Parser_Tactic_intro___elambda__1___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_case___closed__1;
|
||||
lean_object* l_Lean_Parser_regTacticParserAttribute(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_paren___closed__6;
|
||||
lean_object* l_Lean_Parser_symbolInfo(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_underscoreFn___rarg___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_apply___elambda__1___closed__6;
|
||||
|
|
@ -264,6 +276,7 @@ lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly___closed__5;
|
|||
lean_object* l_Lean_Parser_Tactic_case___closed__7;
|
||||
lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_exact___closed__4;
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Tactic_paren(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_exact___elambda__1___closed__2;
|
||||
lean_object* l_String_trim(lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Level_paren___elambda__1___closed__8;
|
||||
|
|
@ -273,6 +286,7 @@ extern lean_object* l_Lean_Parser_Term_typeAscription___closed__2;
|
|||
lean_object* l_Lean_Parser_Term_tacticStxQuot___elambda__1___closed__6;
|
||||
lean_object* l_Lean_Parser_Tactic_seq___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_apply___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_paren___elambda__1___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_apply___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Parser_Tactic_seq___closed__1;
|
||||
lean_object* l_Lean_Parser_Term_tacticBlock___closed__6;
|
||||
|
|
@ -287,6 +301,7 @@ lean_object* l_Lean_Parser_Tactic_assumption___elambda__1___closed__7;
|
|||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___closed__3;
|
||||
lean_object* l_Lean_Parser_Tactic_intro___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_exact___elambda__1___closed__3;
|
||||
extern lean_object* l_Lean_Parser_Level_paren___elambda__1___closed__14;
|
||||
lean_object* l_Lean_Parser_Tactic_intro___closed__3;
|
||||
lean_object* l_Lean_Parser_regBuiltinTacticParserAttr___closed__4;
|
||||
lean_object* l_Lean_Parser_Tactic_intros___elambda__1___closed__2;
|
||||
|
|
@ -308,6 +323,7 @@ lean_object* l_Lean_Parser_Tactic_refine___elambda__1___closed__2;
|
|||
lean_object* l___regBuiltinParser_Lean_Parser_Tactic_orelse(lean_object*);
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlockCurly___elambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Parser_Term_tacticBlock___closed__5;
|
||||
lean_object* l_Lean_Parser_Tactic_paren;
|
||||
lean_object* l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Parser_Tactic_intro;
|
||||
lean_object* l_Lean_Parser_tacticParser___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -2973,6 +2989,346 @@ x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1);
|
|||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren___elambda__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_seq___elambda__1___closed__2;
|
||||
x_2 = l_Lean_Parser_Level_paren___elambda__1___closed__3;
|
||||
x_3 = lean_name_mk_string(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren___elambda__1___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
x_2 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren___elambda__1___closed__3() {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5;
|
||||
x_1 = 0;
|
||||
x_2 = l_Lean_Parser_Level_paren___elambda__1___closed__3;
|
||||
x_3 = l_Lean_Parser_Tactic_paren___elambda__1___closed__2;
|
||||
x_4 = 1;
|
||||
x_5 = l_Lean_Parser_mkAntiquot(x_1, x_2, x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Parser_Tactic_paren___elambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_4 = l_Lean_Parser_Tactic_paren___elambda__1___closed__3;
|
||||
x_5 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_5);
|
||||
x_6 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_6);
|
||||
x_7 = lean_array_get_size(x_6);
|
||||
lean_dec(x_6);
|
||||
x_8 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_1);
|
||||
x_9 = lean_apply_3(x_5, x_1, x_2, x_3);
|
||||
x_10 = lean_ctor_get(x_9, 3);
|
||||
lean_inc(x_10);
|
||||
if (lean_obj_tag(x_10) == 0)
|
||||
{
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_9;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12; uint8_t x_13;
|
||||
x_11 = lean_ctor_get(x_10, 0);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_10);
|
||||
x_12 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_12);
|
||||
x_13 = lean_nat_dec_eq(x_12, x_8);
|
||||
lean_dec(x_12);
|
||||
if (x_13 == 0)
|
||||
{
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_9;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_54; lean_object* x_55;
|
||||
lean_inc(x_8);
|
||||
x_14 = l_Lean_Parser_ParserState_restore(x_9, x_7, x_8);
|
||||
lean_dec(x_7);
|
||||
x_15 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_15);
|
||||
x_16 = lean_array_get_size(x_15);
|
||||
lean_dec(x_15);
|
||||
lean_inc(x_2);
|
||||
x_54 = l_Lean_Parser_tokenFn(x_2, x_14);
|
||||
x_55 = lean_ctor_get(x_54, 3);
|
||||
lean_inc(x_55);
|
||||
if (lean_obj_tag(x_55) == 0)
|
||||
{
|
||||
lean_object* x_56; lean_object* x_57;
|
||||
x_56 = lean_ctor_get(x_54, 0);
|
||||
lean_inc(x_56);
|
||||
x_57 = l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(x_56);
|
||||
lean_dec(x_56);
|
||||
if (lean_obj_tag(x_57) == 2)
|
||||
{
|
||||
lean_object* x_58; lean_object* x_59; uint8_t x_60;
|
||||
x_58 = lean_ctor_get(x_57, 1);
|
||||
lean_inc(x_58);
|
||||
lean_dec(x_57);
|
||||
x_59 = l_Lean_Parser_Level_paren___elambda__1___closed__7;
|
||||
x_60 = lean_string_dec_eq(x_58, x_59);
|
||||
lean_dec(x_58);
|
||||
if (x_60 == 0)
|
||||
{
|
||||
lean_object* x_61; lean_object* x_62;
|
||||
x_61 = l_Lean_Parser_Level_paren___elambda__1___closed__14;
|
||||
lean_inc(x_8);
|
||||
x_62 = l_Lean_Parser_ParserState_mkErrorsAt(x_54, x_61, x_8);
|
||||
x_17 = x_62;
|
||||
goto block_53;
|
||||
}
|
||||
else
|
||||
{
|
||||
x_17 = x_54;
|
||||
goto block_53;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_63; lean_object* x_64;
|
||||
lean_dec(x_57);
|
||||
x_63 = l_Lean_Parser_Level_paren___elambda__1___closed__14;
|
||||
lean_inc(x_8);
|
||||
x_64 = l_Lean_Parser_ParserState_mkErrorsAt(x_54, x_63, x_8);
|
||||
x_17 = x_64;
|
||||
goto block_53;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_65; lean_object* x_66;
|
||||
lean_dec(x_55);
|
||||
x_65 = l_Lean_Parser_Level_paren___elambda__1___closed__14;
|
||||
lean_inc(x_8);
|
||||
x_66 = l_Lean_Parser_ParserState_mkErrorsAt(x_54, x_65, x_8);
|
||||
x_17 = x_66;
|
||||
goto block_53;
|
||||
}
|
||||
block_53:
|
||||
{
|
||||
lean_object* x_18;
|
||||
x_18 = lean_ctor_get(x_17, 3);
|
||||
lean_inc(x_18);
|
||||
if (lean_obj_tag(x_18) == 0)
|
||||
{
|
||||
lean_object* x_19; lean_object* x_20;
|
||||
lean_inc(x_2);
|
||||
x_19 = l_Lean_Parser_Tactic_seq___elambda__1(x_1, x_2, x_17);
|
||||
x_20 = lean_ctor_get(x_19, 3);
|
||||
lean_inc(x_20);
|
||||
if (lean_obj_tag(x_20) == 0)
|
||||
{
|
||||
lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
x_21 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_21);
|
||||
x_22 = l_Lean_Parser_tokenFn(x_2, x_19);
|
||||
x_23 = lean_ctor_get(x_22, 3);
|
||||
lean_inc(x_23);
|
||||
if (lean_obj_tag(x_23) == 0)
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25;
|
||||
x_24 = lean_ctor_get(x_22, 0);
|
||||
lean_inc(x_24);
|
||||
x_25 = l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(x_24);
|
||||
lean_dec(x_24);
|
||||
if (lean_obj_tag(x_25) == 2)
|
||||
{
|
||||
lean_object* x_26; lean_object* x_27; uint8_t x_28;
|
||||
x_26 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_25);
|
||||
x_27 = l_Lean_Parser_Level_paren___elambda__1___closed__8;
|
||||
x_28 = lean_string_dec_eq(x_26, x_27);
|
||||
lean_dec(x_26);
|
||||
if (x_28 == 0)
|
||||
{
|
||||
lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
x_29 = l_Lean_Parser_Level_paren___elambda__1___closed__11;
|
||||
x_30 = l_Lean_Parser_ParserState_mkErrorsAt(x_22, x_29, x_21);
|
||||
x_31 = l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
x_32 = l_Lean_Parser_ParserState_mkNode(x_30, x_31, x_16);
|
||||
x_33 = l_Lean_Parser_mergeOrElseErrors(x_32, x_11, x_8);
|
||||
lean_dec(x_8);
|
||||
return x_33;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36;
|
||||
lean_dec(x_21);
|
||||
x_34 = l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
x_35 = l_Lean_Parser_ParserState_mkNode(x_22, x_34, x_16);
|
||||
x_36 = l_Lean_Parser_mergeOrElseErrors(x_35, x_11, x_8);
|
||||
lean_dec(x_8);
|
||||
return x_36;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
lean_dec(x_25);
|
||||
x_37 = l_Lean_Parser_Level_paren___elambda__1___closed__11;
|
||||
x_38 = l_Lean_Parser_ParserState_mkErrorsAt(x_22, x_37, x_21);
|
||||
x_39 = l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
x_40 = l_Lean_Parser_ParserState_mkNode(x_38, x_39, x_16);
|
||||
x_41 = l_Lean_Parser_mergeOrElseErrors(x_40, x_11, x_8);
|
||||
lean_dec(x_8);
|
||||
return x_41;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46;
|
||||
lean_dec(x_23);
|
||||
x_42 = l_Lean_Parser_Level_paren___elambda__1___closed__11;
|
||||
x_43 = l_Lean_Parser_ParserState_mkErrorsAt(x_22, x_42, x_21);
|
||||
x_44 = l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
x_45 = l_Lean_Parser_ParserState_mkNode(x_43, x_44, x_16);
|
||||
x_46 = l_Lean_Parser_mergeOrElseErrors(x_45, x_11, x_8);
|
||||
lean_dec(x_8);
|
||||
return x_46;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_47; lean_object* x_48; lean_object* x_49;
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_2);
|
||||
x_47 = l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
x_48 = l_Lean_Parser_ParserState_mkNode(x_19, x_47, x_16);
|
||||
x_49 = l_Lean_Parser_mergeOrElseErrors(x_48, x_11, x_8);
|
||||
lean_dec(x_8);
|
||||
return x_49;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_50; lean_object* x_51; lean_object* x_52;
|
||||
lean_dec(x_18);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_50 = l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
x_51 = l_Lean_Parser_ParserState_mkNode(x_17, x_50, x_16);
|
||||
x_52 = l_Lean_Parser_mergeOrElseErrors(x_51, x_11, x_8);
|
||||
lean_dec(x_8);
|
||||
return x_52;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_seq;
|
||||
x_2 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_2);
|
||||
x_3 = l_Lean_Parser_Level_paren___closed__4;
|
||||
x_4 = l_Lean_Parser_andthenInfo(x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Term_explicitBinder___closed__1;
|
||||
x_2 = l_Lean_Parser_Tactic_paren___closed__1;
|
||||
x_3 = l_Lean_Parser_andthenInfo(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
x_2 = l_Lean_Parser_Tactic_paren___closed__2;
|
||||
x_3 = l_Lean_Parser_nodeInfo(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_paren___elambda__1___closed__3;
|
||||
x_2 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_2);
|
||||
x_3 = l_Lean_Parser_Tactic_paren___closed__3;
|
||||
x_4 = l_Lean_Parser_orelseInfo(x_2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic_paren___elambda__1), 3, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_paren___closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_paren___closed__5;
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_paren() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Parser_Tactic_paren___closed__6;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l___regBuiltinParser_Lean_Parser_Tactic_paren(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_2 = 0;
|
||||
x_3 = l_Lean_Parser_regBuiltinTacticParserAttr___closed__4;
|
||||
x_4 = l_Lean_Parser_Tactic_paren___elambda__1___closed__1;
|
||||
x_5 = l_Lean_Parser_Tactic_paren;
|
||||
x_6 = l_Lean_Parser_addBuiltinParser(x_2, x_3, x_4, x_5, x_1);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -5049,6 +5405,29 @@ lean_mark_persistent(l_Lean_Parser_Tactic_case);
|
|||
res = l___regBuiltinParser_Lean_Parser_Tactic_case(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Parser_Tactic_paren___elambda__1___closed__1 = _init_l_Lean_Parser_Tactic_paren___elambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren___elambda__1___closed__1);
|
||||
l_Lean_Parser_Tactic_paren___elambda__1___closed__2 = _init_l_Lean_Parser_Tactic_paren___elambda__1___closed__2();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren___elambda__1___closed__2);
|
||||
l_Lean_Parser_Tactic_paren___elambda__1___closed__3 = _init_l_Lean_Parser_Tactic_paren___elambda__1___closed__3();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren___elambda__1___closed__3);
|
||||
l_Lean_Parser_Tactic_paren___closed__1 = _init_l_Lean_Parser_Tactic_paren___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren___closed__1);
|
||||
l_Lean_Parser_Tactic_paren___closed__2 = _init_l_Lean_Parser_Tactic_paren___closed__2();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren___closed__2);
|
||||
l_Lean_Parser_Tactic_paren___closed__3 = _init_l_Lean_Parser_Tactic_paren___closed__3();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren___closed__3);
|
||||
l_Lean_Parser_Tactic_paren___closed__4 = _init_l_Lean_Parser_Tactic_paren___closed__4();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren___closed__4);
|
||||
l_Lean_Parser_Tactic_paren___closed__5 = _init_l_Lean_Parser_Tactic_paren___closed__5();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren___closed__5);
|
||||
l_Lean_Parser_Tactic_paren___closed__6 = _init_l_Lean_Parser_Tactic_paren___closed__6();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren___closed__6);
|
||||
l_Lean_Parser_Tactic_paren = _init_l_Lean_Parser_Tactic_paren();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_paren);
|
||||
res = l___regBuiltinParser_Lean_Parser_Tactic_paren(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__1 = _init_l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__1);
|
||||
l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__2 = _init_l_Lean_Parser_Tactic_nestedTacticBlock___elambda__1___closed__2();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue