diff --git a/stage0/src/Lean/Elab/BuiltinTerm.lean b/stage0/src/Lean/Elab/BuiltinTerm.lean index 6157a9ecfc..624f571eb4 100644 --- a/stage0/src/Lean/Elab/BuiltinTerm.lean +++ b/stage0/src/Lean/Elab/BuiltinTerm.lean @@ -95,6 +95,47 @@ private def elabOptLevel (stx : Syntax) : TermElabM Level := else throwError "synthetic hole has already been defined with an incompatible local context" +@[builtinTermElab «letMVar»] def elabLetMVar : TermElab := fun stx expectedType? => do + match stx with + | `(let_mvar% ? $n := $e; $b) => + match (← getMCtx).findUserName? n.getId with + | some _ => throwError "invalid 'let_mvar%', metavariable '?{n.getId}' has already been used" + | none => + let e ← elabTerm e none + let mvar ← mkFreshExprMVar (← inferType e) MetavarKind.syntheticOpaque n.getId + assignExprMVar mvar.mvarId! e + elabTerm b expectedType? + | _ => throwUnsupportedSyntax + +private def getMVarFromUserName (ident : Syntax) : MetaM Expr := do + match (← getMCtx).findUserName? ident.getId with + | none => throwError "unknown metavariable '?{ident.getId}'" + | some mvarId => instantiateMVars (mkMVar mvarId) + + +@[builtinTermElab «waitIfTypeMVar»] def elabWaitIfTypeMVar : TermElab := fun stx expectedType? => do + match stx with + | `(wait_if_type_mvar% ? $n; $b) => + tryPostponeIfMVar (← inferType (← getMVarFromUserName n)) + elabTerm b expectedType? + | _ => throwUnsupportedSyntax + +@[builtinTermElab «waitIfTypeContainsMVar»] def elabWaitIfTypeContainsMVar : TermElab := fun stx expectedType? => do + match stx with + | `(wait_if_type_contains_mvar% ? $n; $b) => + if (← instantiateMVars (← inferType (← getMVarFromUserName n))).hasExprMVar then + tryPostpone + elabTerm b expectedType? + | _ => throwUnsupportedSyntax + +@[builtinTermElab «waitIfContainsMVar»] def elabWaitIfContainsMVar : TermElab := fun stx expectedType? => do + match stx with + | `(wait_if_contains_mvar% ? $n; $b) => + if (← getMVarFromUserName n).hasExprMVar then + tryPostpone + elabTerm b expectedType? + | _ => throwUnsupportedSyntax + private def mkTacticMVar (type : Expr) (tacticCode : Syntax) : TermElabM Expr := do let mvar ← mkFreshExprMVar type MetavarKind.syntheticOpaque let mvarId := mvar.mvarId! diff --git a/stage0/src/Lean/Meta/Tactic/Util.lean b/stage0/src/Lean/Meta/Tactic/Util.lean index 78bb8cbcf4..006b9c5f62 100644 --- a/stage0/src/Lean/Meta/Tactic/Util.lean +++ b/stage0/src/Lean/Meta/Tactic/Util.lean @@ -16,7 +16,7 @@ def getMVarTag (mvarId : MVarId) : MetaM Name := return (← getMVarDecl mvarId).userName def setMVarTag (mvarId : MVarId) (tag : Name) : MetaM Unit := do - modify fun s => { s with mctx := s.mctx.setMVarUserName mvarId tag } + modify fun s => { s with mctx := s.mctx.renameMVar mvarId tag } def appendTag (tag : Name) (suffix : Name) : Name := tag.modifyBase (. ++ suffix.eraseMacroScopes) diff --git a/stage0/src/Lean/MetavarContext.lean b/stage0/src/Lean/MetavarContext.lean index 2f7ecc85c0..3860b2970a 100644 --- a/stage0/src/Lean/MetavarContext.lean +++ b/stage0/src/Lean/MetavarContext.lean @@ -278,6 +278,7 @@ structure MetavarContext where mvarCounter : Nat := 0 -- Counter for setting the field `index` at `MetavarDecl` lDepth : PersistentHashMap MVarId Nat := {} decls : PersistentHashMap MVarId MetavarDecl := {} + userNames : PersistentHashMap Name MVarId := {} lAssignment : PersistentHashMap MVarId Level := {} eAssignment : PersistentHashMap MVarId Expr := {} dAssignment : PersistentHashMap MVarId DelayedMetavarAssignment := {} @@ -320,7 +321,8 @@ def addExprMVarDecl (mctx : MetavarContext) localInstances type kind - numScopeArgs } } + numScopeArgs } + userNames := if userName.isAnonymous then mctx.userNames else mctx.userNames.insert userName mvarId } def addExprMVarDeclExp (mctx : MetavarContext) (mvarId : MVarId) (userName : Name) (lctx : LocalContext) (localInstances : LocalInstances) (type : Expr) (kind : MetavarKind) : MetavarContext := @@ -341,19 +343,19 @@ def getDecl (mctx : MetavarContext) (mvarId : MVarId) : MetavarDecl := | none => panic! "unknown metavariable" def findUserName? (mctx : MetavarContext) (userName : Name) : Option MVarId := - let search : Except MVarId Unit := mctx.decls.forM fun mvarId decl => - if decl.userName == userName then throw mvarId else pure () - match search with - | Except.ok _ => none - | Except.error mvarId => some mvarId + mctx.userNames.find? userName def setMVarKind (mctx : MetavarContext) (mvarId : MVarId) (kind : MetavarKind) : MetavarContext := let decl := mctx.getDecl mvarId { mctx with decls := mctx.decls.insert mvarId { decl with kind := kind } } -def setMVarUserName (mctx : MetavarContext) (mvarId : MVarId) (userName : Name) : MetavarContext := +def renameMVar (mctx : MetavarContext) (mvarId : MVarId) (userName : Name) : MetavarContext := let decl := mctx.getDecl mvarId - { mctx with decls := mctx.decls.insert mvarId { decl with userName := userName } } + { mctx with + decls := mctx.decls.insert mvarId { decl with userName := userName } + userNames := + let userNames := mctx.userNames.erase decl.userName + if userName.isAnonymous then userNames else userNames.insert userName mvarId } /- Update the type of the given metavariable. This function assumes the new type is definitionally equal to the current one -/ @@ -374,11 +376,6 @@ def isAnonymousMVar (mctx : MetavarContext) (mvarId : MVarId) : Bool := | none => false | some mvarDecl => mvarDecl.userName.isAnonymous -def renameMVar (mctx : MetavarContext) (mvarId : MVarId) (newUserName : Name) : MetavarContext := - match mctx.findDecl? mvarId with - | none => panic! "unknown metavariable" - | some mvarDecl => { mctx with decls := mctx.decls.insert mvarId { mvarDecl with userName := newUserName } } - def assignLevel (m : MetavarContext) (mvarId : MVarId) (val : Level) : MetavarContext := { m with lAssignment := m.lAssignment.insert mvarId val } diff --git a/stage0/stdlib/Lean/Compiler/ExternAttr.c b/stage0/stdlib/Lean/Compiler/ExternAttr.c index 8076673e84..0db31f539e 100644 --- a/stage0/stdlib/Lean/Compiler/ExternAttr.c +++ b/stage0/stdlib/Lean/Compiler/ExternAttr.c @@ -150,6 +150,7 @@ uint8_t l_Lean_Name_quickCmp(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_registerParametricAttribute___at_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_353____spec__1___lambda__4___boxed(lean_object*); static lean_object* l_Lean_externAttr___closed__6; lean_object* l_Std_RBNode_insert___at_Lean_NameMap_insert___spec__1___rarg(lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_getExternConstArity___closed__22; lean_object* l_Nat_repr(lean_object*); static lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_initFn____x40_Lean_Compiler_ExternAttr___hyg_353____spec__5___lambda__2___closed__1; lean_object* lean_st_mk_ref(lean_object*, lean_object*); @@ -4346,42 +4347,36 @@ static lean_object* _init_l_Lean_getExternConstArity___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(0u); -x_2 = l_Lean_getExternConstArity___closed__10; -x_3 = lean_alloc_ctor(0, 7, 0); +x_1 = l_Lean_getExternConstArity___closed__3; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); +lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_getExternConstArity___closed__12() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_getExternConstArity___closed__3; -x_2 = lean_unsigned_to_nat(0u); -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* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_getExternConstArity___closed__10; +x_3 = l_Lean_getExternConstArity___closed__11; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_getExternConstArity___closed__13() { _start: { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); -return x_1; -} -} -static lean_object* _init_l_Lean_getExternConstArity___closed__14() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_getExternConstArity___closed__3; x_2 = lean_unsigned_to_nat(0u); @@ -4391,6 +4386,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } +static lean_object* _init_l_Lean_getExternConstArity___closed__14() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); +return x_1; +} +} static lean_object* _init_l_Lean_getExternConstArity___closed__15() { _start: { @@ -4406,6 +4409,18 @@ return x_3; static lean_object* _init_l_Lean_getExternConstArity___closed__16() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_getExternConstArity___closed__3; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_getExternConstArity___closed__17() { +_start: +{ lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Expr_instBEqExpr; x_2 = lean_alloc_closure((void*)(l_instBEqProd___rarg), 4, 2); @@ -4414,7 +4429,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_getExternConstArity___closed__17() { +static lean_object* _init_l_Lean_getExternConstArity___closed__18() { _start: { lean_object* x_1; lean_object* x_2; @@ -4425,7 +4440,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_getExternConstArity___closed__18() { +static lean_object* _init_l_Lean_getExternConstArity___closed__19() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -4437,14 +4452,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_getExternConstArity___closed__19() { +static lean_object* _init_l_Lean_getExternConstArity___closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_getExternConstArity___closed__12; -x_2 = l_Lean_getExternConstArity___closed__14; -x_3 = l_Lean_getExternConstArity___closed__15; -x_4 = l_Lean_getExternConstArity___closed__18; +x_1 = l_Lean_getExternConstArity___closed__13; +x_2 = l_Lean_getExternConstArity___closed__15; +x_3 = l_Lean_getExternConstArity___closed__16; +x_4 = l_Lean_getExternConstArity___closed__19; x_5 = lean_alloc_ctor(0, 7, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -4456,13 +4471,13 @@ lean_ctor_set(x_5, 6, x_4); return x_5; } } -static lean_object* _init_l_Lean_getExternConstArity___closed__20() { +static lean_object* _init_l_Lean_getExternConstArity___closed__21() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); -x_2 = l_Lean_getExternConstArity___closed__11; -x_3 = l_Lean_getExternConstArity___closed__19; +x_2 = l_Lean_getExternConstArity___closed__12; +x_3 = l_Lean_getExternConstArity___closed__20; x_4 = l_Lean_getExternConstArity___closed__7; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_2); @@ -4472,7 +4487,7 @@ lean_ctor_set(x_5, 3, x_4); return x_5; } } -static lean_object* _init_l_Lean_getExternConstArity___closed__21() { +static lean_object* _init_l_Lean_getExternConstArity___closed__22() { _start: { lean_object* x_1; @@ -4537,14 +4552,14 @@ x_20 = lean_st_ref_get(x_3, x_18); x_21 = lean_ctor_get(x_20, 1); lean_inc(x_21); lean_dec(x_20); -x_22 = l_Lean_getExternConstArity___closed__20; +x_22 = l_Lean_getExternConstArity___closed__21; x_23 = lean_st_mk_ref(x_22, x_21); x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); x_25 = lean_ctor_get(x_23, 1); lean_inc(x_25); lean_dec(x_23); -x_26 = l_Lean_getExternConstArity___closed__21; +x_26 = l_Lean_getExternConstArity___closed__22; x_27 = l_Lean_getExternConstArity___closed__9; lean_inc(x_3); lean_inc(x_24); @@ -4693,14 +4708,14 @@ x_55 = lean_st_ref_get(x_3, x_53); x_56 = lean_ctor_get(x_55, 1); lean_inc(x_56); lean_dec(x_55); -x_57 = l_Lean_getExternConstArity___closed__20; +x_57 = l_Lean_getExternConstArity___closed__21; x_58 = lean_st_mk_ref(x_57, x_56); x_59 = lean_ctor_get(x_58, 0); lean_inc(x_59); x_60 = lean_ctor_get(x_58, 1); lean_inc(x_60); lean_dec(x_58); -x_61 = l_Lean_getExternConstArity___closed__21; +x_61 = l_Lean_getExternConstArity___closed__22; x_62 = l_Lean_getExternConstArity___closed__9; lean_inc(x_3); lean_inc(x_59); @@ -4881,14 +4896,14 @@ x_98 = lean_st_ref_get(x_3, x_96); x_99 = lean_ctor_get(x_98, 1); lean_inc(x_99); lean_dec(x_98); -x_100 = l_Lean_getExternConstArity___closed__20; +x_100 = l_Lean_getExternConstArity___closed__21; x_101 = lean_st_mk_ref(x_100, x_99); x_102 = lean_ctor_get(x_101, 0); lean_inc(x_102); x_103 = lean_ctor_get(x_101, 1); lean_inc(x_103); lean_dec(x_101); -x_104 = l_Lean_getExternConstArity___closed__21; +x_104 = l_Lean_getExternConstArity___closed__22; x_105 = l_Lean_getExternConstArity___closed__9; lean_inc(x_3); lean_inc(x_102); @@ -5542,6 +5557,8 @@ l_Lean_getExternConstArity___closed__20 = _init_l_Lean_getExternConstArity___clo lean_mark_persistent(l_Lean_getExternConstArity___closed__20); l_Lean_getExternConstArity___closed__21 = _init_l_Lean_getExternConstArity___closed__21(); lean_mark_persistent(l_Lean_getExternConstArity___closed__21); +l_Lean_getExternConstArity___closed__22 = _init_l_Lean_getExternConstArity___closed__22(); +lean_mark_persistent(l_Lean_getExternConstArity___closed__22); l_Lean_getExternConstArityExport___closed__1 = _init_l_Lean_getExternConstArityExport___closed__1(); lean_mark_persistent(l_Lean_getExternConstArityExport___closed__1); l_Lean_getExternConstArityExport___closed__2 = _init_l_Lean_getExternConstArityExport___closed__2(); diff --git a/stage0/stdlib/Lean/CoreM.c b/stage0/stdlib/Lean/CoreM.c index c293067643..ac10edc752 100644 --- a/stage0/stdlib/Lean/CoreM.c +++ b/stage0/stdlib/Lean/CoreM.c @@ -1293,18 +1293,20 @@ return x_3; static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__1; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_Core_instInhabitedState___closed__4; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Core_instAddMessageContextCoreM___spec__1___closed__3() { diff --git a/stage0/stdlib/Lean/Elab/BuiltinTerm.c b/stage0/stdlib/Lean/Elab/BuiltinTerm.c index 97cf0aa72c..bc99ac171b 100644 --- a/stage0/stdlib/Lean/Elab/BuiltinTerm.c +++ b/stage0/stdlib/Lean/Elab/BuiltinTerm.c @@ -21,31 +21,39 @@ static lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Term_elabDoubleQuot LEAN_EXPORT lean_object* l___private_Lean_Elab_Open_0__Lean_Elab_OpenDecl_elabOpenHiding___at_Lean_Elab_Term_elabOpen___spec__15(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_elabStrLit___closed__1; LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabTypeOf___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureTypeOf___closed__2; LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabScientificLit(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeStx___closed__1; LEAN_EXPORT lean_object* l_Lean_Elab_throwIllFormedSyntax___at_Lean_Elab_Term_elabStrLit___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Elab_Term_elabLetMVar___closed__5; LEAN_EXPORT lean_object* l___private_Lean_Elab_Open_0__Lean_Elab_OpenDecl_addOpenDecl___at_Lean_Elab_Term_elabOpen___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_resolveNamespace___at_Lean_Elab_Term_elabOpen___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); static lean_object* l_Lean_Elab_Term_elabScientificLit___closed__2; lean_object* l_Lean_Expr_mvarId_x21(lean_object*); +static lean_object* l_Lean_Elab_Term_elabLetMVar___closed__3; static lean_object* l___regBuiltin_Lean_Elab_Term_elabBadCDot___closed__2; lean_object* lean_erase_macro_scopes(lean_object*); +static lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__2; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__16___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*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__26___boxed(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___regBuiltin_Lean_Elab_Term_elabProp___closed__14; +LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_stringToMessageData(lean_object*); LEAN_EXPORT lean_object* l_Lean_resolveGlobalConstCore___at_Lean_Elab_Term_elabDoubleQuotedName___spec__6___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__1; LEAN_EXPORT lean_object* l_Lean_Elab_resolveGlobalConstNoOverloadWithInfo___at_Lean_Elab_Term_elabDoubleQuotedName___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabSort___closed__2; lean_object* l_Lean_mkSort(lean_object*); +static lean_object* l_Lean_Elab_Term_elabLetMVar___closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_elabProp___closed__5; static lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureTypeOf___closed__4; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__21___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___regBuiltin_Lean_Elab_Term_elabProp___closed__3; lean_object* lean_name_mk_string(lean_object*, lean_object*); +static lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__3; lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_Elab_pushInfoLeaf___at_Lean_Elab_Term_addDotCompletionInfo___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_error_to_string(lean_object*); @@ -53,6 +61,7 @@ static lean_object* l_Lean_Elab_OpenDecl_elabOpenDecl___at_Lean_Elab_Term_elabOp static lean_object* l___regBuiltin_Lean_Elab_Term_elabStrLit___closed__4; LEAN_EXPORT lean_object* l___private_Lean_Elab_Open_0__Lean_Elab_OpenDecl_elabOpenScoped___at_Lean_Elab_Term_elabOpen___spec__19(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mapTRAux___at_Lean_resolveGlobalConstCore___spec__2(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabCharLit___closed__3; static lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Term_elabDoubleQuotedName___spec__2___closed__1; lean_object* l_Lean_Elab_Term_getDeclName_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -61,8 +70,10 @@ LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabRawNatLit(lean_object LEAN_EXPORT lean_object* l___private_Lean_Elab_Open_0__Lean_Elab_OpenDecl_elabOpenSimple___at_Lean_Elab_Term_elabOpen___spec__23___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3___closed__2; LEAN_EXPORT lean_object* l_Lean_activateScoped___at_Lean_Elab_Term_elabOpen___spec__20___boxed(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_elabLetMVar___closed__1; static lean_object* l___regBuiltin_Lean_Elab_Term_elabQuotedName___closed__1; lean_object* l_List_filterMap___at_Lean_resolveGlobalConst___spec__1(lean_object*); +static lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__4; static lean_object* l___regBuiltin_Lean_Elab_Term_elabCharLit___closed__5; static lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureTypeOf___closed__1; LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabNumLit___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -88,10 +99,12 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabRawNatLit___closed__4; static lean_object* l___regBuiltin_Lean_Elab_Term_elabScientificLit___closed__1; LEAN_EXPORT lean_object* l_Lean_activateScoped___at_Lean_Elab_Term_elabOpen___spec__20(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_elabQuotedName___closed__2; +static lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1; uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_Elab_Term_mkAuxName___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabProp___closed__7; LEAN_EXPORT lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_elabOpen___spec__10(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_elabWaitIfTypeMVar___closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureTypeOf___closed__5; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__24(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getMVarDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -101,12 +114,14 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabDoubleQuotedName___closed_ LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabProp(lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_mkConstWithLevelParams___at_Lean_Elab_Term_elabDoubleQuotedName___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2; LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBadCDot___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_resolveGlobalConstCore___at_Lean_Elab_Term_elabDoubleQuotedName___spec__6___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___regBuiltin_Lean_Elab_Term_elabCharLit___closed__4; static lean_object* l___regBuiltin_Lean_Elab_Term_elabDoubleQuotedName___closed__1; static lean_object* l___regBuiltin_Lean_Elab_Term_elabByTactic___closed__4; static lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureExpectedType___closed__5; +static lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__3; static lean_object* l___regBuiltin_Lean_Elab_Term_elabStrLit___closed__5; LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabOpen___spec__11___boxed(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_elabTypeStx___closed__2; @@ -114,11 +129,11 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabRawNatLit___closed__1; LEAN_EXPORT lean_object* l_Lean_resolveGlobalConstCore___at_Lean_Elab_Term_elabDoubleQuotedName___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabSort___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabTypeOf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__4; LEAN_EXPORT lean_object* l_Lean_popScope___at_Lean_Elab_Term_elabOpen___spec__25___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabSort___closed__3; LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabByTactic(lean_object*); static lean_object* l_Lean_Elab_Term_elabProp___rarg___closed__1; +static lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1; static lean_object* l___regBuiltin_Lean_Elab_Term_elabStrLit___closed__3; LEAN_EXPORT lean_object* l___private_Lean_Elab_Open_0__Lean_Elab_OpenDecl_elabOpenSimple___at_Lean_Elab_Term_elabOpen___spec__23(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeStx(lean_object*); @@ -139,14 +154,17 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabStrLit___boxed(lean_object*, lean_ static lean_object* l___regBuiltin_Lean_Elab_Term_elabRawNatLit___closed__5; LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabCompletion(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__18___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*); +LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabNoImplicitLambda___closed__2; LEAN_EXPORT lean_object* l___private_Lean_Elab_Open_0__Lean_Elab_OpenDecl_addOpenDecl___at_Lean_Elab_Term_elabOpen___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__22(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabBadCDot___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabCompletion___closed__3; static lean_object* l___regBuiltin_Lean_Elab_Term_elabHole___closed__3; +static lean_object* l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__1; extern lean_object* l_Lean_maxRecDepth; static lean_object* l___regBuiltin_Lean_Elab_Term_elabHole___closed__5; +static lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__3; extern lean_object* l_Lean_LocalContext_empty; lean_object* l_Lean_ScopedEnvExtension_popScope___rarg(lean_object*, lean_object*); lean_object* l_List_mapTRAux___at_Lean_resolveGlobalConstNoOverload___spec__1(lean_object*, lean_object*); @@ -158,6 +176,8 @@ LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabOpen___spec__ LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabHole(lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_Open_0__Lean_Elab_OpenDecl_elabOpenRenaming___at_Lean_Elab_Term_elabOpen___spec__4(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_elabTypeStx___closed__5; +LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___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* l_Lean_ConstantInfo_levelParams(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabProp___closed__4; lean_object* l_Lean_ResolveName_resolveNamespace_x3f(lean_object*, lean_object*, lean_object*, lean_object*); @@ -203,6 +223,7 @@ lean_object* l_Lean_Name_toString(lean_object*, uint8_t); LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureExpectedType(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabDoubleQuotedName___closed__5; LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabPipeCompletion(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Expr_hasExprMVar(lean_object*); lean_object* l_Lean_replaceRef(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_resolveGlobalConstCore___at_Lean_Elab_Term_elabOpen___spec__9___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabNoImplicitLambda___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -226,6 +247,7 @@ static lean_object* l_Lean_Elab_OpenDecl_elabOpenDecl___at_Lean_Elab_Term_elabOp LEAN_EXPORT lean_object* l_Lean_Elab_OpenDecl_resolveId___at_Lean_Elab_Term_elabOpen___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_mk_ref(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabCharLit(lean_object*); +static lean_object* l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_elabScientificLit___closed__2; lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageContextTermElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -239,14 +261,18 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabProp___boxed(lean_object*, lean_ob lean_object* l_Lean_MetavarContext_assignExpr(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Term_elabScientificLit___closed__11; uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); +static lean_object* l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2; static lean_object* l_Lean_Elab_Term_elabCharLit___closed__2; lean_object* lean_expr_dbg_to_string(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__18(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_mkFreshTypeMVarFor___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabLetMVar(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabProp___closed__2; static lean_object* l_Lean_Elab_OpenDecl_elabOpenDecl___at_Lean_Elab_Term_elabOpen___spec__3___closed__3; +static lean_object* l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2; LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabProp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_elabSetOption_setOption___at_Lean_Elab_Term_elabSetOption___spec__3___lambda__1(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_elabWaitIfTypeContainsMVar___closed__1; LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_mkFreshTypeMVarFor___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabProp___closed__11; static lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeOf___closed__3; @@ -278,6 +304,7 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabNumLit___closed__4; static lean_object* l___regBuiltin_Lean_Elab_Term_elabSetOption___closed__4; static lean_object* l___regBuiltin_Lean_Elab_Term_elabSort___closed__4; LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_mkFreshTypeMVarFor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar(lean_object*); LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabOpen(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabCharLit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_termElabAttribute; @@ -287,9 +314,13 @@ LEAN_EXPORT lean_object* l_Lean_resolveNamespace___at_Lean_Elab_Term_elabOpen___ static lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Term_elabDoubleQuotedName___spec__2___closed__2; LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureTypeOf(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabEnsureTypeOf___boxed(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_elabWaitIfContainsMVar___closed__1; +LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterAux___at_Lean_resolveGlobalConstCore___spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabOpen___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabHole(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_elabCharLit___closed__1; static lean_object* l___regBuiltin_Lean_Elab_Term_elabHole___closed__4; @@ -298,12 +329,14 @@ LEAN_EXPORT lean_object* l_Lean_Elab_OpenDecl_elabOpenDecl___at_Lean_Elab_Term_e lean_object* l_Lean_Syntax_getSepArgs(lean_object*); static lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__1; LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabStrLit(lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabWaitIfTypeMVar(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_elabNumLit___closed__1; static lean_object* l_Lean_Elab_elabSetOption___at_Lean_Elab_Term_elabSetOption___spec__1___closed__1; lean_object* l_Lean_mkLevelSucc(lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabDoubleQuotedName___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureExpectedType___closed__2; LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabScientificLit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwError___at_Lean_Meta_abstractRange___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabQuotedName___closed__5; lean_object* l_Lean_Elab_Term_addDotCompletionInfo(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_elabScientificLit___closed__4; @@ -325,6 +358,7 @@ lean_object* l_Lean_Syntax_getKind(lean_object*); static lean_object* l_Lean_Elab_Term_elabScientificLit___closed__8; static lean_object* l___regBuiltin_Lean_Elab_Term_elabSort___closed__1; static lean_object* l___regBuiltin_Lean_Elab_Term_elabQuotedName___closed__3; +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabWaitIfTypeContainsMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkApp5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_elabOpen___spec__10___boxed(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_elabProp___closed__8; @@ -351,6 +385,7 @@ static lean_object* l_Lean_Elab_Term_elabSyntheticHole___closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_elabHole___closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_elabCompletion___closed__5; LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__21(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_tryPostponeIfMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabPipeCompletion(lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabQuotedName(lean_object*); @@ -363,6 +398,7 @@ static lean_object* l_Lean_Elab_Term_elabPipeCompletion___lambda__1___closed__1; static lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureExpectedType___closed__1; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabOpen___spec__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_withLCtx___at_Lean_Elab_Term_elabSyntheticHole___spec__1(lean_object*); +static lean_object* l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__3; uint8_t l_Lean_Syntax_isNone(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabQuotedName___closed__4; lean_object* lean_infer_type(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -370,6 +406,7 @@ lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, l lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_mkFreshExprMVarImpl(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabPipeCompletion___closed__3; static lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3___closed__3; +static lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__3; lean_object* l_Lean_Syntax_isNameLit_x3f(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_OpenDecl_elabOpenDecl___at_Lean_Elab_Term_elabOpen___spec__3___lambda__1(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_elabNumLit___closed__2; @@ -381,6 +418,7 @@ lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_objec static lean_object* l_Lean_Elab_Term_elabScientificLit___closed__5; static lean_object* l_Lean_Elab_Term_elabPipeCompletion___lambda__1___closed__2; LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabSetOption(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); static lean_object* l_Lean_Elab_Term_elabByTactic___closed__3; static lean_object* l_Lean_Elab_Term_elabNumLit___lambda__1___closed__2; static lean_object* l_Lean_Elab_OpenDecl_elabOpenDecl___at_Lean_Elab_Term_elabOpen___spec__3___closed__7; @@ -392,18 +430,23 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabSyntheticHole(lean_object*, lean_o static lean_object* l_Lean_Elab_throwIllFormedSyntax___at_Lean_Elab_Term_elabStrLit___spec__1___closed__1; static lean_object* l_Lean_Elab_elabSetOption_setOption___at_Lean_Elab_Term_elabSetOption___spec__3___closed__1; LEAN_EXPORT lean_object* l_Lean_resolveGlobalConstCore___at_Lean_Elab_Term_elabOpen___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__3; +extern lean_object* l_Lean_Elab_unsupportedSyntaxExceptionId; static lean_object* l_Lean_Elab_Term_elabByTactic___closed__1; lean_object* l_Lean_Elab_Term_registerMVarErrorImplicitArgInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshTypeMVar(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_tryPostpone(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_throwIllFormedSyntax___at_Lean_Elab_Term_elabStrLit___spec__1___closed__2; +static lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabEnsureExpectedType___closed__3; LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabRawNatLit(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_elabLetMVar___closed__4; +static lean_object* l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1; lean_object* l_Lean_mkStrLit(lean_object*); lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withLocalContextImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabOpen___closed__3; static lean_object* l___regBuiltin_Lean_Elab_Term_elabCompletion___closed__4; +static lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2; extern lean_object* l_Lean_scopedEnvExtensionsRef; uint8_t l_List_isEmpty___rarg(lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -411,6 +454,8 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabCharLit___closed__2; LEAN_EXPORT lean_object* l_Lean_resolveGlobalConstCore___at_Lean_Elab_Term_elabOpen___spec__9___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_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Term_elabSetOption___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabDoubleQuotedName___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabLetMVar(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_elabLetMVar___closed__6; static lean_object* l___regBuiltin_Lean_Elab_Term_elabProp___closed__6; static lean_object* l___regBuiltin_Lean_Elab_Term_elabSyntheticHole___closed__2; lean_object* l_List_toString___at_Lean_resolveGlobalConstNoOverloadCore___spec__2(lean_object*); @@ -419,6 +464,7 @@ static lean_object* l___regBuiltin_Lean_Elab_Term_elabNoImplicitLambda___closed_ lean_object* l_Lean_mkAppB(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_findUserName_x3f(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabCompletion(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabWaitIfContainsMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_indentExpr(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabStrLit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Elab_Term_elabOpen___spec__14(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -429,6 +475,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabSetOption___boxed(lean_object*, le lean_object* l_Lean_mkConst(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabSetOption(lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabScientificLit___closed__3; +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___lambda__1(lean_object*, 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_elabTypeStx___closed__4; lean_object* lean_uint32_to_nat(uint32_t); static lean_object* l___regBuiltin_Lean_Elab_Term_elabSyntheticHole___closed__1; @@ -450,7 +497,9 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabRawNatLit___boxed(lean_object*, le lean_object* l_Lean_mkApp3(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeOf___closed__2; static lean_object* l___regBuiltin_Lean_Elab_Term_elabNoImplicitLambda___closed__1; +static lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg___closed__1; static lean_object* l_Lean_Elab_Term_elabSyntheticHole___closed__7; +static lean_object* l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2; lean_object* l_List_mapTRAux___at_Lean_resolveGlobalConstNoOverloadCore___spec__1(lean_object*, lean_object*, lean_object*); static lean_object* l___regBuiltin_Lean_Elab_Term_elabSetOption___closed__5; static lean_object* l_Lean_Elab_Term_elabBadCDot___rarg___closed__2; @@ -2426,6 +2475,1136 @@ 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_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_unsupportedSyntaxExceptionId; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg___closed__1; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = lean_alloc_closure((void*)(l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg), 1, 0); +return x_7; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabLetMVar___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("letMVar"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabLetMVar___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltin_Lean_Elab_Term_elabProp___closed__6; +x_2 = l_Lean_Elab_Term_elabLetMVar___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabLetMVar___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid 'let_mvar%', metavariable '?"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabLetMVar___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Term_elabLetMVar___closed__3; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabLetMVar___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("' has already been used"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabLetMVar___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Term_elabLetMVar___closed__5; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabLetMVar(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; uint8_t x_11; +x_10 = l_Lean_Elab_Term_elabLetMVar___closed__2; +lean_inc(x_1); +x_11 = l_Lean_Syntax_isOfKind(x_1, x_10); +if (x_11 == 0) +{ +lean_object* x_12; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_12 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg(x_9); +return x_12; +} +else +{ +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; +x_13 = lean_unsigned_to_nat(2u); +x_14 = l_Lean_Syntax_getArg(x_1, x_13); +x_15 = lean_unsigned_to_nat(4u); +x_16 = l_Lean_Syntax_getArg(x_1, x_15); +x_17 = lean_unsigned_to_nat(6u); +x_18 = l_Lean_Syntax_getArg(x_1, x_17); +lean_dec(x_1); +x_19 = lean_st_ref_get(x_8, x_9); +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +lean_dec(x_19); +x_21 = lean_st_ref_get(x_6, 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 = lean_ctor_get(x_22, 0); +lean_inc(x_24); +lean_dec(x_22); +x_25 = l_Lean_Syntax_getId(x_14); +lean_dec(x_14); +lean_inc(x_25); +x_26 = l_Lean_MetavarContext_findUserName_x3f(x_24, x_25); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; uint8_t x_28; lean_object* x_29; +x_27 = lean_box(0); +x_28 = 1; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_29 = l_Lean_Elab_Term_elabTerm(x_16, x_27, x_28, x_28, x_3, x_4, x_5, x_6, x_7, x_8, x_23); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +lean_dec(x_29); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_30); +x_32 = lean_infer_type(x_30, x_5, x_6, x_7, x_8, x_31); +if (lean_obj_tag(x_32) == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t 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; +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_32, 1); +lean_inc(x_34); +lean_dec(x_32); +x_35 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_35, 0, x_33); +x_36 = 2; +lean_inc(x_5); +x_37 = l___private_Lean_Meta_Basic_0__Lean_Meta_mkFreshExprMVarImpl(x_35, x_36, x_25, x_5, x_6, x_7, x_8, x_34); +x_38 = lean_ctor_get(x_37, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_37, 1); +lean_inc(x_39); +lean_dec(x_37); +x_40 = l_Lean_Expr_mvarId_x21(x_38); +lean_dec(x_38); +x_41 = l_Lean_Meta_assignExprMVar(x_40, x_30, x_5, x_6, x_7, x_8, x_39); +x_42 = lean_ctor_get(x_41, 1); +lean_inc(x_42); +lean_dec(x_41); +x_43 = l_Lean_Elab_Term_elabTerm(x_18, x_2, x_28, x_28, x_3, x_4, x_5, x_6, x_7, x_8, x_42); +return x_43; +} +else +{ +uint8_t x_44; +lean_dec(x_30); +lean_dec(x_25); +lean_dec(x_18); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_44 = !lean_is_exclusive(x_32); +if (x_44 == 0) +{ +return x_32; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_32, 0); +x_46 = lean_ctor_get(x_32, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_32); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +} +else +{ +uint8_t x_48; +lean_dec(x_25); +lean_dec(x_18); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_48 = !lean_is_exclusive(x_29); +if (x_48 == 0) +{ +return x_29; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_29, 0); +x_50 = lean_ctor_get(x_29, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_29); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; +} +} +} +else +{ +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_dec(x_26); +lean_dec(x_18); +lean_dec(x_16); +lean_dec(x_2); +x_52 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_52, 0, x_25); +x_53 = l_Lean_Elab_Term_elabLetMVar___closed__4; +x_54 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_52); +x_55 = l_Lean_Elab_Term_elabLetMVar___closed__6; +x_56 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +x_57 = l_Lean_throwError___at_Lean_Elab_Term_synthesizeInst___spec__1(x_56, x_3, x_4, x_5, x_6, x_7, x_8, x_23); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +return x_57; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_7; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elabLetMVar"); +return x_1; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltin_Lean_Elab_Term_elabProp___closed__11; +x_2 = l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetMVar), 9, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabLetMVar(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_Lean_Elab_Term_elabLetMVar___closed__2; +x_4 = l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__2; +x_5 = l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__3; +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___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unknown metavariable '?"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__1; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +static lean_object* _init_l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("'"); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__3; +x_2 = l_Lean_stringToMessageData(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; 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_7 = lean_st_ref_get(x_5, x_6); +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +lean_dec(x_7); +x_9 = lean_st_ref_get(x_3, x_8); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_ctor_get(x_10, 0); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_Syntax_getId(x_1); +lean_inc(x_13); +x_14 = l_Lean_MetavarContext_findUserName_x3f(x_12, x_13); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_15 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_15, 0, x_13); +x_16 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__2; +x_17 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_15); +x_18 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__4; +x_19 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +x_20 = l_Lean_throwError___at_Lean_Meta_abstractRange___spec__1(x_19, x_2, x_3, x_4, x_5, x_11); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_20; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_dec(x_13); +x_21 = lean_ctor_get(x_14, 0); +lean_inc(x_21); +lean_dec(x_14); +x_22 = l_Lean_mkMVar(x_21); +x_23 = l_Lean_Meta_instantiateMVars(x_22, x_2, x_3, x_4, x_5, x_11); +return x_23; +} +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_1); +return x_7; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("waitIfTypeMVar"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltin_Lean_Elab_Term_elabProp___closed__6; +x_2 = l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabWaitIfTypeMVar(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; uint8_t x_11; +x_10 = l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2; +lean_inc(x_1); +x_11 = l_Lean_Syntax_isOfKind(x_1, x_10); +if (x_11 == 0) +{ +lean_object* x_12; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_12 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg(x_9); +return x_12; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_13 = lean_unsigned_to_nat(2u); +x_14 = l_Lean_Syntax_getArg(x_1, x_13); +x_15 = lean_unsigned_to_nat(4u); +x_16 = l_Lean_Syntax_getArg(x_1, x_15); +lean_dec(x_1); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_17 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName(x_14, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_14); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_20 = lean_infer_type(x_18, x_5, x_6, x_7, x_8, x_19); +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_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_3); +x_23 = l_Lean_Elab_Term_tryPostponeIfMVar(x_21, x_3, x_4, x_5, x_6, x_7, x_8, x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; uint8_t x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_dec(x_23); +x_25 = 1; +x_26 = l_Lean_Elab_Term_elabTerm(x_16, x_2, x_25, x_25, x_3, x_4, x_5, x_6, x_7, x_8, x_24); +return x_26; +} +else +{ +uint8_t x_27; +lean_dec(x_16); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_27 = !lean_is_exclusive(x_23); +if (x_27 == 0) +{ +return x_23; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_23, 0); +x_29 = lean_ctor_get(x_23, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_23); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +else +{ +uint8_t x_31; +lean_dec(x_16); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_31 = !lean_is_exclusive(x_20); +if (x_31 == 0) +{ +return x_20; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_20, 0); +x_33 = lean_ctor_get(x_20, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_20); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; +} +} +} +else +{ +uint8_t x_35; +lean_dec(x_16); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_35 = !lean_is_exclusive(x_17); +if (x_35 == 0) +{ +return x_17; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_17, 0); +x_37 = lean_ctor_get(x_17, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_17); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +} +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elabWaitIfTypeMVar"); +return x_1; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltin_Lean_Elab_Term_elabProp___closed__11; +x_2 = l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabWaitIfTypeMVar), 9, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar(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_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2; +x_4 = l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2; +x_5 = l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__3; +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_elabWaitIfTypeContainsMVar___lambda__1(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, lean_object* x_10) { +_start: +{ +uint8_t x_11; lean_object* x_12; +x_11 = 1; +x_12 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_11, x_11, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +return x_12; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("waitIfTypeContainsMVar"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltin_Lean_Elab_Term_elabProp___closed__6; +x_2 = l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabWaitIfTypeContainsMVar(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; uint8_t x_11; +x_10 = l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2; +lean_inc(x_1); +x_11 = l_Lean_Syntax_isOfKind(x_1, x_10); +if (x_11 == 0) +{ +lean_object* x_12; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_12 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg(x_9); +return x_12; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_13 = lean_unsigned_to_nat(2u); +x_14 = l_Lean_Syntax_getArg(x_1, x_13); +x_15 = lean_unsigned_to_nat(4u); +x_16 = l_Lean_Syntax_getArg(x_1, x_15); +lean_dec(x_1); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_17 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName(x_14, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_14); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_20 = lean_infer_type(x_18, x_5, x_6, x_7, x_8, x_19); +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_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_23 = l_Lean_Meta_instantiateMVars(x_21, x_5, x_6, x_7, x_8, x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; uint8_t x_26; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = l_Lean_Expr_hasExprMVar(x_24); +lean_dec(x_24); +if (x_26 == 0) +{ +uint8_t x_27; lean_object* x_28; +x_27 = 1; +x_28 = l_Lean_Elab_Term_elabTerm(x_16, x_2, x_27, x_27, x_3, x_4, x_5, x_6, x_7, x_8, x_25); +return x_28; +} +else +{ +lean_object* x_29; +lean_inc(x_3); +x_29 = l_Lean_Elab_Term_tryPostpone(x_3, x_4, x_5, x_6, x_7, x_8, x_25); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; uint8_t x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +lean_dec(x_29); +x_31 = 1; +x_32 = l_Lean_Elab_Term_elabTerm(x_16, x_2, x_31, x_31, x_3, x_4, x_5, x_6, x_7, x_8, x_30); +return x_32; +} +else +{ +uint8_t x_33; +lean_dec(x_16); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_33 = !lean_is_exclusive(x_29); +if (x_33 == 0) +{ +return x_29; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_29, 0); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_29); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +} +} +else +{ +uint8_t x_37; +lean_dec(x_16); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_37 = !lean_is_exclusive(x_23); +if (x_37 == 0) +{ +return x_23; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_23, 0); +x_39 = lean_ctor_get(x_23, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_23); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +} +else +{ +uint8_t x_41; +lean_dec(x_16); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_41 = !lean_is_exclusive(x_20); +if (x_41 == 0) +{ +return x_20; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_20, 0); +x_43 = lean_ctor_get(x_20, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_20); +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +return x_44; +} +} +} +else +{ +uint8_t x_45; +lean_dec(x_16); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_45 = !lean_is_exclusive(x_17); +if (x_45 == 0) +{ +return x_17; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_17, 0); +x_47 = lean_ctor_get(x_17, 1); +lean_inc(x_47); +lean_inc(x_46); +lean_dec(x_17); +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_46); +lean_ctor_set(x_48, 1, x_47); +return x_48; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___lambda__1___boxed(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, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_3); +return x_11; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elabWaitIfTypeContainsMVar"); +return x_1; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltin_Lean_Elab_Term_elabProp___closed__11; +x_2 = l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabWaitIfTypeContainsMVar), 9, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar(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_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2; +x_4 = l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2; +x_5 = l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__3; +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_elabWaitIfContainsMVar___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("waitIfContainsMVar"); +return x_1; +} +} +static lean_object* _init_l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltin_Lean_Elab_Term_elabProp___closed__6; +x_2 = l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabWaitIfContainsMVar(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; uint8_t x_11; +x_10 = l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2; +lean_inc(x_1); +x_11 = l_Lean_Syntax_isOfKind(x_1, x_10); +if (x_11 == 0) +{ +lean_object* x_12; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_12 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg(x_9); +return x_12; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_13 = lean_unsigned_to_nat(2u); +x_14 = l_Lean_Syntax_getArg(x_1, x_13); +x_15 = lean_unsigned_to_nat(4u); +x_16 = l_Lean_Syntax_getArg(x_1, x_15); +lean_dec(x_1); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_17 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName(x_14, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_14); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; uint8_t x_20; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +x_20 = l_Lean_Expr_hasExprMVar(x_18); +lean_dec(x_18); +if (x_20 == 0) +{ +uint8_t x_21; lean_object* x_22; +x_21 = 1; +x_22 = l_Lean_Elab_Term_elabTerm(x_16, x_2, x_21, x_21, x_3, x_4, x_5, x_6, x_7, x_8, x_19); +return x_22; +} +else +{ +lean_object* x_23; +lean_inc(x_3); +x_23 = l_Lean_Elab_Term_tryPostpone(x_3, x_4, x_5, x_6, x_7, x_8, x_19); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; uint8_t x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_dec(x_23); +x_25 = 1; +x_26 = l_Lean_Elab_Term_elabTerm(x_16, x_2, x_25, x_25, x_3, x_4, x_5, x_6, x_7, x_8, x_24); +return x_26; +} +else +{ +uint8_t x_27; +lean_dec(x_16); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_27 = !lean_is_exclusive(x_23); +if (x_27 == 0) +{ +return x_23; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_23, 0); +x_29 = lean_ctor_get(x_23, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_23); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +} +else +{ +uint8_t x_31; +lean_dec(x_16); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_31 = !lean_is_exclusive(x_17); +if (x_31 == 0) +{ +return x_17; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_17, 0); +x_33 = lean_ctor_get(x_17, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_17); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; +} +} +} +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elabWaitIfContainsMVar"); +return x_1; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___regBuiltin_Lean_Elab_Term_elabProp___closed__11; +x_2 = l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabWaitIfContainsMVar), 9, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar(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_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2; +x_4 = l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2; +x_5 = l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__3; +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___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_mkTacticMVar(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: { @@ -4404,23 +5583,6 @@ x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("'"); -return x_1; -} -} -static lean_object* _init_l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__3; -x_2 = l_Lean_stringToMessageData(x_1); -return x_2; -} -} LEAN_EXPORT lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7(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) { _start: { @@ -4433,7 +5595,7 @@ x_12 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___sp x_13 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_11); -x_14 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__4; +x_14 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__4; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_14); @@ -6073,7 +7235,7 @@ x_29 = l_Lean_Name_toString(x_1, x_28); x_30 = l_Lean_resolveNamespace___at_Lean_Elab_Term_elabOpen___spec__5___closed__1; x_31 = lean_string_append(x_30, x_29); lean_dec(x_29); -x_32 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__3; +x_32 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__3; x_33 = lean_string_append(x_31, x_32); x_34 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_34, 0, x_33); @@ -6116,7 +7278,7 @@ x_43 = l_Lean_Name_toString(x_1, x_42); x_44 = l_Lean_resolveNamespace___at_Lean_Elab_Term_elabOpen___spec__5___closed__1; x_45 = lean_string_append(x_44, x_43); lean_dec(x_43); -x_46 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__3; +x_46 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__3; x_47 = lean_string_append(x_45, x_46); x_48 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_48, 0, x_47); @@ -6252,7 +7414,7 @@ x_13 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___sp x_14 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); -x_15 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__4; +x_15 = l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__4; x_16 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); @@ -10060,6 +11222,76 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabSyntheticHole___closed__5 res = l___regBuiltin_Lean_Elab_Term_elabSyntheticHole(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg___closed__1 = _init_l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg___closed__1(); +lean_mark_persistent(l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_elabLetMVar___spec__1___rarg___closed__1); +l_Lean_Elab_Term_elabLetMVar___closed__1 = _init_l_Lean_Elab_Term_elabLetMVar___closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_elabLetMVar___closed__1); +l_Lean_Elab_Term_elabLetMVar___closed__2 = _init_l_Lean_Elab_Term_elabLetMVar___closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_elabLetMVar___closed__2); +l_Lean_Elab_Term_elabLetMVar___closed__3 = _init_l_Lean_Elab_Term_elabLetMVar___closed__3(); +lean_mark_persistent(l_Lean_Elab_Term_elabLetMVar___closed__3); +l_Lean_Elab_Term_elabLetMVar___closed__4 = _init_l_Lean_Elab_Term_elabLetMVar___closed__4(); +lean_mark_persistent(l_Lean_Elab_Term_elabLetMVar___closed__4); +l_Lean_Elab_Term_elabLetMVar___closed__5 = _init_l_Lean_Elab_Term_elabLetMVar___closed__5(); +lean_mark_persistent(l_Lean_Elab_Term_elabLetMVar___closed__5); +l_Lean_Elab_Term_elabLetMVar___closed__6 = _init_l_Lean_Elab_Term_elabLetMVar___closed__6(); +lean_mark_persistent(l_Lean_Elab_Term_elabLetMVar___closed__6); +l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__1(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__1); +l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__2 = _init_l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__2(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__2); +l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__3 = _init_l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__3(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabLetMVar___closed__3); +res = l___regBuiltin_Lean_Elab_Term_elabLetMVar(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__1 = _init_l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__1); +l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__2 = _init_l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__2); +l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__3 = _init_l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__3(); +lean_mark_persistent(l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__3); +l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__4 = _init_l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__4(); +lean_mark_persistent(l___private_Lean_Elab_BuiltinTerm_0__Lean_Elab_Term_getMVarFromUserName___closed__4); +l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1 = _init_l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1); +l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2 = _init_l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2); +l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__1); +l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2 = _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__2); +l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__3 = _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__3(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar___closed__3); +res = l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeMVar(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1 = _init_l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1); +l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2 = _init_l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2); +l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__1); +l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2 = _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__2); +l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__3 = _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__3(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar___closed__3); +res = l___regBuiltin_Lean_Elab_Term_elabWaitIfTypeContainsMVar(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1 = _init_l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1); +l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2 = _init_l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2); +l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__1); +l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2 = _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__2); +l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__3 = _init_l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__3(); +lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar___closed__3); +res = l___regBuiltin_Lean_Elab_Term_elabWaitIfContainsMVar(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_Elab_Term_elabByTactic___closed__1 = _init_l_Lean_Elab_Term_elabByTactic___closed__1(); lean_mark_persistent(l_Lean_Elab_Term_elabByTactic___closed__1); l_Lean_Elab_Term_elabByTactic___closed__2 = _init_l_Lean_Elab_Term_elabByTactic___closed__2(); @@ -10235,10 +11467,6 @@ l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7__ lean_mark_persistent(l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__1); l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__2 = _init_l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__2(); lean_mark_persistent(l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__2); -l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__3 = _init_l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__3(); -lean_mark_persistent(l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__3); -l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__4 = _init_l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__4(); -lean_mark_persistent(l_Lean_throwUnknownConstant___at_Lean_Elab_Term_elabDoubleQuotedName___spec__7___closed__4); l_Lean_resolveGlobalConst___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3___closed__1 = _init_l_Lean_resolveGlobalConst___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3___closed__1(); lean_mark_persistent(l_Lean_resolveGlobalConst___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3___closed__1); l_Lean_resolveGlobalConst___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3___closed__2 = _init_l_Lean_resolveGlobalConst___at_Lean_Elab_Term_elabDoubleQuotedName___spec__3___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Command.c b/stage0/stdlib/Lean/Elab/Command.c index 7869d961dd..83a3b97227 100644 --- a/stage0/stdlib/Lean/Elab/Command.c +++ b/stage0/stdlib/Lean/Elab/Command.c @@ -1981,18 +1981,20 @@ return x_4; static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__1() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_Elab_Command_State_infoState___default___closed__3; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_Elab_Command_instInhabitedState___closed__2; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_addMessageContextPartial___at_Lean_Elab_Command_instAddMessageContextCommandElabM___spec__1___closed__2() { diff --git a/stage0/stdlib/Lean/Elab/InfoTree.c b/stage0/stdlib/Lean/Elab/InfoTree.c index 0a80d692a7..ef069852db 100644 --- a/stage0/stdlib/Lean/Elab/InfoTree.c +++ b/stage0/stdlib/Lean/Elab/InfoTree.c @@ -64,7 +64,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_TermInfo_runMetaM(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_withSaveInfoContext___rarg___lambda__4___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* l_Std_PersistentArray_append___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Option_format___at_Lean_Elab_CompletionInfo_format___spec__1___boxed(lean_object*); -static uint32_t l_Lean_Elab_instInhabitedContextInfo___closed__5; +static lean_object* l_Lean_Elab_instInhabitedContextInfo___closed__5; lean_object* lean_st_ref_get(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_enableInfoTree(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_MacroExpansionInfo_format(lean_object*, lean_object*, lean_object*); @@ -134,7 +134,7 @@ static lean_object* l_Lean_Elab_instInhabitedContextInfo___closed__9; LEAN_EXPORT lean_object* l_Lean_Elab_resolveGlobalConstWithInfos___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_resolveGlobalConstWithInfos___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_pushInfoTree___rarg(lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Elab_instInhabitedContextInfo___closed__4; +static uint32_t l_Lean_Elab_instInhabitedContextInfo___closed__4; LEAN_EXPORT lean_object* l_Lean_Elab_withMacroExpansionInfo___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withSaveInfoContext___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withSaveInfoContext___spec__4___rarg___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*); @@ -207,6 +207,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_instInhabitedCommandInfo; static lean_object* l_Lean_Elab_instInhabitedContextInfo___closed__8; size_t l_USize_shiftLeft(size_t, size_t); LEAN_EXPORT lean_object* l_Lean_Elab_getResetInfoTrees___rarg___lambda__1(lean_object*); +static lean_object* l_Lean_Elab_ContextInfo_mctx___default___closed__5; static lean_object* l_Lean_Elab_MacroExpansionInfo_format___closed__2; lean_object* l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_TermInfo_format(lean_object*, lean_object*, lean_object*); @@ -454,24 +455,38 @@ static lean_object* _init_l_Lean_Elab_ContextInfo_mctx___default___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_ContextInfo_mctx___default___closed__2; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_Elab_ContextInfo_mctx___default___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_Elab_ContextInfo_mctx___default___closed__3; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_Elab_ContextInfo_mctx___default___closed__4; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Elab_ContextInfo_mctx___default() { _start: { lean_object* x_1; -x_1 = l_Lean_Elab_ContextInfo_mctx___default___closed__4; +x_1 = l_Lean_Elab_ContextInfo_mctx___default___closed__5; return x_1; } } @@ -511,22 +526,10 @@ return x_2; static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_ContextInfo_mctx___default___closed__2; -x_2 = lean_unsigned_to_nat(0u); -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; -} -} -static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__3() { -_start: -{ uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = 1; x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__1; -x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__2; +x_3 = l_Lean_Elab_ContextInfo_mctx___default___closed__4; x_4 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); @@ -534,7 +537,7 @@ lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1); return x_4; } } -static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__4() { +static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__3() { _start: { lean_object* x_1; lean_object* x_2; @@ -543,7 +546,7 @@ x_2 = lean_mk_empty_array_with_capacity(x_1); return x_2; } } -static uint32_t _init_l_Lean_Elab_instInhabitedContextInfo___closed__5() { +static uint32_t _init_l_Lean_Elab_instInhabitedContextInfo___closed__4() { _start: { lean_object* x_1; uint32_t x_2; @@ -552,14 +555,14 @@ x_2 = lean_uint32_of_nat(x_1); return x_2; } } -static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__6() { +static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__5() { _start: { uint32_t x_1; uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__5; +x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__4; x_2 = 0; x_3 = lean_box(0); -x_4 = l_Lean_Elab_instInhabitedContextInfo___closed__4; +x_4 = l_Lean_Elab_instInhabitedContextInfo___closed__3; x_5 = lean_alloc_ctor(0, 4, 5); lean_ctor_set(x_5, 0, x_3); lean_ctor_set(x_5, 1, x_4); @@ -570,14 +573,14 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*4 + 4, x_2); return x_5; } } -static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__7() { +static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__1; -x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__3; -x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__4; -x_4 = l_Lean_Elab_instInhabitedContextInfo___closed__6; +x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__2; +x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__3; +x_4 = l_Lean_Elab_instInhabitedContextInfo___closed__5; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -586,7 +589,7 @@ lean_ctor_set(x_5, 3, x_4); return x_5; } } -static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__8() { +static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__7() { _start: { lean_object* x_1; @@ -594,12 +597,12 @@ x_1 = lean_mk_string(""); return x_1; } } -static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__9() { +static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__8; -x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__4; +x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__7; +x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__3; x_3 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -607,14 +610,33 @@ lean_ctor_set(x_3, 2, x_2); return x_3; } } +static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_Elab_ContextInfo_mctx___default___closed__3; +x_3 = l_Lean_Elab_ContextInfo_mctx___default___closed__4; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; +} +} static lean_object* _init_l_Lean_Elab_instInhabitedContextInfo___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = lean_box(0); -x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__7; -x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__9; -x_4 = l_Lean_Elab_ContextInfo_mctx___default___closed__4; +x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__6; +x_3 = l_Lean_Elab_instInhabitedContextInfo___closed__8; +x_4 = l_Lean_Elab_instInhabitedContextInfo___closed__9; x_5 = lean_box(0); x_6 = lean_alloc_ctor(0, 6, 0); lean_ctor_set(x_6, 0, x_2); @@ -678,7 +700,7 @@ static lean_object* _init_l_Lean_Elab_instInhabitedTermInfo___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__4; +x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__3; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; @@ -698,7 +720,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; size_t x_4; lean_object* x_5; x_1 = l_Lean_Elab_instInhabitedTermInfo___closed__2; -x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__4; +x_2 = l_Lean_Elab_instInhabitedContextInfo___closed__3; x_3 = lean_unsigned_to_nat(0u); x_4 = l_Lean_Elab_instInhabitedTermInfo___closed__3; x_5 = lean_alloc_ctor(0, 4, sizeof(size_t)*1); @@ -838,7 +860,7 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_box(0); x_2 = l_Lean_Elab_instInhabitedElabInfo___closed__1; -x_3 = l_Lean_Elab_ContextInfo_mctx___default___closed__4; +x_3 = l_Lean_Elab_ContextInfo_mctx___default___closed__5; x_4 = lean_alloc_ctor(0, 5, 0); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); @@ -2106,7 +2128,7 @@ _start: lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 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; x_5 = lean_box(0); x_6 = l_Lean_Elab_ContextInfo_runMetaM___rarg___closed__1; -x_7 = l_Lean_Elab_instInhabitedContextInfo___closed__4; +x_7 = l_Lean_Elab_instInhabitedContextInfo___closed__3; x_8 = lean_unsigned_to_nat(0u); x_9 = lean_alloc_ctor(0, 5, 0); lean_ctor_set(x_9, 0, x_6); @@ -2489,7 +2511,7 @@ static lean_object* _init_l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatStxR _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__8; +x_1 = l_Lean_Elab_instInhabitedContextInfo___closed__7; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; @@ -8268,6 +8290,8 @@ l_Lean_Elab_ContextInfo_mctx___default___closed__3 = _init_l_Lean_Elab_ContextIn lean_mark_persistent(l_Lean_Elab_ContextInfo_mctx___default___closed__3); l_Lean_Elab_ContextInfo_mctx___default___closed__4 = _init_l_Lean_Elab_ContextInfo_mctx___default___closed__4(); lean_mark_persistent(l_Lean_Elab_ContextInfo_mctx___default___closed__4); +l_Lean_Elab_ContextInfo_mctx___default___closed__5 = _init_l_Lean_Elab_ContextInfo_mctx___default___closed__5(); +lean_mark_persistent(l_Lean_Elab_ContextInfo_mctx___default___closed__5); l_Lean_Elab_ContextInfo_mctx___default = _init_l_Lean_Elab_ContextInfo_mctx___default(); lean_mark_persistent(l_Lean_Elab_ContextInfo_mctx___default); l_Lean_Elab_ContextInfo_options___default = _init_l_Lean_Elab_ContextInfo_options___default(); @@ -8283,8 +8307,8 @@ lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__2); l_Lean_Elab_instInhabitedContextInfo___closed__3 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__3(); lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__3); l_Lean_Elab_instInhabitedContextInfo___closed__4 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__4(); -lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__4); l_Lean_Elab_instInhabitedContextInfo___closed__5 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__5(); +lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__5); l_Lean_Elab_instInhabitedContextInfo___closed__6 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__6(); lean_mark_persistent(l_Lean_Elab_instInhabitedContextInfo___closed__6); l_Lean_Elab_instInhabitedContextInfo___closed__7 = _init_l_Lean_Elab_instInhabitedContextInfo___closed__7(); diff --git a/stage0/stdlib/Lean/Elab/Term.c b/stage0/stdlib/Lean/Elab/Term.c index c132b8fb43..2f5b88ec86 100644 --- a/stage0/stdlib/Lean/Elab/Term.c +++ b/stage0/stdlib/Lean/Elab/Term.c @@ -217,6 +217,7 @@ lean_object* lean_st_ref_get(lean_object*, lean_object*); static lean_object* l_Lean_Elab_Term_mkCoe___closed__1; LEAN_EXPORT lean_object* l___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_Term_throwErrorIfErrors___closed__2; +static lean_object* l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__14; LEAN_EXPORT lean_object* l_Lean_Elab_liftMacroM___at___private_Lean_Elab_Term_0__Lean_Elab_Term_elabTermAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_autoBoundImplicitExceptionId; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Term_withoutModifyingElabMetaStateWithInfo___spec__7(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -2121,18 +2122,20 @@ return x_5; static lean_object* _init_l_Lean_Elab_Term_instInhabitedSavedState___closed__10() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_Elab_Term_State_infoState___default___closed__3; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_Elab_Term_instInhabitedSavedState___closed__2; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Elab_Term_instInhabitedSavedState___closed__11() { @@ -44059,9 +44062,28 @@ return x_6; static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__8() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_Elab_Term_State_infoState___default___closed__3; +x_3 = l_Lean_Elab_Term_instInhabitedSavedState___closed__2; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; +} +} +static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__9() { +_start: +{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_instInhabitedSavedState___closed__10; +x_2 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__8; x_3 = l_Lean_Elab_Term_instInhabitedSavedState___closed__18; x_4 = l_Lean_Elab_Term_Context_autoBoundImplicits___default___closed__3; x_5 = lean_alloc_ctor(0, 4, 0); @@ -44072,7 +44094,7 @@ lean_ctor_set(x_5, 3, x_4); return x_5; } } -static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__9() { +static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -44082,7 +44104,7 @@ x_3 = lean_nat_add(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__10() { +static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__11() { _start: { lean_object* x_1; @@ -44090,21 +44112,21 @@ x_1 = lean_mk_string("_uniq"); return x_1; } } -static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__11() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__10; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__11; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__11; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__12; x_2 = lean_unsigned_to_nat(1u); x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); @@ -44112,7 +44134,7 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__13() { +static lean_object* _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__14() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; @@ -44138,9 +44160,9 @@ x_10 = lean_box(0); x_33 = l_Lean_maxRecDepth; x_34 = l_Lean_Option_get___at_Lean_initFn____x40_Lean_Util_PPExt___hyg_218____spec__1(x_3, x_33); x_35 = l_Lean_Core_getMaxHeartbeats(x_3); -x_36 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__9; -x_37 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__12; -x_38 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__13; +x_36 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__10; +x_37 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__13; +x_38 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__14; x_39 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_39, 0, x_2); lean_ctor_set(x_39, 1, x_36); @@ -44178,7 +44200,7 @@ x_50 = lean_st_ref_get(x_48, x_49); x_51 = lean_ctor_get(x_50, 1); lean_inc(x_51); lean_dec(x_50); -x_52 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__8; +x_52 = l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__9; x_53 = lean_st_mk_ref(x_52, x_51); x_54 = lean_ctor_get(x_53, 0); lean_inc(x_54); @@ -49747,6 +49769,8 @@ l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__12 = _init_l_Lean_Elab_T lean_mark_persistent(l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__12); l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__13 = _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__13(); lean_mark_persistent(l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__13); +l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__14 = _init_l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__14(); +lean_mark_persistent(l_Lean_Elab_Term_instMetaEvalTermElabM___rarg___closed__14); l_List_foldlM___at_Lean_Elab_Term_evalExpr___spec__8___closed__1 = _init_l_List_foldlM___at_Lean_Elab_Term_evalExpr___spec__8___closed__1(); lean_mark_persistent(l_List_foldlM___at_Lean_Elab_Term_evalExpr___spec__8___closed__1); l_List_foldlM___at_Lean_Elab_Term_evalExpr___spec__8___closed__2 = _init_l_List_foldlM___at_Lean_Elab_Term_evalExpr___spec__8___closed__2(); diff --git a/stage0/stdlib/Lean/Message.c b/stage0/stdlib/Lean/Message.c index 4939bfb3ae..b3fe09e5f7 100644 --- a/stage0/stdlib/Lean/Message.c +++ b/stage0/stdlib/Lean/Message.c @@ -259,6 +259,7 @@ static lean_object* l_Lean_myMacro____x40_Lean_Message___hyg_2309____closed__14; static lean_object* l_Lean_MessageData_formatAux___closed__6; static lean_object* l_Lean_myMacro____x40_Lean_Message___hyg_2309____closed__3; uint8_t l_UInt32_decEq(uint32_t, uint32_t); +static lean_object* l_Lean_MessageData_instantiateMVars___closed__5; static lean_object* l_Lean_MessageData_formatAux___closed__5; LEAN_EXPORT lean_object* l_Lean_Message_toString___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_push___rarg(lean_object*, lean_object*); @@ -973,24 +974,38 @@ static lean_object* _init_l_Lean_MessageData_instantiateMVars___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_MessageData_instantiateMVars___closed__2; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_MessageData_instantiateMVars___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_MessageData_instantiateMVars___closed__3; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_MessageData_instantiateMVars___closed__4; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } LEAN_EXPORT lean_object* l_Lean_MessageData_instantiateMVars(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_MessageData_instantiateMVars___closed__4; +x_2 = l_Lean_MessageData_instantiateMVars___closed__5; x_3 = l_Lean_MessageData_instantiateMVars_visit(x_1, x_2); return x_3; } @@ -5456,7 +5471,7 @@ lean_dec(x_1); x_6 = lean_ctor_get(x_5, 1); lean_inc(x_6); lean_dec(x_5); -x_7 = l_Lean_MessageData_instantiateMVars___closed__4; +x_7 = l_Lean_MessageData_instantiateMVars___closed__5; x_8 = l_Lean_addMessageContextPartial___rarg___lambda__1___closed__2; x_9 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_9, 0, x_2); @@ -6528,7 +6543,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Message_0__Lean_KernelException_mkCtx( _start: { lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_5 = l_Lean_MessageData_instantiateMVars___closed__4; +x_5 = l_Lean_MessageData_instantiateMVars___closed__5; x_6 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_6, 0, x_1); lean_ctor_set(x_6, 1, x_5); @@ -7300,6 +7315,8 @@ l_Lean_MessageData_instantiateMVars___closed__3 = _init_l_Lean_MessageData_insta lean_mark_persistent(l_Lean_MessageData_instantiateMVars___closed__3); l_Lean_MessageData_instantiateMVars___closed__4 = _init_l_Lean_MessageData_instantiateMVars___closed__4(); lean_mark_persistent(l_Lean_MessageData_instantiateMVars___closed__4); +l_Lean_MessageData_instantiateMVars___closed__5 = _init_l_Lean_MessageData_instantiateMVars___closed__5(); +lean_mark_persistent(l_Lean_MessageData_instantiateMVars___closed__5); l_Lean_MessageData_nil = _init_l_Lean_MessageData_nil(); lean_mark_persistent(l_Lean_MessageData_nil); l_Lean_MessageData_formatAux___closed__1 = _init_l_Lean_MessageData_formatAux___closed__1(); diff --git a/stage0/stdlib/Lean/Meta/Basic.c b/stage0/stdlib/Lean/Meta/Basic.c index 7d2d9c8255..1949df2ac5 100644 --- a/stage0/stdlib/Lean/Meta/Basic.c +++ b/stage0/stdlib/Lean/Meta/Basic.c @@ -244,6 +244,7 @@ static lean_object* l_Lean_Meta_instMonadBacktrackSavedStateMetaM___closed__1; LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_mkFreshExprMVarImpl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Meta_liftMkBindingM___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAppN(lean_object*, lean_object*); +static lean_object* l_Lean_Meta_State_mctx___default___closed__3; LEAN_EXPORT lean_object* l_Lean_Meta_withLocalDeclsD(lean_object*); static lean_object* l_Lean_Meta_Context_lctx___default___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_instantiateForall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -282,7 +283,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_withNewBinderI lean_object* lean_array_fget(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_getZetaFVarIds(lean_object*); lean_object* l___private_Lean_CoreM_0__Lean_Core_mkFreshNameImp(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_Meta_instInhabitedSavedState___closed__3; +static uint32_t l_Lean_Meta_instInhabitedSavedState___closed__3; lean_object* l_Lean_Option_get___at_Lean_initFn____x40_Lean_Util_PPExt___hyg_218____spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_map2MetaM___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_throwUnknownFVar(lean_object*); @@ -442,7 +443,7 @@ extern lean_object* l_Lean_instInhabitedExpr; LEAN_EXPORT uint8_t l_Lean_Meta_Config_ctxApprox___default; LEAN_EXPORT lean_object* l_Lean_Meta_map1MetaM(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_dependsOn___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static uint32_t l_Lean_Meta_instInhabitedSavedState___closed__4; +static lean_object* l_Lean_Meta_instInhabitedSavedState___closed__4; lean_object* l_Array_reverse___rarg(lean_object*); lean_object* l_Lean_ppExpr(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_assignLevelMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1566,24 +1567,38 @@ static lean_object* _init_l_Lean_Meta_State_mctx___default___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Meta_Cache_inferType___default___closed__2; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_Meta_State_mctx___default___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_Meta_State_mctx___default___closed__1; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_Meta_State_mctx___default___closed__2; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Meta_State_mctx___default() { _start: { lean_object* x_1; -x_1 = l_Lean_Meta_State_mctx___default___closed__2; +x_1 = l_Lean_Meta_State_mctx___default___closed__3; return x_1; } } @@ -1688,7 +1703,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); -x_2 = l_Lean_Meta_State_mctx___default___closed__2; +x_2 = l_Lean_Meta_State_mctx___default___closed__3; x_3 = l_Lean_Meta_instInhabitedCache___closed__2; x_4 = l_Lean_Meta_instInhabitedState___closed__3; x_5 = lean_alloc_ctor(0, 4, 0); @@ -1719,22 +1734,10 @@ return x_2; static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_Cache_inferType___default___closed__2; -x_2 = lean_unsigned_to_nat(0u); -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; -} -} -static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__3() { -_start: -{ uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = 1; x_2 = l_Lean_Meta_instInhabitedSavedState___closed__1; -x_3 = l_Lean_Meta_instInhabitedSavedState___closed__2; +x_3 = l_Lean_Meta_State_mctx___default___closed__2; x_4 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); @@ -1742,7 +1745,7 @@ lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1); return x_4; } } -static uint32_t _init_l_Lean_Meta_instInhabitedSavedState___closed__4() { +static uint32_t _init_l_Lean_Meta_instInhabitedSavedState___closed__3() { _start: { lean_object* x_1; uint32_t x_2; @@ -1751,11 +1754,11 @@ x_2 = lean_uint32_of_nat(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__5() { +static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__4() { _start: { uint32_t x_1; uint8_t x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_Meta_instInhabitedSavedState___closed__4; +x_1 = l_Lean_Meta_instInhabitedSavedState___closed__3; x_2 = 0; x_3 = lean_box(0); x_4 = l_Lean_Meta_ParamInfo_backDeps___default___closed__1; @@ -1769,14 +1772,14 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*4 + 4, x_2); return x_5; } } -static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__6() { +static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Meta_instInhabitedSavedState___closed__1; -x_2 = l_Lean_Meta_instInhabitedSavedState___closed__3; +x_2 = l_Lean_Meta_instInhabitedSavedState___closed__2; x_3 = l_Lean_Meta_ParamInfo_backDeps___default___closed__1; -x_4 = l_Lean_Meta_instInhabitedSavedState___closed__5; +x_4 = l_Lean_Meta_instInhabitedSavedState___closed__4; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -1785,7 +1788,7 @@ lean_ctor_set(x_5, 3, x_4); return x_5; } } -static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__7() { +static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -1797,7 +1800,7 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__8() { +static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__7() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; @@ -1809,14 +1812,14 @@ lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_1); return x_3; } } -static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__9() { +static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_Meta_instInhabitedSavedState___closed__6; +x_1 = l_Lean_Meta_instInhabitedSavedState___closed__5; x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Meta_instInhabitedSavedState___closed__7; -x_4 = l_Lean_Meta_instInhabitedSavedState___closed__8; +x_3 = l_Lean_Meta_instInhabitedSavedState___closed__6; +x_4 = l_Lean_Meta_instInhabitedSavedState___closed__7; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -1825,12 +1828,31 @@ lean_ctor_set(x_5, 3, x_4); return x_5; } } +static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_Meta_State_mctx___default___closed__1; +x_3 = l_Lean_Meta_State_mctx___default___closed__2; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; +} +} static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); -x_2 = l_Lean_Meta_State_mctx___default___closed__2; +x_2 = l_Lean_Meta_instInhabitedSavedState___closed__9; x_3 = l_Lean_Meta_instInhabitedCache___closed__2; x_4 = l_Lean_Meta_instInhabitedState___closed__3; x_5 = lean_alloc_ctor(0, 4, 0); @@ -1845,7 +1867,7 @@ static lean_object* _init_l_Lean_Meta_instInhabitedSavedState___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_instInhabitedSavedState___closed__9; +x_1 = l_Lean_Meta_instInhabitedSavedState___closed__8; x_2 = l_Lean_Meta_instInhabitedSavedState___closed__10; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); @@ -3348,7 +3370,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); -x_2 = l_Lean_Meta_State_mctx___default___closed__2; +x_2 = l_Lean_Meta_State_mctx___default___closed__3; x_3 = l_Lean_Meta_instInhabitedCache___closed__2; x_4 = l_Lean_Meta_State_postponed___default___closed__3; x_5 = lean_alloc_ctor(0, 4, 0); @@ -28654,6 +28676,8 @@ l_Lean_Meta_State_mctx___default___closed__1 = _init_l_Lean_Meta_State_mctx___de lean_mark_persistent(l_Lean_Meta_State_mctx___default___closed__1); l_Lean_Meta_State_mctx___default___closed__2 = _init_l_Lean_Meta_State_mctx___default___closed__2(); lean_mark_persistent(l_Lean_Meta_State_mctx___default___closed__2); +l_Lean_Meta_State_mctx___default___closed__3 = _init_l_Lean_Meta_State_mctx___default___closed__3(); +lean_mark_persistent(l_Lean_Meta_State_mctx___default___closed__3); l_Lean_Meta_State_mctx___default = _init_l_Lean_Meta_State_mctx___default(); lean_mark_persistent(l_Lean_Meta_State_mctx___default); l_Lean_Meta_State_cache___default = _init_l_Lean_Meta_State_cache___default(); @@ -28682,8 +28706,8 @@ lean_mark_persistent(l_Lean_Meta_instInhabitedSavedState___closed__1); l_Lean_Meta_instInhabitedSavedState___closed__2 = _init_l_Lean_Meta_instInhabitedSavedState___closed__2(); lean_mark_persistent(l_Lean_Meta_instInhabitedSavedState___closed__2); l_Lean_Meta_instInhabitedSavedState___closed__3 = _init_l_Lean_Meta_instInhabitedSavedState___closed__3(); -lean_mark_persistent(l_Lean_Meta_instInhabitedSavedState___closed__3); l_Lean_Meta_instInhabitedSavedState___closed__4 = _init_l_Lean_Meta_instInhabitedSavedState___closed__4(); +lean_mark_persistent(l_Lean_Meta_instInhabitedSavedState___closed__4); l_Lean_Meta_instInhabitedSavedState___closed__5 = _init_l_Lean_Meta_instInhabitedSavedState___closed__5(); lean_mark_persistent(l_Lean_Meta_instInhabitedSavedState___closed__5); l_Lean_Meta_instInhabitedSavedState___closed__6 = _init_l_Lean_Meta_instInhabitedSavedState___closed__6(); diff --git a/stage0/stdlib/Lean/Meta/Instances.c b/stage0/stdlib/Lean/Meta/Instances.c index 20aca6fcc1..e8cf2b2926 100644 --- a/stage0/stdlib/Lean/Meta/Instances.c +++ b/stage0/stdlib/Lean/Meta/Instances.c @@ -2948,18 +2948,20 @@ return x_3; static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Instances___hyg_408____lambda__1___closed__9() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_Instances___hyg_408____lambda__1___closed__8; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Std_PersistentHashMap_empty___at_Lean_Meta_Instances_instanceNames___default___spec__1___closed__3; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Instances___hyg_408____lambda__1___closed__10() { diff --git a/stage0/stdlib/Lean/Meta/RecursorInfo.c b/stage0/stdlib/Lean/Meta/RecursorInfo.c index 78a5b88067..56b9de2d53 100644 --- a/stage0/stdlib/Lean/Meta/RecursorInfo.c +++ b/stage0/stdlib/Lean/Meta/RecursorInfo.c @@ -324,6 +324,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_recursorAttribute___lambda__6(lean_object*) static lean_object* l_Lean_Meta_Attribute_Recursor_getMajorPos___closed__6; static lean_object* l___private_Lean_Meta_RecursorInfo_0__Lean_Meta_getMajorPosDepElim___closed__5; lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__21; uint8_t lean_expr_eqv(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at___private_Lean_Meta_RecursorInfo_0__Lean_Meta_mkRecursorInfoAux___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_registerParametricAttribute___at_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____spec__1___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -10807,42 +10808,36 @@ static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(0u); -x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__10; -x_3 = lean_alloc_ctor(0, 7, 0); +x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__3; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); +lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__12() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__3; -x_2 = lean_unsigned_to_nat(0u); -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* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__10; +x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__11; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__13() { _start: { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); -return x_1; -} -} -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__14() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__3; x_2 = lean_unsigned_to_nat(0u); @@ -10852,6 +10847,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__14() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); +return x_1; +} +} static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__15() { _start: { @@ -10867,6 +10870,18 @@ return x_3; static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__16() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__3; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__17() { +_start: +{ lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Expr_instBEqExpr; x_2 = lean_alloc_closure((void*)(l_instBEqProd___rarg), 4, 2); @@ -10875,7 +10890,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__17() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__18() { _start: { lean_object* x_1; lean_object* x_2; @@ -10886,7 +10901,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__18() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__19() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -10898,14 +10913,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__19() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__12; -x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__14; -x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__15; -x_4 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__18; +x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__13; +x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__15; +x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__16; +x_4 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__19; x_5 = lean_alloc_ctor(0, 7, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -10917,13 +10932,13 @@ lean_ctor_set(x_5, 6, x_4); return x_5; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__20() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__21() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); -x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__11; -x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__19; +x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__12; +x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__20; x_4 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__7; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_2); @@ -10943,7 +10958,7 @@ x_7 = lean_st_ref_get(x_4, x_5); x_8 = lean_ctor_get(x_7, 1); lean_inc(x_8); lean_dec(x_7); -x_9 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__20; +x_9 = l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__21; x_10 = lean_st_mk_ref(x_9, x_8); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); @@ -12222,6 +12237,8 @@ l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___close lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__19); l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__20 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__20(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__20); +l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__21 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__21(); +lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____lambda__2___closed__21); l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____closed__1 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____closed__1(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____closed__1); l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____closed__2 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_RecursorInfo___hyg_2258____closed__2(); diff --git a/stage0/stdlib/Lean/Meta/SynthInstance.c b/stage0/stdlib/Lean/Meta/SynthInstance.c index d5a07d9338..09154836f7 100644 --- a/stage0/stdlib/Lean/Meta/SynthInstance.c +++ b/stage0/stdlib/Lean/Meta/SynthInstance.c @@ -506,6 +506,7 @@ static lean_object* l_Lean_Meta_SynthInstance_resume___closed__1; LEAN_EXPORT lean_object* l_Lean_Meta_SynthInstance_checkMaxHeartbeats___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_filterMapM___at_Lean_Meta_SynthInstance_getInstances___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_SynthInstance_wakeUp___closed__3; +static lean_object* l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8; static lean_object* l_Lean_Meta_SynthInstance_inferTCGoalsRLAttr___closed__4; static lean_object* l_Lean_Meta_SynthInstance_checkMaxHeartbeats___closed__1; static lean_object* l_Lean_Meta_SynthInstance_synth___closed__3; @@ -1112,25 +1113,39 @@ static lean_object* _init_l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode__ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(0u); -x_2 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__5; -x_3 = lean_alloc_ctor(0, 7, 0); +x_1 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__4; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); +lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__5; +x_3 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__6; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; +} +} +static lean_object* _init_l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8() { +_start: +{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__2; -x_2 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__6; +x_2 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7; x_3 = l_Lean_Meta_SynthInstance_inferTCGoalsRLAttr___lambda__5___closed__1; x_4 = lean_unsigned_to_nat(0u); x_5 = lean_alloc_ctor(0, 5, 0); @@ -1146,7 +1161,7 @@ static lean_object* _init_l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode() _start: { lean_object* x_1; -x_1 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7; +x_1 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8; return x_1; } } @@ -1156,7 +1171,7 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); x_2 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__2; -x_3 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__6; +x_3 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7; x_4 = lean_unsigned_to_nat(0u); x_5 = lean_alloc_ctor(0, 5, 0); lean_ctor_set(x_5, 0, x_2); @@ -10954,7 +10969,7 @@ else { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; x_27 = lean_array_fget(x_15, x_18); -x_28 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7; +x_28 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8; x_29 = lean_array_fset(x_15, x_18, x_28); x_30 = lean_apply_1(x_1, x_27); x_31 = lean_array_fset(x_29, x_18, x_30); @@ -11037,7 +11052,7 @@ else { 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; x_53 = lean_array_fget(x_40, x_45); -x_54 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7; +x_54 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8; x_55 = lean_array_fset(x_40, x_45, x_54); x_56 = lean_apply_1(x_1, x_53); x_57 = lean_array_fset(x_55, x_45, x_56); @@ -11125,7 +11140,7 @@ else { lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51; x_48 = lean_array_fget(x_41, x_44); -x_49 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7; +x_49 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8; x_50 = lean_array_fset(x_41, x_44, x_49); x_51 = !lean_is_exclusive(x_48); if (x_51 == 0) @@ -11212,7 +11227,7 @@ else { 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; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; x_75 = lean_array_fget(x_65, x_70); -x_76 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7; +x_76 = l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8; x_77 = lean_array_fset(x_65, x_70, x_76); x_78 = lean_ctor_get(x_75, 0); lean_inc(x_78); @@ -20315,6 +20330,8 @@ l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__6 = _init_l_Lean_ lean_mark_persistent(l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__6); l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7 = _init_l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7(); lean_mark_persistent(l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__7); +l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8 = _init_l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8(); +lean_mark_persistent(l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode___closed__8); l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode = _init_l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode(); lean_mark_persistent(l_Lean_Meta_SynthInstance_instInhabitedGeneratorNode); l_Lean_Meta_SynthInstance_instInhabitedConsumerNode___closed__1 = _init_l_Lean_Meta_SynthInstance_instInhabitedConsumerNode___closed__1(); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Simp/CongrLemmas.c b/stage0/stdlib/Lean/Meta/Tactic/Simp/CongrLemmas.c index 843606a900..bcd9107d38 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Simp/CongrLemmas.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Simp/CongrLemmas.c @@ -9537,18 +9537,20 @@ return x_3; static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Simp_CongrLemmas___hyg_1538____lambda__1___closed__9() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Simp_CongrLemmas___hyg_1538____lambda__1___closed__8; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_Meta_CongrLemmas_lemmas___default___closed__3; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_Simp_CongrLemmas___hyg_1538____lambda__1___closed__10() { diff --git a/stage0/stdlib/Lean/Meta/Tactic/Simp/SimpLemmas.c b/stage0/stdlib/Lean/Meta/Tactic/Simp/SimpLemmas.c index 13502470aa..3d75701f26 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Simp/SimpLemmas.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Simp/SimpLemmas.c @@ -367,6 +367,7 @@ lean_object* l_Lean_Meta_isProp(lean_object*, lean_object*, lean_object*, lean_o static lean_object* l_Lean_Meta_SimpLemma_getName___closed__2; static lean_object* l___private_Lean_Meta_Tactic_Simp_SimpLemmas_0__Lean_Meta_preprocess___lambda__1___closed__2; static lean_object* l_Lean_Meta_simpExtension___closed__9; +static lean_object* l_Lean_Meta_mkSimpAttr___lambda__1___closed__29; LEAN_EXPORT uint8_t l_Lean_Meta_SimpLemma_post___default; lean_object* l_Lean_indentExpr(lean_object*); static lean_object* l_Lean_Meta_mkSimpAttr___lambda__1___closed__22; @@ -8940,42 +8941,36 @@ static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(0u); -x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__8; -x_3 = lean_alloc_ctor(0, 7, 0); +x_1 = l_Lean_Meta_instInhabitedSimpLemmas___closed__2; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); +lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__10() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_instInhabitedSimpLemmas___closed__2; -x_2 = lean_unsigned_to_nat(0u); -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* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__8; +x_3 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__9; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__11() { _start: { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); -return x_1; -} -} -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__12() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Meta_instInhabitedSimpLemmas___closed__2; x_2 = lean_unsigned_to_nat(0u); @@ -8985,6 +8980,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__12() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); +return x_1; +} +} static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__13() { _start: { @@ -9000,6 +9003,18 @@ return x_3; static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__14() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Meta_instInhabitedSimpLemmas___closed__2; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__15() { +_start: +{ lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Expr_instBEqExpr; x_2 = lean_alloc_closure((void*)(l_instBEqProd___rarg), 4, 2); @@ -9008,7 +9023,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__15() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__16() { _start: { lean_object* x_1; lean_object* x_2; @@ -9019,7 +9034,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__16() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__17() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -9031,14 +9046,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__17() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__18() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__10; -x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__12; -x_3 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__13; -x_4 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__16; +x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__11; +x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__13; +x_3 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__14; +x_4 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__17; x_5 = lean_alloc_ctor(0, 7, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -9050,13 +9065,13 @@ lean_ctor_set(x_5, 6, x_4); return x_5; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__18() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__19() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); -x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__9; -x_3 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__17; +x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__10; +x_3 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__18; x_4 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__5; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_2); @@ -9066,7 +9081,7 @@ lean_ctor_set(x_5, 3, x_4); return x_5; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__19() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__20() { _start: { lean_object* x_1; @@ -9074,16 +9089,16 @@ x_1 = lean_mk_string("invalid 'simp', it is not a proposition nor a definition ( return x_1; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__20() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__21() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__19; +x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__20; x_2 = l_Lean_stringToMessageData(x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__21() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__22() { _start: { lean_object* x_1; @@ -9091,17 +9106,17 @@ x_1 = lean_mk_string("Lean"); return x_1; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__22() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__23() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__21; +x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__22; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__23() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__24() { _start: { lean_object* x_1; @@ -9109,17 +9124,17 @@ x_1 = lean_mk_string("Parser"); return x_1; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__24() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__25() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__22; -x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__23; +x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__23; +x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__24; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__25() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__26() { _start: { lean_object* x_1; @@ -9127,17 +9142,17 @@ x_1 = lean_mk_string("Tactic"); return x_1; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__26() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__27() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__24; -x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__25; +x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__25; +x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__26; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__27() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__28() { _start: { lean_object* x_1; @@ -9145,12 +9160,12 @@ x_1 = lean_mk_string("simpPost"); return x_1; } } -static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__28() { +static lean_object* _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__29() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__26; -x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__27; +x_1 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__27; +x_2 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__28; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } @@ -9163,7 +9178,7 @@ x_8 = lean_st_ref_get(x_6, x_7); x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); lean_dec(x_8); -x_10 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__18; +x_10 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__19; x_11 = lean_st_mk_ref(x_10, x_9); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); @@ -9206,7 +9221,7 @@ if (x_35 == 0) lean_object* x_36; lean_object* x_37; uint8_t x_38; lean_dec(x_2); lean_dec(x_1); -x_36 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__20; +x_36 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__21; x_37 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_36, x_26, x_12, x_5, x_6, x_34); lean_dec(x_6); lean_dec(x_5); @@ -9265,7 +9280,7 @@ x_52 = lean_unsigned_to_nat(0u); x_53 = l_Lean_Syntax_getArg(x_48, x_52); lean_dec(x_48); x_54 = l_Lean_Syntax_getKind(x_53); -x_55 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__28; +x_55 = l_Lean_Meta_mkSimpAttr___lambda__1___closed__29; x_56 = lean_name_eq(x_54, x_55); lean_dec(x_54); lean_inc(x_6); @@ -12210,6 +12225,8 @@ l_Lean_Meta_mkSimpAttr___lambda__1___closed__27 = _init_l_Lean_Meta_mkSimpAttr__ lean_mark_persistent(l_Lean_Meta_mkSimpAttr___lambda__1___closed__27); l_Lean_Meta_mkSimpAttr___lambda__1___closed__28 = _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__28(); lean_mark_persistent(l_Lean_Meta_mkSimpAttr___lambda__1___closed__28); +l_Lean_Meta_mkSimpAttr___lambda__1___closed__29 = _init_l_Lean_Meta_mkSimpAttr___lambda__1___closed__29(); +lean_mark_persistent(l_Lean_Meta_mkSimpAttr___lambda__1___closed__29); l_Lean_Meta_mkSimpExt___closed__1 = _init_l_Lean_Meta_mkSimpExt___closed__1(); lean_mark_persistent(l_Lean_Meta_mkSimpExt___closed__1); l_Lean_Meta_mkSimpExt___closed__2 = _init_l_Lean_Meta_mkSimpExt___closed__2(); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Util.c b/stage0/stdlib/Lean/Meta/Tactic/Util.c index ec01e8711a..e5d2dbf9c6 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Util.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Util.c @@ -50,12 +50,12 @@ static lean_object* l_Lean_Meta_throwTacticEx___rarg___closed__8; lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Meta_setMVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MetavarContext_setMVarUserName(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_throwTacticEx___rarg___closed__3; LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Meta_throwTacticEx___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_getNondepPropHyps___spec__11___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_Meta_throwTacticEx___rarg___closed__1; LEAN_EXPORT lean_object* l_Std_PersistentArray_forIn___at_Lean_Meta_getNondepPropHyps___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_renameMVar(lean_object*, lean_object*, lean_object*); lean_object* l_Std_mkHashSetImp___rarg(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_throwTacticEx___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_throwTacticEx___rarg___closed__2; @@ -267,7 +267,7 @@ if (x_13 == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; x_14 = lean_ctor_get(x_11, 0); -x_15 = l_Lean_MetavarContext_setMVarUserName(x_14, x_1, x_2); +x_15 = l_Lean_MetavarContext_renameMVar(x_14, x_1, x_2); lean_ctor_set(x_11, 0, x_15); x_16 = lean_st_ref_set(x_4, x_11, x_12); x_17 = !lean_is_exclusive(x_16); @@ -305,7 +305,7 @@ lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_dec(x_11); -x_27 = l_Lean_MetavarContext_setMVarUserName(x_23, x_1, x_2); +x_27 = l_Lean_MetavarContext_renameMVar(x_23, x_1, x_2); x_28 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_24); diff --git a/stage0/stdlib/Lean/Meta/UnificationHint.c b/stage0/stdlib/Lean/Meta/UnificationHint.c index 9f08f7592d..803a1b3e73 100644 --- a/stage0/stdlib/Lean/Meta/UnificationHint.c +++ b/stage0/stdlib/Lean/Meta/UnificationHint.c @@ -115,6 +115,7 @@ LEAN_EXPORT lean_object* l___private_Init_Data_Array_BinSearch_0__Array_binInser static lean_object* l___private_Init_Data_Array_BinSearch_0__Array_binInsertAux___at_Lean_Meta_UnificationHints_add___spec__6___closed__1; lean_object* l_Lean_ConstantInfo_levelParams(lean_object*); static lean_object* l_Lean_Meta_addUnificationHint___lambda__1___closed__5; +static lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__19; LEAN_EXPORT lean_object* l_Lean_Meta_tryUnificationHints(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_ScopedEnvExtension_getState___at_Lean_Meta_addUnificationHint___spec__2(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_unificationHintExtension___lambda__3(lean_object*); @@ -3919,42 +3920,36 @@ static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(0u); -x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__8; -x_3 = lean_alloc_ctor(0, 7, 0); +x_1 = l_Lean_Meta_instInhabitedUnificationHints___closed__2; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); +lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__10() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Meta_instInhabitedUnificationHints___closed__2; -x_2 = lean_unsigned_to_nat(0u); -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* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__8; +x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__9; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__11() { _start: { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); -return x_1; -} -} -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__12() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Meta_instInhabitedUnificationHints___closed__2; x_2 = lean_unsigned_to_nat(0u); @@ -3964,6 +3959,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__12() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); +return x_1; +} +} static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__13() { _start: { @@ -3979,6 +3982,18 @@ return x_3; static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__14() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Meta_instInhabitedUnificationHints___closed__2; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__15() { +_start: +{ lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Expr_instBEqExpr; x_2 = lean_alloc_closure((void*)(l_instBEqProd___rarg), 4, 2); @@ -3987,7 +4002,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__15() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__16() { _start: { lean_object* x_1; lean_object* x_2; @@ -3998,7 +4013,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__16() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__17() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -4010,14 +4025,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__17() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__18() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__10; -x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__12; -x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__13; -x_4 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__16; +x_1 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__11; +x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__13; +x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__14; +x_4 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__17; x_5 = lean_alloc_ctor(0, 7, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -4029,13 +4044,13 @@ lean_ctor_set(x_5, 6, x_4); return x_5; } } -static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__18() { +static lean_object* _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__19() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); -x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__9; -x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__17; +x_2 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__10; +x_3 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__18; x_4 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__5; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_2); @@ -4062,7 +4077,7 @@ x_9 = lean_st_ref_get(x_5, x_8); x_10 = lean_ctor_get(x_9, 1); lean_inc(x_10); lean_dec(x_9); -x_11 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__18; +x_11 = l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__19; x_12 = lean_st_mk_ref(x_11, x_10); x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); @@ -8893,6 +8908,8 @@ l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___clo lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__17); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__18 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__18(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__18); +l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__19 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__19(); +lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__1___closed__19); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__2___closed__1 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__2___closed__1(); lean_mark_persistent(l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__2___closed__1); l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__2___closed__2 = _init_l_Lean_Meta_initFn____x40_Lean_Meta_UnificationHint___hyg_685____lambda__2___closed__2(); diff --git a/stage0/stdlib/Lean/MetavarContext.c b/stage0/stdlib/Lean/MetavarContext.c index 7d4b8d216e..e9d4501c47 100644 --- a/stage0/stdlib/Lean/MetavarContext.c +++ b/stage0/stdlib/Lean/MetavarContext.c @@ -19,7 +19,6 @@ LEAN_EXPORT uint8_t l_Std_PersistentHashMap_containsAux___at_Lean_MetavarContext LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_MetavarContext_instantiateExprMVars___spec__33___rarg___lambda__10___boxed__const__1; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateExprMVars___spec__10___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_MetavarContext_instantiateLevelMVars___rarg___lambda__1___closed__4; -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_MetavarContext_findUserName_x3f___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateExprMVars___spec__8___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarContext_instantiateLevelMVars___at_Lean_MetavarContext_instantiateMVars___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarContext_instantiateExprMVars___rarg___lambda__19(lean_object*, lean_object*, lean_object*); @@ -47,7 +46,6 @@ static lean_object* l_Lean_MetavarContext_instantiateExprMVars___rarg___lambda__ LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_MetavarContext_instantiateExprMVars___spec__33___rarg___lambda__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__8___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_MetavarContext_localDeclDependsOn___spec__34(lean_object*, lean_object*, size_t, size_t); -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_MetavarContext_findUserName_x3f___spec__4(lean_object*, lean_object*, size_t, size_t, lean_object*); LEAN_EXPORT lean_object* l_Std_AssocList_find_x3f___at_Lean_MetavarContext_instantiateExprMVars___spec__2(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_MetavarContext_MkBinding_collectDeps___spec__24___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_instInhabitedMetavarDecl___closed__5; @@ -198,9 +196,11 @@ LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_Me LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_MetavarContext_MkBinding_collectDeps___spec__17___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); static lean_object* l_Lean_MetavarContext_instantiateExprMVars___rarg___lambda__14___closed__1; +extern lean_object* l_Lean_instHashableName; LEAN_EXPORT lean_object* l_Lean_MetavarContext_mkBinding(uint8_t, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); static lean_object* l_Lean_MetavarContext_getDecl___closed__1; uint8_t lean_name_eq(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_MetavarContext_userNames___default; LEAN_EXPORT lean_object* l_Std_mkHashMap___at_Lean_MetavarContext_instantiateMVars___spec__1(lean_object*); uint8_t l_Lean_Expr_isApp(lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarContext_isDelayedAssigned___boxed(lean_object*, lean_object*); @@ -237,13 +237,11 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instant lean_object* lean_string_append(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarContext_LevelMVarToParam_State_paramNames___default; LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_MetavarContext_instantiateExprMVars___spec__33___rarg___lambda__4(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Lean_MetavarContext_setMVarUserName(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarDecl_numScopeArgs___default; LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_reprMetavarKind____x40_Lean_MetavarContext___hyg_89_(uint8_t, lean_object*); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_MetavarContext_localDeclDependsOn___spec__41(lean_object*, lean_object*, size_t, size_t); LEAN_EXPORT lean_object* l_Lean_MetavarContext_MkBinding_collectDeps___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visit___at_Lean_MetavarContext_localDeclDependsOn___spec__36(lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_forM___at_Lean_MetavarContext_findUserName_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Lean_instInhabitedMetavarKind; LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_MetavarContext_localDeclDependsOn___spec__13(lean_object*, lean_object*, size_t, size_t); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_MetavarContext_localDeclDependsOn___spec__12(lean_object*, lean_object*, size_t, size_t); @@ -369,12 +367,10 @@ LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_MetavarContext_MkBi LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateExprMVars___spec__18(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_MetavarContext_instantiateMVars___spec__33(lean_object*); lean_object* lean_expr_instantiate_rev_range(lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Lean_MetavarContext_renameMVar___closed__2; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimApp___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_StateRefT_x27_get___at_Lean_MetavarContext_instMonadMCtxMetavarContextST___spec__1___rarg(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarContext_instantiateLevelMVars___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_MetavarContext_0__Lean_reprMetavarKind____x40_Lean_MetavarContext___hyg_89____closed__9; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateExprMVars___spec__22___rarg(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__26___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -424,8 +420,10 @@ LEAN_EXPORT lean_object* l_Std_PersistentArray_anyM___at_Lean_MetavarContext_MkB LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_MetavarContext_instantiateExprMVars___spec__33___rarg___lambda__3___boxed__const__1; static lean_object* l_List_toString___at_Lean_MetavarContext_MkBinding_instToStringException___spec__2___closed__2; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__17___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Nat_forM_loop___at_Lean_MetavarContext_MkBinding_collectDeps___spec__60___closed__1; LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_MetavarContext_instantiateExprMVars___spec__33___rarg___lambda__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_MetavarContext_instantiateExprMVars___spec__33___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_MetavarContext_userNames___default___closed__1; LEAN_EXPORT lean_object* l_Lean_instMonadMCtx___rarg___lambda__1(lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_MetavarContext_instantiateExprMVars___rarg___lambda__20___closed__3; LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visitMain___at_Lean_MetavarContext_MkBinding_collectDeps___spec__17(lean_object*, lean_object*, lean_object*, lean_object*); @@ -456,7 +454,6 @@ LEAN_EXPORT lean_object* l_Lean_MetavarContext_instantiateLevelMVars___at_Lean_M static lean_object* l_Lean_MetavarContext_LevelMVarToParam_instMonadCacheExprStructEqExprM___closed__1; lean_object* l_Lean_Name_toString(lean_object*, uint8_t); LEAN_EXPORT lean_object* l_Lean_MetavarKind_noConfusion___rarg(uint8_t, uint8_t, lean_object*); -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_hasExprMVar(lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_MetavarContext_exprDependsOn___spec__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); @@ -476,7 +473,6 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instant lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__22___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_mkHashMapImp___rarg(lean_object*); -LEAN_EXPORT lean_object* l_panic___at_Lean_MetavarContext_renameMVar___spec__1(lean_object*); static lean_object* l_Lean_MetavarContext_instantiateExprMVars___rarg___lambda__12___closed__1; LEAN_EXPORT lean_object* l_Lean_MetavarContext_instantiateLevelMVars___at_Lean_MetavarContext_instantiateMVars___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Lean_instBEqLocalInstance(lean_object*, lean_object*); @@ -516,7 +512,6 @@ LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_MetavarContext_instant LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__18(lean_object*); static lean_object* l_Lean_MetavarContext_getDecl___closed__3; LEAN_EXPORT lean_object* l_Lean_MetavarContext_instantiateLevelMVars(lean_object*); -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_MetavarContext_findUserName_x3f___spec__5___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visit___at_Lean_MetavarContext_MkBinding_collectDeps___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__9(lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarContext_elimMVarDeps(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); @@ -647,7 +642,6 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instant LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateExprMVars___spec__13___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_MetavarContext_localDeclDependsOn___spec__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_MetavarContext_MkBinding_collectDeps___spec__34___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_MetavarContext_findUserName_x3f___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_Data_binderInfo(uint64_t); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_MetavarContext_exprDependsOn___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_MetavarContext_MkBinding_instToStringException___closed__3; @@ -756,7 +750,6 @@ LEAN_EXPORT lean_object* l_Lean_MetavarContext_MkBinding_instToStringException(l LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_MetavarContext_getExprAssignmentDomain___spec__1(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarContext_MkBinding_preserveOrder(uint8_t, lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimMVar_cont___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_MetavarContext_findUserName_x3f___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_List_mapM___at_Lean_MetavarContext_instantiateMVars___spec__5___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_MetavarContext_instantiateExprMVars___rarg___lambda__19___closed__3; LEAN_EXPORT lean_object* l_Std_PersistentArray_anyM___at_Lean_MetavarContext_localDeclDependsOn___spec__17___boxed(lean_object*, lean_object*); @@ -816,7 +809,6 @@ uint8_t l_Lean_Name_isAnonymous(lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimApp___spec__1(lean_object*, size_t, size_t, lean_object*, uint8_t, lean_object*); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_MetavarContext_MkBinding_collectDeps___spec__36(lean_object*, lean_object*, size_t, size_t); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_MetavarContext_MkBinding_collectDeps___spec__54(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*); -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_MetavarContext_findUserName_x3f___spec__5(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarContext_addExprMVarDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_withFreshCache___rarg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Std_PersistentArray_anyM___at_Lean_MetavarContext_MkBinding_collectDeps___spec__39(lean_object*, lean_object*); @@ -855,7 +847,6 @@ LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_MetavarContext_MkBinding_co LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimMVar_cont___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_EXPORT uint8_t l_Std_PersistentArray_anyMAux___at_Lean_MetavarContext_localDeclDependsOn___spec__32(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__17(lean_object*); -static lean_object* l_Lean_MetavarContext_renameMVar___closed__1; LEAN_EXPORT lean_object* l_Lean_LocalInstances_erase___lambda__1___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateExprMVars___spec__11___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l___private_Lean_MetavarContext_0__Lean_reprMetavarKind____x40_Lean_MetavarContext___hyg_89____closed__3; @@ -907,7 +898,6 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instant LEAN_EXPORT lean_object* l_Lean_MetavarContext_abstractRange___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ST_Prim_Ref_modifyGetUnsafe___rarg___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_MetavarContext_MkBinding_collectDeps___spec__21(lean_object*, lean_object*, size_t, size_t); -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimApp___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_PersistentArray_anyM___at_Lean_MetavarContext_MkBinding_collectDeps___spec__25___boxed(lean_object*, lean_object*); static lean_object* l_Lean_MetavarContext_MkBinding_instToStringException___closed__2; @@ -925,7 +915,6 @@ LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_ LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_MetavarContext_MkBinding_collectDeps___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__24___rarg(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Expr_withAppAux___at_Lean_MetavarContext_instantiateExprMVars___spec__33___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -static lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___closed__1; static lean_object* l___private_Lean_MetavarContext_0__Lean_reprMetavarKind____x40_Lean_MetavarContext___hyg_89____closed__20; LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_MetavarContext_localDeclDependsOn___spec__41___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_MetavarContext_getLevelDepth(lean_object*, lean_object*); @@ -1122,6 +1111,7 @@ LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__7___rarg(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_MetavarContext_DependsOn_dep_visit___at_Lean_MetavarContext_localDeclDependsOn___spec__22(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +extern lean_object* l_Lean_Name_instBEqName; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_MetavarContext_instantiateMVars___spec__28___rarg(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_MetavarContext_MkBinding_collectDeps___spec__58___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_MetavarContext_MkBinding_collectDeps___spec__27(lean_object*, lean_object*, size_t, size_t); @@ -1886,6 +1876,26 @@ x_1 = l_Lean_MetavarContext_lDepth___default___closed__1; return x_1; } } +static lean_object* _init_l_Lean_MetavarContext_userNames___default___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_instInhabitedMetavarDecl___closed__2; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_MetavarContext_userNames___default() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_MetavarContext_userNames___default___closed__1; +return x_1; +} +} static lean_object* _init_l_Lean_MetavarContext_lAssignment___default() { _start: { @@ -1950,18 +1960,20 @@ return x_3; static lean_object* _init_l_Lean_MetavarContext_instInhabitedMetavarContext___closed__1() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_MetavarContext_lDepth___default___closed__1; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_MetavarContext_userNames___default___closed__1; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_MetavarContext_instInhabitedMetavarContext() { @@ -1988,71 +2000,120 @@ uint8_t x_9; x_9 = !lean_is_exclusive(x_1); if (x_9 == 0) { -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_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; uint8_t x_20; x_10 = lean_ctor_get(x_1, 0); x_11 = lean_ctor_get(x_1, 1); x_12 = lean_ctor_get(x_1, 3); -x_13 = lean_unsigned_to_nat(1u); -x_14 = lean_nat_add(x_11, x_13); +x_13 = lean_ctor_get(x_1, 4); +x_14 = lean_unsigned_to_nat(1u); +x_15 = lean_nat_add(x_11, x_14); lean_inc(x_10); -x_15 = lean_alloc_ctor(0, 7, 1); -lean_ctor_set(x_15, 0, x_3); -lean_ctor_set(x_15, 1, x_4); -lean_ctor_set(x_15, 2, x_6); -lean_ctor_set(x_15, 3, x_10); -lean_ctor_set(x_15, 4, x_5); -lean_ctor_set(x_15, 5, x_8); -lean_ctor_set(x_15, 6, x_11); -lean_ctor_set_uint8(x_15, sizeof(void*)*7, x_7); -x_16 = l_Lean_instBEqMVarId; -x_17 = l_Lean_instHashableMVarId; -x_18 = l_Std_PersistentHashMap_insert___rarg(x_16, x_17, x_12, x_2, x_15); -lean_ctor_set(x_1, 3, x_18); -lean_ctor_set(x_1, 1, x_14); +lean_inc(x_3); +x_16 = lean_alloc_ctor(0, 7, 1); +lean_ctor_set(x_16, 0, x_3); +lean_ctor_set(x_16, 1, x_4); +lean_ctor_set(x_16, 2, x_6); +lean_ctor_set(x_16, 3, x_10); +lean_ctor_set(x_16, 4, x_5); +lean_ctor_set(x_16, 5, x_8); +lean_ctor_set(x_16, 6, x_11); +lean_ctor_set_uint8(x_16, sizeof(void*)*7, x_7); +x_17 = l_Lean_instBEqMVarId; +x_18 = l_Lean_instHashableMVarId; +lean_inc(x_2); +x_19 = l_Std_PersistentHashMap_insert___rarg(x_17, x_18, x_12, x_2, x_16); +x_20 = l_Lean_Name_isAnonymous(x_3); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = l_Lean_Name_instBEqName; +x_22 = l_Lean_instHashableName; +x_23 = l_Std_PersistentHashMap_insert___rarg(x_21, x_22, x_13, x_3, x_2); +lean_ctor_set(x_1, 4, x_23); +lean_ctor_set(x_1, 3, x_19); +lean_ctor_set(x_1, 1, x_15); return x_1; } else { -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; -x_19 = lean_ctor_get(x_1, 0); -x_20 = lean_ctor_get(x_1, 1); -x_21 = lean_ctor_get(x_1, 2); -x_22 = lean_ctor_get(x_1, 3); -x_23 = lean_ctor_get(x_1, 4); -x_24 = lean_ctor_get(x_1, 5); -x_25 = lean_ctor_get(x_1, 6); +lean_dec(x_3); +lean_dec(x_2); +lean_ctor_set(x_1, 3, x_19); +lean_ctor_set(x_1, 1, x_15); +return x_1; +} +} +else +{ +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; uint8_t x_38; +x_24 = lean_ctor_get(x_1, 0); +x_25 = lean_ctor_get(x_1, 1); +x_26 = lean_ctor_get(x_1, 2); +x_27 = lean_ctor_get(x_1, 3); +x_28 = lean_ctor_get(x_1, 4); +x_29 = lean_ctor_get(x_1, 5); +x_30 = lean_ctor_get(x_1, 6); +x_31 = lean_ctor_get(x_1, 7); +lean_inc(x_31); +lean_inc(x_30); +lean_inc(x_29); +lean_inc(x_28); +lean_inc(x_27); +lean_inc(x_26); lean_inc(x_25); lean_inc(x_24); -lean_inc(x_23); -lean_inc(x_22); -lean_inc(x_21); -lean_inc(x_20); -lean_inc(x_19); lean_dec(x_1); -x_26 = lean_unsigned_to_nat(1u); -x_27 = lean_nat_add(x_20, x_26); -lean_inc(x_19); -x_28 = lean_alloc_ctor(0, 7, 1); -lean_ctor_set(x_28, 0, x_3); -lean_ctor_set(x_28, 1, x_4); -lean_ctor_set(x_28, 2, x_6); -lean_ctor_set(x_28, 3, x_19); -lean_ctor_set(x_28, 4, x_5); -lean_ctor_set(x_28, 5, x_8); -lean_ctor_set(x_28, 6, x_20); -lean_ctor_set_uint8(x_28, sizeof(void*)*7, x_7); -x_29 = l_Lean_instBEqMVarId; -x_30 = l_Lean_instHashableMVarId; -x_31 = l_Std_PersistentHashMap_insert___rarg(x_29, x_30, x_22, x_2, x_28); -x_32 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_32, 0, x_19); -lean_ctor_set(x_32, 1, x_27); -lean_ctor_set(x_32, 2, x_21); -lean_ctor_set(x_32, 3, x_31); -lean_ctor_set(x_32, 4, x_23); -lean_ctor_set(x_32, 5, x_24); -lean_ctor_set(x_32, 6, x_25); -return x_32; +x_32 = lean_unsigned_to_nat(1u); +x_33 = lean_nat_add(x_25, x_32); +lean_inc(x_24); +lean_inc(x_3); +x_34 = lean_alloc_ctor(0, 7, 1); +lean_ctor_set(x_34, 0, x_3); +lean_ctor_set(x_34, 1, x_4); +lean_ctor_set(x_34, 2, x_6); +lean_ctor_set(x_34, 3, x_24); +lean_ctor_set(x_34, 4, x_5); +lean_ctor_set(x_34, 5, x_8); +lean_ctor_set(x_34, 6, x_25); +lean_ctor_set_uint8(x_34, sizeof(void*)*7, x_7); +x_35 = l_Lean_instBEqMVarId; +x_36 = l_Lean_instHashableMVarId; +lean_inc(x_2); +x_37 = l_Std_PersistentHashMap_insert___rarg(x_35, x_36, x_27, x_2, x_34); +x_38 = l_Lean_Name_isAnonymous(x_3); +if (x_38 == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_39 = l_Lean_Name_instBEqName; +x_40 = l_Lean_instHashableName; +x_41 = l_Std_PersistentHashMap_insert___rarg(x_39, x_40, x_28, x_3, x_2); +x_42 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_42, 0, x_24); +lean_ctor_set(x_42, 1, x_33); +lean_ctor_set(x_42, 2, x_26); +lean_ctor_set(x_42, 3, x_37); +lean_ctor_set(x_42, 4, x_41); +lean_ctor_set(x_42, 5, x_29); +lean_ctor_set(x_42, 6, x_30); +lean_ctor_set(x_42, 7, x_31); +return x_42; +} +else +{ +lean_object* x_43; +lean_dec(x_3); +lean_dec(x_2); +x_43 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_43, 0, x_24); +lean_ctor_set(x_43, 1, x_33); +lean_ctor_set(x_43, 2, x_26); +lean_ctor_set(x_43, 3, x_37); +lean_ctor_set(x_43, 4, x_28); +lean_ctor_set(x_43, 5, x_29); +lean_ctor_set(x_43, 6, x_30); +lean_ctor_set(x_43, 7, x_31); +return x_43; +} } } } @@ -2104,7 +2165,7 @@ return x_1; } 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; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_object* x_9; 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; x_9 = lean_ctor_get(x_1, 0); x_10 = lean_ctor_get(x_1, 1); x_11 = lean_ctor_get(x_1, 2); @@ -2112,6 +2173,8 @@ x_12 = lean_ctor_get(x_1, 3); x_13 = lean_ctor_get(x_1, 4); x_14 = lean_ctor_get(x_1, 5); x_15 = lean_ctor_get(x_1, 6); +x_16 = lean_ctor_get(x_1, 7); +lean_inc(x_16); lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); @@ -2120,19 +2183,20 @@ lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_dec(x_1); -x_16 = l_Lean_instBEqMVarId; -x_17 = l_Lean_instHashableMVarId; +x_17 = l_Lean_instBEqMVarId; +x_18 = l_Lean_instHashableMVarId; lean_inc(x_9); -x_18 = l_Std_PersistentHashMap_insert___rarg(x_16, x_17, x_11, x_2, x_9); -x_19 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_19, 0, x_9); -lean_ctor_set(x_19, 1, x_10); -lean_ctor_set(x_19, 2, x_18); -lean_ctor_set(x_19, 3, x_12); -lean_ctor_set(x_19, 4, x_13); -lean_ctor_set(x_19, 5, x_14); -lean_ctor_set(x_19, 6, x_15); -return x_19; +x_19 = l_Std_PersistentHashMap_insert___rarg(x_17, x_18, x_11, x_2, x_9); +x_20 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_20, 0, x_9); +lean_ctor_set(x_20, 1, x_10); +lean_ctor_set(x_20, 2, x_19); +lean_ctor_set(x_20, 3, x_12); +lean_ctor_set(x_20, 4, x_13); +lean_ctor_set(x_20, 5, x_14); +lean_ctor_set(x_20, 6, x_15); +lean_ctor_set(x_20, 7, x_16); +return x_20; } } } @@ -2188,7 +2252,7 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_MetavarContext_getDecl___closed__1; x_2 = l_Lean_MetavarContext_getDecl___closed__2; -x_3 = lean_unsigned_to_nat(341u); +x_3 = lean_unsigned_to_nat(343u); x_4 = lean_unsigned_to_nat(17u); x_5 = l_Lean_MetavarContext_getDecl___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -2222,362 +2286,17 @@ return x_9; } } } -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_MetavarContext_findUserName_x3f___spec__4(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; -x_6 = x_3 == x_4; -if (x_6 == 0) -{ -lean_object* x_7; -x_7 = lean_array_uget(x_2, x_3); -switch (lean_obj_tag(x_7)) { -case 0: -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; -lean_dec(x_5); -x_8 = lean_ctor_get(x_7, 0); -lean_inc(x_8); -x_9 = lean_ctor_get(x_7, 1); -lean_inc(x_9); -lean_dec(x_7); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -lean_dec(x_9); -x_11 = lean_name_eq(x_10, x_1); -lean_dec(x_10); -if (x_11 == 0) -{ -size_t x_12; size_t x_13; lean_object* x_14; -lean_dec(x_8); -x_12 = 1; -x_13 = x_3 + x_12; -x_14 = lean_box(0); -x_3 = x_13; -x_5 = x_14; -goto _start; -} -else -{ -lean_object* x_16; -lean_dec(x_1); -x_16 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_16, 0, x_8); -return x_16; -} -} -case 1: -{ -lean_object* x_17; lean_object* x_18; -x_17 = lean_ctor_get(x_7, 0); -lean_inc(x_17); -lean_dec(x_7); -lean_inc(x_1); -x_18 = l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3(x_1, x_17, x_5); -if (lean_obj_tag(x_18) == 0) -{ -uint8_t x_19; -lean_dec(x_1); -x_19 = !lean_is_exclusive(x_18); -if (x_19 == 0) -{ -return x_18; -} -else -{ -lean_object* x_20; lean_object* x_21; -x_20 = lean_ctor_get(x_18, 0); -lean_inc(x_20); -lean_dec(x_18); -x_21 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_21, 0, x_20); -return x_21; -} -} -else -{ -lean_object* x_22; size_t x_23; size_t x_24; -x_22 = lean_ctor_get(x_18, 0); -lean_inc(x_22); -lean_dec(x_18); -x_23 = 1; -x_24 = x_3 + x_23; -x_3 = x_24; -x_5 = x_22; -goto _start; -} -} -default: -{ -size_t x_26; size_t x_27; -x_26 = 1; -x_27 = x_3 + x_26; -x_3 = x_27; -goto _start; -} -} -} -else -{ -lean_object* x_29; -lean_dec(x_1); -x_29 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_29, 0, x_5); -return x_29; -} -} -} -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_MetavarContext_findUserName_x3f___spec__5___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; uint8_t x_8; -x_7 = lean_array_get_size(x_2); -x_8 = lean_nat_dec_lt(x_5, x_7); -lean_dec(x_7); -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_5); -lean_dec(x_1); -x_9 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_9, 0, x_6); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_array_fget(x_2, x_5); -x_11 = lean_array_fget(x_3, x_5); -lean_inc(x_1); -x_12 = lean_apply_3(x_1, x_6, x_10, x_11); -if (lean_obj_tag(x_12) == 0) -{ -uint8_t x_13; -lean_dec(x_5); -lean_dec(x_1); -x_13 = !lean_is_exclusive(x_12); -if (x_13 == 0) -{ -return x_12; -} -else -{ -lean_object* x_14; lean_object* x_15; -x_14 = lean_ctor_get(x_12, 0); -lean_inc(x_14); -lean_dec(x_12); -x_15 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_15, 0, x_14); -return x_15; -} -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_12, 0); -lean_inc(x_16); -lean_dec(x_12); -x_17 = lean_unsigned_to_nat(1u); -x_18 = lean_nat_add(x_5, x_17); -lean_dec(x_5); -x_4 = lean_box(0); -x_5 = x_18; -x_6 = x_16; -goto _start; -} -} -} -} -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_MetavarContext_findUserName_x3f___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_MetavarContext_findUserName_x3f___spec__5___rarg___boxed), 6, 0); -return x_4; -} -} -static lean_object* _init_l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_box(0); -x_2 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; uint8_t x_6; -x_5 = lean_ctor_get(x_4, 0); -x_6 = lean_name_eq(x_5, x_1); -if (x_6 == 0) -{ -lean_object* x_7; -lean_dec(x_3); -x_7 = l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___closed__1; -return x_7; -} -else -{ -lean_object* x_8; -x_8 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_8, 0, x_3); -return x_8; -} -} -} -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -lean_dec(x_2); -x_5 = lean_array_get_size(x_4); -x_6 = lean_unsigned_to_nat(0u); -x_7 = lean_nat_dec_lt(x_6, x_5); -if (x_7 == 0) -{ -lean_object* x_8; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -x_8 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_8, 0, x_3); -return x_8; -} -else -{ -uint8_t x_9; -x_9 = lean_nat_dec_le(x_5, x_5); -if (x_9 == 0) -{ -lean_object* x_10; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_1); -x_10 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_10, 0, x_3); -return x_10; -} -else -{ -size_t x_11; size_t x_12; lean_object* x_13; -x_11 = 0; -x_12 = lean_usize_of_nat(x_5); -lean_dec(x_5); -x_13 = l_Array_foldlMUnsafe_fold___at_Lean_MetavarContext_findUserName_x3f___spec__4(x_1, x_4, x_11, x_12, x_3); -lean_dec(x_4); -return x_13; -} -} -} -else -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_14 = lean_ctor_get(x_2, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_2, 1); -lean_inc(x_15); -lean_dec(x_2); -x_16 = lean_alloc_closure((void*)(l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___boxed), 4, 1); -lean_closure_set(x_16, 0, x_1); -x_17 = lean_unsigned_to_nat(0u); -x_18 = l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_MetavarContext_findUserName_x3f___spec__5___rarg(x_16, x_14, x_15, lean_box(0), x_17, x_3); -lean_dec(x_15); -lean_dec(x_14); -return x_18; -} -} -} -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_MetavarContext_findUserName_x3f___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -lean_object* x_6; lean_object* x_7; -lean_dec(x_3); -lean_dec(x_2); -x_6 = lean_ctor_get(x_4, 0); -lean_inc(x_6); -lean_dec(x_4); -x_7 = l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3(x_1, x_6, x_5); -return x_7; -} -} -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_forM___at_Lean_MetavarContext_findUserName_x3f___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; -x_5 = lean_box(0); -x_6 = l_Std_PersistentHashMap_foldlM___at_Lean_MetavarContext_findUserName_x3f___spec__2(x_1, x_2, x_3, x_4, x_5); -return x_6; -} -} LEAN_EXPORT lean_object* l_Lean_MetavarContext_findUserName_x3f(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_3 = lean_ctor_get(x_1, 3); +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_3 = lean_ctor_get(x_1, 4); lean_inc(x_3); lean_dec(x_1); -x_4 = l_Lean_instBEqMVarId; -x_5 = l_Lean_instHashableMVarId; -x_6 = lean_box(0); -x_7 = l_Std_PersistentHashMap_foldlM___at_Lean_MetavarContext_findUserName_x3f___spec__2(x_2, x_4, x_5, x_3, x_6); -if (lean_obj_tag(x_7) == 0) -{ -lean_object* x_8; lean_object* x_9; -x_8 = lean_ctor_get(x_7, 0); -lean_inc(x_8); -lean_dec(x_7); -x_9 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_9, 0, x_8); -return x_9; -} -else -{ -lean_object* x_10; -lean_dec(x_7); -x_10 = lean_box(0); -return x_10; -} -} -} -LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_MetavarContext_findUserName_x3f___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -size_t x_6; size_t x_7; lean_object* x_8; -x_6 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_7 = lean_unbox_usize(x_4); -lean_dec(x_4); -x_8 = l_Array_foldlMUnsafe_fold___at_Lean_MetavarContext_findUserName_x3f___spec__4(x_1, x_2, x_6, x_7, x_5); -lean_dec(x_2); -return x_8; -} -} -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_MetavarContext_findUserName_x3f___spec__5___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Std_PersistentHashMap_foldlMAux_traverse___at_Lean_MetavarContext_findUserName_x3f___spec__5___rarg(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_3); -lean_dec(x_2); -return x_7; -} -} -LEAN_EXPORT lean_object* l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__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_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1(x_1, x_2, x_3, x_4); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; +x_4 = l_Lean_Name_instBEqName; +x_5 = l_Lean_instHashableName; +x_6 = l_Std_PersistentHashMap_find_x3f___rarg(x_4, x_5, x_3, x_2); +return x_6; } } LEAN_EXPORT lean_object* l_Lean_MetavarContext_setMVarKind(lean_object* x_1, lean_object* x_2, uint8_t x_3) { @@ -2640,7 +2359,7 @@ return x_1; } else { -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_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; x_23 = lean_ctor_get(x_1, 0); x_24 = lean_ctor_get(x_1, 1); x_25 = lean_ctor_get(x_1, 2); @@ -2648,6 +2367,8 @@ x_26 = lean_ctor_get(x_1, 3); x_27 = lean_ctor_get(x_1, 4); x_28 = lean_ctor_get(x_1, 5); x_29 = lean_ctor_get(x_1, 6); +x_30 = lean_ctor_get(x_1, 7); +lean_inc(x_30); lean_inc(x_29); lean_inc(x_28); lean_inc(x_27); @@ -2656,157 +2377,16 @@ lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_dec(x_1); -x_30 = lean_ctor_get(x_4, 0); -lean_inc(x_30); -x_31 = lean_ctor_get(x_4, 1); +x_31 = lean_ctor_get(x_4, 0); lean_inc(x_31); -x_32 = lean_ctor_get(x_4, 2); +x_32 = lean_ctor_get(x_4, 1); lean_inc(x_32); -x_33 = lean_ctor_get(x_4, 3); +x_33 = lean_ctor_get(x_4, 2); lean_inc(x_33); -x_34 = lean_ctor_get(x_4, 4); +x_34 = lean_ctor_get(x_4, 3); lean_inc(x_34); -x_35 = lean_ctor_get(x_4, 5); +x_35 = lean_ctor_get(x_4, 4); lean_inc(x_35); -x_36 = lean_ctor_get(x_4, 6); -lean_inc(x_36); -if (lean_is_exclusive(x_4)) { - lean_ctor_release(x_4, 0); - lean_ctor_release(x_4, 1); - lean_ctor_release(x_4, 2); - lean_ctor_release(x_4, 3); - lean_ctor_release(x_4, 4); - lean_ctor_release(x_4, 5); - lean_ctor_release(x_4, 6); - x_37 = x_4; -} else { - lean_dec_ref(x_4); - x_37 = lean_box(0); -} -if (lean_is_scalar(x_37)) { - x_38 = lean_alloc_ctor(0, 7, 1); -} else { - x_38 = x_37; -} -lean_ctor_set(x_38, 0, x_30); -lean_ctor_set(x_38, 1, x_31); -lean_ctor_set(x_38, 2, x_32); -lean_ctor_set(x_38, 3, x_33); -lean_ctor_set(x_38, 4, x_34); -lean_ctor_set(x_38, 5, x_35); -lean_ctor_set(x_38, 6, x_36); -lean_ctor_set_uint8(x_38, sizeof(void*)*7, x_3); -x_39 = l_Lean_instBEqMVarId; -x_40 = l_Lean_instHashableMVarId; -x_41 = l_Std_PersistentHashMap_insert___rarg(x_39, x_40, x_26, x_2, x_38); -x_42 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_42, 0, x_23); -lean_ctor_set(x_42, 1, x_24); -lean_ctor_set(x_42, 2, x_25); -lean_ctor_set(x_42, 3, x_41); -lean_ctor_set(x_42, 4, x_27); -lean_ctor_set(x_42, 5, x_28); -lean_ctor_set(x_42, 6, x_29); -return x_42; -} -} -} -LEAN_EXPORT lean_object* l_Lean_MetavarContext_setMVarKind___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; lean_object* x_5; -x_4 = lean_unbox(x_3); -lean_dec(x_3); -x_5 = l_Lean_MetavarContext_setMVarKind(x_1, x_2, x_4); -return x_5; -} -} -LEAN_EXPORT lean_object* l_Lean_MetavarContext_setMVarUserName(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; uint8_t x_5; -lean_inc(x_2); -lean_inc(x_1); -x_4 = l_Lean_MetavarContext_getDecl(x_1, x_2); -x_5 = !lean_is_exclusive(x_1); -if (x_5 == 0) -{ -uint8_t x_6; -x_6 = !lean_is_exclusive(x_4); -if (x_6 == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = lean_ctor_get(x_1, 3); -x_8 = lean_ctor_get(x_4, 0); -lean_dec(x_8); -lean_ctor_set(x_4, 0, x_3); -x_9 = l_Lean_instBEqMVarId; -x_10 = l_Lean_instHashableMVarId; -x_11 = l_Std_PersistentHashMap_insert___rarg(x_9, x_10, x_7, x_2, x_4); -lean_ctor_set(x_1, 3, x_11); -return x_1; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t 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; -x_12 = lean_ctor_get(x_1, 3); -x_13 = lean_ctor_get(x_4, 1); -x_14 = lean_ctor_get(x_4, 2); -x_15 = lean_ctor_get(x_4, 3); -x_16 = lean_ctor_get(x_4, 4); -x_17 = lean_ctor_get_uint8(x_4, sizeof(void*)*7); -x_18 = lean_ctor_get(x_4, 5); -x_19 = lean_ctor_get(x_4, 6); -lean_inc(x_19); -lean_inc(x_18); -lean_inc(x_16); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_13); -lean_dec(x_4); -x_20 = lean_alloc_ctor(0, 7, 1); -lean_ctor_set(x_20, 0, x_3); -lean_ctor_set(x_20, 1, x_13); -lean_ctor_set(x_20, 2, x_14); -lean_ctor_set(x_20, 3, x_15); -lean_ctor_set(x_20, 4, x_16); -lean_ctor_set(x_20, 5, x_18); -lean_ctor_set(x_20, 6, x_19); -lean_ctor_set_uint8(x_20, sizeof(void*)*7, x_17); -x_21 = l_Lean_instBEqMVarId; -x_22 = l_Lean_instHashableMVarId; -x_23 = l_Std_PersistentHashMap_insert___rarg(x_21, x_22, x_12, x_2, x_20); -lean_ctor_set(x_1, 3, x_23); -return x_1; -} -} -else -{ -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; uint8_t 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; -x_24 = lean_ctor_get(x_1, 0); -x_25 = lean_ctor_get(x_1, 1); -x_26 = lean_ctor_get(x_1, 2); -x_27 = lean_ctor_get(x_1, 3); -x_28 = lean_ctor_get(x_1, 4); -x_29 = lean_ctor_get(x_1, 5); -x_30 = lean_ctor_get(x_1, 6); -lean_inc(x_30); -lean_inc(x_29); -lean_inc(x_28); -lean_inc(x_27); -lean_inc(x_26); -lean_inc(x_25); -lean_inc(x_24); -lean_dec(x_1); -x_31 = lean_ctor_get(x_4, 1); -lean_inc(x_31); -x_32 = lean_ctor_get(x_4, 2); -lean_inc(x_32); -x_33 = lean_ctor_get(x_4, 3); -lean_inc(x_33); -x_34 = lean_ctor_get(x_4, 4); -lean_inc(x_34); -x_35 = lean_ctor_get_uint8(x_4, sizeof(void*)*7); x_36 = lean_ctor_get(x_4, 5); lean_inc(x_36); x_37 = lean_ctor_get(x_4, 6); @@ -2829,29 +2409,246 @@ if (lean_is_scalar(x_38)) { } else { x_39 = x_38; } -lean_ctor_set(x_39, 0, x_3); -lean_ctor_set(x_39, 1, x_31); -lean_ctor_set(x_39, 2, x_32); -lean_ctor_set(x_39, 3, x_33); -lean_ctor_set(x_39, 4, x_34); +lean_ctor_set(x_39, 0, x_31); +lean_ctor_set(x_39, 1, x_32); +lean_ctor_set(x_39, 2, x_33); +lean_ctor_set(x_39, 3, x_34); +lean_ctor_set(x_39, 4, x_35); lean_ctor_set(x_39, 5, x_36); lean_ctor_set(x_39, 6, x_37); -lean_ctor_set_uint8(x_39, sizeof(void*)*7, x_35); +lean_ctor_set_uint8(x_39, sizeof(void*)*7, x_3); x_40 = l_Lean_instBEqMVarId; x_41 = l_Lean_instHashableMVarId; -x_42 = l_Std_PersistentHashMap_insert___rarg(x_40, x_41, x_27, x_2, x_39); -x_43 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_43, 0, x_24); -lean_ctor_set(x_43, 1, x_25); -lean_ctor_set(x_43, 2, x_26); +x_42 = l_Std_PersistentHashMap_insert___rarg(x_40, x_41, x_26, x_2, x_39); +x_43 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_43, 0, x_23); +lean_ctor_set(x_43, 1, x_24); +lean_ctor_set(x_43, 2, x_25); lean_ctor_set(x_43, 3, x_42); -lean_ctor_set(x_43, 4, x_28); -lean_ctor_set(x_43, 5, x_29); -lean_ctor_set(x_43, 6, x_30); +lean_ctor_set(x_43, 4, x_27); +lean_ctor_set(x_43, 5, x_28); +lean_ctor_set(x_43, 6, x_29); +lean_ctor_set(x_43, 7, x_30); return x_43; } } } +LEAN_EXPORT lean_object* l_Lean_MetavarContext_setMVarKind___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = lean_unbox(x_3); +lean_dec(x_3); +x_5 = l_Lean_MetavarContext_setMVarKind(x_1, x_2, x_4); +return x_5; +} +} +LEAN_EXPORT lean_object* l_Lean_MetavarContext_renameMVar(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +lean_inc(x_2); +lean_inc(x_1); +x_4 = l_Lean_MetavarContext_getDecl(x_1, x_2); +x_5 = !lean_is_exclusive(x_1); +if (x_5 == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_4); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_7 = lean_ctor_get(x_1, 3); +x_8 = lean_ctor_get(x_1, 4); +x_9 = lean_ctor_get(x_4, 0); +lean_inc(x_3); +lean_ctor_set(x_4, 0, x_3); +x_10 = l_Lean_instBEqMVarId; +x_11 = l_Lean_instHashableMVarId; +lean_inc(x_2); +x_12 = l_Std_PersistentHashMap_insert___rarg(x_10, x_11, x_7, x_2, x_4); +x_13 = l_Lean_Name_instBEqName; +x_14 = l_Lean_instHashableName; +x_15 = l_Std_PersistentHashMap_erase___rarg(x_13, x_14, x_8, x_9); +x_16 = l_Lean_Name_isAnonymous(x_3); +if (x_16 == 0) +{ +lean_object* x_17; +x_17 = l_Std_PersistentHashMap_insert___rarg(x_13, x_14, x_15, x_3, x_2); +lean_ctor_set(x_1, 4, x_17); +lean_ctor_set(x_1, 3, x_12); +return x_1; +} +else +{ +lean_dec(x_3); +lean_dec(x_2); +lean_ctor_set(x_1, 4, x_15); +lean_ctor_set(x_1, 3, x_12); +return x_1; +} +} +else +{ +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; uint8_t 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; uint8_t x_35; +x_18 = lean_ctor_get(x_1, 3); +x_19 = lean_ctor_get(x_1, 4); +x_20 = lean_ctor_get(x_4, 0); +x_21 = lean_ctor_get(x_4, 1); +x_22 = lean_ctor_get(x_4, 2); +x_23 = lean_ctor_get(x_4, 3); +x_24 = lean_ctor_get(x_4, 4); +x_25 = lean_ctor_get_uint8(x_4, sizeof(void*)*7); +x_26 = lean_ctor_get(x_4, 5); +x_27 = lean_ctor_get(x_4, 6); +lean_inc(x_27); +lean_inc(x_26); +lean_inc(x_24); +lean_inc(x_23); +lean_inc(x_22); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_4); +lean_inc(x_3); +x_28 = lean_alloc_ctor(0, 7, 1); +lean_ctor_set(x_28, 0, x_3); +lean_ctor_set(x_28, 1, x_21); +lean_ctor_set(x_28, 2, x_22); +lean_ctor_set(x_28, 3, x_23); +lean_ctor_set(x_28, 4, x_24); +lean_ctor_set(x_28, 5, x_26); +lean_ctor_set(x_28, 6, x_27); +lean_ctor_set_uint8(x_28, sizeof(void*)*7, x_25); +x_29 = l_Lean_instBEqMVarId; +x_30 = l_Lean_instHashableMVarId; +lean_inc(x_2); +x_31 = l_Std_PersistentHashMap_insert___rarg(x_29, x_30, x_18, x_2, x_28); +x_32 = l_Lean_Name_instBEqName; +x_33 = l_Lean_instHashableName; +x_34 = l_Std_PersistentHashMap_erase___rarg(x_32, x_33, x_19, x_20); +x_35 = l_Lean_Name_isAnonymous(x_3); +if (x_35 == 0) +{ +lean_object* x_36; +x_36 = l_Std_PersistentHashMap_insert___rarg(x_32, x_33, x_34, x_3, x_2); +lean_ctor_set(x_1, 4, x_36); +lean_ctor_set(x_1, 3, x_31); +return x_1; +} +else +{ +lean_dec(x_3); +lean_dec(x_2); +lean_ctor_set(x_1, 4, x_34); +lean_ctor_set(x_1, 3, x_31); +return x_1; +} +} +} +else +{ +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; uint8_t 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; uint8_t x_61; +x_37 = lean_ctor_get(x_1, 0); +x_38 = lean_ctor_get(x_1, 1); +x_39 = lean_ctor_get(x_1, 2); +x_40 = lean_ctor_get(x_1, 3); +x_41 = lean_ctor_get(x_1, 4); +x_42 = lean_ctor_get(x_1, 5); +x_43 = lean_ctor_get(x_1, 6); +x_44 = lean_ctor_get(x_1, 7); +lean_inc(x_44); +lean_inc(x_43); +lean_inc(x_42); +lean_inc(x_41); +lean_inc(x_40); +lean_inc(x_39); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_1); +x_45 = lean_ctor_get(x_4, 0); +lean_inc(x_45); +x_46 = lean_ctor_get(x_4, 1); +lean_inc(x_46); +x_47 = lean_ctor_get(x_4, 2); +lean_inc(x_47); +x_48 = lean_ctor_get(x_4, 3); +lean_inc(x_48); +x_49 = lean_ctor_get(x_4, 4); +lean_inc(x_49); +x_50 = lean_ctor_get_uint8(x_4, sizeof(void*)*7); +x_51 = lean_ctor_get(x_4, 5); +lean_inc(x_51); +x_52 = lean_ctor_get(x_4, 6); +lean_inc(x_52); +if (lean_is_exclusive(x_4)) { + lean_ctor_release(x_4, 0); + lean_ctor_release(x_4, 1); + lean_ctor_release(x_4, 2); + lean_ctor_release(x_4, 3); + lean_ctor_release(x_4, 4); + lean_ctor_release(x_4, 5); + lean_ctor_release(x_4, 6); + x_53 = x_4; +} else { + lean_dec_ref(x_4); + x_53 = lean_box(0); +} +lean_inc(x_3); +if (lean_is_scalar(x_53)) { + x_54 = lean_alloc_ctor(0, 7, 1); +} else { + x_54 = x_53; +} +lean_ctor_set(x_54, 0, x_3); +lean_ctor_set(x_54, 1, x_46); +lean_ctor_set(x_54, 2, x_47); +lean_ctor_set(x_54, 3, x_48); +lean_ctor_set(x_54, 4, x_49); +lean_ctor_set(x_54, 5, x_51); +lean_ctor_set(x_54, 6, x_52); +lean_ctor_set_uint8(x_54, sizeof(void*)*7, x_50); +x_55 = l_Lean_instBEqMVarId; +x_56 = l_Lean_instHashableMVarId; +lean_inc(x_2); +x_57 = l_Std_PersistentHashMap_insert___rarg(x_55, x_56, x_40, x_2, x_54); +x_58 = l_Lean_Name_instBEqName; +x_59 = l_Lean_instHashableName; +x_60 = l_Std_PersistentHashMap_erase___rarg(x_58, x_59, x_41, x_45); +x_61 = l_Lean_Name_isAnonymous(x_3); +if (x_61 == 0) +{ +lean_object* x_62; lean_object* x_63; +x_62 = l_Std_PersistentHashMap_insert___rarg(x_58, x_59, x_60, x_3, x_2); +x_63 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_63, 0, x_37); +lean_ctor_set(x_63, 1, x_38); +lean_ctor_set(x_63, 2, x_39); +lean_ctor_set(x_63, 3, x_57); +lean_ctor_set(x_63, 4, x_62); +lean_ctor_set(x_63, 5, x_42); +lean_ctor_set(x_63, 6, x_43); +lean_ctor_set(x_63, 7, x_44); +return x_63; +} +else +{ +lean_object* x_64; +lean_dec(x_3); +lean_dec(x_2); +x_64 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_64, 0, x_37); +lean_ctor_set(x_64, 1, x_38); +lean_ctor_set(x_64, 2, x_39); +lean_ctor_set(x_64, 3, x_57); +lean_ctor_set(x_64, 4, x_60); +lean_ctor_set(x_64, 5, x_42); +lean_ctor_set(x_64, 6, x_43); +lean_ctor_set(x_64, 7, x_44); +return x_64; +} +} +} +} LEAN_EXPORT lean_object* l_Lean_MetavarContext_setMVarType(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -2913,7 +2710,7 @@ return x_1; } else { -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; uint8_t 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_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; uint8_t 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; x_24 = lean_ctor_get(x_1, 0); x_25 = lean_ctor_get(x_1, 1); x_26 = lean_ctor_get(x_1, 2); @@ -2921,6 +2718,8 @@ x_27 = lean_ctor_get(x_1, 3); x_28 = lean_ctor_get(x_1, 4); x_29 = lean_ctor_get(x_1, 5); x_30 = lean_ctor_get(x_1, 6); +x_31 = lean_ctor_get(x_1, 7); +lean_inc(x_31); lean_inc(x_30); lean_inc(x_29); lean_inc(x_28); @@ -2929,19 +2728,19 @@ lean_inc(x_26); lean_inc(x_25); lean_inc(x_24); lean_dec(x_1); -x_31 = lean_ctor_get(x_4, 0); -lean_inc(x_31); -x_32 = lean_ctor_get(x_4, 1); +x_32 = lean_ctor_get(x_4, 0); lean_inc(x_32); -x_33 = lean_ctor_get(x_4, 3); +x_33 = lean_ctor_get(x_4, 1); lean_inc(x_33); -x_34 = lean_ctor_get(x_4, 4); +x_34 = lean_ctor_get(x_4, 3); lean_inc(x_34); -x_35 = lean_ctor_get_uint8(x_4, sizeof(void*)*7); -x_36 = lean_ctor_get(x_4, 5); -lean_inc(x_36); -x_37 = lean_ctor_get(x_4, 6); +x_35 = lean_ctor_get(x_4, 4); +lean_inc(x_35); +x_36 = lean_ctor_get_uint8(x_4, sizeof(void*)*7); +x_37 = lean_ctor_get(x_4, 5); lean_inc(x_37); +x_38 = lean_ctor_get(x_4, 6); +lean_inc(x_38); if (lean_is_exclusive(x_4)) { lean_ctor_release(x_4, 0); lean_ctor_release(x_4, 1); @@ -2950,36 +2749,37 @@ if (lean_is_exclusive(x_4)) { lean_ctor_release(x_4, 4); lean_ctor_release(x_4, 5); lean_ctor_release(x_4, 6); - x_38 = x_4; + x_39 = x_4; } else { lean_dec_ref(x_4); - x_38 = lean_box(0); + x_39 = lean_box(0); } -if (lean_is_scalar(x_38)) { - x_39 = lean_alloc_ctor(0, 7, 1); +if (lean_is_scalar(x_39)) { + x_40 = lean_alloc_ctor(0, 7, 1); } else { - x_39 = x_38; + x_40 = x_39; } -lean_ctor_set(x_39, 0, x_31); -lean_ctor_set(x_39, 1, x_32); -lean_ctor_set(x_39, 2, x_3); -lean_ctor_set(x_39, 3, x_33); -lean_ctor_set(x_39, 4, x_34); -lean_ctor_set(x_39, 5, x_36); -lean_ctor_set(x_39, 6, x_37); -lean_ctor_set_uint8(x_39, sizeof(void*)*7, x_35); -x_40 = l_Lean_instBEqMVarId; -x_41 = l_Lean_instHashableMVarId; -x_42 = l_Std_PersistentHashMap_insert___rarg(x_40, x_41, x_27, x_2, x_39); -x_43 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_43, 0, x_24); -lean_ctor_set(x_43, 1, x_25); -lean_ctor_set(x_43, 2, x_26); -lean_ctor_set(x_43, 3, x_42); -lean_ctor_set(x_43, 4, x_28); -lean_ctor_set(x_43, 5, x_29); -lean_ctor_set(x_43, 6, x_30); -return x_43; +lean_ctor_set(x_40, 0, x_32); +lean_ctor_set(x_40, 1, x_33); +lean_ctor_set(x_40, 2, x_3); +lean_ctor_set(x_40, 3, x_34); +lean_ctor_set(x_40, 4, x_35); +lean_ctor_set(x_40, 5, x_37); +lean_ctor_set(x_40, 6, x_38); +lean_ctor_set_uint8(x_40, sizeof(void*)*7, x_36); +x_41 = l_Lean_instBEqMVarId; +x_42 = l_Lean_instHashableMVarId; +x_43 = l_Std_PersistentHashMap_insert___rarg(x_41, x_42, x_27, x_2, x_40); +x_44 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_44, 0, x_24); +lean_ctor_set(x_44, 1, x_25); +lean_ctor_set(x_44, 2, x_26); +lean_ctor_set(x_44, 3, x_43); +lean_ctor_set(x_44, 4, x_28); +lean_ctor_set(x_44, 5, x_29); +lean_ctor_set(x_44, 6, x_30); +lean_ctor_set(x_44, 7, x_31); +return x_44; } } } @@ -3010,7 +2810,7 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_MetavarContext_getDecl___closed__1; x_2 = l_Lean_MetavarContext_getLevelDepth___closed__1; -x_3 = lean_unsigned_to_nat(370u); +x_3 = lean_unsigned_to_nat(372u); x_4 = lean_unsigned_to_nat(14u); x_5 = l_Lean_MetavarContext_getDecl___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -3074,184 +2874,6 @@ x_4 = lean_box(x_3); return x_4; } } -LEAN_EXPORT lean_object* l_panic___at_Lean_MetavarContext_renameMVar___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_MetavarContext_instInhabitedMetavarContext; -x_3 = lean_panic_fn(x_2, x_1); -return x_3; -} -} -static lean_object* _init_l_Lean_MetavarContext_renameMVar___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("Lean.MetavarContext.renameMVar"); -return x_1; -} -} -static lean_object* _init_l_Lean_MetavarContext_renameMVar___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_1 = l_Lean_MetavarContext_getDecl___closed__1; -x_2 = l_Lean_MetavarContext_renameMVar___closed__1; -x_3 = lean_unsigned_to_nat(379u); -x_4 = lean_unsigned_to_nat(21u); -x_5 = l_Lean_MetavarContext_getDecl___closed__3; -x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); -return x_6; -} -} -LEAN_EXPORT lean_object* l_Lean_MetavarContext_renameMVar(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -lean_inc(x_2); -lean_inc(x_1); -x_4 = l_Lean_MetavarContext_findDecl_x3f(x_1, x_2); -if (lean_obj_tag(x_4) == 0) -{ -lean_object* x_5; lean_object* x_6; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_5 = l_Lean_MetavarContext_renameMVar___closed__2; -x_6 = l_panic___at_Lean_MetavarContext_renameMVar___spec__1(x_5); -return x_6; -} -else -{ -lean_object* x_7; uint8_t x_8; -x_7 = lean_ctor_get(x_4, 0); -lean_inc(x_7); -lean_dec(x_4); -x_8 = !lean_is_exclusive(x_1); -if (x_8 == 0) -{ -uint8_t x_9; -x_9 = !lean_is_exclusive(x_7); -if (x_9 == 0) -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_10 = lean_ctor_get(x_1, 3); -x_11 = lean_ctor_get(x_7, 0); -lean_dec(x_11); -lean_ctor_set(x_7, 0, x_3); -x_12 = l_Lean_instBEqMVarId; -x_13 = l_Lean_instHashableMVarId; -x_14 = l_Std_PersistentHashMap_insert___rarg(x_12, x_13, x_10, x_2, x_7); -lean_ctor_set(x_1, 3, x_14); -return x_1; -} -else -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t 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; -x_15 = lean_ctor_get(x_1, 3); -x_16 = lean_ctor_get(x_7, 1); -x_17 = lean_ctor_get(x_7, 2); -x_18 = lean_ctor_get(x_7, 3); -x_19 = lean_ctor_get(x_7, 4); -x_20 = lean_ctor_get_uint8(x_7, sizeof(void*)*7); -x_21 = lean_ctor_get(x_7, 5); -x_22 = lean_ctor_get(x_7, 6); -lean_inc(x_22); -lean_inc(x_21); -lean_inc(x_19); -lean_inc(x_18); -lean_inc(x_17); -lean_inc(x_16); -lean_dec(x_7); -x_23 = lean_alloc_ctor(0, 7, 1); -lean_ctor_set(x_23, 0, x_3); -lean_ctor_set(x_23, 1, x_16); -lean_ctor_set(x_23, 2, x_17); -lean_ctor_set(x_23, 3, x_18); -lean_ctor_set(x_23, 4, x_19); -lean_ctor_set(x_23, 5, x_21); -lean_ctor_set(x_23, 6, x_22); -lean_ctor_set_uint8(x_23, sizeof(void*)*7, x_20); -x_24 = l_Lean_instBEqMVarId; -x_25 = l_Lean_instHashableMVarId; -x_26 = l_Std_PersistentHashMap_insert___rarg(x_24, x_25, x_15, x_2, x_23); -lean_ctor_set(x_1, 3, x_26); -return x_1; -} -} -else -{ -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; uint8_t 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; -x_27 = lean_ctor_get(x_1, 0); -x_28 = lean_ctor_get(x_1, 1); -x_29 = lean_ctor_get(x_1, 2); -x_30 = lean_ctor_get(x_1, 3); -x_31 = lean_ctor_get(x_1, 4); -x_32 = lean_ctor_get(x_1, 5); -x_33 = lean_ctor_get(x_1, 6); -lean_inc(x_33); -lean_inc(x_32); -lean_inc(x_31); -lean_inc(x_30); -lean_inc(x_29); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_1); -x_34 = lean_ctor_get(x_7, 1); -lean_inc(x_34); -x_35 = lean_ctor_get(x_7, 2); -lean_inc(x_35); -x_36 = lean_ctor_get(x_7, 3); -lean_inc(x_36); -x_37 = lean_ctor_get(x_7, 4); -lean_inc(x_37); -x_38 = lean_ctor_get_uint8(x_7, sizeof(void*)*7); -x_39 = lean_ctor_get(x_7, 5); -lean_inc(x_39); -x_40 = lean_ctor_get(x_7, 6); -lean_inc(x_40); -if (lean_is_exclusive(x_7)) { - lean_ctor_release(x_7, 0); - lean_ctor_release(x_7, 1); - lean_ctor_release(x_7, 2); - lean_ctor_release(x_7, 3); - lean_ctor_release(x_7, 4); - lean_ctor_release(x_7, 5); - lean_ctor_release(x_7, 6); - x_41 = x_7; -} else { - lean_dec_ref(x_7); - x_41 = lean_box(0); -} -if (lean_is_scalar(x_41)) { - x_42 = lean_alloc_ctor(0, 7, 1); -} else { - x_42 = x_41; -} -lean_ctor_set(x_42, 0, x_3); -lean_ctor_set(x_42, 1, x_34); -lean_ctor_set(x_42, 2, x_35); -lean_ctor_set(x_42, 3, x_36); -lean_ctor_set(x_42, 4, x_37); -lean_ctor_set(x_42, 5, x_39); -lean_ctor_set(x_42, 6, x_40); -lean_ctor_set_uint8(x_42, sizeof(void*)*7, x_38); -x_43 = l_Lean_instBEqMVarId; -x_44 = l_Lean_instHashableMVarId; -x_45 = l_Std_PersistentHashMap_insert___rarg(x_43, x_44, x_30, x_2, x_42); -x_46 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_46, 0, x_27); -lean_ctor_set(x_46, 1, x_28); -lean_ctor_set(x_46, 2, x_29); -lean_ctor_set(x_46, 3, x_45); -lean_ctor_set(x_46, 4, x_31); -lean_ctor_set(x_46, 5, x_32); -lean_ctor_set(x_46, 6, x_33); -return x_46; -} -} -} -} LEAN_EXPORT lean_object* l_Lean_MetavarContext_assignLevel(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -3260,54 +2882,6 @@ x_4 = !lean_is_exclusive(x_1); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_5 = lean_ctor_get(x_1, 4); -x_6 = l_Lean_instBEqMVarId; -x_7 = l_Lean_instHashableMVarId; -x_8 = l_Std_PersistentHashMap_insert___rarg(x_6, x_7, x_5, x_2, x_3); -lean_ctor_set(x_1, 4, x_8); -return x_1; -} -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; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_9 = lean_ctor_get(x_1, 0); -x_10 = lean_ctor_get(x_1, 1); -x_11 = lean_ctor_get(x_1, 2); -x_12 = lean_ctor_get(x_1, 3); -x_13 = lean_ctor_get(x_1, 4); -x_14 = lean_ctor_get(x_1, 5); -x_15 = lean_ctor_get(x_1, 6); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_dec(x_1); -x_16 = l_Lean_instBEqMVarId; -x_17 = l_Lean_instHashableMVarId; -x_18 = l_Std_PersistentHashMap_insert___rarg(x_16, x_17, x_13, x_2, x_3); -x_19 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_19, 0, x_9); -lean_ctor_set(x_19, 1, x_10); -lean_ctor_set(x_19, 2, x_11); -lean_ctor_set(x_19, 3, x_12); -lean_ctor_set(x_19, 4, x_18); -lean_ctor_set(x_19, 5, x_14); -lean_ctor_set(x_19, 6, x_15); -return x_19; -} -} -} -LEAN_EXPORT lean_object* l_Lean_MetavarContext_assignExpr(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_1); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_5 = lean_ctor_get(x_1, 5); x_6 = l_Lean_instBEqMVarId; x_7 = l_Lean_instHashableMVarId; @@ -3317,7 +2891,7 @@ return x_1; } 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; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_object* x_9; 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; x_9 = lean_ctor_get(x_1, 0); x_10 = lean_ctor_get(x_1, 1); x_11 = lean_ctor_get(x_1, 2); @@ -3325,6 +2899,8 @@ x_12 = lean_ctor_get(x_1, 3); x_13 = lean_ctor_get(x_1, 4); x_14 = lean_ctor_get(x_1, 5); x_15 = lean_ctor_get(x_1, 6); +x_16 = lean_ctor_get(x_1, 7); +lean_inc(x_16); lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); @@ -3333,18 +2909,70 @@ lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_dec(x_1); -x_16 = l_Lean_instBEqMVarId; -x_17 = l_Lean_instHashableMVarId; -x_18 = l_Std_PersistentHashMap_insert___rarg(x_16, x_17, x_14, x_2, x_3); -x_19 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_19, 0, x_9); -lean_ctor_set(x_19, 1, x_10); -lean_ctor_set(x_19, 2, x_11); -lean_ctor_set(x_19, 3, x_12); -lean_ctor_set(x_19, 4, x_13); -lean_ctor_set(x_19, 5, x_18); -lean_ctor_set(x_19, 6, x_15); -return x_19; +x_17 = l_Lean_instBEqMVarId; +x_18 = l_Lean_instHashableMVarId; +x_19 = l_Std_PersistentHashMap_insert___rarg(x_17, x_18, x_14, x_2, x_3); +x_20 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_20, 0, x_9); +lean_ctor_set(x_20, 1, x_10); +lean_ctor_set(x_20, 2, x_11); +lean_ctor_set(x_20, 3, x_12); +lean_ctor_set(x_20, 4, x_13); +lean_ctor_set(x_20, 5, x_19); +lean_ctor_set(x_20, 6, x_15); +lean_ctor_set(x_20, 7, x_16); +return x_20; +} +} +} +LEAN_EXPORT lean_object* l_Lean_MetavarContext_assignExpr(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_ctor_get(x_1, 6); +x_6 = l_Lean_instBEqMVarId; +x_7 = l_Lean_instHashableMVarId; +x_8 = l_Std_PersistentHashMap_insert___rarg(x_6, x_7, x_5, x_2, x_3); +lean_ctor_set(x_1, 6, x_8); +return x_1; +} +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; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_9 = lean_ctor_get(x_1, 0); +x_10 = lean_ctor_get(x_1, 1); +x_11 = lean_ctor_get(x_1, 2); +x_12 = lean_ctor_get(x_1, 3); +x_13 = lean_ctor_get(x_1, 4); +x_14 = lean_ctor_get(x_1, 5); +x_15 = lean_ctor_get(x_1, 6); +x_16 = lean_ctor_get(x_1, 7); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_1); +x_17 = l_Lean_instBEqMVarId; +x_18 = l_Lean_instHashableMVarId; +x_19 = l_Std_PersistentHashMap_insert___rarg(x_17, x_18, x_15, x_2, x_3); +x_20 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_20, 0, x_9); +lean_ctor_set(x_20, 1, x_10); +lean_ctor_set(x_20, 2, x_11); +lean_ctor_set(x_20, 3, x_12); +lean_ctor_set(x_20, 4, x_13); +lean_ctor_set(x_20, 5, x_14); +lean_ctor_set(x_20, 6, x_19); +lean_ctor_set(x_20, 7, x_16); +return x_20; } } } @@ -3356,7 +2984,7 @@ x_6 = !lean_is_exclusive(x_1); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_7 = lean_ctor_get(x_1, 6); +x_7 = lean_ctor_get(x_1, 7); x_8 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_8, 0, x_3); lean_ctor_set(x_8, 1, x_4); @@ -3364,12 +2992,12 @@ lean_ctor_set(x_8, 2, x_5); x_9 = l_Lean_instBEqMVarId; x_10 = l_Lean_instHashableMVarId; x_11 = l_Std_PersistentHashMap_insert___rarg(x_9, x_10, x_7, x_2, x_8); -lean_ctor_set(x_1, 6, x_11); +lean_ctor_set(x_1, 7, x_11); return x_1; } else { -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_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; x_12 = lean_ctor_get(x_1, 0); x_13 = lean_ctor_get(x_1, 1); x_14 = lean_ctor_get(x_1, 2); @@ -3377,6 +3005,8 @@ x_15 = lean_ctor_get(x_1, 3); x_16 = lean_ctor_get(x_1, 4); x_17 = lean_ctor_get(x_1, 5); x_18 = lean_ctor_get(x_1, 6); +x_19 = lean_ctor_get(x_1, 7); +lean_inc(x_19); lean_inc(x_18); lean_inc(x_17); lean_inc(x_16); @@ -3385,22 +3015,23 @@ lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); lean_dec(x_1); -x_19 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_19, 0, x_3); -lean_ctor_set(x_19, 1, x_4); -lean_ctor_set(x_19, 2, x_5); -x_20 = l_Lean_instBEqMVarId; -x_21 = l_Lean_instHashableMVarId; -x_22 = l_Std_PersistentHashMap_insert___rarg(x_20, x_21, x_18, x_2, x_19); -x_23 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_23, 0, x_12); -lean_ctor_set(x_23, 1, x_13); -lean_ctor_set(x_23, 2, x_14); -lean_ctor_set(x_23, 3, x_15); -lean_ctor_set(x_23, 4, x_16); -lean_ctor_set(x_23, 5, x_17); -lean_ctor_set(x_23, 6, x_22); -return x_23; +x_20 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_20, 0, x_3); +lean_ctor_set(x_20, 1, x_4); +lean_ctor_set(x_20, 2, x_5); +x_21 = l_Lean_instBEqMVarId; +x_22 = l_Lean_instHashableMVarId; +x_23 = l_Std_PersistentHashMap_insert___rarg(x_21, x_22, x_19, x_2, x_20); +x_24 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_24, 0, x_12); +lean_ctor_set(x_24, 1, x_13); +lean_ctor_set(x_24, 2, x_14); +lean_ctor_set(x_24, 3, x_15); +lean_ctor_set(x_24, 4, x_16); +lean_ctor_set(x_24, 5, x_17); +lean_ctor_set(x_24, 6, x_18); +lean_ctor_set(x_24, 7, x_23); +return x_24; } } } @@ -3408,19 +3039,6 @@ LEAN_EXPORT lean_object* l_Lean_MetavarContext_getLevelAssignment_x3f(lean_objec _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_3 = lean_ctor_get(x_1, 4); -lean_inc(x_3); -lean_dec(x_1); -x_4 = l_Lean_instBEqMVarId; -x_5 = l_Lean_instHashableMVarId; -x_6 = l_Std_PersistentHashMap_find_x3f___rarg(x_4, x_5, x_3, x_2); -return x_6; -} -} -LEAN_EXPORT lean_object* l_Lean_MetavarContext_getExprAssignment_x3f(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_3 = lean_ctor_get(x_1, 5); lean_inc(x_3); lean_dec(x_1); @@ -3430,7 +3048,7 @@ x_6 = l_Std_PersistentHashMap_find_x3f___rarg(x_4, x_5, x_3, x_2); return x_6; } } -LEAN_EXPORT lean_object* l_Lean_MetavarContext_getDelayedAssignment_x3f(lean_object* x_1, lean_object* x_2) { +LEAN_EXPORT lean_object* l_Lean_MetavarContext_getExprAssignment_x3f(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; @@ -3443,6 +3061,19 @@ x_6 = l_Std_PersistentHashMap_find_x3f___rarg(x_4, x_5, x_3, x_2); return x_6; } } +LEAN_EXPORT lean_object* l_Lean_MetavarContext_getDelayedAssignment_x3f(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_3 = lean_ctor_get(x_1, 7); +lean_inc(x_3); +lean_dec(x_1); +x_4 = l_Lean_instBEqMVarId; +x_5 = l_Lean_instHashableMVarId; +x_6 = l_Std_PersistentHashMap_find_x3f___rarg(x_4, x_5, x_3, x_2); +return x_6; +} +} LEAN_EXPORT uint8_t l_Std_PersistentHashMap_containsAtAux___at_Lean_MetavarContext_isLevelAssigned___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -3584,7 +3215,7 @@ LEAN_EXPORT uint8_t l_Lean_MetavarContext_isLevelAssigned(lean_object* x_1, lean _start: { lean_object* x_3; uint8_t x_4; -x_3 = lean_ctor_get(x_1, 4); +x_3 = lean_ctor_get(x_1, 5); lean_inc(x_3); lean_dec(x_1); x_4 = l_Std_PersistentHashMap_contains___at_Lean_MetavarContext_isLevelAssigned___spec__1(x_3, x_2); @@ -3754,7 +3385,7 @@ LEAN_EXPORT uint8_t l_Lean_MetavarContext_isExprAssigned(lean_object* x_1, lean_ _start: { lean_object* x_3; uint8_t x_4; -x_3 = lean_ctor_get(x_1, 5); +x_3 = lean_ctor_get(x_1, 6); lean_inc(x_3); lean_dec(x_1); x_4 = l_Std_PersistentHashMap_contains___at_Lean_MetavarContext_isExprAssigned___spec__1(x_3, x_2); @@ -3924,7 +3555,7 @@ LEAN_EXPORT uint8_t l_Lean_MetavarContext_isDelayedAssigned(lean_object* x_1, le _start: { lean_object* x_3; uint8_t x_4; -x_3 = lean_ctor_get(x_1, 6); +x_3 = lean_ctor_get(x_1, 7); lean_inc(x_3); lean_dec(x_1); x_4 = l_Std_PersistentHashMap_contains___at_Lean_MetavarContext_isDelayedAssigned___spec__1(x_3, x_2); @@ -3981,16 +3612,16 @@ x_3 = !lean_is_exclusive(x_1); if (x_3 == 0) { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_4 = lean_ctor_get(x_1, 6); +x_4 = lean_ctor_get(x_1, 7); x_5 = l_Lean_instBEqMVarId; x_6 = l_Lean_instHashableMVarId; x_7 = l_Std_PersistentHashMap_erase___rarg(x_5, x_6, x_4, x_2); -lean_ctor_set(x_1, 6, x_7); +lean_ctor_set(x_1, 7, x_7); return x_1; } else { -lean_object* x_8; lean_object* x_9; 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_8; lean_object* x_9; 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; x_8 = lean_ctor_get(x_1, 0); x_9 = lean_ctor_get(x_1, 1); x_10 = lean_ctor_get(x_1, 2); @@ -3998,6 +3629,8 @@ x_11 = lean_ctor_get(x_1, 3); x_12 = lean_ctor_get(x_1, 4); x_13 = lean_ctor_get(x_1, 5); x_14 = lean_ctor_get(x_1, 6); +x_15 = lean_ctor_get(x_1, 7); +lean_inc(x_15); lean_inc(x_14); lean_inc(x_13); lean_inc(x_12); @@ -4006,18 +3639,19 @@ lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_dec(x_1); -x_15 = l_Lean_instBEqMVarId; -x_16 = l_Lean_instHashableMVarId; -x_17 = l_Std_PersistentHashMap_erase___rarg(x_15, x_16, x_14, x_2); -x_18 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_18, 0, x_8); -lean_ctor_set(x_18, 1, x_9); -lean_ctor_set(x_18, 2, x_10); -lean_ctor_set(x_18, 3, x_11); -lean_ctor_set(x_18, 4, x_12); -lean_ctor_set(x_18, 5, x_13); -lean_ctor_set(x_18, 6, x_17); -return x_18; +x_16 = l_Lean_instBEqMVarId; +x_17 = l_Lean_instHashableMVarId; +x_18 = l_Std_PersistentHashMap_erase___rarg(x_16, x_17, x_15, x_2); +x_19 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_19, 0, x_8); +lean_ctor_set(x_19, 1, x_9); +lean_ctor_set(x_19, 2, x_10); +lean_ctor_set(x_19, 3, x_11); +lean_ctor_set(x_19, 4, x_12); +lean_ctor_set(x_19, 5, x_13); +lean_ctor_set(x_19, 6, x_14); +lean_ctor_set(x_19, 7, x_18); +return x_19; } } } @@ -4095,7 +3729,7 @@ _start: lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_1 = l_Lean_MetavarContext_getDecl___closed__1; x_2 = l_Lean_MetavarContext_isLevelAssignable___closed__1; -x_3 = lean_unsigned_to_nat(430u); +x_3 = lean_unsigned_to_nat(427u); x_4 = lean_unsigned_to_nat(14u); x_5 = l_Lean_MetavarContext_isLevelAssignable___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -4180,7 +3814,7 @@ return x_1; } else { -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 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_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 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; x_6 = lean_ctor_get(x_1, 0); x_7 = lean_ctor_get(x_1, 1); x_8 = lean_ctor_get(x_1, 2); @@ -4188,6 +3822,8 @@ x_9 = lean_ctor_get(x_1, 3); x_10 = lean_ctor_get(x_1, 4); x_11 = lean_ctor_get(x_1, 5); x_12 = lean_ctor_get(x_1, 6); +x_13 = lean_ctor_get(x_1, 7); +lean_inc(x_13); lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); @@ -4196,18 +3832,19 @@ lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_dec(x_1); -x_13 = lean_unsigned_to_nat(1u); -x_14 = lean_nat_add(x_6, x_13); +x_14 = lean_unsigned_to_nat(1u); +x_15 = lean_nat_add(x_6, x_14); lean_dec(x_6); -x_15 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_7); -lean_ctor_set(x_15, 2, x_8); -lean_ctor_set(x_15, 3, x_9); -lean_ctor_set(x_15, 4, x_10); -lean_ctor_set(x_15, 5, x_11); -lean_ctor_set(x_15, 6, x_12); -return x_15; +x_16 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_7); +lean_ctor_set(x_16, 2, x_8); +lean_ctor_set(x_16, 3, x_9); +lean_ctor_set(x_16, 4, x_10); +lean_ctor_set(x_16, 5, x_11); +lean_ctor_set(x_16, 6, x_12); +lean_ctor_set(x_16, 7, x_13); +return x_16; } } } @@ -24020,7 +23657,7 @@ return x_11; } else { -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_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; x_18 = lean_ctor_get(x_11, 0); x_19 = lean_ctor_get(x_11, 1); x_20 = lean_ctor_get(x_11, 2); @@ -24028,6 +23665,8 @@ x_21 = lean_ctor_get(x_11, 3); x_22 = lean_ctor_get(x_11, 4); x_23 = lean_ctor_get(x_11, 5); x_24 = lean_ctor_get(x_11, 6); +x_25 = lean_ctor_get(x_11, 7); +lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_inc(x_22); @@ -24038,103 +23677,108 @@ lean_inc(x_18); lean_dec(x_11); lean_ctor_set(x_3, 2, x_12); lean_ctor_set(x_3, 1, x_8); -x_25 = l_Lean_instBEqMVarId; -x_26 = l_Lean_instHashableMVarId; -x_27 = l_Std_PersistentHashMap_insert___rarg(x_25, x_26, x_21, x_2, x_3); -x_28 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_28, 0, x_18); -lean_ctor_set(x_28, 1, x_19); -lean_ctor_set(x_28, 2, x_20); -lean_ctor_set(x_28, 3, x_27); -lean_ctor_set(x_28, 4, x_22); -lean_ctor_set(x_28, 5, x_23); -lean_ctor_set(x_28, 6, x_24); -return x_28; +x_26 = l_Lean_instBEqMVarId; +x_27 = l_Lean_instHashableMVarId; +x_28 = l_Std_PersistentHashMap_insert___rarg(x_26, x_27, x_21, x_2, x_3); +x_29 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_29, 0, x_18); +lean_ctor_set(x_29, 1, x_19); +lean_ctor_set(x_29, 2, x_20); +lean_ctor_set(x_29, 3, x_28); +lean_ctor_set(x_29, 4, x_22); +lean_ctor_set(x_29, 5, x_23); +lean_ctor_set(x_29, 6, x_24); +lean_ctor_set(x_29, 7, x_25); +return x_29; } } else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t 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; -x_29 = lean_ctor_get(x_3, 0); -x_30 = lean_ctor_get(x_3, 1); -x_31 = lean_ctor_get(x_3, 2); -x_32 = lean_ctor_get(x_3, 3); -x_33 = lean_ctor_get(x_3, 4); -x_34 = lean_ctor_get_uint8(x_3, sizeof(void*)*7); -x_35 = lean_ctor_get(x_3, 5); -x_36 = lean_ctor_get(x_3, 6); +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t 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; +x_30 = lean_ctor_get(x_3, 0); +x_31 = lean_ctor_get(x_3, 1); +x_32 = lean_ctor_get(x_3, 2); +x_33 = lean_ctor_get(x_3, 3); +x_34 = lean_ctor_get(x_3, 4); +x_35 = lean_ctor_get_uint8(x_3, sizeof(void*)*7); +x_36 = lean_ctor_get(x_3, 5); +x_37 = lean_ctor_get(x_3, 6); +lean_inc(x_37); lean_inc(x_36); -lean_inc(x_35); +lean_inc(x_34); lean_inc(x_33); lean_inc(x_32); lean_inc(x_31); lean_inc(x_30); -lean_inc(x_29); lean_dec(x_3); -x_37 = l_Lean_MetavarContext_instantiateLCtxMVars(x_1, x_30); -x_38 = lean_ctor_get(x_37, 0); -lean_inc(x_38); -x_39 = lean_ctor_get(x_37, 1); +x_38 = l_Lean_MetavarContext_instantiateLCtxMVars(x_1, x_31); +x_39 = lean_ctor_get(x_38, 0); lean_inc(x_39); -lean_dec(x_37); -x_40 = l_Lean_MetavarContext_instantiateMVars(x_39, x_31); -x_41 = lean_ctor_get(x_40, 1); -lean_inc(x_41); -x_42 = lean_ctor_get(x_40, 0); +x_40 = lean_ctor_get(x_38, 1); +lean_inc(x_40); +lean_dec(x_38); +x_41 = l_Lean_MetavarContext_instantiateMVars(x_40, x_32); +x_42 = lean_ctor_get(x_41, 1); lean_inc(x_42); -lean_dec(x_40); x_43 = lean_ctor_get(x_41, 0); lean_inc(x_43); -x_44 = lean_ctor_get(x_41, 1); +lean_dec(x_41); +x_44 = lean_ctor_get(x_42, 0); lean_inc(x_44); -x_45 = lean_ctor_get(x_41, 2); +x_45 = lean_ctor_get(x_42, 1); lean_inc(x_45); -x_46 = lean_ctor_get(x_41, 3); +x_46 = lean_ctor_get(x_42, 2); lean_inc(x_46); -x_47 = lean_ctor_get(x_41, 4); +x_47 = lean_ctor_get(x_42, 3); lean_inc(x_47); -x_48 = lean_ctor_get(x_41, 5); +x_48 = lean_ctor_get(x_42, 4); lean_inc(x_48); -x_49 = lean_ctor_get(x_41, 6); +x_49 = lean_ctor_get(x_42, 5); lean_inc(x_49); -if (lean_is_exclusive(x_41)) { - lean_ctor_release(x_41, 0); - lean_ctor_release(x_41, 1); - lean_ctor_release(x_41, 2); - lean_ctor_release(x_41, 3); - lean_ctor_release(x_41, 4); - lean_ctor_release(x_41, 5); - lean_ctor_release(x_41, 6); - x_50 = x_41; +x_50 = lean_ctor_get(x_42, 6); +lean_inc(x_50); +x_51 = lean_ctor_get(x_42, 7); +lean_inc(x_51); +if (lean_is_exclusive(x_42)) { + lean_ctor_release(x_42, 0); + lean_ctor_release(x_42, 1); + lean_ctor_release(x_42, 2); + lean_ctor_release(x_42, 3); + lean_ctor_release(x_42, 4); + lean_ctor_release(x_42, 5); + lean_ctor_release(x_42, 6); + lean_ctor_release(x_42, 7); + x_52 = x_42; } else { - lean_dec_ref(x_41); - x_50 = lean_box(0); + lean_dec_ref(x_42); + x_52 = lean_box(0); } -x_51 = lean_alloc_ctor(0, 7, 1); -lean_ctor_set(x_51, 0, x_29); -lean_ctor_set(x_51, 1, x_38); -lean_ctor_set(x_51, 2, x_42); -lean_ctor_set(x_51, 3, x_32); -lean_ctor_set(x_51, 4, x_33); -lean_ctor_set(x_51, 5, x_35); -lean_ctor_set(x_51, 6, x_36); -lean_ctor_set_uint8(x_51, sizeof(void*)*7, x_34); -x_52 = l_Lean_instBEqMVarId; -x_53 = l_Lean_instHashableMVarId; -x_54 = l_Std_PersistentHashMap_insert___rarg(x_52, x_53, x_46, x_2, x_51); -if (lean_is_scalar(x_50)) { - x_55 = lean_alloc_ctor(0, 7, 0); +x_53 = lean_alloc_ctor(0, 7, 1); +lean_ctor_set(x_53, 0, x_30); +lean_ctor_set(x_53, 1, x_39); +lean_ctor_set(x_53, 2, x_43); +lean_ctor_set(x_53, 3, x_33); +lean_ctor_set(x_53, 4, x_34); +lean_ctor_set(x_53, 5, x_36); +lean_ctor_set(x_53, 6, x_37); +lean_ctor_set_uint8(x_53, sizeof(void*)*7, x_35); +x_54 = l_Lean_instBEqMVarId; +x_55 = l_Lean_instHashableMVarId; +x_56 = l_Std_PersistentHashMap_insert___rarg(x_54, x_55, x_47, x_2, x_53); +if (lean_is_scalar(x_52)) { + x_57 = lean_alloc_ctor(0, 8, 0); } else { - x_55 = x_50; + x_57 = x_52; } -lean_ctor_set(x_55, 0, x_43); -lean_ctor_set(x_55, 1, x_44); -lean_ctor_set(x_55, 2, x_45); -lean_ctor_set(x_55, 3, x_54); -lean_ctor_set(x_55, 4, x_47); -lean_ctor_set(x_55, 5, x_48); -lean_ctor_set(x_55, 6, x_49); -return x_55; +lean_ctor_set(x_57, 0, x_44); +lean_ctor_set(x_57, 1, x_45); +lean_ctor_set(x_57, 2, x_46); +lean_ctor_set(x_57, 3, x_56); +lean_ctor_set(x_57, 4, x_48); +lean_ctor_set(x_57, 5, x_49); +lean_ctor_set(x_57, 6, x_50); +lean_ctor_set(x_57, 7, x_51); +return x_57; } } } @@ -39469,6 +39113,16 @@ x_9 = l_Std_PersistentArray_foldlM___at_Lean_MetavarContext_MkBinding_collectDep return x_9; } } +static lean_object* _init_l_Nat_forM_loop___at_Lean_MetavarContext_MkBinding_collectDeps___spec__60___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} LEAN_EXPORT lean_object* l_Nat_forM_loop___at_Lean_MetavarContext_MkBinding_collectDeps___spec__60(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { @@ -39526,7 +39180,7 @@ lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_22 = l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___closed__1; +x_22 = l_Nat_forM_loop___at_Lean_MetavarContext_MkBinding_collectDeps___spec__60___closed__1; return x_22; } } @@ -39591,7 +39245,7 @@ lean_dec(x_5); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_19 = l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___closed__1; +x_19 = l_Nat_forM_loop___at_Lean_MetavarContext_MkBinding_collectDeps___spec__60___closed__1; return x_19; } } @@ -50877,7 +50531,7 @@ LEAN_EXPORT lean_object* l_Lean_MetavarContext_getExprAssignmentDomain(lean_obje _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = lean_ctor_get(x_1, 5); +x_2 = lean_ctor_get(x_1, 6); lean_inc(x_2); lean_dec(x_1); x_3 = l_Lean_instInhabitedMetavarDecl___closed__4; @@ -51031,6 +50685,10 @@ l_Lean_MetavarContext_lDepth___default = _init_l_Lean_MetavarContext_lDepth___de lean_mark_persistent(l_Lean_MetavarContext_lDepth___default); l_Lean_MetavarContext_decls___default = _init_l_Lean_MetavarContext_decls___default(); lean_mark_persistent(l_Lean_MetavarContext_decls___default); +l_Lean_MetavarContext_userNames___default___closed__1 = _init_l_Lean_MetavarContext_userNames___default___closed__1(); +lean_mark_persistent(l_Lean_MetavarContext_userNames___default___closed__1); +l_Lean_MetavarContext_userNames___default = _init_l_Lean_MetavarContext_userNames___default(); +lean_mark_persistent(l_Lean_MetavarContext_userNames___default); l_Lean_MetavarContext_lAssignment___default = _init_l_Lean_MetavarContext_lAssignment___default(); lean_mark_persistent(l_Lean_MetavarContext_lAssignment___default); l_Lean_MetavarContext_eAssignment___default = _init_l_Lean_MetavarContext_eAssignment___default(); @@ -51049,16 +50707,10 @@ l_Lean_MetavarContext_getDecl___closed__3 = _init_l_Lean_MetavarContext_getDecl_ lean_mark_persistent(l_Lean_MetavarContext_getDecl___closed__3); l_Lean_MetavarContext_getDecl___closed__4 = _init_l_Lean_MetavarContext_getDecl___closed__4(); lean_mark_persistent(l_Lean_MetavarContext_getDecl___closed__4); -l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___closed__1 = _init_l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___closed__1(); -lean_mark_persistent(l_Std_PersistentHashMap_foldlMAux___at_Lean_MetavarContext_findUserName_x3f___spec__3___lambda__1___closed__1); l_Lean_MetavarContext_getLevelDepth___closed__1 = _init_l_Lean_MetavarContext_getLevelDepth___closed__1(); lean_mark_persistent(l_Lean_MetavarContext_getLevelDepth___closed__1); l_Lean_MetavarContext_getLevelDepth___closed__2 = _init_l_Lean_MetavarContext_getLevelDepth___closed__2(); lean_mark_persistent(l_Lean_MetavarContext_getLevelDepth___closed__2); -l_Lean_MetavarContext_renameMVar___closed__1 = _init_l_Lean_MetavarContext_renameMVar___closed__1(); -lean_mark_persistent(l_Lean_MetavarContext_renameMVar___closed__1); -l_Lean_MetavarContext_renameMVar___closed__2 = _init_l_Lean_MetavarContext_renameMVar___closed__2(); -lean_mark_persistent(l_Lean_MetavarContext_renameMVar___closed__2); l_Std_PersistentHashMap_containsAux___at_Lean_MetavarContext_isLevelAssigned___spec__2___closed__1 = _init_l_Std_PersistentHashMap_containsAux___at_Lean_MetavarContext_isLevelAssigned___spec__2___closed__1(); l_Std_PersistentHashMap_containsAux___at_Lean_MetavarContext_isLevelAssigned___spec__2___closed__2 = _init_l_Std_PersistentHashMap_containsAux___at_Lean_MetavarContext_isLevelAssigned___spec__2___closed__2(); l_Lean_MetavarContext_isLevelAssignable___closed__1 = _init_l_Lean_MetavarContext_isLevelAssignable___closed__1(); @@ -51211,6 +50863,8 @@ l_Lean_MetavarContext_MkBinding_instMonadHashMapCacheAdapterExprStructEqExprM___ lean_mark_persistent(l_Lean_MetavarContext_MkBinding_instMonadHashMapCacheAdapterExprStructEqExprM___closed__3); l_Lean_MetavarContext_MkBinding_instMonadHashMapCacheAdapterExprStructEqExprM = _init_l_Lean_MetavarContext_MkBinding_instMonadHashMapCacheAdapterExprStructEqExprM(); lean_mark_persistent(l_Lean_MetavarContext_MkBinding_instMonadHashMapCacheAdapterExprStructEqExprM); +l_Nat_forM_loop___at_Lean_MetavarContext_MkBinding_collectDeps___spec__60___closed__1 = _init_l_Nat_forM_loop___at_Lean_MetavarContext_MkBinding_collectDeps___spec__60___closed__1(); +lean_mark_persistent(l_Nat_forM_loop___at_Lean_MetavarContext_MkBinding_collectDeps___spec__60___closed__1); l___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimMVar_cont___boxed__const__1 = _init_l___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimMVar_cont___boxed__const__1(); lean_mark_persistent(l___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimMVar_cont___boxed__const__1); l___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimApp___boxed__const__1 = _init_l___private_Lean_MetavarContext_0__Lean_MetavarContext_MkBinding_elimApp___boxed__const__1(); diff --git a/stage0/stdlib/Lean/ParserCompiler.c b/stage0/stdlib/Lean/ParserCompiler.c index 734de2b498..5870173e78 100644 --- a/stage0/stdlib/Lean/ParserCompiler.c +++ b/stage0/stdlib/Lean/ParserCompiler.c @@ -356,6 +356,7 @@ LEAN_EXPORT lean_object* l_Lean_ParserCompiler_compileParserExpr___rarg___lambda lean_object* lean_panic_fn(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_ParserCompiler_compileParserExpr___spec__39___at_Lean_ParserCompiler_compileParserExpr___spec__40(lean_object*); LEAN_EXPORT lean_object* l_Lean_ParserCompiler_compileParserExpr___rarg___lambda__23(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__32; static lean_object* l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__10; LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_ParserCompiler_compileParserExpr___spec__34___at_Lean_ParserCompiler_compileParserExpr___spec__35___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_foldrMUnsafe_fold___at_Lean_ParserCompiler_compileParserExpr___spec__8(lean_object*); @@ -26699,42 +26700,36 @@ static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___c _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(0u); -x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__11; -x_3 = lean_alloc_ctor(0, 7, 0); +x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__3; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); +lean_ctor_set(x_3, 1, x_2); return x_3; } } static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__13() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__3; -x_2 = lean_unsigned_to_nat(0u); -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* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__11; +x_3 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__12; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__14() { _start: { -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); -return x_1; -} -} -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__15() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__3; x_2 = lean_unsigned_to_nat(0u); @@ -26744,6 +26739,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__15() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed), 1, 0); +return x_1; +} +} static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__16() { _start: { @@ -26759,6 +26762,18 @@ return x_3; static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__17() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__3; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__18() { +_start: +{ lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Expr_instBEqExpr; x_2 = lean_alloc_closure((void*)(l_instBEqProd___rarg), 4, 2); @@ -26767,7 +26782,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__18() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__19() { _start: { lean_object* x_1; lean_object* x_2; @@ -26778,7 +26793,7 @@ lean_closure_set(x_2, 1, x_1); return x_2; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__19() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -26790,14 +26805,14 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__20() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__21() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__13; -x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__15; -x_3 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__16; -x_4 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__19; +x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__14; +x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__16; +x_3 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__17; +x_4 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__20; x_5 = lean_alloc_ctor(0, 7, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -26809,13 +26824,13 @@ lean_ctor_set(x_5, 6, x_4); return x_5; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__21() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__22() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = lean_box(0); -x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__12; -x_3 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__20; +x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__13; +x_3 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__21; x_4 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__7; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_2); @@ -26825,7 +26840,7 @@ lean_ctor_set(x_5, 3, x_4); return x_5; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__22() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__23() { _start: { lean_object* x_1; @@ -26833,7 +26848,7 @@ x_1 = lean_mk_string("Lean.ParserCompiler"); return x_1; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__23() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__24() { _start: { lean_object* x_1; @@ -26841,7 +26856,7 @@ x_1 = lean_mk_string("Lean.ParserCompiler.compileCategoryParser"); return x_1; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__24() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__25() { _start: { lean_object* x_1; @@ -26849,20 +26864,20 @@ x_1 = lean_mk_string("unreachable code has been reached"); return x_1; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__25() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__26() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__22; -x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__23; +x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__23; +x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__24; x_3 = lean_unsigned_to_nat(109u); x_4 = lean_unsigned_to_nat(6u); -x_5 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__24; +x_5 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__25; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); return x_6; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__26() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__27() { _start: { lean_object* x_1; @@ -26870,17 +26885,17 @@ x_1 = lean_mk_string("Attr"); return x_1; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__27() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__28() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Expr_ReplaceImpl_replaceUnsafeM_visit___at_Lean_ParserCompiler_replaceParserTy___spec__1___rarg___closed__4; -x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__26; +x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__27; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__28() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__29() { _start: { lean_object* x_1; @@ -26888,17 +26903,17 @@ x_1 = lean_mk_string("simple"); return x_1; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__29() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__30() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__27; -x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__28; +x_1 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__28; +x_2 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__29; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__30() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__31() { _start: { lean_object* x_1; lean_object* x_2; @@ -26907,7 +26922,7 @@ x_2 = lean_mk_empty_array_with_capacity(x_1); return x_2; } } -static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__31() { +static lean_object* _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__32() { _start: { lean_object* x_1; lean_object* x_2; @@ -26927,7 +26942,7 @@ x_9 = lean_st_ref_get(x_5, x_6); x_10 = lean_ctor_get(x_9, 1); lean_inc(x_10); lean_dec(x_9); -x_11 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__21; +x_11 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__22; x_12 = lean_st_mk_ref(x_11, x_10); x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); @@ -26965,7 +26980,7 @@ x_24 = lean_ctor_get(x_18, 0); lean_inc(x_24); lean_dec(x_18); x_25 = lean_mk_syntax_ident(x_2); -x_26 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__30; +x_26 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__31; x_27 = lean_array_push(x_26, x_25); x_28 = l_Lean_nullKind; x_29 = lean_alloc_ctor(1, 2, 0); @@ -26985,10 +27000,10 @@ lean_inc(x_32); lean_dec(x_31); lean_inc(x_32); x_33 = lean_mk_syntax_ident(x_32); -x_34 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__31; +x_34 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__32; x_35 = lean_array_push(x_34, x_33); x_36 = lean_array_push(x_35, x_29); -x_37 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__29; +x_37 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__30; x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_37); lean_ctor_set(x_38, 1, x_36); @@ -27010,10 +27025,10 @@ lean_inc(x_43); lean_dec(x_42); lean_inc(x_43); x_44 = lean_mk_syntax_ident(x_43); -x_45 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__31; +x_45 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__32; x_46 = lean_array_push(x_45, x_44); x_47 = lean_array_push(x_46, x_29); -x_48 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__29; +x_48 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__30; x_49 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_49, 0, x_48); lean_ctor_set(x_49, 1, x_47); @@ -27031,7 +27046,7 @@ lean_dec(x_1); x_52 = lean_ctor_get(x_22, 1); lean_inc(x_52); lean_dec(x_22); -x_53 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__25; +x_53 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__26; x_54 = l_panic___at_Lean_ParserCompiler_compileCategoryParser___spec__1(x_53, x_4, x_5, x_52); return x_54; } @@ -27446,7 +27461,7 @@ x_59 = lean_st_ref_get(x_6, x_10); x_60 = lean_ctor_get(x_59, 1); lean_inc(x_60); lean_dec(x_59); -x_61 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__21; +x_61 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__22; x_62 = lean_st_mk_ref(x_61, x_60); x_63 = lean_ctor_get(x_62, 0); lean_inc(x_63); @@ -27613,7 +27628,7 @@ x_15 = lean_st_ref_get(x_6, x_14); x_16 = lean_ctor_get(x_15, 1); lean_inc(x_16); lean_dec(x_15); -x_17 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__21; +x_17 = l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__22; x_18 = lean_st_mk_ref(x_17, x_16); x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); @@ -27889,6 +27904,8 @@ l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__30 = _init_l_Lean_P lean_mark_persistent(l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__30); l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__31 = _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__31(); lean_mark_persistent(l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__31); +l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__32 = _init_l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__32(); +lean_mark_persistent(l_Lean_ParserCompiler_compileCategoryParser___rarg___closed__32); l_Lean_ParserCompiler_registerParserCompiler___rarg___lambda__1___closed__1 = _init_l_Lean_ParserCompiler_registerParserCompiler___rarg___lambda__1___closed__1(); lean_mark_persistent(l_Lean_ParserCompiler_registerParserCompiler___rarg___lambda__1___closed__1); l_Lean_ParserCompiler_registerParserCompiler___rarg___lambda__1___closed__2 = _init_l_Lean_ParserCompiler_registerParserCompiler___rarg___lambda__1___closed__2(); diff --git a/stage0/stdlib/Lean/Util/PPExt.c b/stage0/stdlib/Lean/Util/PPExt.c index 480f0243af..74bcd5541c 100644 --- a/stage0/stdlib/Lean/Util/PPExt.c +++ b/stage0/stdlib/Lean/Util/PPExt.c @@ -74,6 +74,7 @@ static lean_object* l_Lean_ppExt___closed__2; LEAN_EXPORT uint8_t l_Lean_Option_get___at_Lean_ppExpr___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Option_register___at_Std_Format_initFn____x40_Lean_Data_Format___hyg_48____spec__1(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_ppFnsRef; +static lean_object* l_Lean_PPContext_mctx___default___closed__5; lean_object* l_Std_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*); static lean_object* l_Lean_ppTerm___closed__4; static lean_object* l_Lean_initFn____x40_Lean_Util_PPExt___hyg_218____lambda__3___closed__2; @@ -411,24 +412,38 @@ static lean_object* _init_l_Lean_PPContext_mctx___default___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_PPContext_mctx___default___closed__2; +x_2 = lean_unsigned_to_nat(0u); +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; +} +} +static lean_object* _init_l_Lean_PPContext_mctx___default___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_PPContext_mctx___default___closed__3; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_PPContext_mctx___default___closed__4; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_PPContext_mctx___default() { _start: { lean_object* x_1; -x_1 = l_Lean_PPContext_mctx___default___closed__4; +x_1 = l_Lean_PPContext_mctx___default___closed__5; return x_1; } } @@ -1577,6 +1592,8 @@ l_Lean_PPContext_mctx___default___closed__3 = _init_l_Lean_PPContext_mctx___defa lean_mark_persistent(l_Lean_PPContext_mctx___default___closed__3); l_Lean_PPContext_mctx___default___closed__4 = _init_l_Lean_PPContext_mctx___default___closed__4(); lean_mark_persistent(l_Lean_PPContext_mctx___default___closed__4); +l_Lean_PPContext_mctx___default___closed__5 = _init_l_Lean_PPContext_mctx___default___closed__5(); +lean_mark_persistent(l_Lean_PPContext_mctx___default___closed__5); l_Lean_PPContext_mctx___default = _init_l_Lean_PPContext_mctx___default(); lean_mark_persistent(l_Lean_PPContext_mctx___default); l_Lean_PPContext_lctx___default___closed__1 = _init_l_Lean_PPContext_lctx___default___closed__1(); diff --git a/stage0/stdlib/Lean/Widget/InteractiveCode.c b/stage0/stdlib/Lean/Widget/InteractiveCode.c index c442c2c027..7ab390994b 100644 --- a/stage0/stdlib/Lean/Widget/InteractiveCode.c +++ b/stage0/stdlib/Lean/Widget/InteractiveCode.c @@ -292,18 +292,20 @@ return x_3; static lean_object* _init_l_Lean_Widget_instInhabitedInfoWithCtx___closed__13() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_Widget_instInhabitedInfoWithCtx___closed__12; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_Widget_instInhabitedInfoWithCtx___closed__4; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Widget_instInhabitedInfoWithCtx___closed__14() { diff --git a/stage0/stdlib/Lean/Widget/InteractiveDiagnostic.c b/stage0/stdlib/Lean/Widget/InteractiveDiagnostic.c index 66f15d0493..d8fcd5b6d2 100644 --- a/stage0/stdlib/Lean/Widget/InteractiveDiagnostic.c +++ b/stage0/stdlib/Lean/Widget/InteractiveDiagnostic.c @@ -13124,18 +13124,20 @@ return x_3; static lean_object* _init_l_Lean_Widget_instInhabitedEmbedFmt___closed__12() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = lean_unsigned_to_nat(0u); x_2 = l_Lean_Widget_instInhabitedEmbedFmt___closed__11; -x_3 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_1); -lean_ctor_set(x_3, 2, x_2); -lean_ctor_set(x_3, 3, x_2); -lean_ctor_set(x_3, 4, x_2); -lean_ctor_set(x_3, 5, x_2); -lean_ctor_set(x_3, 6, x_2); -return x_3; +x_3 = l_Lean_Widget_instInhabitedEmbedFmt___closed__4; +x_4 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_1); +lean_ctor_set(x_4, 2, x_2); +lean_ctor_set(x_4, 3, x_2); +lean_ctor_set(x_4, 4, x_3); +lean_ctor_set(x_4, 5, x_2); +lean_ctor_set(x_4, 6, x_2); +lean_ctor_set(x_4, 7, x_2); +return x_4; } } static lean_object* _init_l_Lean_Widget_instInhabitedEmbedFmt___closed__13() {