diff --git a/src/Lean/Elab/PreDefinition/Basic.lean b/src/Lean/Elab/PreDefinition/Basic.lean index b1b78b1a9aa5..b38e7f40fb95 100644 --- a/src/Lean/Elab/PreDefinition/Basic.lean +++ b/src/Lean/Elab/PreDefinition/Basic.lean @@ -132,18 +132,27 @@ private def reportTheoremDiag (d : TheoremVal) : TermElabM Unit := do private def addNonRecAux (preDef : PreDefinition) (compile : Bool) (all : List Name) (applyAttrAfterCompilation := true) : TermElabM Unit := withRef preDef.ref do let preDef ← abstractNestedProofs preDef - let mkDefDecl : TermElabM Declaration := + let isProp ← isProp preDef.type + -- If we're going to create a theorem, discard the `reducible` attribute. + let preDef := if isProp then preDef.filterAttrs (fun attr => attr.name != `reducible && attr.name != `inline) else preDef + let constantVal : ConstantVal := { name := preDef.declName, levelParams := preDef.levelParams, type := preDef.type } + let env ← getEnv + let mkDefDecl (hints := ReducibilityHints.regular (getMaxHeight env preDef.value + 1)) : TermElabM Declaration := return Declaration.defnDecl { - name := preDef.declName, levelParams := preDef.levelParams, type := preDef.type, value := preDef.value - hints := ReducibilityHints.regular (getMaxHeight (← getEnv) preDef.value + 1) - safety := if preDef.modifiers.isUnsafe then DefinitionSafety.unsafe else DefinitionSafety.safe, - all } + constantVal with + value := preDef.value + safety := if preDef.modifiers.isUnsafe then DefinitionSafety.unsafe else DefinitionSafety.safe, + hints + all } let mkThmDecl : TermElabM Declaration := do - let d := { - name := preDef.declName, levelParams := preDef.levelParams, type := preDef.type, value := preDef.value, all - } + let d := { constantVal with value := preDef.value, all } reportTheoremDiag d return Declaration.thmDecl d + let mkAbbrevDecl : TermElabM Declaration := do + if isProp then + mkThmDecl + else + mkDefDecl ReducibilityHints.abbrev let decl ← match preDef.kind with | DefKind.«theorem» => mkThmDecl @@ -152,21 +161,16 @@ private def addNonRecAux (preDef : PreDefinition) (compile : Bool) (all : List N name := preDef.declName, levelParams := preDef.levelParams, type := preDef.type, value := preDef.value isUnsafe := preDef.modifiers.isUnsafe, all } - | DefKind.«abbrev» => - pure <| Declaration.defnDecl { - name := preDef.declName, levelParams := preDef.levelParams, type := preDef.type, value := preDef.value - hints := ReducibilityHints.«abbrev» - safety := if preDef.modifiers.isUnsafe then DefinitionSafety.unsafe else DefinitionSafety.safe, - all } + | DefKind.«abbrev» => mkAbbrevDecl | DefKind.def | DefKind.example => mkDefDecl - | DefKind.«instance» => if ← Meta.isProp preDef.type then mkThmDecl else mkDefDecl + | DefKind.«instance» => if isProp then mkThmDecl else mkDefDecl addDecl decl withSaveInfoContext do -- save new env addTermInfo' preDef.ref (← mkConstWithLevelParams preDef.declName) (isBinder := true) applyAttributesOf #[preDef] AttributeApplicationTime.afterTypeChecking if preDef.modifiers.isNoncomputable then modifyEnv fun env => addNoncomputable env preDef.declName - if compile && shouldGenCodeFor preDef then + if compile && !isProp && shouldGenCodeFor preDef then discard <| compileDecl decl if applyAttrAfterCompilation then generateEagerEqns preDef.declName diff --git a/stage0/stdlib/Init/Data/Fin/Basic.c b/stage0/stdlib/Init/Data/Fin/Basic.c index fd33331e249c..1f5566122e48 100644 --- a/stage0/stdlib/Init/Data/Fin/Basic.c +++ b/stage0/stdlib/Init/Data/Fin/Basic.c @@ -209,6 +209,24 @@ lean_dec(x_1); return x_2; } } +LEAN_EXPORT lean_object* l_Fin_ofNat_x27(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_nat_mod(x_3, x_1); +return x_4; +} +} +LEAN_EXPORT lean_object* l_Fin_ofNat_x27___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Fin_ofNat_x27(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_1); +return x_4; +} +} LEAN_EXPORT lean_object* l_Fin_ofNat(lean_object* x_1, lean_object* x_2) { _start: { @@ -230,24 +248,6 @@ lean_dec(x_1); return x_3; } } -LEAN_EXPORT lean_object* l_Fin_ofNat_x27(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = lean_nat_mod(x_3, x_1); -return x_4; -} -} -LEAN_EXPORT lean_object* l_Fin_ofNat_x27___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Fin_ofNat_x27(x_1, x_2, x_3); -lean_dec(x_3); -lean_dec(x_1); -return x_4; -} -} LEAN_EXPORT lean_object* l_Fin_add(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { diff --git a/stage0/stdlib/Lean/Class.c b/stage0/stdlib/Lean/Class.c index 1c386c787735..e62acd70d638 100644 --- a/stage0/stdlib/Lean/Class.c +++ b/stage0/stdlib/Lean/Class.c @@ -2983,7 +2983,7 @@ static lean_object* _init_l_Lean_mkOutParamArgsImplicit_go___closed__4() { 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_mkOutParamArgsImplicit_go___closed__1; x_2 = l_Lean_mkOutParamArgsImplicit_go___closed__2; -x_3 = lean_unsigned_to_nat(1761u); +x_3 = lean_unsigned_to_nat(1765u); x_4 = lean_unsigned_to_nat(24u); x_5 = l_Lean_mkOutParamArgsImplicit_go___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -3004,7 +3004,7 @@ static lean_object* _init_l_Lean_mkOutParamArgsImplicit_go___closed__6() { 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_mkOutParamArgsImplicit_go___closed__1; x_2 = l_Lean_mkOutParamArgsImplicit_go___closed__5; -x_3 = lean_unsigned_to_nat(1750u); +x_3 = lean_unsigned_to_nat(1754u); x_4 = lean_unsigned_to_nat(23u); x_5 = l_Lean_mkOutParamArgsImplicit_go___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Compiler/LCNF/FVarUtil.c b/stage0/stdlib/Lean/Compiler/LCNF/FVarUtil.c index c55f35af4973..ac7e3ffcf27a 100644 --- a/stage0/stdlib/Lean/Compiler/LCNF/FVarUtil.c +++ b/stage0/stdlib/Lean/Compiler/LCNF/FVarUtil.c @@ -442,7 +442,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___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; x_1 = l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__1___closed__1; x_2 = l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__1___closed__2; -x_3 = lean_unsigned_to_nat(1697u); +x_3 = lean_unsigned_to_nat(1701u); x_4 = lean_unsigned_to_nat(20u); x_5 = l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__1___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -521,7 +521,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__2_ 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_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__1___closed__1; x_2 = l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__2___closed__1; -x_3 = lean_unsigned_to_nat(1686u); +x_3 = lean_unsigned_to_nat(1690u); x_4 = lean_unsigned_to_nat(18u); x_5 = l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__2___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -637,7 +637,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__4_ 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_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__1___closed__1; x_2 = l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__4___closed__1; -x_3 = lean_unsigned_to_nat(1781u); +x_3 = lean_unsigned_to_nat(1785u); x_4 = lean_unsigned_to_nat(20u); x_5 = l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__4___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -775,7 +775,7 @@ static lean_object* _init_l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__6_ 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_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__1___closed__1; x_2 = l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__6___closed__1; -x_3 = lean_unsigned_to_nat(1761u); +x_3 = lean_unsigned_to_nat(1765u); x_4 = lean_unsigned_to_nat(24u); x_5 = l_Lean_Compiler_LCNF_Expr_mapFVarM___rarg___lambda__6___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Elab/PreDefinition/Basic.c b/stage0/stdlib/Lean/Elab/PreDefinition/Basic.c index bac60eee9d32..419371c58fe6 100644 --- a/stage0/stdlib/Lean/Elab/PreDefinition/Basic.c +++ b/stage0/stdlib/Lean/Elab/PreDefinition/Basic.c @@ -63,7 +63,7 @@ lean_object* l_Lean_throwError___at___private_Lean_Meta_Basic_0__Lean_Meta_proce lean_object* l_Lean_Meta_abstractNestedProofs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_compileDecl(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_replaceRef(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(lean_object*, lean_object*, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__7(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* l_Lean_instantiateMVars___at_Lean_Elab_Term_MVarErrorInfo_logError___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_shareCommonPreDefs(lean_object*, lean_object*, lean_object*, lean_object*); @@ -99,6 +99,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_PreDefinition_filterAttrs(lean_object*, lea LEAN_EXPORT lean_object* l_Lean_PersistentArray_mapMAux___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__9(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___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_withSavedPartialInfoContext___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__2___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_fixLevelParams___lambda__1___closed__2; +static lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___closed__1; extern lean_object* l_Lean_maxRecDepth; LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_addAndCompilePartialRec___spec__5___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l_Array_anyMUnsafe_any___at_Lean_Elab_addAndCompilePartialRec___spec__1(lean_object*, lean_object*, size_t, size_t); @@ -128,6 +129,7 @@ LEAN_EXPORT lean_object* l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_withSa lean_object* l_Lean_Name_mkStr3(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_fixLevelParams___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_shareCommonPreDefs___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__3; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_fixLevelParams___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Elab_shareCommonPreDefs___spec__3___lambda__4(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -143,6 +145,7 @@ lean_object* lean_replace_expr(lean_object*, lean_object*); static lean_object* l_Lean_Elab_instInhabitedPreDefinition___closed__4; lean_object* lean_st_ref_take(lean_object*, lean_object*); static lean_object* l_Lean_Elab_instInhabitedPreDefinition___closed__1; +static lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__2; lean_object* l_Lean_getMaxHeight(lean_object*, lean_object*); LEAN_EXPORT lean_object* l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_withSavedPartialInfoContext___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__2___lambda__1___boxed(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_PersistentArray_mapMAux___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -158,6 +161,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_applyAttributesOf___boxed(lean_object*, lea static lean_object* l_Std_Range_forIn_x27_loop___at_Lean_Elab_checkCodomainsLevel___spec__2___lambda__1___closed__14; static lean_object* l_Lean_Elab_fixLevelParams___closed__2; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_fixLevelParams___spec__2___lambda__1(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT uint8_t l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5(lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_addNonRec___boxed(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_shareCommonPreDefs___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_addAndCompilePartialRec___spec__2___lambda__1(lean_object*, lean_object*, lean_object*); @@ -166,6 +170,7 @@ static lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_repor lean_object* l_Lean_Elab_Term_applyAttributesAt(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MessageData_ofFormat(lean_object*); lean_object* l_Lean_PersistentArray_append___rarg(lean_object*, lean_object*); +static lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__1; lean_object* l_Lean_Meta_getLevel(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Elab_diagnostics_threshold_proofSize; LEAN_EXPORT lean_object* l_Array_anyMUnsafe_any___at_Lean_Elab_addAndCompilePartialRec___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -222,12 +227,13 @@ lean_object* l_Lean_Option_register___at_Lean_initFn____x40_Lean_Util_RecDepth__ static lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__3; static lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_Basic___hyg_1042____closed__6; static lean_object* l_Lean_withTraceNode___at_Lean_Elab_fixLevelParams___spec__3___lambda__2___closed__2; +static lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__4; LEAN_EXPORT lean_object* l_List_mapM_loop___at_Lean_Elab_addAndCompileUnsafe___spec__3(uint8_t, 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___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_containsRecFn(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Elab_applyAttributesOf___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_List_mapM_loop___at_Lean_Elab_addAndCompileUnsafe___spec__3___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___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___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_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(uint8_t, 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_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___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*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(uint8_t, lean_object*, lean_object*, uint8_t, uint8_t, 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_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__1; LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Elab_applyAttributesOf___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Elab_initFn____x40_Lean_Elab_PreDefinition_Basic___hyg_1042____closed__8; @@ -242,6 +248,7 @@ static lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_checkCodomainsLevel___ LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Elab_shareCommonPreDefs___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_hasRecAppSyntax___boxed(lean_object*); static lean_object* l_Std_Range_forIn_x27_loop___at_Lean_Elab_checkCodomainsLevel___spec__2___lambda__2___closed__1; +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___boxed(lean_object*); double l_Float_ofScientific(lean_object*, uint8_t, lean_object*); static lean_object* l_Lean_Elab_shareCommonPreDefs___closed__3; LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__6(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -338,7 +345,7 @@ uint32_t lean_uint32_add(uint32_t, uint32_t); static lean_object* l_Std_Range_forIn_x27_loop___at_Lean_Elab_checkCodomainsLevel___spec__2___lambda__1___closed__4; LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Elab_fixLevelParams___spec__3___lambda__2___boxed(lean_object**); LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___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___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3___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_object*); +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3___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_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_withTraceNode___at_Lean_Elab_fixLevelParams___spec__3___lambda__4(lean_object*, lean_object*, uint8_t, 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_object* lean_array_get_size(lean_object*); LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Lean_Elab_shareCommonPreDefs___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -7016,79 +7023,90 @@ return x_21; } } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(uint8_t x_1, lean_object* x_2, lean_object* x_3, uint8_t 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, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(uint8_t x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, uint8_t 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) { _start: { if (x_4 == 0) { -lean_object* x_15; lean_object* x_16; -lean_dec(x_6); -x_15 = lean_box(0); -x_16 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__2(x_1, x_2, x_3, x_15, x_8, x_9, x_10, x_11, x_12, x_13, x_14); -return x_16; +lean_object* x_16; lean_object* x_17; +lean_dec(x_7); +x_16 = lean_box(0); +x_17 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__2(x_1, x_2, x_3, x_16, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +return x_17; } else { -uint8_t x_17; -x_17 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_shouldGenCodeFor(x_5); -if (x_17 == 0) +if (x_5 == 0) { -lean_object* x_18; lean_object* x_19; -lean_dec(x_6); -x_18 = lean_box(0); -x_19 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__2(x_1, x_2, x_3, x_18, x_8, x_9, x_10, x_11, x_12, x_13, x_14); -return x_19; +uint8_t x_18; +x_18 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_shouldGenCodeFor(x_6); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; +lean_dec(x_7); +x_19 = lean_box(0); +x_20 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__2(x_1, x_2, x_3, x_19, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +return x_20; } else { -lean_object* x_20; +lean_object* x_21; +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_inc(x_8); -x_20 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_compileDecl(x_6, x_8, x_9, x_10, x_11, x_12, x_13, x_14); -if (lean_obj_tag(x_20) == 0) +x_21 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_compileDecl(x_7, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +if (lean_obj_tag(x_21) == 0) { -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_20, 1); -lean_inc(x_21); -lean_dec(x_20); -x_22 = lean_box(0); -x_23 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__2(x_1, x_2, x_3, x_22, x_8, x_9, x_10, x_11, x_12, x_13, x_21); -return x_23; +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_box(0); +x_24 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__2(x_1, x_2, x_3, x_23, x_9, x_10, x_11, x_12, x_13, x_14, x_22); +return x_24; } else { -uint8_t x_24; +uint8_t x_25; +lean_dec(x_14); lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); -lean_dec(x_8); lean_dec(x_2); -x_24 = !lean_is_exclusive(x_20); -if (x_24 == 0) +x_25 = !lean_is_exclusive(x_21); +if (x_25 == 0) { -return x_20; +return x_21; } else { -lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_25 = lean_ctor_get(x_20, 0); -x_26 = lean_ctor_get(x_20, 1); +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_21, 0); +x_27 = lean_ctor_get(x_21, 1); +lean_inc(x_27); lean_inc(x_26); -lean_inc(x_25); -lean_dec(x_20); -x_27 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_27, 0, x_25); -lean_ctor_set(x_27, 1, x_26); -return x_27; +lean_dec(x_21); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; +} } } } +else +{ +lean_object* x_29; lean_object* x_30; +lean_dec(x_7); +x_29 = lean_box(0); +x_30 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__2(x_1, x_2, x_3, x_29, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +return x_30; +} } } } @@ -7144,334 +7162,411 @@ lean_ctor_set(x_2, 5, x_1); return x_2; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(lean_object* x_1, lean_object* x_2, uint8_t x_3, uint8_t 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, lean_object* x_11, lean_object* x_12) { +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(lean_object* x_1, lean_object* x_2, uint8_t x_3, uint8_t x_4, uint8_t 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) { _start: { -lean_object* x_13; +lean_object* x_14; +lean_inc(x_12); lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_5); -x_13 = l_Lean_addDecl(x_5, x_10, x_11, x_12); -if (lean_obj_tag(x_13) == 0) +lean_inc(x_6); +x_14 = l_Lean_addDecl(x_6, x_11, x_12, x_13); +if (lean_obj_tag(x_14) == 0) { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_14 = lean_ctor_get(x_13, 1); -lean_inc(x_14); -lean_dec(x_13); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +lean_dec(x_14); lean_inc(x_2); lean_inc(x_1); -x_15 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__1), 9, 2); -lean_closure_set(x_15, 0, x_1); -lean_closure_set(x_15, 1, x_2); -x_16 = lean_alloc_closure((void*)(l_Lean_Elab_withSaveInfoContext___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__1___lambda__1___boxed), 7, 0); +x_16 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__1), 9, 2); +lean_closure_set(x_16, 0, x_1); +lean_closure_set(x_16, 1, x_2); +x_17 = lean_alloc_closure((void*)(l_Lean_Elab_withSaveInfoContext___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__1___lambda__1___boxed), 7, 0); +lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -lean_inc(x_6); -x_17 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_withSavedPartialInfoContext___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__2(x_15, x_16, x_6, x_7, x_8, x_9, x_10, x_11, x_14); -if (lean_obj_tag(x_17) == 0) +x_18 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_withSavedPartialInfoContext___at___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___spec__2(x_16, x_17, x_7, x_8, x_9, x_10, x_11, x_12, x_15); +if (lean_obj_tag(x_18) == 0) { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); -x_19 = lean_box(0); +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_object* x_24; +x_19 = lean_ctor_get(x_18, 1); +lean_inc(x_19); +lean_dec(x_18); +x_20 = lean_box(0); lean_inc(x_2); -x_20 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_20, 0, x_2); -lean_ctor_set(x_20, 1, x_19); -x_21 = lean_array_mk(x_20); -x_22 = 0; +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_2); +lean_ctor_set(x_21, 1, x_20); +x_22 = lean_array_mk(x_21); +x_23 = 0; +lean_inc(x_12); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -lean_inc(x_6); -x_23 = l_Lean_Elab_applyAttributesOf(x_21, x_22, x_6, x_7, x_8, x_9, x_10, x_11, x_18); -if (lean_obj_tag(x_23) == 0) +x_24 = l_Lean_Elab_applyAttributesOf(x_22, x_23, x_7, x_8, x_9, x_10, x_11, x_12, x_19); +if (lean_obj_tag(x_24) == 0) { -lean_object* x_24; uint8_t x_25; -x_24 = lean_ctor_get(x_2, 2); -lean_inc(x_24); -x_25 = lean_ctor_get_uint8(x_24, sizeof(void*)*3 + 1); -lean_dec(x_24); -if (x_25 == 0) +lean_object* x_25; uint8_t x_26; +x_25 = lean_ctor_get(x_2, 2); +lean_inc(x_25); +x_26 = lean_ctor_get_uint8(x_25, sizeof(void*)*3 + 1); +lean_dec(x_25); +if (x_26 == 0) { -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_23, 1); -lean_inc(x_26); -lean_dec(x_23); -x_27 = lean_box(0); -x_28 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_3, x_1, x_21, x_4, x_2, x_5, x_27, x_6, x_7, x_8, x_9, x_10, x_11, x_26); +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_24, 1); +lean_inc(x_27); +lean_dec(x_24); +x_28 = lean_box(0); +x_29 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_3, x_1, x_22, x_4, x_5, x_2, x_6, x_28, x_7, x_8, x_9, x_10, x_11, x_12, x_27); lean_dec(x_2); -lean_dec(x_21); -return x_28; +lean_dec(x_22); +return x_29; } else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; -x_29 = lean_ctor_get(x_23, 1); -lean_inc(x_29); -lean_dec(x_23); -x_30 = lean_st_ref_take(x_11, x_29); -x_31 = lean_ctor_get(x_30, 0); -lean_inc(x_31); -x_32 = lean_ctor_get(x_30, 1); +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; +x_30 = lean_ctor_get(x_24, 1); +lean_inc(x_30); +lean_dec(x_24); +x_31 = lean_st_ref_take(x_12, x_30); +x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); -lean_dec(x_30); -x_33 = !lean_is_exclusive(x_31); -if (x_33 == 0) +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +lean_dec(x_31); +x_34 = !lean_is_exclusive(x_32); +if (x_34 == 0) { -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; uint8_t x_44; -x_34 = lean_ctor_get(x_31, 0); -x_35 = lean_ctor_get(x_31, 4); -lean_dec(x_35); -x_36 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__1; +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; uint8_t x_45; +x_35 = lean_ctor_get(x_32, 0); +x_36 = lean_ctor_get(x_32, 4); +lean_dec(x_36); +x_37 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__1; lean_inc(x_1); -x_37 = l_Lean_TagDeclarationExtension_tag(x_36, x_34, x_1); -x_38 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__4; -lean_ctor_set(x_31, 4, x_38); -lean_ctor_set(x_31, 0, x_37); -x_39 = lean_st_ref_set(x_11, x_31, x_32); -x_40 = lean_ctor_get(x_39, 1); -lean_inc(x_40); -lean_dec(x_39); -x_41 = lean_st_ref_take(x_9, x_40); -x_42 = lean_ctor_get(x_41, 0); -lean_inc(x_42); -x_43 = lean_ctor_get(x_41, 1); +x_38 = l_Lean_TagDeclarationExtension_tag(x_37, x_35, x_1); +x_39 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__4; +lean_ctor_set(x_32, 4, x_39); +lean_ctor_set(x_32, 0, x_38); +x_40 = lean_st_ref_set(x_12, x_32, x_33); +x_41 = lean_ctor_get(x_40, 1); +lean_inc(x_41); +lean_dec(x_40); +x_42 = lean_st_ref_take(x_10, x_41); +x_43 = lean_ctor_get(x_42, 0); lean_inc(x_43); -lean_dec(x_41); -x_44 = !lean_is_exclusive(x_42); -if (x_44 == 0) +x_44 = lean_ctor_get(x_42, 1); +lean_inc(x_44); +lean_dec(x_42); +x_45 = !lean_is_exclusive(x_43); +if (x_45 == 0) { -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_45 = lean_ctor_get(x_42, 1); -lean_dec(x_45); -x_46 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__5; -lean_ctor_set(x_42, 1, x_46); -x_47 = lean_st_ref_set(x_9, x_42, x_43); -x_48 = lean_ctor_get(x_47, 1); -lean_inc(x_48); -lean_dec(x_47); -x_49 = lean_box(0); -x_50 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_3, x_1, x_21, x_4, x_2, x_5, x_49, x_6, x_7, x_8, x_9, x_10, x_11, x_48); +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_46 = lean_ctor_get(x_43, 1); +lean_dec(x_46); +x_47 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__5; +lean_ctor_set(x_43, 1, x_47); +x_48 = lean_st_ref_set(x_10, x_43, x_44); +x_49 = lean_ctor_get(x_48, 1); +lean_inc(x_49); +lean_dec(x_48); +x_50 = lean_box(0); +x_51 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_3, x_1, x_22, x_4, x_5, x_2, x_6, x_50, x_7, x_8, x_9, x_10, x_11, x_12, x_49); lean_dec(x_2); -lean_dec(x_21); -return x_50; +lean_dec(x_22); +return x_51; } else { -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; -x_51 = lean_ctor_get(x_42, 0); -x_52 = lean_ctor_get(x_42, 2); -x_53 = lean_ctor_get(x_42, 3); -x_54 = lean_ctor_get(x_42, 4); +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_52 = lean_ctor_get(x_43, 0); +x_53 = lean_ctor_get(x_43, 2); +x_54 = lean_ctor_get(x_43, 3); +x_55 = lean_ctor_get(x_43, 4); +lean_inc(x_55); lean_inc(x_54); lean_inc(x_53); lean_inc(x_52); -lean_inc(x_51); -lean_dec(x_42); -x_55 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__5; -x_56 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_56, 0, x_51); -lean_ctor_set(x_56, 1, x_55); -lean_ctor_set(x_56, 2, x_52); -lean_ctor_set(x_56, 3, x_53); -lean_ctor_set(x_56, 4, x_54); -x_57 = lean_st_ref_set(x_9, x_56, x_43); -x_58 = lean_ctor_get(x_57, 1); -lean_inc(x_58); -lean_dec(x_57); -x_59 = lean_box(0); -x_60 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_3, x_1, x_21, x_4, x_2, x_5, x_59, x_6, x_7, x_8, x_9, x_10, x_11, x_58); +lean_dec(x_43); +x_56 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__5; +x_57 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_57, 0, x_52); +lean_ctor_set(x_57, 1, x_56); +lean_ctor_set(x_57, 2, x_53); +lean_ctor_set(x_57, 3, x_54); +lean_ctor_set(x_57, 4, x_55); +x_58 = lean_st_ref_set(x_10, x_57, x_44); +x_59 = lean_ctor_get(x_58, 1); +lean_inc(x_59); +lean_dec(x_58); +x_60 = lean_box(0); +x_61 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_3, x_1, x_22, x_4, x_5, x_2, x_6, x_60, x_7, x_8, x_9, x_10, x_11, x_12, x_59); lean_dec(x_2); -lean_dec(x_21); -return x_60; +lean_dec(x_22); +return x_61; } } else { -lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; 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_61 = lean_ctor_get(x_31, 0); -x_62 = lean_ctor_get(x_31, 1); -x_63 = lean_ctor_get(x_31, 2); -x_64 = lean_ctor_get(x_31, 3); -x_65 = lean_ctor_get(x_31, 5); -x_66 = lean_ctor_get(x_31, 6); -x_67 = lean_ctor_get(x_31, 7); +lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_62 = lean_ctor_get(x_32, 0); +x_63 = lean_ctor_get(x_32, 1); +x_64 = lean_ctor_get(x_32, 2); +x_65 = lean_ctor_get(x_32, 3); +x_66 = lean_ctor_get(x_32, 5); +x_67 = lean_ctor_get(x_32, 6); +x_68 = lean_ctor_get(x_32, 7); +lean_inc(x_68); lean_inc(x_67); lean_inc(x_66); lean_inc(x_65); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); -lean_inc(x_61); -lean_dec(x_31); -x_68 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__1; +lean_dec(x_32); +x_69 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__1; lean_inc(x_1); -x_69 = l_Lean_TagDeclarationExtension_tag(x_68, x_61, x_1); -x_70 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__4; -x_71 = lean_alloc_ctor(0, 8, 0); -lean_ctor_set(x_71, 0, x_69); -lean_ctor_set(x_71, 1, x_62); -lean_ctor_set(x_71, 2, x_63); -lean_ctor_set(x_71, 3, x_64); -lean_ctor_set(x_71, 4, x_70); -lean_ctor_set(x_71, 5, x_65); -lean_ctor_set(x_71, 6, x_66); -lean_ctor_set(x_71, 7, x_67); -x_72 = lean_st_ref_set(x_11, x_71, x_32); -x_73 = lean_ctor_get(x_72, 1); -lean_inc(x_73); -lean_dec(x_72); -x_74 = lean_st_ref_take(x_9, x_73); -x_75 = lean_ctor_get(x_74, 0); -lean_inc(x_75); -x_76 = lean_ctor_get(x_74, 1); +x_70 = l_Lean_TagDeclarationExtension_tag(x_69, x_62, x_1); +x_71 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__4; +x_72 = lean_alloc_ctor(0, 8, 0); +lean_ctor_set(x_72, 0, x_70); +lean_ctor_set(x_72, 1, x_63); +lean_ctor_set(x_72, 2, x_64); +lean_ctor_set(x_72, 3, x_65); +lean_ctor_set(x_72, 4, x_71); +lean_ctor_set(x_72, 5, x_66); +lean_ctor_set(x_72, 6, x_67); +lean_ctor_set(x_72, 7, x_68); +x_73 = lean_st_ref_set(x_12, x_72, x_33); +x_74 = lean_ctor_get(x_73, 1); +lean_inc(x_74); +lean_dec(x_73); +x_75 = lean_st_ref_take(x_10, x_74); +x_76 = lean_ctor_get(x_75, 0); lean_inc(x_76); -lean_dec(x_74); -x_77 = lean_ctor_get(x_75, 0); +x_77 = lean_ctor_get(x_75, 1); lean_inc(x_77); -x_78 = lean_ctor_get(x_75, 2); +lean_dec(x_75); +x_78 = lean_ctor_get(x_76, 0); lean_inc(x_78); -x_79 = lean_ctor_get(x_75, 3); +x_79 = lean_ctor_get(x_76, 2); lean_inc(x_79); -x_80 = lean_ctor_get(x_75, 4); +x_80 = lean_ctor_get(x_76, 3); lean_inc(x_80); -if (lean_is_exclusive(x_75)) { - lean_ctor_release(x_75, 0); - lean_ctor_release(x_75, 1); - lean_ctor_release(x_75, 2); - lean_ctor_release(x_75, 3); - lean_ctor_release(x_75, 4); - x_81 = x_75; -} else { - lean_dec_ref(x_75); - x_81 = lean_box(0); -} -x_82 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__5; -if (lean_is_scalar(x_81)) { - x_83 = lean_alloc_ctor(0, 5, 0); -} else { - x_83 = x_81; -} -lean_ctor_set(x_83, 0, x_77); -lean_ctor_set(x_83, 1, x_82); -lean_ctor_set(x_83, 2, x_78); -lean_ctor_set(x_83, 3, x_79); -lean_ctor_set(x_83, 4, x_80); -x_84 = lean_st_ref_set(x_9, x_83, x_76); -x_85 = lean_ctor_get(x_84, 1); -lean_inc(x_85); -lean_dec(x_84); -x_86 = lean_box(0); -x_87 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_3, x_1, x_21, x_4, x_2, x_5, x_86, x_6, x_7, x_8, x_9, x_10, x_11, x_85); +x_81 = lean_ctor_get(x_76, 4); +lean_inc(x_81); +if (lean_is_exclusive(x_76)) { + lean_ctor_release(x_76, 0); + lean_ctor_release(x_76, 1); + lean_ctor_release(x_76, 2); + lean_ctor_release(x_76, 3); + lean_ctor_release(x_76, 4); + x_82 = x_76; +} else { + lean_dec_ref(x_76); + x_82 = lean_box(0); +} +x_83 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__5; +if (lean_is_scalar(x_82)) { + x_84 = lean_alloc_ctor(0, 5, 0); +} else { + x_84 = x_82; +} +lean_ctor_set(x_84, 0, x_78); +lean_ctor_set(x_84, 1, x_83); +lean_ctor_set(x_84, 2, x_79); +lean_ctor_set(x_84, 3, x_80); +lean_ctor_set(x_84, 4, x_81); +x_85 = lean_st_ref_set(x_10, x_84, x_77); +x_86 = lean_ctor_get(x_85, 1); +lean_inc(x_86); +lean_dec(x_85); +x_87 = lean_box(0); +x_88 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_3, x_1, x_22, x_4, x_5, x_2, x_6, x_87, x_7, x_8, x_9, x_10, x_11, x_12, x_86); lean_dec(x_2); -lean_dec(x_21); -return x_87; +lean_dec(x_22); +return x_88; } } } else { -uint8_t x_88; -lean_dec(x_21); +uint8_t x_89; +lean_dec(x_22); +lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); -x_88 = !lean_is_exclusive(x_23); -if (x_88 == 0) +x_89 = !lean_is_exclusive(x_24); +if (x_89 == 0) { -return x_23; +return x_24; } else { -lean_object* x_89; lean_object* x_90; lean_object* x_91; -x_89 = lean_ctor_get(x_23, 0); -x_90 = lean_ctor_get(x_23, 1); +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_24, 0); +x_91 = lean_ctor_get(x_24, 1); +lean_inc(x_91); lean_inc(x_90); -lean_inc(x_89); -lean_dec(x_23); -x_91 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_91, 0, x_89); -lean_ctor_set(x_91, 1, x_90); -return x_91; +lean_dec(x_24); +x_92 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_92, 0, x_90); +lean_ctor_set(x_92, 1, x_91); +return x_92; } } } else { -uint8_t x_92; +uint8_t x_93; +lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); -x_92 = !lean_is_exclusive(x_17); -if (x_92 == 0) +x_93 = !lean_is_exclusive(x_18); +if (x_93 == 0) { -return x_17; +return x_18; } else { -lean_object* x_93; lean_object* x_94; lean_object* x_95; -x_93 = lean_ctor_get(x_17, 0); -x_94 = lean_ctor_get(x_17, 1); +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_18, 0); +x_95 = lean_ctor_get(x_18, 1); +lean_inc(x_95); lean_inc(x_94); -lean_inc(x_93); -lean_dec(x_17); -x_95 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_95, 0, x_93); -lean_ctor_set(x_95, 1, x_94); -return x_95; +lean_dec(x_18); +x_96 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_96, 0, x_94); +lean_ctor_set(x_96, 1, x_95); +return x_96; } } } else { -uint8_t x_96; +uint8_t x_97; +lean_dec(x_12); lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); -lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); -x_96 = !lean_is_exclusive(x_13); -if (x_96 == 0) +x_97 = !lean_is_exclusive(x_14); +if (x_97 == 0) { -return x_13; +return x_14; } else { -lean_object* x_97; lean_object* x_98; lean_object* x_99; -x_97 = lean_ctor_get(x_13, 0); -x_98 = lean_ctor_get(x_13, 1); +lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_14, 0); +x_99 = lean_ctor_get(x_14, 1); +lean_inc(x_99); lean_inc(x_98); -lean_inc(x_97); -lean_dec(x_13); -x_99 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_99, 0, x_97); -lean_ctor_set(x_99, 1, x_98); -return x_99; +lean_dec(x_14); +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_98); +lean_ctor_set(x_100, 1, x_99); +return x_100; +} +} +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("reducible", 9, 9); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__1; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("inline", 6, 6); +return x_1; +} +} +static lean_object* _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__3; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT uint8_t l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; uint8_t x_4; +x_2 = lean_ctor_get(x_1, 0); +x_3 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__2; +x_4 = lean_name_eq(x_2, x_3); +if (x_4 == 0) +{ +lean_object* x_5; uint8_t x_6; +x_5 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__4; +x_6 = lean_name_eq(x_2, x_5); +if (x_6 == 0) +{ +uint8_t x_7; +x_7 = 1; +return x_7; +} +else +{ +uint8_t x_8; +x_8 = 0; +return x_8; +} +} +else +{ +uint8_t x_9; +x_9 = 0; +return x_9; +} } } +static lean_object* _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___boxed), 1, 0); +return x_1; } } LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux(lean_object* x_1, uint8_t x_2, lean_object* x_3, uint8_t 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, lean_object* x_11) { @@ -7496,308 +7591,366 @@ lean_inc(x_7); x_16 = l_Lean_Elab_abstractNestedProofs(x_1, x_7, x_8, x_9, x_10, x_11); if (lean_obj_tag(x_16) == 0) { -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; uint8_t x_25; lean_object* x_26; +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_16, 1); lean_inc(x_18); lean_dec(x_16); -x_19 = lean_ctor_get(x_17, 3); -lean_inc(x_19); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -x_21 = lean_ctor_get(x_17, 4); -lean_inc(x_21); -lean_inc(x_21); +x_19 = lean_ctor_get(x_17, 4); lean_inc(x_19); -x_22 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_22, 0, x_19); -lean_ctor_set(x_22, 1, x_20); -lean_ctor_set(x_22, 2, x_21); -x_23 = lean_ctor_get(x_17, 5); -lean_inc(x_23); -lean_inc(x_3); -lean_inc(x_23); -lean_inc(x_22); -x_24 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_24, 0, x_22); -lean_ctor_set(x_24, 1, x_23); -lean_ctor_set(x_24, 2, x_3); -x_25 = lean_ctor_get_uint8(x_17, sizeof(void*)*7); -x_26 = lean_box(x_25); -switch (lean_obj_tag(x_26)) { -case 1: -{ -lean_object* x_27; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -x_27 = l_Lean_Meta_isProp(x_21, x_7, x_8, x_9, x_10, x_18); -if (lean_obj_tag(x_27) == 0) +x_20 = l_Lean_Meta_isProp(x_19, x_7, x_8, x_9, x_10, x_18); +if (lean_obj_tag(x_20) == 0) { -lean_object* x_28; uint8_t x_29; -x_28 = lean_ctor_get(x_27, 0); -lean_inc(x_28); -x_29 = lean_unbox(x_28); -lean_dec(x_28); -if (x_29 == 0) +lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; uint8_t x_110; +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); +x_23 = lean_st_ref_get(x_10, x_22); +x_110 = lean_unbox(x_21); +if (x_110 == 0) { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint32_t x_36; uint32_t x_37; uint32_t x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; -lean_dec(x_24); -x_30 = lean_ctor_get(x_27, 1); -lean_inc(x_30); -lean_dec(x_27); -x_31 = lean_st_ref_get(x_10, x_30); -x_32 = lean_ctor_get(x_31, 0); -lean_inc(x_32); -x_33 = lean_ctor_get(x_31, 1); -lean_inc(x_33); -lean_dec(x_31); -x_34 = lean_ctor_get(x_32, 0); -lean_inc(x_34); -lean_dec(x_32); -lean_inc(x_23); -x_35 = l_Lean_getMaxHeight(x_34, x_23); -x_36 = lean_unbox_uint32(x_35); -lean_dec(x_35); -x_37 = 1; -x_38 = lean_uint32_add(x_36, x_37); -x_39 = lean_alloc_ctor(2, 0, 4); -lean_ctor_set_uint32(x_39, 0, x_38); -x_40 = lean_ctor_get(x_17, 2); -lean_inc(x_40); -x_41 = lean_ctor_get_uint8(x_40, sizeof(void*)*3 + 3); -lean_dec(x_40); -if (x_41 == 0) -{ -uint8_t x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_42 = 1; -x_43 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_43, 0, x_22); -lean_ctor_set(x_43, 1, x_23); -lean_ctor_set(x_43, 2, x_39); -lean_ctor_set(x_43, 3, x_3); -lean_ctor_set_uint8(x_43, sizeof(void*)*4, x_42); -x_44 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_44, 0, x_43); -x_45 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_19, x_17, x_4, x_2, x_44, x_5, x_6, x_7, x_8, x_9, x_10, x_33); -return x_45; +uint8_t x_111; +x_111 = 0; +x_24 = x_111; +goto block_109; } else { -uint8_t x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_46 = 0; -x_47 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_47, 0, x_22); -lean_ctor_set(x_47, 1, x_23); -lean_ctor_set(x_47, 2, x_39); -lean_ctor_set(x_47, 3, x_3); -lean_ctor_set_uint8(x_47, sizeof(void*)*4, x_46); -x_48 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_48, 0, x_47); -x_49 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_19, x_17, x_4, x_2, x_48, x_5, x_6, x_7, x_8, x_9, x_10, x_33); -return x_49; +uint8_t x_112; +x_112 = 1; +x_24 = x_112; +goto block_109; } +block_109: +{ +lean_object* x_25; +if (x_24 == 0) +{ +x_25 = x_17; +goto block_106; } else { -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; -lean_dec(x_23); -lean_dec(x_22); -lean_dec(x_3); -x_50 = lean_ctor_get(x_27, 1); -lean_inc(x_50); -lean_dec(x_27); -lean_inc(x_9); -lean_inc(x_24); -x_51 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_24, x_5, x_6, x_7, x_8, x_9, x_10, x_50); -x_52 = lean_ctor_get(x_51, 1); -lean_inc(x_52); -lean_dec(x_51); -x_53 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_53, 0, x_24); -x_54 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_19, x_17, x_4, x_2, x_53, x_5, x_6, x_7, x_8, x_9, x_10, x_52); -return x_54; -} +lean_object* x_107; lean_object* x_108; +x_107 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___closed__1; +x_108 = l_Lean_Elab_PreDefinition_filterAttrs(x_17, x_107); +x_25 = x_108; +goto block_106; } -else +block_106: { -uint8_t x_55; -lean_dec(x_24); +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; +x_26 = lean_ctor_get(x_23, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_23, 1); +lean_inc(x_27); lean_dec(x_23); -lean_dec(x_22); -lean_dec(x_19); -lean_dec(x_17); -lean_dec(x_9); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -x_55 = !lean_is_exclusive(x_27); -if (x_55 == 0) +x_28 = lean_ctor_get(x_25, 3); +lean_inc(x_28); +x_29 = lean_ctor_get(x_25, 1); +lean_inc(x_29); +x_30 = lean_ctor_get(x_25, 4); +lean_inc(x_30); +lean_inc(x_28); +x_31 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_31, 0, x_28); +lean_ctor_set(x_31, 1, x_29); +lean_ctor_set(x_31, 2, x_30); +x_32 = lean_ctor_get(x_26, 0); +lean_inc(x_32); +lean_dec(x_26); +x_33 = lean_ctor_get(x_25, 5); +lean_inc(x_33); +lean_inc(x_3); +lean_inc(x_33); +lean_inc(x_31); +x_34 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_34, 0, x_31); +lean_ctor_set(x_34, 1, x_33); +lean_ctor_set(x_34, 2, x_3); +x_35 = lean_ctor_get_uint8(x_25, sizeof(void*)*7); +x_36 = lean_box(x_35); +switch (lean_obj_tag(x_36)) { +case 1: { -return x_27; +if (x_24 == 0) +{ +lean_object* x_37; uint32_t x_38; uint32_t x_39; uint32_t x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; +lean_dec(x_34); +lean_inc(x_33); +x_37 = l_Lean_getMaxHeight(x_32, x_33); +x_38 = lean_unbox_uint32(x_37); +lean_dec(x_37); +x_39 = 1; +x_40 = lean_uint32_add(x_38, x_39); +x_41 = lean_alloc_ctor(2, 0, 4); +lean_ctor_set_uint32(x_41, 0, x_40); +x_42 = lean_ctor_get(x_25, 2); +lean_inc(x_42); +x_43 = lean_ctor_get_uint8(x_42, sizeof(void*)*3 + 3); +lean_dec(x_42); +if (x_43 == 0) +{ +uint8_t x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; lean_object* x_48; +x_44 = 1; +x_45 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_45, 0, x_31); +lean_ctor_set(x_45, 1, x_33); +lean_ctor_set(x_45, 2, x_41); +lean_ctor_set(x_45, 3, x_3); +lean_ctor_set_uint8(x_45, sizeof(void*)*4, x_44); +x_46 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_46, 0, x_45); +x_47 = lean_unbox(x_21); +lean_dec(x_21); +x_48 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_47, x_46, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +return x_48; } else { -lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_56 = lean_ctor_get(x_27, 0); -x_57 = lean_ctor_get(x_27, 1); -lean_inc(x_57); -lean_inc(x_56); -lean_dec(x_27); -x_58 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_58, 0, x_56); -lean_ctor_set(x_58, 1, x_57); -return x_58; +uint8_t x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; lean_object* x_53; +x_49 = 0; +x_50 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_50, 0, x_31); +lean_ctor_set(x_50, 1, x_33); +lean_ctor_set(x_50, 2, x_41); +lean_ctor_set(x_50, 3, x_3); +lean_ctor_set_uint8(x_50, sizeof(void*)*4, x_49); +x_51 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_51, 0, x_50); +x_52 = lean_unbox(x_21); +lean_dec(x_21); +x_53 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_52, x_51, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +return x_53; } } +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; lean_object* x_58; +lean_dec(x_33); +lean_dec(x_32); +lean_dec(x_31); +lean_dec(x_3); +lean_inc(x_9); +lean_inc(x_34); +x_54 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_34, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +x_55 = lean_ctor_get(x_54, 1); +lean_inc(x_55); +lean_dec(x_54); +x_56 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_56, 0, x_34); +x_57 = lean_unbox(x_21); +lean_dec(x_21); +x_58 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_57, x_56, x_5, x_6, x_7, x_8, x_9, x_10, x_55); +return x_58; +} } case 2: { -lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; -lean_dec(x_23); -lean_dec(x_22); -lean_dec(x_21); +lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; lean_object* x_63; +lean_dec(x_33); +lean_dec(x_32); +lean_dec(x_31); lean_dec(x_3); lean_inc(x_9); -lean_inc(x_24); -x_59 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_24, x_5, x_6, x_7, x_8, x_9, x_10, x_18); +lean_inc(x_34); +x_59 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_34, x_5, x_6, x_7, x_8, x_9, x_10, x_27); x_60 = lean_ctor_get(x_59, 1); lean_inc(x_60); lean_dec(x_59); x_61 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_61, 0, x_24); -x_62 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_19, x_17, x_4, x_2, x_61, x_5, x_6, x_7, x_8, x_9, x_10, x_60); -return x_62; +lean_ctor_set(x_61, 0, x_34); +x_62 = lean_unbox(x_21); +lean_dec(x_21); +x_63 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_62, x_61, x_5, x_6, x_7, x_8, x_9, x_10, x_60); +return x_63; } case 4: { -lean_object* x_63; uint8_t x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -lean_dec(x_24); +lean_object* x_64; uint8_t x_65; lean_object* x_66; lean_object* x_67; uint8_t x_68; lean_object* x_69; +lean_dec(x_34); +lean_dec(x_32); +x_64 = lean_ctor_get(x_25, 2); +lean_inc(x_64); +x_65 = lean_ctor_get_uint8(x_64, sizeof(void*)*3 + 3); +lean_dec(x_64); +x_66 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_66, 0, x_31); +lean_ctor_set(x_66, 1, x_33); +lean_ctor_set(x_66, 2, x_3); +lean_ctor_set_uint8(x_66, sizeof(void*)*3, x_65); +x_67 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_67, 0, x_66); +x_68 = lean_unbox(x_21); lean_dec(x_21); -x_63 = lean_ctor_get(x_17, 2); -lean_inc(x_63); -x_64 = lean_ctor_get_uint8(x_63, sizeof(void*)*3 + 3); -lean_dec(x_63); -x_65 = lean_alloc_ctor(0, 3, 1); -lean_ctor_set(x_65, 0, x_22); -lean_ctor_set(x_65, 1, x_23); -lean_ctor_set(x_65, 2, x_3); -lean_ctor_set_uint8(x_65, sizeof(void*)*3, x_64); -x_66 = lean_alloc_ctor(3, 1, 0); -lean_ctor_set(x_66, 0, x_65); -x_67 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_19, x_17, x_4, x_2, x_66, x_5, x_6, x_7, x_8, x_9, x_10, x_18); -return x_67; +x_69 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_68, x_67, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +return x_69; } case 5: { -lean_object* x_68; uint8_t x_69; -lean_dec(x_24); +lean_dec(x_32); +if (x_24 == 0) +{ +lean_object* x_70; uint8_t x_71; +lean_dec(x_34); +x_70 = lean_ctor_get(x_25, 2); +lean_inc(x_70); +x_71 = lean_ctor_get_uint8(x_70, sizeof(void*)*3 + 3); +lean_dec(x_70); +if (x_71 == 0) +{ +lean_object* x_72; uint8_t x_73; lean_object* x_74; lean_object* x_75; uint8_t x_76; lean_object* x_77; +x_72 = lean_box(1); +x_73 = 1; +x_74 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_74, 0, x_31); +lean_ctor_set(x_74, 1, x_33); +lean_ctor_set(x_74, 2, x_72); +lean_ctor_set(x_74, 3, x_3); +lean_ctor_set_uint8(x_74, sizeof(void*)*4, x_73); +x_75 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_75, 0, x_74); +x_76 = lean_unbox(x_21); lean_dec(x_21); -x_68 = lean_ctor_get(x_17, 2); -lean_inc(x_68); -x_69 = lean_ctor_get_uint8(x_68, sizeof(void*)*3 + 3); -lean_dec(x_68); -if (x_69 == 0) -{ -lean_object* x_70; uint8_t x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_70 = lean_box(1); -x_71 = 1; -x_72 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_72, 0, x_22); -lean_ctor_set(x_72, 1, x_23); -lean_ctor_set(x_72, 2, x_70); -lean_ctor_set(x_72, 3, x_3); -lean_ctor_set_uint8(x_72, sizeof(void*)*4, x_71); -x_73 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_73, 0, x_72); -x_74 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_19, x_17, x_4, x_2, x_73, x_5, x_6, x_7, x_8, x_9, x_10, x_18); -return x_74; +x_77 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_76, x_75, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +return x_77; +} +else +{ +lean_object* x_78; uint8_t x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; lean_object* x_83; +x_78 = lean_box(1); +x_79 = 0; +x_80 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_80, 0, x_31); +lean_ctor_set(x_80, 1, x_33); +lean_ctor_set(x_80, 2, x_78); +lean_ctor_set(x_80, 3, x_3); +lean_ctor_set_uint8(x_80, sizeof(void*)*4, x_79); +x_81 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_81, 0, x_80); +x_82 = lean_unbox(x_21); +lean_dec(x_21); +x_83 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_82, x_81, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +return x_83; +} } else { -lean_object* x_75; uint8_t x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; -x_75 = lean_box(1); -x_76 = 0; -x_77 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_77, 0, x_22); -lean_ctor_set(x_77, 1, x_23); -lean_ctor_set(x_77, 2, x_75); -lean_ctor_set(x_77, 3, x_3); -lean_ctor_set_uint8(x_77, sizeof(void*)*4, x_76); -x_78 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_78, 0, x_77); -x_79 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_19, x_17, x_4, x_2, x_78, x_5, x_6, x_7, x_8, x_9, x_10, x_18); -return x_79; +lean_object* x_84; lean_object* x_85; lean_object* x_86; uint8_t x_87; lean_object* x_88; +lean_dec(x_33); +lean_dec(x_31); +lean_dec(x_3); +lean_inc(x_9); +lean_inc(x_34); +x_84 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_34, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +x_85 = lean_ctor_get(x_84, 1); +lean_inc(x_85); +lean_dec(x_84); +x_86 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_86, 0, x_34); +x_87 = lean_unbox(x_21); +lean_dec(x_21); +x_88 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_87, x_86, x_5, x_6, x_7, x_8, x_9, x_10, x_85); +return x_88; } } default: { -lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; uint32_t x_85; uint32_t x_86; uint32_t x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; -lean_dec(x_26); -lean_dec(x_24); -lean_dec(x_21); -x_80 = lean_st_ref_get(x_10, x_18); -x_81 = lean_ctor_get(x_80, 0); -lean_inc(x_81); -x_82 = lean_ctor_get(x_80, 1); -lean_inc(x_82); -lean_dec(x_80); -x_83 = lean_ctor_get(x_81, 0); -lean_inc(x_83); -lean_dec(x_81); -lean_inc(x_23); -x_84 = l_Lean_getMaxHeight(x_83, x_23); -x_85 = lean_unbox_uint32(x_84); -lean_dec(x_84); -x_86 = 1; -x_87 = lean_uint32_add(x_85, x_86); -x_88 = lean_alloc_ctor(2, 0, 4); -lean_ctor_set_uint32(x_88, 0, x_87); -x_89 = lean_ctor_get(x_17, 2); -lean_inc(x_89); -x_90 = lean_ctor_get_uint8(x_89, sizeof(void*)*3 + 3); +lean_object* x_89; uint32_t x_90; uint32_t x_91; uint32_t x_92; lean_object* x_93; lean_object* x_94; uint8_t x_95; +lean_dec(x_36); +lean_dec(x_34); +lean_inc(x_33); +x_89 = l_Lean_getMaxHeight(x_32, x_33); +x_90 = lean_unbox_uint32(x_89); lean_dec(x_89); -if (x_90 == 0) -{ -uint8_t x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; x_91 = 1; -x_92 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_92, 0, x_22); -lean_ctor_set(x_92, 1, x_23); -lean_ctor_set(x_92, 2, x_88); -lean_ctor_set(x_92, 3, x_3); -lean_ctor_set_uint8(x_92, sizeof(void*)*4, x_91); -x_93 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_93, 0, x_92); -x_94 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_19, x_17, x_4, x_2, x_93, x_5, x_6, x_7, x_8, x_9, x_10, x_82); -return x_94; +x_92 = lean_uint32_add(x_90, x_91); +x_93 = lean_alloc_ctor(2, 0, 4); +lean_ctor_set_uint32(x_93, 0, x_92); +x_94 = lean_ctor_get(x_25, 2); +lean_inc(x_94); +x_95 = lean_ctor_get_uint8(x_94, sizeof(void*)*3 + 3); +lean_dec(x_94); +if (x_95 == 0) +{ +uint8_t x_96; lean_object* x_97; lean_object* x_98; uint8_t x_99; lean_object* x_100; +x_96 = 1; +x_97 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_97, 0, x_31); +lean_ctor_set(x_97, 1, x_33); +lean_ctor_set(x_97, 2, x_93); +lean_ctor_set(x_97, 3, x_3); +lean_ctor_set_uint8(x_97, sizeof(void*)*4, x_96); +x_98 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_98, 0, x_97); +x_99 = lean_unbox(x_21); +lean_dec(x_21); +x_100 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_99, x_98, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +return x_100; +} +else +{ +uint8_t x_101; lean_object* x_102; lean_object* x_103; uint8_t x_104; lean_object* x_105; +x_101 = 0; +x_102 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_102, 0, x_31); +lean_ctor_set(x_102, 1, x_33); +lean_ctor_set(x_102, 2, x_93); +lean_ctor_set(x_102, 3, x_3); +lean_ctor_set_uint8(x_102, sizeof(void*)*4, x_101); +x_103 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_103, 0, x_102); +x_104 = lean_unbox(x_21); +lean_dec(x_21); +x_105 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_28, x_25, x_4, x_2, x_104, x_103, x_5, x_6, x_7, x_8, x_9, x_10, x_27); +return x_105; +} +} +} +} +} } else { -uint8_t x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; -x_95 = 0; -x_96 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_96, 0, x_22); -lean_ctor_set(x_96, 1, x_23); -lean_ctor_set(x_96, 2, x_88); -lean_ctor_set(x_96, 3, x_3); -lean_ctor_set_uint8(x_96, sizeof(void*)*4, x_95); -x_97 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_97, 0, x_96); -x_98 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_19, x_17, x_4, x_2, x_97, x_5, x_6, x_7, x_8, x_9, x_10, x_82); -return x_98; +uint8_t x_113; +lean_dec(x_17); +lean_dec(x_9); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_113 = !lean_is_exclusive(x_20); +if (x_113 == 0) +{ +return x_20; } +else +{ +lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_114 = lean_ctor_get(x_20, 0); +x_115 = lean_ctor_get(x_20, 1); +lean_inc(x_115); +lean_inc(x_114); +lean_dec(x_20); +x_116 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_116, 0, x_114); +lean_ctor_set(x_116, 1, x_115); +return x_116; } } } else { -uint8_t x_99; +uint8_t x_117; lean_dec(x_9); lean_dec(x_10); lean_dec(x_8); @@ -7805,412 +7958,470 @@ lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); -x_99 = !lean_is_exclusive(x_16); -if (x_99 == 0) +x_117 = !lean_is_exclusive(x_16); +if (x_117 == 0) { return x_16; } else { -lean_object* x_100; lean_object* x_101; lean_object* x_102; -x_100 = lean_ctor_get(x_16, 0); -x_101 = lean_ctor_get(x_16, 1); -lean_inc(x_101); -lean_inc(x_100); +lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_118 = lean_ctor_get(x_16, 0); +x_119 = lean_ctor_get(x_16, 1); +lean_inc(x_119); +lean_inc(x_118); lean_dec(x_16); -x_102 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_102, 0, x_100); -lean_ctor_set(x_102, 1, x_101); -return x_102; -} -} -} -else -{ -lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; uint8_t x_114; lean_object* x_115; uint8_t x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; -x_103 = lean_ctor_get(x_9, 0); -x_104 = lean_ctor_get(x_9, 1); -x_105 = lean_ctor_get(x_9, 2); -x_106 = lean_ctor_get(x_9, 3); -x_107 = lean_ctor_get(x_9, 4); -x_108 = lean_ctor_get(x_9, 5); -x_109 = lean_ctor_get(x_9, 6); -x_110 = lean_ctor_get(x_9, 7); -x_111 = lean_ctor_get(x_9, 8); -x_112 = lean_ctor_get(x_9, 9); -x_113 = lean_ctor_get(x_9, 10); -x_114 = lean_ctor_get_uint8(x_9, sizeof(void*)*12); -x_115 = lean_ctor_get(x_9, 11); -x_116 = lean_ctor_get_uint8(x_9, sizeof(void*)*12 + 1); -lean_inc(x_115); -lean_inc(x_113); -lean_inc(x_112); -lean_inc(x_111); -lean_inc(x_110); -lean_inc(x_109); -lean_inc(x_108); -lean_inc(x_107); -lean_inc(x_106); -lean_inc(x_105); -lean_inc(x_104); -lean_inc(x_103); +x_120 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_120, 0, x_118); +lean_ctor_set(x_120, 1, x_119); +return x_120; +} +} +} +else +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; uint8_t x_132; lean_object* x_133; uint8_t x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +x_121 = lean_ctor_get(x_9, 0); +x_122 = lean_ctor_get(x_9, 1); +x_123 = lean_ctor_get(x_9, 2); +x_124 = lean_ctor_get(x_9, 3); +x_125 = lean_ctor_get(x_9, 4); +x_126 = lean_ctor_get(x_9, 5); +x_127 = lean_ctor_get(x_9, 6); +x_128 = lean_ctor_get(x_9, 7); +x_129 = lean_ctor_get(x_9, 8); +x_130 = lean_ctor_get(x_9, 9); +x_131 = lean_ctor_get(x_9, 10); +x_132 = lean_ctor_get_uint8(x_9, sizeof(void*)*12); +x_133 = lean_ctor_get(x_9, 11); +x_134 = lean_ctor_get_uint8(x_9, sizeof(void*)*12 + 1); +lean_inc(x_133); +lean_inc(x_131); +lean_inc(x_130); +lean_inc(x_129); +lean_inc(x_128); +lean_inc(x_127); +lean_inc(x_126); +lean_inc(x_125); +lean_inc(x_124); +lean_inc(x_123); +lean_inc(x_122); +lean_inc(x_121); lean_dec(x_9); -x_117 = l_Lean_replaceRef(x_12, x_108); -lean_dec(x_108); +x_135 = l_Lean_replaceRef(x_12, x_126); +lean_dec(x_126); lean_dec(x_12); -x_118 = lean_alloc_ctor(0, 12, 2); -lean_ctor_set(x_118, 0, x_103); -lean_ctor_set(x_118, 1, x_104); -lean_ctor_set(x_118, 2, x_105); -lean_ctor_set(x_118, 3, x_106); -lean_ctor_set(x_118, 4, x_107); -lean_ctor_set(x_118, 5, x_117); -lean_ctor_set(x_118, 6, x_109); -lean_ctor_set(x_118, 7, x_110); -lean_ctor_set(x_118, 8, x_111); -lean_ctor_set(x_118, 9, x_112); -lean_ctor_set(x_118, 10, x_113); -lean_ctor_set(x_118, 11, x_115); -lean_ctor_set_uint8(x_118, sizeof(void*)*12, x_114); -lean_ctor_set_uint8(x_118, sizeof(void*)*12 + 1, x_116); +x_136 = lean_alloc_ctor(0, 12, 2); +lean_ctor_set(x_136, 0, x_121); +lean_ctor_set(x_136, 1, x_122); +lean_ctor_set(x_136, 2, x_123); +lean_ctor_set(x_136, 3, x_124); +lean_ctor_set(x_136, 4, x_125); +lean_ctor_set(x_136, 5, x_135); +lean_ctor_set(x_136, 6, x_127); +lean_ctor_set(x_136, 7, x_128); +lean_ctor_set(x_136, 8, x_129); +lean_ctor_set(x_136, 9, x_130); +lean_ctor_set(x_136, 10, x_131); +lean_ctor_set(x_136, 11, x_133); +lean_ctor_set_uint8(x_136, sizeof(void*)*12, x_132); +lean_ctor_set_uint8(x_136, sizeof(void*)*12 + 1, x_134); lean_inc(x_10); -lean_inc(x_118); +lean_inc(x_136); lean_inc(x_8); lean_inc(x_7); -x_119 = l_Lean_Elab_abstractNestedProofs(x_1, x_7, x_8, x_118, x_10, x_11); -if (lean_obj_tag(x_119) == 0) -{ -lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; uint8_t x_128; lean_object* x_129; -x_120 = lean_ctor_get(x_119, 0); -lean_inc(x_120); -x_121 = lean_ctor_get(x_119, 1); -lean_inc(x_121); -lean_dec(x_119); -x_122 = lean_ctor_get(x_120, 3); -lean_inc(x_122); -x_123 = lean_ctor_get(x_120, 1); -lean_inc(x_123); -x_124 = lean_ctor_get(x_120, 4); -lean_inc(x_124); -lean_inc(x_124); -lean_inc(x_122); -x_125 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_125, 0, x_122); -lean_ctor_set(x_125, 1, x_123); -lean_ctor_set(x_125, 2, x_124); -x_126 = lean_ctor_get(x_120, 5); -lean_inc(x_126); -lean_inc(x_3); -lean_inc(x_126); -lean_inc(x_125); -x_127 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_127, 0, x_125); -lean_ctor_set(x_127, 1, x_126); -lean_ctor_set(x_127, 2, x_3); -x_128 = lean_ctor_get_uint8(x_120, sizeof(void*)*7); -x_129 = lean_box(x_128); -switch (lean_obj_tag(x_129)) { -case 1: -{ -lean_object* x_130; +x_137 = l_Lean_Elab_abstractNestedProofs(x_1, x_7, x_8, x_136, x_10, x_11); +if (lean_obj_tag(x_137) == 0) +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; +x_138 = lean_ctor_get(x_137, 0); +lean_inc(x_138); +x_139 = lean_ctor_get(x_137, 1); +lean_inc(x_139); +lean_dec(x_137); +x_140 = lean_ctor_get(x_138, 4); +lean_inc(x_140); lean_inc(x_10); -lean_inc(x_118); +lean_inc(x_136); lean_inc(x_8); lean_inc(x_7); -x_130 = l_Lean_Meta_isProp(x_124, x_7, x_8, x_118, x_10, x_121); -if (lean_obj_tag(x_130) == 0) +x_141 = l_Lean_Meta_isProp(x_140, x_7, x_8, x_136, x_10, x_139); +if (lean_obj_tag(x_141) == 0) { -lean_object* x_131; uint8_t x_132; -x_131 = lean_ctor_get(x_130, 0); -lean_inc(x_131); -x_132 = lean_unbox(x_131); -lean_dec(x_131); -if (x_132 == 0) -{ -lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; uint32_t x_139; uint32_t x_140; uint32_t x_141; lean_object* x_142; lean_object* x_143; uint8_t x_144; -lean_dec(x_127); -x_133 = lean_ctor_get(x_130, 1); -lean_inc(x_133); -lean_dec(x_130); -x_134 = lean_st_ref_get(x_10, x_133); -x_135 = lean_ctor_get(x_134, 0); -lean_inc(x_135); -x_136 = lean_ctor_get(x_134, 1); -lean_inc(x_136); -lean_dec(x_134); -x_137 = lean_ctor_get(x_135, 0); -lean_inc(x_137); -lean_dec(x_135); -lean_inc(x_126); -x_138 = l_Lean_getMaxHeight(x_137, x_126); -x_139 = lean_unbox_uint32(x_138); -lean_dec(x_138); -x_140 = 1; -x_141 = lean_uint32_add(x_139, x_140); -x_142 = lean_alloc_ctor(2, 0, 4); -lean_ctor_set_uint32(x_142, 0, x_141); -x_143 = lean_ctor_get(x_120, 2); +lean_object* x_142; lean_object* x_143; lean_object* x_144; uint8_t x_145; uint8_t x_231; +x_142 = lean_ctor_get(x_141, 0); +lean_inc(x_142); +x_143 = lean_ctor_get(x_141, 1); lean_inc(x_143); -x_144 = lean_ctor_get_uint8(x_143, sizeof(void*)*3 + 3); -lean_dec(x_143); -if (x_144 == 0) -{ -uint8_t x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; -x_145 = 1; -x_146 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_146, 0, x_125); -lean_ctor_set(x_146, 1, x_126); -lean_ctor_set(x_146, 2, x_142); -lean_ctor_set(x_146, 3, x_3); -lean_ctor_set_uint8(x_146, sizeof(void*)*4, x_145); -x_147 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_147, 0, x_146); -x_148 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_122, x_120, x_4, x_2, x_147, x_5, x_6, x_7, x_8, x_118, x_10, x_136); -return x_148; -} -else -{ -uint8_t x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; -x_149 = 0; -x_150 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_150, 0, x_125); -lean_ctor_set(x_150, 1, x_126); -lean_ctor_set(x_150, 2, x_142); -lean_ctor_set(x_150, 3, x_3); -lean_ctor_set_uint8(x_150, sizeof(void*)*4, x_149); -x_151 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_151, 0, x_150); -x_152 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_122, x_120, x_4, x_2, x_151, x_5, x_6, x_7, x_8, x_118, x_10, x_136); -return x_152; -} -} -else -{ -lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; -lean_dec(x_126); -lean_dec(x_125); -lean_dec(x_3); -x_153 = lean_ctor_get(x_130, 1); -lean_inc(x_153); -lean_dec(x_130); -lean_inc(x_118); -lean_inc(x_127); -x_154 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_127, x_5, x_6, x_7, x_8, x_118, x_10, x_153); -x_155 = lean_ctor_get(x_154, 1); -lean_inc(x_155); -lean_dec(x_154); -x_156 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_156, 0, x_127); -x_157 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_122, x_120, x_4, x_2, x_156, x_5, x_6, x_7, x_8, x_118, x_10, x_155); -return x_157; +lean_dec(x_141); +x_144 = lean_st_ref_get(x_10, x_143); +x_231 = lean_unbox(x_142); +if (x_231 == 0) +{ +uint8_t x_232; +x_232 = 0; +x_145 = x_232; +goto block_230; } +else +{ +uint8_t x_233; +x_233 = 1; +x_145 = x_233; +goto block_230; +} +block_230: +{ +lean_object* x_146; +if (x_145 == 0) +{ +x_146 = x_138; +goto block_227; } else { -lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; -lean_dec(x_127); -lean_dec(x_126); -lean_dec(x_125); -lean_dec(x_122); -lean_dec(x_120); -lean_dec(x_118); -lean_dec(x_10); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -x_158 = lean_ctor_get(x_130, 0); -lean_inc(x_158); -x_159 = lean_ctor_get(x_130, 1); -lean_inc(x_159); -if (lean_is_exclusive(x_130)) { - lean_ctor_release(x_130, 0); - lean_ctor_release(x_130, 1); - x_160 = x_130; -} else { - lean_dec_ref(x_130); - x_160 = lean_box(0); +lean_object* x_228; lean_object* x_229; +x_228 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___closed__1; +x_229 = l_Lean_Elab_PreDefinition_filterAttrs(x_138, x_228); +x_146 = x_229; +goto block_227; } -if (lean_is_scalar(x_160)) { - x_161 = lean_alloc_ctor(1, 2, 0); -} else { - x_161 = x_160; +block_227: +{ +lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; uint8_t x_156; lean_object* x_157; +x_147 = lean_ctor_get(x_144, 0); +lean_inc(x_147); +x_148 = lean_ctor_get(x_144, 1); +lean_inc(x_148); +lean_dec(x_144); +x_149 = lean_ctor_get(x_146, 3); +lean_inc(x_149); +x_150 = lean_ctor_get(x_146, 1); +lean_inc(x_150); +x_151 = lean_ctor_get(x_146, 4); +lean_inc(x_151); +lean_inc(x_149); +x_152 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_152, 0, x_149); +lean_ctor_set(x_152, 1, x_150); +lean_ctor_set(x_152, 2, x_151); +x_153 = lean_ctor_get(x_147, 0); +lean_inc(x_153); +lean_dec(x_147); +x_154 = lean_ctor_get(x_146, 5); +lean_inc(x_154); +lean_inc(x_3); +lean_inc(x_154); +lean_inc(x_152); +x_155 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_155, 0, x_152); +lean_ctor_set(x_155, 1, x_154); +lean_ctor_set(x_155, 2, x_3); +x_156 = lean_ctor_get_uint8(x_146, sizeof(void*)*7); +x_157 = lean_box(x_156); +switch (lean_obj_tag(x_157)) { +case 1: +{ +if (x_145 == 0) +{ +lean_object* x_158; uint32_t x_159; uint32_t x_160; uint32_t x_161; lean_object* x_162; lean_object* x_163; uint8_t x_164; +lean_dec(x_155); +lean_inc(x_154); +x_158 = l_Lean_getMaxHeight(x_153, x_154); +x_159 = lean_unbox_uint32(x_158); +lean_dec(x_158); +x_160 = 1; +x_161 = lean_uint32_add(x_159, x_160); +x_162 = lean_alloc_ctor(2, 0, 4); +lean_ctor_set_uint32(x_162, 0, x_161); +x_163 = lean_ctor_get(x_146, 2); +lean_inc(x_163); +x_164 = lean_ctor_get_uint8(x_163, sizeof(void*)*3 + 3); +lean_dec(x_163); +if (x_164 == 0) +{ +uint8_t x_165; lean_object* x_166; lean_object* x_167; uint8_t x_168; lean_object* x_169; +x_165 = 1; +x_166 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_166, 0, x_152); +lean_ctor_set(x_166, 1, x_154); +lean_ctor_set(x_166, 2, x_162); +lean_ctor_set(x_166, 3, x_3); +lean_ctor_set_uint8(x_166, sizeof(void*)*4, x_165); +x_167 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_167, 0, x_166); +x_168 = lean_unbox(x_142); +lean_dec(x_142); +x_169 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_168, x_167, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +return x_169; +} +else +{ +uint8_t x_170; lean_object* x_171; lean_object* x_172; uint8_t x_173; lean_object* x_174; +x_170 = 0; +x_171 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_171, 0, x_152); +lean_ctor_set(x_171, 1, x_154); +lean_ctor_set(x_171, 2, x_162); +lean_ctor_set(x_171, 3, x_3); +lean_ctor_set_uint8(x_171, sizeof(void*)*4, x_170); +x_172 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_172, 0, x_171); +x_173 = lean_unbox(x_142); +lean_dec(x_142); +x_174 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_173, x_172, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +return x_174; } -lean_ctor_set(x_161, 0, x_158); -lean_ctor_set(x_161, 1, x_159); -return x_161; +} +else +{ +lean_object* x_175; lean_object* x_176; lean_object* x_177; uint8_t x_178; lean_object* x_179; +lean_dec(x_154); +lean_dec(x_153); +lean_dec(x_152); +lean_dec(x_3); +lean_inc(x_136); +lean_inc(x_155); +x_175 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_155, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +x_176 = lean_ctor_get(x_175, 1); +lean_inc(x_176); +lean_dec(x_175); +x_177 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_177, 0, x_155); +x_178 = lean_unbox(x_142); +lean_dec(x_142); +x_179 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_178, x_177, x_5, x_6, x_7, x_8, x_136, x_10, x_176); +return x_179; } } case 2: { -lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; -lean_dec(x_126); -lean_dec(x_125); -lean_dec(x_124); +lean_object* x_180; lean_object* x_181; lean_object* x_182; uint8_t x_183; lean_object* x_184; +lean_dec(x_154); +lean_dec(x_153); +lean_dec(x_152); lean_dec(x_3); -lean_inc(x_118); -lean_inc(x_127); -x_162 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_127, x_5, x_6, x_7, x_8, x_118, x_10, x_121); -x_163 = lean_ctor_get(x_162, 1); -lean_inc(x_163); -lean_dec(x_162); -x_164 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_164, 0, x_127); -x_165 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_122, x_120, x_4, x_2, x_164, x_5, x_6, x_7, x_8, x_118, x_10, x_163); -return x_165; +lean_inc(x_136); +lean_inc(x_155); +x_180 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_155, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +x_181 = lean_ctor_get(x_180, 1); +lean_inc(x_181); +lean_dec(x_180); +x_182 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_182, 0, x_155); +x_183 = lean_unbox(x_142); +lean_dec(x_142); +x_184 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_183, x_182, x_5, x_6, x_7, x_8, x_136, x_10, x_181); +return x_184; } case 4: { -lean_object* x_166; uint8_t x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; -lean_dec(x_127); -lean_dec(x_124); -x_166 = lean_ctor_get(x_120, 2); -lean_inc(x_166); -x_167 = lean_ctor_get_uint8(x_166, sizeof(void*)*3 + 3); -lean_dec(x_166); -x_168 = lean_alloc_ctor(0, 3, 1); -lean_ctor_set(x_168, 0, x_125); -lean_ctor_set(x_168, 1, x_126); -lean_ctor_set(x_168, 2, x_3); -lean_ctor_set_uint8(x_168, sizeof(void*)*3, x_167); -x_169 = lean_alloc_ctor(3, 1, 0); -lean_ctor_set(x_169, 0, x_168); -x_170 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_122, x_120, x_4, x_2, x_169, x_5, x_6, x_7, x_8, x_118, x_10, x_121); -return x_170; +lean_object* x_185; uint8_t x_186; lean_object* x_187; lean_object* x_188; uint8_t x_189; lean_object* x_190; +lean_dec(x_155); +lean_dec(x_153); +x_185 = lean_ctor_get(x_146, 2); +lean_inc(x_185); +x_186 = lean_ctor_get_uint8(x_185, sizeof(void*)*3 + 3); +lean_dec(x_185); +x_187 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_187, 0, x_152); +lean_ctor_set(x_187, 1, x_154); +lean_ctor_set(x_187, 2, x_3); +lean_ctor_set_uint8(x_187, sizeof(void*)*3, x_186); +x_188 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_188, 0, x_187); +x_189 = lean_unbox(x_142); +lean_dec(x_142); +x_190 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_189, x_188, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +return x_190; } case 5: { -lean_object* x_171; uint8_t x_172; -lean_dec(x_127); -lean_dec(x_124); -x_171 = lean_ctor_get(x_120, 2); -lean_inc(x_171); -x_172 = lean_ctor_get_uint8(x_171, sizeof(void*)*3 + 3); -lean_dec(x_171); -if (x_172 == 0) -{ -lean_object* x_173; uint8_t x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; -x_173 = lean_box(1); -x_174 = 1; -x_175 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_175, 0, x_125); -lean_ctor_set(x_175, 1, x_126); -lean_ctor_set(x_175, 2, x_173); -lean_ctor_set(x_175, 3, x_3); -lean_ctor_set_uint8(x_175, sizeof(void*)*4, x_174); -x_176 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_176, 0, x_175); -x_177 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_122, x_120, x_4, x_2, x_176, x_5, x_6, x_7, x_8, x_118, x_10, x_121); -return x_177; -} -else -{ -lean_object* x_178; uint8_t x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; -x_178 = lean_box(1); -x_179 = 0; -x_180 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_180, 0, x_125); -lean_ctor_set(x_180, 1, x_126); -lean_ctor_set(x_180, 2, x_178); -lean_ctor_set(x_180, 3, x_3); -lean_ctor_set_uint8(x_180, sizeof(void*)*4, x_179); -x_181 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_181, 0, x_180); -x_182 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_122, x_120, x_4, x_2, x_181, x_5, x_6, x_7, x_8, x_118, x_10, x_121); -return x_182; -} -} -default: +lean_dec(x_153); +if (x_145 == 0) { -lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; uint32_t x_188; uint32_t x_189; uint32_t x_190; lean_object* x_191; lean_object* x_192; uint8_t x_193; -lean_dec(x_129); -lean_dec(x_127); -lean_dec(x_124); -x_183 = lean_st_ref_get(x_10, x_121); -x_184 = lean_ctor_get(x_183, 0); -lean_inc(x_184); -x_185 = lean_ctor_get(x_183, 1); -lean_inc(x_185); -lean_dec(x_183); -x_186 = lean_ctor_get(x_184, 0); -lean_inc(x_186); -lean_dec(x_184); -lean_inc(x_126); -x_187 = l_Lean_getMaxHeight(x_186, x_126); -x_188 = lean_unbox_uint32(x_187); -lean_dec(x_187); -x_189 = 1; -x_190 = lean_uint32_add(x_188, x_189); -x_191 = lean_alloc_ctor(2, 0, 4); -lean_ctor_set_uint32(x_191, 0, x_190); -x_192 = lean_ctor_get(x_120, 2); -lean_inc(x_192); -x_193 = lean_ctor_get_uint8(x_192, sizeof(void*)*3 + 3); -lean_dec(x_192); -if (x_193 == 0) +lean_object* x_191; uint8_t x_192; +lean_dec(x_155); +x_191 = lean_ctor_get(x_146, 2); +lean_inc(x_191); +x_192 = lean_ctor_get_uint8(x_191, sizeof(void*)*3 + 3); +lean_dec(x_191); +if (x_192 == 0) { -uint8_t x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; +lean_object* x_193; uint8_t x_194; lean_object* x_195; lean_object* x_196; uint8_t x_197; lean_object* x_198; +x_193 = lean_box(1); x_194 = 1; x_195 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_195, 0, x_125); -lean_ctor_set(x_195, 1, x_126); -lean_ctor_set(x_195, 2, x_191); +lean_ctor_set(x_195, 0, x_152); +lean_ctor_set(x_195, 1, x_154); +lean_ctor_set(x_195, 2, x_193); lean_ctor_set(x_195, 3, x_3); lean_ctor_set_uint8(x_195, sizeof(void*)*4, x_194); x_196 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_196, 0, x_195); -x_197 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_122, x_120, x_4, x_2, x_196, x_5, x_6, x_7, x_8, x_118, x_10, x_185); -return x_197; +x_197 = lean_unbox(x_142); +lean_dec(x_142); +x_198 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_197, x_196, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +return x_198; } else { -uint8_t x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; -x_198 = 0; -x_199 = lean_alloc_ctor(0, 4, 1); -lean_ctor_set(x_199, 0, x_125); -lean_ctor_set(x_199, 1, x_126); -lean_ctor_set(x_199, 2, x_191); -lean_ctor_set(x_199, 3, x_3); -lean_ctor_set_uint8(x_199, sizeof(void*)*4, x_198); -x_200 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_200, 0, x_199); -x_201 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_122, x_120, x_4, x_2, x_200, x_5, x_6, x_7, x_8, x_118, x_10, x_185); -return x_201; +lean_object* x_199; uint8_t x_200; lean_object* x_201; lean_object* x_202; uint8_t x_203; lean_object* x_204; +x_199 = lean_box(1); +x_200 = 0; +x_201 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_201, 0, x_152); +lean_ctor_set(x_201, 1, x_154); +lean_ctor_set(x_201, 2, x_199); +lean_ctor_set(x_201, 3, x_3); +lean_ctor_set_uint8(x_201, sizeof(void*)*4, x_200); +x_202 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_202, 0, x_201); +x_203 = lean_unbox(x_142); +lean_dec(x_142); +x_204 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_203, x_202, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +return x_204; +} +} +else +{ +lean_object* x_205; lean_object* x_206; lean_object* x_207; uint8_t x_208; lean_object* x_209; +lean_dec(x_154); +lean_dec(x_152); +lean_dec(x_3); +lean_inc(x_136); +lean_inc(x_155); +x_205 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_reportTheoremDiag(x_155, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +x_206 = lean_ctor_get(x_205, 1); +lean_inc(x_206); +lean_dec(x_205); +x_207 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_207, 0, x_155); +x_208 = lean_unbox(x_142); +lean_dec(x_142); +x_209 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_208, x_207, x_5, x_6, x_7, x_8, x_136, x_10, x_206); +return x_209; +} +} +default: +{ +lean_object* x_210; uint32_t x_211; uint32_t x_212; uint32_t x_213; lean_object* x_214; lean_object* x_215; uint8_t x_216; +lean_dec(x_157); +lean_dec(x_155); +lean_inc(x_154); +x_210 = l_Lean_getMaxHeight(x_153, x_154); +x_211 = lean_unbox_uint32(x_210); +lean_dec(x_210); +x_212 = 1; +x_213 = lean_uint32_add(x_211, x_212); +x_214 = lean_alloc_ctor(2, 0, 4); +lean_ctor_set_uint32(x_214, 0, x_213); +x_215 = lean_ctor_get(x_146, 2); +lean_inc(x_215); +x_216 = lean_ctor_get_uint8(x_215, sizeof(void*)*3 + 3); +lean_dec(x_215); +if (x_216 == 0) +{ +uint8_t x_217; lean_object* x_218; lean_object* x_219; uint8_t x_220; lean_object* x_221; +x_217 = 1; +x_218 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_218, 0, x_152); +lean_ctor_set(x_218, 1, x_154); +lean_ctor_set(x_218, 2, x_214); +lean_ctor_set(x_218, 3, x_3); +lean_ctor_set_uint8(x_218, sizeof(void*)*4, x_217); +x_219 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_219, 0, x_218); +x_220 = lean_unbox(x_142); +lean_dec(x_142); +x_221 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_220, x_219, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +return x_221; +} +else +{ +uint8_t x_222; lean_object* x_223; lean_object* x_224; uint8_t x_225; lean_object* x_226; +x_222 = 0; +x_223 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_223, 0, x_152); +lean_ctor_set(x_223, 1, x_154); +lean_ctor_set(x_223, 2, x_214); +lean_ctor_set(x_223, 3, x_3); +lean_ctor_set_uint8(x_223, sizeof(void*)*4, x_222); +x_224 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_224, 0, x_223); +x_225 = lean_unbox(x_142); +lean_dec(x_142); +x_226 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_149, x_146, x_4, x_2, x_225, x_224, x_5, x_6, x_7, x_8, x_136, x_10, x_148); +return x_226; +} +} +} } } } +else +{ +lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; +lean_dec(x_138); +lean_dec(x_136); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_234 = lean_ctor_get(x_141, 0); +lean_inc(x_234); +x_235 = lean_ctor_get(x_141, 1); +lean_inc(x_235); +if (lean_is_exclusive(x_141)) { + lean_ctor_release(x_141, 0); + lean_ctor_release(x_141, 1); + x_236 = x_141; +} else { + lean_dec_ref(x_141); + x_236 = lean_box(0); +} +if (lean_is_scalar(x_236)) { + x_237 = lean_alloc_ctor(1, 2, 0); +} else { + x_237 = x_236; +} +lean_ctor_set(x_237, 0, x_234); +lean_ctor_set(x_237, 1, x_235); +return x_237; +} } else { -lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; -lean_dec(x_118); +lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; +lean_dec(x_136); lean_dec(x_10); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); -x_202 = lean_ctor_get(x_119, 0); -lean_inc(x_202); -x_203 = lean_ctor_get(x_119, 1); -lean_inc(x_203); -if (lean_is_exclusive(x_119)) { - lean_ctor_release(x_119, 0); - lean_ctor_release(x_119, 1); - x_204 = x_119; +x_238 = lean_ctor_get(x_137, 0); +lean_inc(x_238); +x_239 = lean_ctor_get(x_137, 1); +lean_inc(x_239); +if (lean_is_exclusive(x_137)) { + lean_ctor_release(x_137, 0); + lean_ctor_release(x_137, 1); + x_240 = x_137; } else { - lean_dec_ref(x_119); - x_204 = lean_box(0); + lean_dec_ref(x_137); + x_240 = lean_box(0); } -if (lean_is_scalar(x_204)) { - x_205 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_240)) { + x_241 = lean_alloc_ctor(1, 2, 0); } else { - x_205 = x_204; + x_241 = x_240; } -lean_ctor_set(x_205, 0, x_202); -lean_ctor_set(x_205, 1, x_203); -return x_205; +lean_ctor_set(x_241, 0, x_238); +lean_ctor_set(x_241, 1, x_239); +return x_241; } } } @@ -8322,31 +8533,45 @@ lean_dec(x_3); return x_13; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3___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, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14) { +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3___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, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { _start: { -uint8_t x_15; uint8_t x_16; lean_object* x_17; -x_15 = lean_unbox(x_1); +uint8_t x_16; uint8_t x_17; uint8_t x_18; lean_object* x_19; +x_16 = lean_unbox(x_1); lean_dec(x_1); -x_16 = lean_unbox(x_4); +x_17 = lean_unbox(x_4); lean_dec(x_4); -x_17 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_15, x_2, x_3, x_16, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14); -lean_dec(x_7); +x_18 = lean_unbox(x_5); lean_dec(x_5); +x_19 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__3(x_16, x_2, x_3, x_17, x_18, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +lean_dec(x_8); +lean_dec(x_6); lean_dec(x_3); -return x_17; +return x_19; } } -LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___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, lean_object* x_11, lean_object* x_12) { +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___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, lean_object* x_11, lean_object* x_12, lean_object* x_13) { _start: { -uint8_t x_13; uint8_t x_14; lean_object* x_15; -x_13 = lean_unbox(x_3); +uint8_t x_14; uint8_t x_15; uint8_t x_16; lean_object* x_17; +x_14 = lean_unbox(x_3); lean_dec(x_3); -x_14 = lean_unbox(x_4); +x_15 = lean_unbox(x_4); lean_dec(x_4); -x_15 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_1, x_2, x_13, x_14, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12); -return x_15; +x_16 = lean_unbox(x_5); +lean_dec(x_5); +x_17 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4(x_1, x_2, x_14, x_15, x_16, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_17; +} +} +LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5(x_1); +lean_dec(x_1); +x_3 = lean_box(x_2); +return x_3; } } LEAN_EXPORT lean_object* l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___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, lean_object* x_11) { @@ -13980,6 +14205,16 @@ l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4_ lean_mark_persistent(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__4); l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__5 = _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__5(); lean_mark_persistent(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__4___closed__5); +l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__1 = _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__1); +l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__2 = _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__2); +l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__3 = _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__3(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__3); +l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__4 = _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__4(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___lambda__5___closed__4); +l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___closed__1 = _init_l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_PreDefinition_Basic_0__Lean_Elab_addNonRecAux___closed__1); l_Lean_Elab_eraseRecAppSyntaxExpr___lambda__1___closed__1 = _init_l_Lean_Elab_eraseRecAppSyntaxExpr___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Elab_eraseRecAppSyntaxExpr___lambda__1___closed__1); l_Lean_Elab_eraseRecAppSyntaxExpr___closed__1 = _init_l_Lean_Elab_eraseRecAppSyntaxExpr___closed__1(); diff --git a/stage0/stdlib/Lean/Expr.c b/stage0/stdlib/Lean/Expr.c index a33e9b96a765..2890f01e85f3 100644 --- a/stage0/stdlib/Lean/Expr.c +++ b/stage0/stdlib/Lean/Expr.c @@ -28848,7 +28848,7 @@ static lean_object* _init_l___private_Lean_Expr_0__Lean_Expr_updateApp_x21Impl__ 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_Expr_mkData___closed__5; x_2 = l___private_Lean_Expr_0__Lean_Expr_updateApp_x21Impl___closed__1; -x_3 = lean_unsigned_to_nat(1686u); +x_3 = lean_unsigned_to_nat(1690u); x_4 = lean_unsigned_to_nat(18u); x_5 = l_Lean_Expr_appFn_x21___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -28927,7 +28927,7 @@ static lean_object* _init_l_Lean_Expr_updateFVar_x21___closed__2() { 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_Expr_mkData___closed__5; x_2 = l_Lean_Expr_updateFVar_x21___closed__1; -x_3 = lean_unsigned_to_nat(1697u); +x_3 = lean_unsigned_to_nat(1701u); x_4 = lean_unsigned_to_nat(20u); x_5 = l_Lean_Expr_fvarId_x21___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -28988,7 +28988,7 @@ static lean_object* _init_l___private_Lean_Expr_0__Lean_Expr_updateConst_x21Impl 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_Expr_mkData___closed__5; x_2 = l___private_Lean_Expr_0__Lean_Expr_updateConst_x21Impl___closed__1; -x_3 = lean_unsigned_to_nat(1702u); +x_3 = lean_unsigned_to_nat(1706u); x_4 = lean_unsigned_to_nat(18u); x_5 = l_Lean_Expr_constName_x21___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -29054,7 +29054,7 @@ static lean_object* _init_l___private_Lean_Expr_0__Lean_Expr_updateSort_x21Impl_ 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_Expr_mkData___closed__5; x_2 = l___private_Lean_Expr_0__Lean_Expr_updateSort_x21Impl___closed__1; -x_3 = lean_unsigned_to_nat(1713u); +x_3 = lean_unsigned_to_nat(1717u); x_4 = lean_unsigned_to_nat(14u); x_5 = l___private_Lean_Expr_0__Lean_Expr_updateSort_x21Impl___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -29125,7 +29125,7 @@ static lean_object* _init_l___private_Lean_Expr_0__Lean_Expr_updateMData_x21Impl 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_Expr_mkData___closed__5; x_2 = l___private_Lean_Expr_0__Lean_Expr_updateMData_x21Impl___closed__1; -x_3 = lean_unsigned_to_nat(1724u); +x_3 = lean_unsigned_to_nat(1728u); x_4 = lean_unsigned_to_nat(17u); x_5 = l___private_Lean_Expr_0__Lean_Expr_updateMData_x21Impl___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -29193,7 +29193,7 @@ static lean_object* _init_l___private_Lean_Expr_0__Lean_Expr_updateProj_x21Impl_ 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_Expr_mkData___closed__5; x_2 = l___private_Lean_Expr_0__Lean_Expr_updateProj_x21Impl___closed__1; -x_3 = lean_unsigned_to_nat(1735u); +x_3 = lean_unsigned_to_nat(1739u); x_4 = lean_unsigned_to_nat(18u); x_5 = l___private_Lean_Expr_0__Lean_Expr_updateProj_x21Impl___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -29264,7 +29264,7 @@ static lean_object* _init_l___private_Lean_Expr_0__Lean_Expr_updateForall_x21Imp 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_Expr_mkData___closed__5; x_2 = l___private_Lean_Expr_0__Lean_Expr_updateForall_x21Impl___closed__1; -x_3 = lean_unsigned_to_nat(1750u); +x_3 = lean_unsigned_to_nat(1754u); x_4 = lean_unsigned_to_nat(23u); x_5 = l___private_Lean_Expr_0__Lean_Expr_updateForall_x21Impl___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -29367,7 +29367,7 @@ static lean_object* _init_l_Lean_Expr_updateForallE_x21___closed__2() { 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_Expr_mkData___closed__5; x_2 = l_Lean_Expr_updateForallE_x21___closed__1; -x_3 = lean_unsigned_to_nat(1761u); +x_3 = lean_unsigned_to_nat(1765u); x_4 = lean_unsigned_to_nat(24u); x_5 = l___private_Lean_Expr_0__Lean_Expr_updateForall_x21Impl___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -29473,7 +29473,7 @@ static lean_object* _init_l___private_Lean_Expr_0__Lean_Expr_updateLambda_x21Imp 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_Expr_mkData___closed__5; x_2 = l___private_Lean_Expr_0__Lean_Expr_updateLambda_x21Impl___closed__1; -x_3 = lean_unsigned_to_nat(1770u); +x_3 = lean_unsigned_to_nat(1774u); x_4 = lean_unsigned_to_nat(19u); x_5 = l___private_Lean_Expr_0__Lean_Expr_updateLambda_x21Impl___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -29576,7 +29576,7 @@ static lean_object* _init_l_Lean_Expr_updateLambdaE_x21___closed__2() { 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_Expr_mkData___closed__5; x_2 = l_Lean_Expr_updateLambdaE_x21___closed__1; -x_3 = lean_unsigned_to_nat(1781u); +x_3 = lean_unsigned_to_nat(1785u); x_4 = lean_unsigned_to_nat(20u); x_5 = l___private_Lean_Expr_0__Lean_Expr_updateLambda_x21Impl___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -29674,7 +29674,7 @@ static lean_object* _init_l___private_Lean_Expr_0__Lean_Expr_updateLet_x21Impl__ 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_Expr_mkData___closed__5; x_2 = l___private_Lean_Expr_0__Lean_Expr_updateLet_x21Impl___closed__1; -x_3 = lean_unsigned_to_nat(1790u); +x_3 = lean_unsigned_to_nat(1794u); x_4 = lean_unsigned_to_nat(22u); x_5 = l_Lean_Expr_letName_x21___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Meta/Closure.c b/stage0/stdlib/Lean/Meta/Closure.c index 2db50a8f60e6..e726a1e626fa 100644 --- a/stage0/stdlib/Lean/Meta/Closure.c +++ b/stage0/stdlib/Lean/Meta/Closure.c @@ -6462,7 +6462,7 @@ static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__4() { 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_Meta_Closure_collectExprAux___closed__1; x_2 = l_Lean_Meta_Closure_collectExprAux___closed__2; -x_3 = lean_unsigned_to_nat(1724u); +x_3 = lean_unsigned_to_nat(1728u); x_4 = lean_unsigned_to_nat(17u); x_5 = l_Lean_Meta_Closure_collectExprAux___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -6491,7 +6491,7 @@ static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__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; x_1 = l_Lean_Meta_Closure_collectExprAux___closed__1; x_2 = l_Lean_Meta_Closure_collectExprAux___closed__5; -x_3 = lean_unsigned_to_nat(1735u); +x_3 = lean_unsigned_to_nat(1739u); x_4 = lean_unsigned_to_nat(18u); x_5 = l_Lean_Meta_Closure_collectExprAux___closed__6; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -6520,7 +6520,7 @@ static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__10() { 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_Meta_Closure_collectExprAux___closed__1; x_2 = l_Lean_Meta_Closure_collectExprAux___closed__8; -x_3 = lean_unsigned_to_nat(1686u); +x_3 = lean_unsigned_to_nat(1690u); x_4 = lean_unsigned_to_nat(18u); x_5 = l_Lean_Meta_Closure_collectExprAux___closed__9; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -6549,7 +6549,7 @@ static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__13() { 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_Meta_Closure_collectExprAux___closed__1; x_2 = l_Lean_Meta_Closure_collectExprAux___closed__11; -x_3 = lean_unsigned_to_nat(1781u); +x_3 = lean_unsigned_to_nat(1785u); x_4 = lean_unsigned_to_nat(20u); x_5 = l_Lean_Meta_Closure_collectExprAux___closed__12; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -6578,7 +6578,7 @@ static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__16() { 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_Meta_Closure_collectExprAux___closed__1; x_2 = l_Lean_Meta_Closure_collectExprAux___closed__14; -x_3 = lean_unsigned_to_nat(1761u); +x_3 = lean_unsigned_to_nat(1765u); x_4 = lean_unsigned_to_nat(24u); x_5 = l_Lean_Meta_Closure_collectExprAux___closed__15; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -6607,7 +6607,7 @@ static lean_object* _init_l_Lean_Meta_Closure_collectExprAux___closed__19() { 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_Meta_Closure_collectExprAux___closed__1; x_2 = l_Lean_Meta_Closure_collectExprAux___closed__17; -x_3 = lean_unsigned_to_nat(1790u); +x_3 = lean_unsigned_to_nat(1794u); x_4 = lean_unsigned_to_nat(22u); x_5 = l_Lean_Meta_Closure_collectExprAux___closed__18; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Meta/ExprLens.c b/stage0/stdlib/Lean/Meta/ExprLens.c index 11730007c97e..c4280718332d 100644 --- a/stage0/stdlib/Lean/Meta/ExprLens.c +++ b/stage0/stdlib/Lean/Meta/ExprLens.c @@ -417,7 +417,7 @@ static lean_object* _init_l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord_ 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___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__3___closed__1; x_2 = l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__3___closed__2; -x_3 = lean_unsigned_to_nat(1686u); +x_3 = lean_unsigned_to_nat(1690u); x_4 = lean_unsigned_to_nat(18u); x_5 = l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__3___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -603,7 +603,7 @@ static lean_object* _init_l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord_ 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___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__3___closed__1; x_2 = l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__8___closed__1; -x_3 = lean_unsigned_to_nat(1790u); +x_3 = lean_unsigned_to_nat(1794u); x_4 = lean_unsigned_to_nat(22u); x_5 = l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__8___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -804,7 +804,7 @@ static lean_object* _init_l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord_ 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___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__3___closed__1; x_2 = l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__10___closed__1; -x_3 = lean_unsigned_to_nat(1781u); +x_3 = lean_unsigned_to_nat(1785u); x_4 = lean_unsigned_to_nat(20u); x_5 = l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__10___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -928,7 +928,7 @@ static lean_object* _init_l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord_ 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___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__3___closed__1; x_2 = l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__11___closed__1; -x_3 = lean_unsigned_to_nat(1761u); +x_3 = lean_unsigned_to_nat(1765u); x_4 = lean_unsigned_to_nat(24u); x_5 = l___private_Lean_Meta_ExprLens_0__Lean_Meta_lensCoord___rarg___lambda__11___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Meta/LitValues.c b/stage0/stdlib/Lean/Meta/LitValues.c index af844ecf9a67..8a6fa8e58c50 100644 --- a/stage0/stdlib/Lean/Meta/LitValues.c +++ b/stage0/stdlib/Lean/Meta/LitValues.c @@ -84,7 +84,6 @@ static lean_object* l_Lean_Meta_normLitValue___lambda__10___closed__3; lean_object* l_Lean_Level_ofNat(lean_object*); lean_object* l_Lean_Expr_appArg_x21(lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_getCharValue_x3f___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Fin_ofNat(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_normLitValue___lambda__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_normLitValue___lambda__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Lean_Meta_isLitValue___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -195,6 +194,7 @@ uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_mkApp3(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Loop_forIn_loop___at_Lean_Meta_getListLitOf_x3f___spec__1___rarg___closed__2; static lean_object* l_Lean_Meta_getUInt64Value_x3f___closed__1; +lean_object* lean_nat_mod(lean_object*, lean_object*); static lean_object* l_Lean_Meta_litToCtor___lambda__1___closed__15; lean_object* l_Lean_instantiateMVars___at___private_Lean_Meta_Basic_0__Lean_Meta_isClassApp_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Lean_Meta_normLitValue___lambda__3___closed__1; @@ -1740,9 +1740,9 @@ x_39 = lean_unsigned_to_nat(1u); x_40 = lean_nat_sub(x_36, x_39); lean_dec(x_36); x_41 = lean_nat_add(x_40, x_39); -x_42 = l_Fin_ofNat(x_40, x_19); -lean_dec(x_19); lean_dec(x_40); +x_42 = lean_nat_mod(x_19, x_41); +lean_dec(x_19); lean_ctor_set(x_16, 1, x_42); lean_ctor_set(x_16, 0, x_41); lean_ctor_set(x_26, 0, x_16); @@ -1775,9 +1775,9 @@ x_47 = lean_unsigned_to_nat(1u); x_48 = lean_nat_sub(x_44, x_47); lean_dec(x_44); x_49 = lean_nat_add(x_48, x_47); -x_50 = l_Fin_ofNat(x_48, x_19); -lean_dec(x_19); lean_dec(x_48); +x_50 = lean_nat_mod(x_19, x_49); +lean_dec(x_19); lean_ctor_set(x_16, 1, x_50); lean_ctor_set(x_16, 0, x_49); x_51 = lean_alloc_ctor(1, 1, 0); @@ -1821,9 +1821,9 @@ x_58 = lean_unsigned_to_nat(1u); x_59 = lean_nat_sub(x_54, x_58); lean_dec(x_54); x_60 = lean_nat_add(x_59, x_58); -x_61 = l_Fin_ofNat(x_59, x_19); -lean_dec(x_19); lean_dec(x_59); +x_61 = lean_nat_mod(x_19, x_60); +lean_dec(x_19); lean_ctor_set(x_16, 1, x_61); lean_ctor_set(x_16, 0, x_60); if (lean_is_scalar(x_55)) { @@ -1992,9 +1992,9 @@ x_92 = lean_unsigned_to_nat(1u); x_93 = lean_nat_sub(x_88, x_92); lean_dec(x_88); x_94 = lean_nat_add(x_93, x_92); -x_95 = l_Fin_ofNat(x_93, x_74); -lean_dec(x_74); lean_dec(x_93); +x_95 = lean_nat_mod(x_74, x_94); +lean_dec(x_74); x_96 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_96, 0, x_94); lean_ctor_set(x_96, 1, x_95); diff --git a/stage0/stdlib/Lean/Meta/Tactic/FunInd.c b/stage0/stdlib/Lean/Meta/Tactic/FunInd.c index 2b4abd586cf6..cf303259266f 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/FunInd.c +++ b/stage0/stdlib/Lean/Meta/Tactic/FunInd.c @@ -52606,7 +52606,7 @@ static lean_object* _init_l_Lean_Tactic_FunInd_buildInductionBody___lambda__18__ 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_Tactic_FunInd_buildInductionBody___lambda__18___closed__1; x_2 = l_Lean_Tactic_FunInd_buildInductionBody___lambda__18___closed__2; -x_3 = lean_unsigned_to_nat(1724u); +x_3 = lean_unsigned_to_nat(1728u); x_4 = lean_unsigned_to_nat(17u); x_5 = l_Lean_Tactic_FunInd_buildInductionBody___lambda__18___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Simp/Main.c b/stage0/stdlib/Lean/Meta/Tactic/Simp/Main.c index bdc40c119edf..4efb9fd54d5f 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Simp/Main.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Simp/Main.c @@ -11927,7 +11927,7 @@ static lean_object* _init_l_Lean_Meta_Simp_simpProj___lambda__1___closed__4() { 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_Meta_Simp_simpProj___lambda__1___closed__1; x_2 = l_Lean_Meta_Simp_simpProj___lambda__1___closed__2; -x_3 = lean_unsigned_to_nat(1735u); +x_3 = lean_unsigned_to_nat(1739u); x_4 = lean_unsigned_to_nat(18u); x_5 = l_Lean_Meta_Simp_simpProj___lambda__1___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -13813,7 +13813,7 @@ static lean_object* _init_l_Lean_Meta_Simp_simpArrow___lambda__1___closed__3() { 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_Meta_Simp_simpProj___lambda__1___closed__1; x_2 = l_Lean_Meta_Simp_simpArrow___lambda__1___closed__1; -x_3 = lean_unsigned_to_nat(1761u); +x_3 = lean_unsigned_to_nat(1765u); x_4 = lean_unsigned_to_nat(24u); x_5 = l_Lean_Meta_Simp_simpArrow___lambda__1___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Simp/SimpTheorems.c b/stage0/stdlib/Lean/Meta/Tactic/Simp/SimpTheorems.c index bd0ba97fba41..a6218c36ea32 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Simp/SimpTheorems.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Simp/SimpTheorems.c @@ -14095,7 +14095,7 @@ static lean_object* _init_l_Lean_Meta_SimpTheorem_getValue___closed__4() { 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_Meta_SimpTheorem_getValue___closed__1; x_2 = l_Lean_Meta_SimpTheorem_getValue___closed__2; -x_3 = lean_unsigned_to_nat(1702u); +x_3 = lean_unsigned_to_nat(1706u); x_4 = lean_unsigned_to_nat(18u); x_5 = l_Lean_Meta_SimpTheorem_getValue___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Simp/Types.c b/stage0/stdlib/Lean/Meta/Tactic/Simp/Types.c index b2c28efe7da5..0142b38c458e 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Simp/Types.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Simp/Types.c @@ -10749,7 +10749,7 @@ static lean_object* _init_l_Lean_Meta_Simp_mkImpCongr___closed__4() { 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_Meta_Simp_mkImpCongr___closed__1; x_2 = l_Lean_Meta_Simp_mkImpCongr___closed__2; -x_3 = lean_unsigned_to_nat(1761u); +x_3 = lean_unsigned_to_nat(1765u); x_4 = lean_unsigned_to_nat(24u); x_5 = l_Lean_Meta_Simp_mkImpCongr___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Lean/Meta/Transform.c b/stage0/stdlib/Lean/Meta/Transform.c index ac9b92b9727b..0db97ada435a 100644 --- a/stage0/stdlib/Lean/Meta/Transform.c +++ b/stage0/stdlib/Lean/Meta/Transform.c @@ -1286,7 +1286,7 @@ static lean_object* _init_l_Lean_Core_transform_visit___rarg___lambda__2___close 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_Core_transform_visit___rarg___lambda__2___closed__1; x_2 = l_Lean_Core_transform_visit___rarg___lambda__2___closed__2; -x_3 = lean_unsigned_to_nat(1781u); +x_3 = lean_unsigned_to_nat(1785u); x_4 = lean_unsigned_to_nat(20u); x_5 = l_Lean_Core_transform_visit___rarg___lambda__2___closed__3; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -1424,7 +1424,7 @@ static lean_object* _init_l_Lean_Core_transform_visit___rarg___lambda__4___close 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_Core_transform_visit___rarg___lambda__2___closed__1; x_2 = l_Lean_Core_transform_visit___rarg___lambda__4___closed__1; -x_3 = lean_unsigned_to_nat(1761u); +x_3 = lean_unsigned_to_nat(1765u); x_4 = lean_unsigned_to_nat(24u); x_5 = l_Lean_Core_transform_visit___rarg___lambda__4___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -1562,7 +1562,7 @@ static lean_object* _init_l_Lean_Core_transform_visit___rarg___lambda__6___close 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_Core_transform_visit___rarg___lambda__2___closed__1; x_2 = l_Lean_Core_transform_visit___rarg___lambda__6___closed__1; -x_3 = lean_unsigned_to_nat(1790u); +x_3 = lean_unsigned_to_nat(1794u); x_4 = lean_unsigned_to_nat(22u); x_5 = l_Lean_Core_transform_visit___rarg___lambda__6___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -1734,7 +1734,7 @@ static lean_object* _init_l_Lean_Core_transform_visit___rarg___lambda__9___close 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_Core_transform_visit___rarg___lambda__2___closed__1; x_2 = l_Lean_Core_transform_visit___rarg___lambda__9___closed__1; -x_3 = lean_unsigned_to_nat(1724u); +x_3 = lean_unsigned_to_nat(1728u); x_4 = lean_unsigned_to_nat(17u); x_5 = l_Lean_Core_transform_visit___rarg___lambda__9___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -1806,7 +1806,7 @@ static lean_object* _init_l_Lean_Core_transform_visit___rarg___lambda__10___clos 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_Core_transform_visit___rarg___lambda__2___closed__1; x_2 = l_Lean_Core_transform_visit___rarg___lambda__10___closed__1; -x_3 = lean_unsigned_to_nat(1735u); +x_3 = lean_unsigned_to_nat(1739u); x_4 = lean_unsigned_to_nat(18u); x_5 = l_Lean_Core_transform_visit___rarg___lambda__10___closed__2; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); diff --git a/stage0/stdlib/Std/Time/DateTime/PlainDateTime.c b/stage0/stdlib/Std/Time/DateTime/PlainDateTime.c index 1b6142537361..bf0be4b43999 100644 --- a/stage0/stdlib/Std/Time/DateTime/PlainDateTime.c +++ b/stage0/stdlib/Std/Time/DateTime/PlainDateTime.c @@ -87,7 +87,6 @@ static lean_object* l_Std_Time_PlainDateTime_instHAddOffset__1___closed__1; static lean_object* l_Std_Time_instInhabitedPlainDateTime___closed__17; static lean_object* l_Std_Time_PlainDateTime_ofTimestampAssumingUTC___lambda__2___closed__9; LEAN_EXPORT lean_object* l_Std_Time_PlainDateTime_addDays___boxed(lean_object*, lean_object*); -lean_object* l_Fin_ofNat(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_List_forIn_x27_loop___at_Std_Time_PlainDateTime_ofTimestampAssumingUTC___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_PlainDateTime_instHAddOffset__5; static lean_object* l_Std_Time_PlainDateTime_ofTimestampAssumingUTC___lambda__2___closed__3; @@ -204,6 +203,7 @@ LEAN_EXPORT lean_object* l_Std_Time_PlainDateTime_addHours(lean_object*, lean_ob static lean_object* l_Std_Time_PlainDateTime_ofTimestampAssumingUTC___lambda__2___closed__14; static lean_object* l_Std_Time_instInhabitedPlainDateTime___closed__35; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* lean_nat_mod(lean_object*, lean_object*); static lean_object* l_Std_Time_instInhabitedPlainDateTime___closed__39; LEAN_EXPORT lean_object* l_Std_Time_PlainDateTime_instHAddOffset__6; LEAN_EXPORT lean_object* l_Std_Time_PlainDateTime_subYearsClip___boxed(lean_object*, lean_object*); @@ -1654,8 +1654,8 @@ lean_inc(x_31); lean_dec(x_29); x_32 = l_Int_toNat(x_31); lean_dec(x_31); -x_33 = lean_unsigned_to_nat(30u); -x_34 = l_Fin_ofNat(x_33, x_32); +x_33 = lean_unsigned_to_nat(31u); +x_34 = lean_nat_mod(x_32, x_33); lean_dec(x_32); x_35 = lean_unsigned_to_nat(10u); x_36 = lean_nat_dec_lt(x_35, x_30); diff --git a/stage0/stdlib/Std/Time/Format.c b/stage0/stdlib/Std/Time/Format.c index 6ba68d6fe67d..6cb9efd29560 100644 --- a/stage0/stdlib/Std/Time/Format.c +++ b/stage0/stdlib/Std/Time/Format.c @@ -114,7 +114,6 @@ static lean_object* l_Std_Time_Formats_rfc822___closed__15; static lean_object* l_Std_Time_Formats_ascTime___closed__16; LEAN_EXPORT lean_object* l_Std_Time_PlainTime_fromTime24Hour(lean_object*); LEAN_EXPORT lean_object* l_Std_Time_ZonedDateTime_toRFC822String(lean_object*); -lean_object* l_Fin_ofNat(lean_object*, lean_object*); static lean_object* l_Std_Time_Formats_rfc850___closed__6; LEAN_EXPORT lean_object* l_Std_Time_DateTime_fromLongDateFormatString(lean_object*); static lean_object* l_Std_Time_Formats_leanDateTimeWithIdentifier___closed__10; @@ -183,7 +182,6 @@ static lean_object* l_Std_Time_Formats_dateTime24Hour___closed__13; LEAN_EXPORT lean_object* l_Std_Time_Formats_time12Hour; LEAN_EXPORT lean_object* l_Std_Time_PlainTime_fromLeanTime24Hour(lean_object*); static lean_object* l_Std_Time_Formats_leanDateTimeWithIdentifier___closed__5; -static lean_object* l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__1; static lean_object* l_Std_Time_Formats_iso8601___closed__13; static lean_object* l_Std_Time_Formats_longDateFormat___closed__7; static lean_object* l_Std_Time_Formats_longDateFormat___closed__2; @@ -349,7 +347,6 @@ static lean_object* l_Std_Time_Formats_time12Hour___closed__6; static lean_object* l_Std_Time_Formats_time12Hour___closed__2; static lean_object* l_Std_Time_Formats_europeanDate___closed__2; static lean_object* l_Std_Time_Formats_leanDateTimeWithZone___closed__7; -static lean_object* l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__2; static lean_object* l_Std_Time_Formats_leanDateTimeWithIdentifierAndNanos___closed__5; static lean_object* l_Std_Time_TimeZone_fromTimeZone___closed__3; static lean_object* l_Std_Time_Formats_ascTime___closed__6; @@ -4550,25 +4547,6 @@ lean_dec(x_1); return x_3; } } -static lean_object* _init_l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(999999999u); -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Fin_ofNat(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__1; -x_2 = lean_nat_to_int(x_1); -return x_2; -} -} LEAN_EXPORT lean_object* l_Std_Time_PlainTime_fromTime24Hour___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -4577,7 +4555,7 @@ x_4 = !lean_is_exclusive(x_3); if (x_4 == 0) { lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_5 = l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__2; +x_5 = l_Std_Time_PlainDate_format___lambda__1___closed__2; x_6 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_6, 0, x_1); lean_ctor_set(x_6, 1, x_2); @@ -4598,7 +4576,7 @@ lean_dec(x_3); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_8); lean_ctor_set(x_10, 1, x_9); -x_11 = l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__2; +x_11 = l_Std_Time_PlainDate_format___lambda__1___closed__2; x_12 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_12, 0, x_1); lean_ctor_set(x_12, 1, x_2); @@ -4796,7 +4774,7 @@ if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_12 = l_Std_Time_HourMarker_toAbsolute(x_4, x_1); -x_13 = l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__2; +x_13 = l_Std_Time_PlainDate_format___lambda__1___closed__2; x_14 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_2); @@ -4818,7 +4796,7 @@ x_18 = l_Std_Time_HourMarker_toAbsolute(x_4, x_1); x_19 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_19, 0, x_16); lean_ctor_set(x_19, 1, x_17); -x_20 = l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__2; +x_20 = l_Std_Time_PlainDate_format___lambda__1___closed__2; x_21 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_21, 0, x_18); lean_ctor_set(x_21, 1, x_2); @@ -7905,10 +7883,6 @@ l_Std_Time_PlainDate_instRepr___closed__4 = _init_l_Std_Time_PlainDate_instRepr_ lean_mark_persistent(l_Std_Time_PlainDate_instRepr___closed__4); l_Std_Time_PlainTime_format___lambda__1___closed__1 = _init_l_Std_Time_PlainTime_format___lambda__1___closed__1(); lean_mark_persistent(l_Std_Time_PlainTime_format___lambda__1___closed__1); -l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__1 = _init_l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__1(); -lean_mark_persistent(l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__1); -l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__2 = _init_l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__2(); -lean_mark_persistent(l_Std_Time_PlainTime_fromTime24Hour___lambda__1___closed__2); l_Std_Time_PlainTime_fromTime24Hour___closed__1 = _init_l_Std_Time_PlainTime_fromTime24Hour___closed__1(); lean_mark_persistent(l_Std_Time_PlainTime_fromTime24Hour___closed__1); l_Std_Time_PlainTime_fromLeanTime24Hour___closed__1 = _init_l_Std_Time_PlainTime_fromLeanTime24Hour___closed__1(); diff --git a/stage0/stdlib/Std/Time/Format/Basic.c b/stage0/stdlib/Std/Time/Format/Basic.c index fbfc64875964..9116bfad1905 100644 --- a/stage0/stdlib/Std/Time/Format/Basic.c +++ b/stage0/stdlib/Std/Time/Format/Basic.c @@ -181,7 +181,6 @@ static lean_object* l_Std_Time_Awareness_instInhabitedType___lambda__2___closed_ static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_formatMonthLong___closed__8; static lean_object* l_Std_Time_OffsetZ_classify___closed__2; LEAN_EXPORT lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_reprOffsetO____x40_Std_Time_Format_Basic___hyg_1279____boxed(lean_object*, lean_object*); -static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__20; static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_reprModifier____x40_Std_Time_Format_Basic___hyg_1845____closed__29; LEAN_EXPORT lean_object* l_Std_Internal_Parsec_manyCharsCore___at___private_Std_Time_Format_Basic_0__Std_Time_parseFormatPart___spec__4(uint32_t, lean_object*, lean_object*); static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_reprModifier____x40_Std_Time_Format_Basic___hyg_1845____closed__2; @@ -327,7 +326,6 @@ static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_parseModifier_ static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_parseModifier___closed__29; LEAN_EXPORT lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_formatQuarterLong___boxed(lean_object*); LEAN_EXPORT lean_object* l_panic___at_Std_Time_GenericFormat_spec_x21___spec__1___rarg(lean_object*); -lean_object* l_Fin_ofNat(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_instInhabitedModifier; LEAN_EXPORT lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_Awareness_getD___boxed(lean_object*, lean_object*); static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_formatMarkerLong___closed__2; @@ -595,7 +593,6 @@ static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_formatMarkerSh static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_reprOffsetO____x40_Std_Time_Format_Basic___hyg_1279____closed__1; static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_reprText____x40_Std_Time_Format_Basic___hyg_15____closed__13; lean_object* lean_int_div(lean_object*, lean_object*); -static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__19; static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_formatWith___closed__5; static lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_parseFormatPart___closed__4; LEAN_EXPORT lean_object* l___private_Std_Time_Format_Basic_0__Std_Time_reprOffsetX____x40_Std_Time_Format_Basic___hyg_1001____boxed(lean_object*, lean_object*); @@ -85783,77 +85780,58 @@ static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericF _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(999999999u); -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Fin_ofNat(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__4; -x_2 = lean_nat_to_int(x_1); -return x_2; -} -} -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__27; x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_reprText____x40_Std_Time_Format_Basic___hyg_15____closed__6; x_3 = lean_int_add(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__7() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__21; -x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__6; +x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__4; x_3 = lean_int_emod(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__8() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__7; -x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__6; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__5; +x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__4; x_3 = lean_int_add(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__9() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__8; -x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__6; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__6; +x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__4; x_3 = lean_int_emod(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__10() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__9; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__7; x_2 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__1; x_3 = lean_int_add(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__11() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__9() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = 0; -x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__10; +x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__8; x_3 = lean_box(x_1); x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_3); @@ -85861,7 +85839,7 @@ lean_ctor_set(x_4, 1, x_2); return x_4; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__12() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -85871,81 +85849,81 @@ x_3 = lean_int_sub(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__13() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__12; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__10; x_2 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__12; x_3 = lean_int_emod(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__14() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__13; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__11; x_2 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__12; x_3 = lean_int_add(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__15() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__13() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__14; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__12; x_2 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__12; x_3 = lean_int_emod(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__16() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__14() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__15; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__13; x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_reprText____x40_Std_Time_Format_Basic___hyg_15____closed__6; x_3 = lean_int_add(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__17() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__15() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__12; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__10; x_2 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__4; x_3 = lean_int_emod(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__18() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__16() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__17; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__15; x_2 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__4; x_3 = lean_int_add(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__19() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__17() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__18; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__16; x_2 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__4; x_3 = lean_int_emod(x_1, x_2); return x_3; } } -static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__20() { +static lean_object* _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__18() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__19; +x_1 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__17; x_2 = l___private_Std_Time_Format_Basic_0__Std_Time_reprText____x40_Std_Time_Format_Basic___hyg_15____closed__6; x_3 = lean_int_add(x_1, x_2); return x_3; @@ -85981,64 +85959,64 @@ x_64 = lean_ctor_get(x_1, 22); lean_inc(x_64); if (lean_obj_tag(x_53) == 0) { +lean_object* x_234; +x_234 = lean_ctor_get(x_1, 27); +lean_inc(x_234); +if (lean_obj_tag(x_234) == 0) +{ lean_object* x_235; -x_235 = lean_ctor_get(x_1, 27); +x_235 = lean_ctor_get(x_1, 28); lean_inc(x_235); if (lean_obj_tag(x_235) == 0) { lean_object* x_236; -x_236 = lean_ctor_get(x_1, 28); +x_236 = lean_ctor_get(x_1, 29); lean_inc(x_236); if (lean_obj_tag(x_236) == 0) { lean_object* x_237; -x_237 = lean_ctor_get(x_1, 29); -lean_inc(x_237); -if (lean_obj_tag(x_237) == 0) +x_237 = l_Std_Time_TimeZone_Offset_zero; +x_65 = x_237; +goto block_233; +} +else { lean_object* x_238; -x_238 = l_Std_Time_TimeZone_Offset_zero; +x_238 = lean_ctor_get(x_236, 0); +lean_inc(x_238); +lean_dec(x_236); x_65 = x_238; -goto block_234; +goto block_233; +} } else { lean_object* x_239; -x_239 = lean_ctor_get(x_237, 0); +x_239 = lean_ctor_get(x_235, 0); lean_inc(x_239); -lean_dec(x_237); +lean_dec(x_235); x_65 = x_239; -goto block_234; +goto block_233; } } else { lean_object* x_240; -x_240 = lean_ctor_get(x_236, 0); +x_240 = lean_ctor_get(x_234, 0); lean_inc(x_240); -lean_dec(x_236); +lean_dec(x_234); x_65 = x_240; -goto block_234; +goto block_233; } } else { lean_object* x_241; -x_241 = lean_ctor_get(x_235, 0); +x_241 = lean_ctor_get(x_53, 0); lean_inc(x_241); -lean_dec(x_235); -x_65 = x_241; -goto block_234; -} -} -else -{ -lean_object* x_242; -x_242 = lean_ctor_get(x_53, 0); -lean_inc(x_242); lean_dec(x_53); -x_65 = x_242; -goto block_234; +x_65 = x_241; +goto block_233; } block_52: { @@ -86147,81 +86125,81 @@ return x_51; } } } -block_234: +block_233: { lean_object* x_66; if (lean_obj_tag(x_54) == 0) { -lean_object* x_229; -x_229 = lean_ctor_get(x_1, 24); -lean_inc(x_229); -if (lean_obj_tag(x_229) == 0) +lean_object* x_228; +x_228 = lean_ctor_get(x_1, 24); +lean_inc(x_228); +if (lean_obj_tag(x_228) == 0) { -uint8_t x_230; lean_object* x_231; -x_230 = 1; +uint8_t x_229; lean_object* x_230; +x_229 = 1; lean_inc(x_65); -x_231 = l_Std_Time_TimeZone_Offset_toIsoString(x_65, x_230); -x_66 = x_231; -goto block_228; +x_230 = l_Std_Time_TimeZone_Offset_toIsoString(x_65, x_229); +x_66 = x_230; +goto block_227; } else { -lean_object* x_232; -x_232 = lean_ctor_get(x_229, 0); -lean_inc(x_232); -lean_dec(x_229); -x_66 = x_232; -goto block_228; +lean_object* x_231; +x_231 = lean_ctor_get(x_228, 0); +lean_inc(x_231); +lean_dec(x_228); +x_66 = x_231; +goto block_227; } } else { -lean_object* x_233; -x_233 = lean_ctor_get(x_54, 0); -lean_inc(x_233); +lean_object* x_232; +x_232 = lean_ctor_get(x_54, 0); +lean_inc(x_232); lean_dec(x_54); -x_66 = x_233; -goto block_228; +x_66 = x_232; +goto block_227; } -block_228: +block_227: { lean_object* x_67; if (lean_obj_tag(x_55) == 0) { -uint8_t x_225; lean_object* x_226; -x_225 = 1; +uint8_t x_224; lean_object* x_225; +x_224 = 1; lean_inc(x_65); -x_226 = l_Std_Time_TimeZone_Offset_toIsoString(x_65, x_225); -x_67 = x_226; -goto block_224; +x_225 = l_Std_Time_TimeZone_Offset_toIsoString(x_65, x_224); +x_67 = x_225; +goto block_223; } else { -lean_object* x_227; -x_227 = lean_ctor_get(x_55, 0); -lean_inc(x_227); +lean_object* x_226; +x_226 = lean_ctor_get(x_55, 0); +lean_inc(x_226); lean_dec(x_55); -x_67 = x_227; -goto block_224; +x_67 = x_226; +goto block_223; } -block_224: +block_223: { lean_object* x_68; lean_object* x_118; if (lean_obj_tag(x_56) == 0) { -lean_object* x_222; -x_222 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__20; -x_118 = x_222; -goto block_221; +lean_object* x_221; +x_221 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__18; +x_118 = x_221; +goto block_220; } else { -lean_object* x_223; -x_223 = lean_ctor_get(x_56, 0); -lean_inc(x_223); +lean_object* x_222; +x_222 = lean_ctor_get(x_56, 0); +lean_inc(x_222); lean_dec(x_56); -x_118 = x_223; -goto block_221; +x_118 = x_222; +goto block_220; } block_117: { @@ -86385,111 +86363,111 @@ return x_99; } } } -block_221: +block_220: { lean_object* x_119; if (lean_obj_tag(x_57) == 0) { -lean_object* x_219; -x_219 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__16; -x_119 = x_219; -goto block_218; +lean_object* x_218; +x_218 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__14; +x_119 = x_218; +goto block_217; } else { -lean_object* x_220; -x_220 = lean_ctor_get(x_57, 0); -lean_inc(x_220); +lean_object* x_219; +x_219 = lean_ctor_get(x_57, 0); +lean_inc(x_219); lean_dec(x_57); -x_119 = x_220; -goto block_218; +x_119 = x_219; +goto block_217; } -block_218: +block_217: { lean_object* x_120; if (lean_obj_tag(x_58) == 0) { if (lean_obj_tag(x_59) == 0) { -lean_object* x_205; -x_205 = lean_ctor_get(x_1, 1); -lean_inc(x_205); -if (lean_obj_tag(x_205) == 0) +lean_object* x_204; +x_204 = lean_ctor_get(x_1, 1); +lean_inc(x_204); +if (lean_obj_tag(x_204) == 0) { -lean_object* x_206; -x_206 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__1; -x_120 = x_206; -goto block_204; +lean_object* x_205; +x_205 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__1; +x_120 = x_205; +goto block_203; } else { -lean_object* x_207; uint8_t x_208; lean_object* x_209; -x_207 = lean_ctor_get(x_205, 0); -lean_inc(x_207); -lean_dec(x_205); -x_208 = 1; -x_209 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_convertYearAndEra(x_207, x_208); -lean_dec(x_207); -x_120 = x_209; -goto block_204; +lean_object* x_206; uint8_t x_207; lean_object* x_208; +x_206 = lean_ctor_get(x_204, 0); +lean_inc(x_206); +lean_dec(x_204); +x_207 = 1; +x_208 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_convertYearAndEra(x_206, x_207); +lean_dec(x_206); +x_120 = x_208; +goto block_203; } } else { -lean_object* x_210; -x_210 = lean_ctor_get(x_59, 0); -lean_inc(x_210); +lean_object* x_209; +x_209 = lean_ctor_get(x_59, 0); +lean_inc(x_209); lean_dec(x_59); -x_120 = x_210; -goto block_204; +x_120 = x_209; +goto block_203; } } else { if (lean_obj_tag(x_59) == 0) { -lean_object* x_211; -x_211 = lean_ctor_get(x_1, 1); -lean_inc(x_211); -if (lean_obj_tag(x_211) == 0) +lean_object* x_210; +x_210 = lean_ctor_get(x_1, 1); +lean_inc(x_210); +if (lean_obj_tag(x_210) == 0) { -lean_object* x_212; +lean_object* x_211; lean_dec(x_58); -x_212 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__1; -x_120 = x_212; -goto block_204; +x_211 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__1; +x_120 = x_211; +goto block_203; } else { -lean_object* x_213; lean_object* x_214; uint8_t x_215; lean_object* x_216; -x_213 = lean_ctor_get(x_58, 0); -lean_inc(x_213); +lean_object* x_212; lean_object* x_213; uint8_t x_214; lean_object* x_215; +x_212 = lean_ctor_get(x_58, 0); +lean_inc(x_212); lean_dec(x_58); -x_214 = lean_ctor_get(x_211, 0); -lean_inc(x_214); -lean_dec(x_211); -x_215 = lean_unbox(x_213); +x_213 = lean_ctor_get(x_210, 0); +lean_inc(x_213); +lean_dec(x_210); +x_214 = lean_unbox(x_212); +lean_dec(x_212); +x_215 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_convertYearAndEra(x_213, x_214); lean_dec(x_213); -x_216 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_convertYearAndEra(x_214, x_215); -lean_dec(x_214); -x_120 = x_216; -goto block_204; +x_120 = x_215; +goto block_203; } } else { -lean_object* x_217; +lean_object* x_216; lean_dec(x_58); -x_217 = lean_ctor_get(x_59, 0); -lean_inc(x_217); +x_216 = lean_ctor_get(x_59, 0); +lean_inc(x_216); lean_dec(x_59); -x_120 = x_217; -goto block_204; +x_120 = x_216; +goto block_203; } } -block_204: +block_203: { -lean_object* x_121; lean_object* x_122; lean_object* x_123; uint8_t x_124; lean_object* x_125; lean_object* x_148; lean_object* x_180; +lean_object* x_121; lean_object* x_122; lean_object* x_123; uint8_t x_124; lean_object* x_125; lean_object* x_148; lean_object* x_179; x_121 = l___private_Std_Time_Format_Basic_0__Std_Time_dateFromModifier___closed__1; x_122 = lean_int_mod(x_120, x_121); x_123 = l_Std_Time_Awareness_instInhabitedType___lambda__2___closed__1; @@ -86497,64 +86475,64 @@ x_124 = lean_int_dec_eq(x_122, x_123); lean_dec(x_122); if (lean_obj_tag(x_60) == 0) { -lean_object* x_190; -x_190 = lean_box(0); -x_180 = x_190; -goto block_189; +lean_object* x_189; +x_189 = lean_box(0); +x_179 = x_189; +goto block_188; } else { +lean_object* x_190; +x_190 = lean_ctor_get(x_1, 13); +lean_inc(x_190); +if (lean_obj_tag(x_190) == 0) +{ lean_object* x_191; -x_191 = lean_ctor_get(x_1, 13); +x_191 = lean_ctor_get(x_1, 14); lean_inc(x_191); if (lean_obj_tag(x_191) == 0) { lean_object* x_192; -x_192 = lean_ctor_get(x_1, 14); -lean_inc(x_192); -if (lean_obj_tag(x_192) == 0) -{ -lean_object* x_193; lean_dec(x_60); -x_193 = lean_box(0); -x_180 = x_193; -goto block_189; +x_192 = lean_box(0); +x_179 = x_192; +goto block_188; } else { -lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; uint8_t x_198; lean_object* x_199; -x_194 = lean_ctor_get(x_60, 0); -lean_inc(x_194); +lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; uint8_t x_197; lean_object* x_198; +x_193 = lean_ctor_get(x_60, 0); +lean_inc(x_193); lean_dec(x_60); -x_195 = lean_ctor_get(x_192, 0); -lean_inc(x_195); -lean_dec(x_192); -x_196 = l___private_Std_Time_Format_Basic_0__Std_Time_reprText____x40_Std_Time_Format_Basic___hyg_15____closed__6; -x_197 = lean_int_add(x_195, x_196); -lean_dec(x_195); -x_198 = lean_unbox(x_194); +x_194 = lean_ctor_get(x_191, 0); +lean_inc(x_194); +lean_dec(x_191); +x_195 = l___private_Std_Time_Format_Basic_0__Std_Time_reprText____x40_Std_Time_Format_Basic___hyg_15____closed__6; +x_196 = lean_int_add(x_194, x_195); lean_dec(x_194); -x_199 = l_Std_Time_HourMarker_toAbsolute(x_198, x_197); -lean_dec(x_197); -x_148 = x_199; -goto block_179; +x_197 = lean_unbox(x_193); +lean_dec(x_193); +x_198 = l_Std_Time_HourMarker_toAbsolute(x_197, x_196); +lean_dec(x_196); +x_148 = x_198; +goto block_178; } } else { -lean_object* x_200; lean_object* x_201; uint8_t x_202; lean_object* x_203; -x_200 = lean_ctor_get(x_60, 0); -lean_inc(x_200); +lean_object* x_199; lean_object* x_200; uint8_t x_201; lean_object* x_202; +x_199 = lean_ctor_get(x_60, 0); +lean_inc(x_199); lean_dec(x_60); -x_201 = lean_ctor_get(x_191, 0); -lean_inc(x_201); -lean_dec(x_191); -x_202 = lean_unbox(x_200); +x_200 = lean_ctor_get(x_190, 0); +lean_inc(x_200); +lean_dec(x_190); +x_201 = lean_unbox(x_199); +lean_dec(x_199); +x_202 = l_Std_Time_HourMarker_toAbsolute(x_201, x_200); lean_dec(x_200); -x_203 = l_Std_Time_HourMarker_toAbsolute(x_202, x_201); -lean_dec(x_201); -x_148 = x_203; -goto block_179; +x_148 = x_202; +goto block_178; } } block_147: @@ -86667,45 +86645,45 @@ goto block_117; } } } -block_179: +block_178: { lean_object* x_149; if (lean_obj_tag(x_61) == 0) { -lean_object* x_177; -x_177 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__10; -x_149 = x_177; -goto block_176; +lean_object* x_176; +x_176 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__8; +x_149 = x_176; +goto block_175; } else { -lean_object* x_178; -x_178 = lean_ctor_get(x_61, 0); -lean_inc(x_178); +lean_object* x_177; +x_177 = lean_ctor_get(x_61, 0); +lean_inc(x_177); lean_dec(x_61); -x_149 = x_178; -goto block_176; +x_149 = x_177; +goto block_175; } -block_176: +block_175: { lean_object* x_150; if (lean_obj_tag(x_62) == 0) { -lean_object* x_174; -x_174 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__11; -x_150 = x_174; -goto block_173; +lean_object* x_173; +x_173 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__9; +x_150 = x_173; +goto block_172; } else { -lean_object* x_175; -x_175 = lean_ctor_get(x_62, 0); -lean_inc(x_175); +lean_object* x_174; +x_174 = lean_ctor_get(x_62, 0); +lean_inc(x_174); lean_dec(x_62); -x_150 = x_175; -goto block_173; +x_150 = x_174; +goto block_172; } -block_173: +block_172: { lean_object* x_151; if (lean_obj_tag(x_63) == 0) @@ -86723,67 +86701,66 @@ lean_inc(x_162); lean_dec(x_1); if (lean_obj_tag(x_162) == 0) { -lean_object* x_163; lean_object* x_164; -x_163 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__5; -x_164 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_164, 0, x_148); -lean_ctor_set(x_164, 1, x_149); -lean_ctor_set(x_164, 2, x_150); -lean_ctor_set(x_164, 3, x_163); -x_125 = x_164; +lean_object* x_163; +x_163 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_163, 0, x_148); +lean_ctor_set(x_163, 1, x_149); +lean_ctor_set(x_163, 2, x_150); +lean_ctor_set(x_163, 3, x_123); +x_125 = x_163; goto block_147; } else { -lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; +lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_dec(x_150); lean_dec(x_149); lean_dec(x_148); -x_165 = lean_ctor_get(x_162, 0); -lean_inc(x_165); +x_164 = lean_ctor_get(x_162, 0); +lean_inc(x_164); lean_dec(x_162); -x_166 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__3; -x_167 = lean_int_mul(x_165, x_166); -lean_dec(x_165); -x_168 = l_Std_Time_PlainTime_ofNanoseconds(x_167); -lean_dec(x_167); -x_125 = x_168; +x_165 = l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__3; +x_166 = lean_int_mul(x_164, x_165); +lean_dec(x_164); +x_167 = l_Std_Time_PlainTime_ofNanoseconds(x_166); +lean_dec(x_166); +x_125 = x_167; goto block_147; } } else { -lean_object* x_169; lean_object* x_170; +lean_object* x_168; lean_object* x_169; lean_dec(x_150); lean_dec(x_149); lean_dec(x_148); lean_dec(x_1); -x_169 = lean_ctor_get(x_64, 0); -lean_inc(x_169); +x_168 = lean_ctor_get(x_64, 0); +lean_inc(x_168); lean_dec(x_64); -x_170 = l_Std_Time_PlainTime_ofNanoseconds(x_169); -lean_dec(x_169); -x_125 = x_170; +x_169 = l_Std_Time_PlainTime_ofNanoseconds(x_168); +lean_dec(x_168); +x_125 = x_169; goto block_147; } } else { -lean_object* x_171; -x_171 = lean_ctor_get(x_161, 0); -lean_inc(x_171); +lean_object* x_170; +x_170 = lean_ctor_get(x_161, 0); +lean_inc(x_170); lean_dec(x_161); -x_151 = x_171; +x_151 = x_170; goto block_160; } } else { -lean_object* x_172; -x_172 = lean_ctor_get(x_63, 0); -lean_inc(x_172); +lean_object* x_171; +x_171 = lean_ctor_get(x_63, 0); +lean_inc(x_171); lean_dec(x_63); -x_151 = x_172; +x_151 = x_171; goto block_160; } block_160: @@ -86844,58 +86821,58 @@ goto block_147; } } } -block_189: +block_188: +{ +lean_object* x_180; +lean_dec(x_179); +x_180 = lean_ctor_get(x_1, 15); +lean_inc(x_180); +if (lean_obj_tag(x_180) == 0) { lean_object* x_181; -lean_dec(x_180); -x_181 = lean_ctor_get(x_1, 15); +x_181 = lean_ctor_get(x_1, 16); lean_inc(x_181); if (lean_obj_tag(x_181) == 0) { -lean_object* x_182; -x_182 = lean_ctor_get(x_1, 16); -lean_inc(x_182); -if (lean_obj_tag(x_182) == 0) -{ x_148 = x_123; -goto block_179; +goto block_178; } else { -lean_object* x_183; -x_183 = lean_ctor_get(x_182, 0); -lean_inc(x_183); -lean_dec(x_182); -x_148 = x_183; -goto block_179; +lean_object* x_182; +x_182 = lean_ctor_get(x_181, 0); +lean_inc(x_182); +lean_dec(x_181); +x_148 = x_182; +goto block_178; } } else { -lean_object* x_184; -x_184 = lean_ctor_get(x_1, 16); -lean_inc(x_184); -if (lean_obj_tag(x_184) == 0) +lean_object* x_183; +x_183 = lean_ctor_get(x_1, 16); +lean_inc(x_183); +if (lean_obj_tag(x_183) == 0) { -lean_object* x_185; lean_object* x_186; lean_object* x_187; -x_185 = lean_ctor_get(x_181, 0); -lean_inc(x_185); -lean_dec(x_181); -x_186 = l___private_Std_Time_Format_Basic_0__Std_Time_parseOffset___closed__8; -x_187 = lean_int_add(x_185, x_186); -lean_dec(x_185); -x_148 = x_187; -goto block_179; +lean_object* x_184; lean_object* x_185; lean_object* x_186; +x_184 = lean_ctor_get(x_180, 0); +lean_inc(x_184); +lean_dec(x_180); +x_185 = l___private_Std_Time_Format_Basic_0__Std_Time_parseOffset___closed__8; +x_186 = lean_int_add(x_184, x_185); +lean_dec(x_184); +x_148 = x_186; +goto block_178; } else { -lean_object* x_188; -lean_dec(x_181); -x_188 = lean_ctor_get(x_184, 0); -lean_inc(x_188); -lean_dec(x_184); -x_148 = x_188; -goto block_179; +lean_object* x_187; +lean_dec(x_180); +x_187 = lean_ctor_get(x_183, 0); +lean_inc(x_187); +lean_dec(x_183); +x_148 = x_187; +goto block_178; } } } @@ -89490,10 +89467,6 @@ l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___ lean_mark_persistent(l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__17); l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__18 = _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__18(); lean_mark_persistent(l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__18); -l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__19 = _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__19(); -lean_mark_persistent(l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__19); -l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__20 = _init_l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__20(); -lean_mark_persistent(l___private_Std_Time_Format_Basic_0__Std_Time_GenericFormat_DateBuilder_build___closed__20); l_Std_Time_GenericFormat_spec_x21___closed__1 = _init_l_Std_Time_GenericFormat_spec_x21___closed__1(); lean_mark_persistent(l_Std_Time_GenericFormat_spec_x21___closed__1); l_Std_Time_GenericFormat_spec_x21___closed__2 = _init_l_Std_Time_GenericFormat_spec_x21___closed__2(); diff --git a/stage0/stdlib/Std/Time/Time/PlainTime.c b/stage0/stdlib/Std/Time/Time/PlainTime.c index 4f6001dfddf0..2cb3fa438157 100644 --- a/stage0/stdlib/Std/Time/Time/PlainTime.c +++ b/stage0/stdlib/Std/Time/Time/PlainTime.c @@ -50,16 +50,13 @@ LEAN_EXPORT lean_object* l_Std_Time_PlainTime_addHours___boxed(lean_object*, lea static lean_object* l_Std_Time_instReprPlainTime___closed__1; lean_object* lean_int_emod(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_PlainTime_instHAddOffset__1; -static lean_object* l_Std_Time_PlainTime_midnight___closed__4; static lean_object* l_Std_Time_PlainTime_instHAddOffset__1___closed__1; static lean_object* l_Std_Time_instInhabitedPlainTime___closed__3; -static lean_object* l_Std_Time_PlainTime_midnight___closed__3; LEAN_EXPORT lean_object* l_Std_Time_PlainTime_subMilliseconds(lean_object*, lean_object*); static lean_object* l___private_Std_Time_Time_PlainTime_0__Std_Time_reprPlainTime____x40_Std_Time_Time_PlainTime___hyg_43____closed__3; LEAN_EXPORT lean_object* l_Std_Time_PlainTime_addSeconds___boxed(lean_object*, lean_object*); static lean_object* l___private_Std_Time_Time_PlainTime_0__Std_Time_reprPlainTime____x40_Std_Time_Time_PlainTime___hyg_43____closed__33; static lean_object* l___private_Std_Time_Time_PlainTime_0__Std_Time_reprPlainTime____x40_Std_Time_Time_PlainTime___hyg_43____closed__8; -lean_object* l_Fin_ofNat(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_instBEqPlainTime___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_PlainTime_instHSubOffset__1; static lean_object* l___private_Std_Time_Time_PlainTime_0__Std_Time_reprPlainTime____x40_Std_Time_Time_PlainTime___hyg_43____closed__27; @@ -1341,30 +1338,11 @@ return x_4; static lean_object* _init_l_Std_Time_PlainTime_midnight___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(999999999u); -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Fin_ofNat(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Std_Time_PlainTime_midnight___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Time_PlainTime_midnight___closed__2; -x_2 = lean_nat_to_int(x_1); -return x_2; -} -} -static lean_object* _init_l_Std_Time_PlainTime_midnight___closed__4() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Std_Time_instInhabitedPlainTime___closed__10; x_2 = l_Std_Time_instInhabitedPlainTime___closed__18; x_3 = l_Std_Time_PlainTime_midnight___closed__1; -x_4 = l_Std_Time_PlainTime_midnight___closed__3; +x_4 = l___private_Std_Time_Time_PlainTime_0__Std_Time_reprPlainTime____x40_Std_Time_Time_PlainTime___hyg_43____closed__8; x_5 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_5, 0, x_1); lean_ctor_set(x_5, 1, x_2); @@ -1377,7 +1355,7 @@ static lean_object* _init_l_Std_Time_PlainTime_midnight() { _start: { lean_object* x_1; -x_1 = l_Std_Time_PlainTime_midnight___closed__4; +x_1 = l_Std_Time_PlainTime_midnight___closed__2; return x_1; } } @@ -1415,7 +1393,7 @@ x_5 = lean_box(x_1); x_6 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_6, 0, x_5); lean_ctor_set(x_6, 1, x_4); -x_7 = l_Std_Time_PlainTime_midnight___closed__3; +x_7 = l___private_Std_Time_Time_PlainTime_0__Std_Time_reprPlainTime____x40_Std_Time_Time_PlainTime___hyg_43____closed__8; x_8 = lean_alloc_ctor(0, 4, 0); lean_ctor_set(x_8, 0, x_2); lean_ctor_set(x_8, 1, x_3); @@ -2535,10 +2513,6 @@ l_Std_Time_PlainTime_midnight___closed__1 = _init_l_Std_Time_PlainTime_midnight_ lean_mark_persistent(l_Std_Time_PlainTime_midnight___closed__1); l_Std_Time_PlainTime_midnight___closed__2 = _init_l_Std_Time_PlainTime_midnight___closed__2(); lean_mark_persistent(l_Std_Time_PlainTime_midnight___closed__2); -l_Std_Time_PlainTime_midnight___closed__3 = _init_l_Std_Time_PlainTime_midnight___closed__3(); -lean_mark_persistent(l_Std_Time_PlainTime_midnight___closed__3); -l_Std_Time_PlainTime_midnight___closed__4 = _init_l_Std_Time_PlainTime_midnight___closed__4(); -lean_mark_persistent(l_Std_Time_PlainTime_midnight___closed__4); l_Std_Time_PlainTime_midnight = _init_l_Std_Time_PlainTime_midnight(); lean_mark_persistent(l_Std_Time_PlainTime_midnight); l_Std_Time_PlainTime_toMilliseconds___closed__1 = _init_l_Std_Time_PlainTime_toMilliseconds___closed__1(); diff --git a/stage0/stdlib/Std/Time/Time/Unit/Nanosecond.c b/stage0/stdlib/Std/Time/Time/Unit/Nanosecond.c index 00cc03dc0bc3..da8a026f08df 100644 --- a/stage0/stdlib/Std/Time/Time/Unit/Nanosecond.c +++ b/stage0/stdlib/Std/Time/Time/Unit/Nanosecond.c @@ -34,7 +34,6 @@ LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instOffsetLE; uint8_t lean_int_dec_le(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instOffsetNeg; LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_Span_toOffset(lean_object*); -lean_object* l_Fin_ofNat(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_Ordinal_ofInt(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_Offset_ofNat(lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instSpanLE; @@ -47,7 +46,6 @@ LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instDecidableLtOrdinal___boxed(le LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_Ordinal_toOffset(lean_object*); static lean_object* l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__1; static lean_object* l_Std_Time_Nanosecond_instOrdinalRepr___closed__1; -static lean_object* l_Std_Time_Nanosecond_instOffsetInhabited___closed__1; LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instOrdinalLT; lean_object* l_Std_Time_Internal_UnitVal_add___rarg___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instOfNatOrdinal(lean_object*); @@ -64,6 +62,7 @@ LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_Ordinal_instOfDayLT; LEAN_EXPORT uint8_t l_Std_Time_Nanosecond_instDecidableLtOrdinal(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instSpanBEq; LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instSpanLT; +lean_object* lean_nat_mod(lean_object*, lean_object*); lean_object* l_Std_Time_Internal_UnitVal_instRepr___rarg___boxed(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_Ordinal_instOfDayLE; uint8_t lean_int_dec_lt(lean_object*, lean_object*); @@ -76,7 +75,6 @@ LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instInhabitedOrdinal; LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instOffsetSub; static lean_object* l_Std_Time_Nanosecond_instOffsetRepr___closed__1; lean_object* l_Std_Time_Internal_Bounded_instBEq___rarg___boxed(lean_object*, lean_object*); -static lean_object* l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__2; LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instOffsetBEq; static lean_object* l_Std_Time_Nanosecond_instOffsetNeg___closed__1; static lean_object* _init_l_Std_Time_Nanosecond_instOrdinalRepr___closed__1() { @@ -131,8 +129,8 @@ LEAN_EXPORT lean_object* l_Std_Time_Nanosecond_instOfNatOrdinal(lean_object* x_1 _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = lean_unsigned_to_nat(999999999u); -x_3 = l_Fin_ofNat(x_2, x_1); +x_2 = lean_unsigned_to_nat(1000000000u); +x_3 = lean_nat_mod(x_1, x_2); x_4 = lean_nat_to_int(x_3); return x_4; } @@ -149,18 +147,8 @@ return x_2; static lean_object* _init_l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__1() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_unsigned_to_nat(999999999u); -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Fin_ofNat(x_1, x_2); -return x_3; -} -} -static lean_object* _init_l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__2() { -_start: -{ lean_object* x_1; lean_object* x_2; -x_1 = l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__1; +x_1 = lean_unsigned_to_nat(0u); x_2 = lean_nat_to_int(x_1); return x_2; } @@ -169,7 +157,7 @@ static lean_object* _init_l_Std_Time_Nanosecond_instInhabitedOrdinal() { _start: { lean_object* x_1; -x_1 = l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__2; +x_1 = l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__1; return x_1; } } @@ -243,20 +231,11 @@ x_1 = l_Std_Time_Nanosecond_instOffsetBEq___closed__1; return x_1; } } -static lean_object* _init_l_Std_Time_Nanosecond_instOffsetInhabited___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_unsigned_to_nat(0u); -x_2 = lean_nat_to_int(x_1); -return x_2; -} -} static lean_object* _init_l_Std_Time_Nanosecond_instOffsetInhabited() { _start: { lean_object* x_1; -x_1 = l_Std_Time_Nanosecond_instOffsetInhabited___closed__1; +x_1 = l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__1; return x_1; } } @@ -427,7 +406,7 @@ static lean_object* _init_l_Std_Time_Nanosecond_instInhabitedSpan() { _start: { lean_object* x_1; -x_1 = l_Std_Time_Nanosecond_instOffsetInhabited___closed__1; +x_1 = l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__1; return x_1; } } @@ -554,8 +533,6 @@ l_Std_Time_Nanosecond_instOrdinalLT = _init_l_Std_Time_Nanosecond_instOrdinalLT( lean_mark_persistent(l_Std_Time_Nanosecond_instOrdinalLT); l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__1 = _init_l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__1(); lean_mark_persistent(l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__1); -l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__2 = _init_l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__2(); -lean_mark_persistent(l_Std_Time_Nanosecond_instInhabitedOrdinal___closed__2); l_Std_Time_Nanosecond_instInhabitedOrdinal = _init_l_Std_Time_Nanosecond_instInhabitedOrdinal(); lean_mark_persistent(l_Std_Time_Nanosecond_instInhabitedOrdinal); l_Std_Time_Nanosecond_instOffsetRepr___closed__1 = _init_l_Std_Time_Nanosecond_instOffsetRepr___closed__1(); @@ -566,8 +543,6 @@ l_Std_Time_Nanosecond_instOffsetBEq___closed__1 = _init_l_Std_Time_Nanosecond_in lean_mark_persistent(l_Std_Time_Nanosecond_instOffsetBEq___closed__1); l_Std_Time_Nanosecond_instOffsetBEq = _init_l_Std_Time_Nanosecond_instOffsetBEq(); lean_mark_persistent(l_Std_Time_Nanosecond_instOffsetBEq); -l_Std_Time_Nanosecond_instOffsetInhabited___closed__1 = _init_l_Std_Time_Nanosecond_instOffsetInhabited___closed__1(); -lean_mark_persistent(l_Std_Time_Nanosecond_instOffsetInhabited___closed__1); l_Std_Time_Nanosecond_instOffsetInhabited = _init_l_Std_Time_Nanosecond_instOffsetInhabited(); lean_mark_persistent(l_Std_Time_Nanosecond_instOffsetInhabited); l_Std_Time_Nanosecond_instOffsetAdd___closed__1 = _init_l_Std_Time_Nanosecond_instOffsetAdd___closed__1(); diff --git a/stage0/stdlib/Std/Time/Zoned/Database.c b/stage0/stdlib/Std/Time/Zoned/Database.c index e35ab2f1ff02..aa3679786614 100644 --- a/stage0/stdlib/Std/Time/Zoned/Database.c +++ b/stage0/stdlib/Std/Time/Zoned/Database.c @@ -13,29 +13,467 @@ #ifdef __cplusplus extern "C" { #endif +LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__1___boxed(lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__9; static uint64_t l_Std_Time_Database_defaultGetLocalZoneRules___closed__2; +lean_object* lean_io_getenv(lean_object*, lean_object*); lean_object* l_Std_Time_Database_TZdb_localRules(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetLocalZoneRules(lean_object*); static uint64_t l_Std_Time_Database_defaultGetLocalZoneRules___closed__3; +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__5; +lean_object* l_System_FilePath_pathExists(lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__8; +LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_defaultGetZoneRules___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint64_t lean_int64_neg(uint64_t); static lean_object* l_Std_Time_Database_defaultGetLocalZoneRules___closed__4; +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__7; LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetLocalZoneRules___closed__4___boxed__const__1; +static size_t l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__11; static lean_object* l_Std_Time_Database_defaultGetZoneRules___closed__1; +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__10; static lean_object* l_Std_Time_Database_defaultGetLocalZoneRules___closed__5; +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__3; lean_object* l_Std_Time_Database_Windows_getLocalTimeZoneIdentifierAt___boxed(lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__6; uint64_t lean_int64_of_nat(lean_object*); +LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___boxed(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__1(lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__1; lean_object* l_Bind_bindLeft___at_Std_Time_Database_WindowsDb_inst___spec__1(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_defaultGetZoneRules___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*); +lean_object* lean_array_mk(lean_object*); lean_object* l_Std_Time_Database_Windows_getZoneRules___boxed(lean_object*, lean_object*); +size_t lean_usize_add(size_t, size_t); +lean_object* lean_array_uget(lean_object*, size_t); +size_t lean_array_size(lean_object*); lean_object* l_Std_Time_Database_TZdb_readRulesFromDisk(lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__4; +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__2; +lean_object* lean_string_append(lean_object*, lean_object*); +uint8_t lean_usize_dec_lt(size_t, size_t); +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__1; +LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetZoneRules(lean_object*, lean_object*); extern uint8_t l_System_Platform_isWindows; static lean_object* l_Std_Time_Database_defaultGetLocalZoneRules___closed__1; lean_object* l_Std_Time_Database_Windows_getZoneRules(lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__2; +LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_defaultGetZoneRules___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +uint8_t x_10; +x_10 = lean_usize_dec_lt(x_7, x_6); +if (x_10 == 0) +{ +lean_object* x_11; +lean_dec(x_4); +lean_dec(x_1); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_8); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +lean_dec(x_8); +x_12 = lean_array_uget(x_5, x_7); +x_13 = l_System_FilePath_pathExists(x_12, x_9); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_unbox(x_14); +lean_dec(x_14); +if (x_15 == 0) +{ +lean_object* x_16; size_t x_17; size_t x_18; +lean_dec(x_12); +x_16 = lean_ctor_get(x_13, 1); +lean_inc(x_16); +lean_dec(x_13); +x_17 = 1; +x_18 = lean_usize_add(x_7, x_17); +lean_inc(x_4); +{ +size_t _tmp_6 = x_18; +lean_object* _tmp_7 = x_4; +lean_object* _tmp_8 = x_16; +x_7 = _tmp_6; +x_8 = _tmp_7; +x_9 = _tmp_8; +} +goto _start; +} +else +{ +uint8_t x_20; +lean_dec(x_4); +x_20 = !lean_is_exclusive(x_13); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_13, 1); +x_22 = lean_ctor_get(x_13, 0); +lean_dec(x_22); +x_23 = l_Std_Time_Database_TZdb_readRulesFromDisk(x_12, x_1, x_21); +if (lean_obj_tag(x_23) == 0) +{ +uint8_t x_24; +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_23, 0); +x_26 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_26, 0, x_25); +x_27 = lean_box(0); +lean_ctor_set(x_13, 1, x_27); +lean_ctor_set(x_13, 0, x_26); +lean_ctor_set(x_23, 0, x_13); +return x_23; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +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, 1, 0); +lean_ctor_set(x_30, 0, x_28); +x_31 = lean_box(0); +lean_ctor_set(x_13, 1, x_31); +lean_ctor_set(x_13, 0, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_13); +lean_ctor_set(x_32, 1, x_29); +return x_32; +} +} +else +{ +uint8_t x_33; +lean_free_object(x_13); +x_33 = !lean_is_exclusive(x_23); +if (x_33 == 0) +{ +return x_23; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_23, 0); +x_35 = lean_ctor_get(x_23, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_23); +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 +{ +lean_object* x_37; lean_object* x_38; +x_37 = lean_ctor_get(x_13, 1); +lean_inc(x_37); +lean_dec(x_13); +x_38 = l_Std_Time_Database_TZdb_readRulesFromDisk(x_12, x_1, x_37); +if (lean_obj_tag(x_38) == 0) +{ +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; +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_38, 1); +lean_inc(x_40); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + x_41 = x_38; +} else { + lean_dec_ref(x_38); + x_41 = lean_box(0); +} +x_42 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_42, 0, x_39); +x_43 = lean_box(0); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +if (lean_is_scalar(x_41)) { + x_45 = lean_alloc_ctor(0, 2, 0); +} else { + x_45 = x_41; +} +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_40); +return x_45; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_46 = lean_ctor_get(x_38, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_38, 1); +lean_inc(x_47); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + x_48 = x_38; +} else { + lean_dec_ref(x_38); + x_48 = lean_box(0); +} +if (lean_is_scalar(x_48)) { + x_49 = lean_alloc_ctor(1, 2, 0); +} else { + x_49 = x_48; +} +lean_ctor_set(x_49, 0, x_46); +lean_ctor_set(x_49, 1, x_47); +return x_49; +} +} +} +} +} +} +static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("cannot find ", 12, 12); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked(" in the local timezone database", 31, 31); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_4 = l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__1; +x_5 = lean_string_append(x_4, x_1); +x_6 = l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__2; +x_7 = lean_string_append(x_5, x_6); +x_8 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_8, 0, x_7); +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_3); +return x_9; +} +} +static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("/usr/share/lib/zoneinfo", 23, 23); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___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; +} +} +static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("/etc/zoneinfo", 13, 13); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__3; +x_2 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__2; +x_3 = lean_alloc_ctor(1, 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_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("/share/zoneinfo", 15, 15); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__5; +x_2 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__4; +x_3 = lean_alloc_ctor(1, 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_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("/usr/share/zoneinfo", 19, 19); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__7; +x_2 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__6; +x_3 = lean_alloc_ctor(1, 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_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__8; +x_2 = lean_array_mk(x_1); +return x_2; +} +} +static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = lean_box(0); +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 size_t _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__11() { +_start: +{ +lean_object* x_1; size_t x_2; +x_1 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__9; +x_2 = lean_array_size(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; size_t x_6; lean_object* x_7; size_t x_8; lean_object* x_9; +x_4 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__9; +x_5 = lean_box(0); +x_6 = 0; +x_7 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__10; +x_8 = l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__11; +lean_inc(x_1); +x_9 = l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_defaultGetZoneRules___spec__1(x_1, x_4, x_5, x_7, x_4, x_8, x_6, x_7, x_3); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +lean_dec(x_10); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_9, 1); +lean_inc(x_12); +lean_dec(x_9); +x_13 = lean_box(0); +x_14 = l_Std_Time_Database_defaultGetZoneRules___lambda__1(x_1, x_13, x_12); +lean_dec(x_1); +return x_14; +} +else +{ +uint8_t x_15; +lean_dec(x_1); +x_15 = !lean_is_exclusive(x_9); +if (x_15 == 0) +{ +lean_object* x_16; lean_object* x_17; +x_16 = lean_ctor_get(x_9, 0); +lean_dec(x_16); +x_17 = lean_ctor_get(x_11, 0); +lean_inc(x_17); +lean_dec(x_11); +lean_ctor_set(x_9, 0, x_17); +return x_9; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_9, 1); +lean_inc(x_18); +lean_dec(x_9); +x_19 = lean_ctor_get(x_11, 0); +lean_inc(x_19); +lean_dec(x_11); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_18); +return x_20; +} +} +} +else +{ +uint8_t x_21; +lean_dec(x_1); +x_21 = !lean_is_exclusive(x_9); +if (x_21 == 0) +{ +return x_9; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_9, 0); +x_23 = lean_ctor_get(x_9, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_9); +x_24 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); +return x_24; +} +} +} +} static lean_object* _init_l_Std_Time_Database_defaultGetZoneRules___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string_unchecked("/usr/share/zoneinfo/", 20, 20); +x_1 = lean_mk_string_unchecked("TZDIR", 5, 5); return x_1; } } @@ -46,18 +484,118 @@ uint8_t x_3; x_3 = l_System_Platform_isWindows; if (x_3 == 0) { -lean_object* x_4; lean_object* x_5; +lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = l_Std_Time_Database_defaultGetZoneRules___closed__1; -x_5 = l_Std_Time_Database_TZdb_readRulesFromDisk(x_4, x_1, x_2); -return x_5; +x_5 = lean_io_getenv(x_4, x_2); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_box(0); +x_9 = l_Std_Time_Database_defaultGetZoneRules___lambda__2(x_1, x_8, x_7); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_5, 1); +lean_inc(x_10); +lean_dec(x_5); +x_11 = lean_ctor_get(x_6, 0); +lean_inc(x_11); +lean_dec(x_6); +x_12 = l_Std_Time_Database_TZdb_readRulesFromDisk(x_11, x_1, x_10); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +return x_12; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_12, 0); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_12); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +else +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_12); +if (x_17 == 0) +{ +return x_12; } else { -lean_object* x_6; -x_6 = l_Std_Time_Database_Windows_getZoneRules(x_1, x_2); +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_12, 0); +x_19 = lean_ctor_get(x_12, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_12); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +} +else +{ +lean_object* x_21; +x_21 = l_Std_Time_Database_Windows_getZoneRules(x_1, x_2); +lean_dec(x_1); +return x_21; +} +} +} +LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_defaultGetZoneRules___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, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +size_t x_10; size_t x_11; lean_object* x_12; +x_10 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_11 = lean_unbox_usize(x_7); +lean_dec(x_7); +x_12 = l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_defaultGetZoneRules___spec__1(x_1, x_2, x_3, x_4, x_5, x_10, x_11, x_8, x_9); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Std_Time_Database_defaultGetZoneRules___lambda__1(x_1, x_2, x_3); +lean_dec(x_2); lean_dec(x_1); -return x_6; +return x_4; +} } +LEAN_EXPORT lean_object* l_Std_Time_Database_defaultGetZoneRules___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Std_Time_Database_defaultGetZoneRules___lambda__2(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; } } static lean_object* _init_l_Std_Time_Database_defaultGetLocalZoneRules___closed__1() { @@ -160,6 +698,31 @@ lean_dec_ref(res); res = initialize_Init_System_Platform(builtin, lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__1 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__1(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__1); +l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__2 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__2(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__1___closed__2); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__1 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__1(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__1); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__2 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__2(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__2); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__3 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__3(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__3); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__4 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__4(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__4); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__5 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__5(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__5); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__6 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__6(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__6); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__7 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__7(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__7); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__8 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__8(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__8); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__9 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__9(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__9); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__10 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__10(); +lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__10); +l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__11 = _init_l_Std_Time_Database_defaultGetZoneRules___lambda__2___closed__11(); l_Std_Time_Database_defaultGetZoneRules___closed__1 = _init_l_Std_Time_Database_defaultGetZoneRules___closed__1(); lean_mark_persistent(l_Std_Time_Database_defaultGetZoneRules___closed__1); l_Std_Time_Database_defaultGetLocalZoneRules___closed__1 = _init_l_Std_Time_Database_defaultGetLocalZoneRules___closed__1(); diff --git a/stage0/stdlib/Std/Time/Zoned/Database/TZdb.c b/stage0/stdlib/Std/Time/Zoned/Database/TZdb.c index 223f541796b3..23047a341596 100644 --- a/stage0/stdlib/Std/Time/Zoned/Database/TZdb.c +++ b/stage0/stdlib/Std/Time/Zoned/Database/TZdb.c @@ -15,75 +15,186 @@ extern "C" { #endif static lean_object* l_Std_Time_Database_TZdb_localRules___closed__2; lean_object* l_Std_Time_TimeZone_TZif_parse(lean_object*); +lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__3(lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Time_Database_TZdb_idFromPath___closed__2; lean_object* l_System_FilePath_join(lean_object*, lean_object*); lean_object* l_Std_Internal_Parsec_ByteArray_Parser_run___rarg(lean_object*, lean_object*); +lean_object* lean_io_getenv(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_parseTZif(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_localRules(lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_TZdb_inst___lambda__2___closed__1; static lean_object* l_Std_Time_Database_TZdb_inst___closed__3; +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__3___boxed(lean_object*, lean_object*, lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); +lean_object* l_System_FilePath_pathExists(lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_TZdb_default___closed__9; +lean_object* lean_string_utf8_byte_size(lean_object*); LEAN_EXPORT lean_object* l___private_Init_Data_Option_Basic_0__Option_decEqOption____x40_Init_Data_Option_Basic___hyg_4____at_Std_Time_Database_TZdb_idFromPath___spec__1___boxed(lean_object*, lean_object*); static lean_object* l_Std_Time_Database_TZdb_inst___closed__2; LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst; +LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_TZdb_inst___spec__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_Std_Time_Database_TZdb_localRules___lambda__1(lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__2; +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__1___boxed(lean_object*, lean_object*, lean_object*); LEAN_EXPORT uint8_t l___private_Init_Data_Option_Basic_0__Option_decEqOption____x40_Init_Data_Option_Basic___hyg_4____at_Std_Time_Database_TZdb_idFromPath___spec__1(lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_TZdb_inst___lambda__1___closed__2; static lean_object* l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__1; +static lean_object* l_Std_Time_Database_TZdb_default___closed__4; static lean_object* l_Std_Time_Database_TZdb_localRules___closed__3; lean_object* l_Std_Time_TimeZone_convertTZif(lean_object*, lean_object*); lean_object* l_System_FilePath_components(lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_parseTZIfFromDisk___boxed(lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_TZdb_default___closed__10; static lean_object* l_Std_Time_Database_TZdb_localRules___closed__5; +static lean_object* l_Std_Time_Database_TZdb_default___closed__11; +static lean_object* l_Std_Time_Database_TZdb_default___closed__7; static lean_object* l_Std_Time_Database_TZdb_parseTZif___closed__1; LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_parseTZIfFromDisk(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_default; static lean_object* l_Std_Time_Database_TZdb_default___closed__1; +static lean_object* l_Std_Time_Database_TZdb_default___closed__8; +static lean_object* l_Std_Time_Database_TZdb_inst___lambda__3___closed__1; +lean_object* l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Time_Database_TZdb_localRules___lambda__1___closed__1; +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Time_Database_TZdb_localRules___closed__1; +lean_object* l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_IO_ofExcept___at_Std_Time_Database_TZdb_parseTZIfFromDisk___spec__1(lean_object*, lean_object*); -LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__2(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Time_Database_TZdb_localRules___closed__4; +static lean_object* l_Std_Time_Database_TZdb_inst___lambda__1___closed__1; LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_idFromPath(lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_parseTZIfFromDisk___lambda__1(lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_TZdb_default___closed__5; static lean_object* l_Std_Time_Database_TZdb_inst___closed__1; lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* lean_array_mk(lean_object*); static lean_object* l_Std_Time_Database_TZdb_localRules___lambda__1___closed__2; +size_t lean_usize_add(size_t, size_t); +static lean_object* l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__3; static lean_object* l_Std_Time_Database_TZdb_default___closed__2; +lean_object* lean_array_uget(lean_object*, size_t); +size_t lean_array_size(lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_readRulesFromDisk(lean_object*, lean_object*, lean_object*); static lean_object* l_Std_Time_Database_TZdb_default___closed__3; static lean_object* l_Std_Time_Database_TZdb_localRules___closed__6; lean_object* lean_string_append(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +uint8_t lean_usize_dec_lt(size_t, size_t); LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_localRules___lambda__1___boxed(lean_object*, lean_object*, lean_object*); +static lean_object* l_Std_Time_Database_TZdb_default___closed__6; lean_object* l_IO_FS_readBinFile(lean_object*, lean_object*); static lean_object* l_Std_Time_Database_TZdb_idFromPath___closed__3; lean_object* l_IO_Process_run(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_TZdb_inst___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__1(lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__4(lean_object*, lean_object*); static lean_object* l_Std_Time_Database_TZdb_idFromPath___closed__1; lean_object* l_Array_get_x3f___rarg(lean_object*, lean_object*); static lean_object* _init_l_Std_Time_Database_TZdb_default___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string_unchecked("/etc/localtime", 14, 14); +x_1 = lean_mk_string_unchecked("/usr/share/lib/zoneinfo", 23, 23); return x_1; } } static lean_object* _init_l_Std_Time_Database_TZdb_default___closed__2() { _start: { +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Std_Time_Database_TZdb_default___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; +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_default___closed__3() { +_start: +{ lean_object* x_1; -x_1 = lean_mk_string_unchecked("/usr/share/zoneinfo/", 20, 20); +x_1 = lean_mk_string_unchecked("/etc/zoneinfo", 13, 13); return x_1; } } -static lean_object* _init_l_Std_Time_Database_TZdb_default___closed__3() { +static lean_object* _init_l_Std_Time_Database_TZdb_default___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Std_Time_Database_TZdb_default___closed__1; +x_1 = l_Std_Time_Database_TZdb_default___closed__3; x_2 = l_Std_Time_Database_TZdb_default___closed__2; +x_3 = lean_alloc_ctor(1, 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_Std_Time_Database_TZdb_default___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("/share/zoneinfo", 15, 15); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_default___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Std_Time_Database_TZdb_default___closed__5; +x_2 = l_Std_Time_Database_TZdb_default___closed__4; +x_3 = lean_alloc_ctor(1, 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_Std_Time_Database_TZdb_default___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("/usr/share/zoneinfo", 19, 19); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_default___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Std_Time_Database_TZdb_default___closed__7; +x_2 = l_Std_Time_Database_TZdb_default___closed__6; +x_3 = lean_alloc_ctor(1, 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_Std_Time_Database_TZdb_default___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Std_Time_Database_TZdb_default___closed__8; +x_2 = lean_array_mk(x_1); +return x_2; +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_default___closed__10() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("/etc/localtime", 14, 14); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_default___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Std_Time_Database_TZdb_default___closed__10; +x_2 = l_Std_Time_Database_TZdb_default___closed__9; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -94,7 +205,7 @@ static lean_object* _init_l_Std_Time_Database_TZdb_default() { _start: { lean_object* x_1; -x_1 = l_Std_Time_Database_TZdb_default___closed__3; +x_1 = l_Std_Time_Database_TZdb_default___closed__11; return x_1; } } @@ -200,7 +311,7 @@ static lean_object* _init_l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__1 _start: { lean_object* x_1; -x_1 = lean_mk_string_unchecked("cannot find ", 12, 12); +x_1 = lean_mk_string_unchecked("unable to locate ", 17, 17); return x_1; } } @@ -208,7 +319,15 @@ static lean_object* _init_l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__2 _start: { lean_object* x_1; -x_1 = lean_mk_string_unchecked(" in the local timezone database", 31, 31); +x_1 = lean_mk_string_unchecked(" in the local timezone database at '", 36, 36); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("'", 1, 1); return x_1; } } @@ -234,7 +353,7 @@ uint8_t x_8; x_8 = !lean_is_exclusive(x_4); if (x_8 == 0) { -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_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; x_9 = lean_ctor_get(x_4, 0); lean_dec(x_9); x_10 = l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__1; @@ -242,28 +361,34 @@ x_11 = lean_string_append(x_10, x_2); lean_dec(x_2); x_12 = l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__2; x_13 = lean_string_append(x_11, x_12); -x_14 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_4, 0, x_14); +x_14 = lean_string_append(x_13, x_1); +x_15 = l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__3; +x_16 = lean_string_append(x_14, x_15); +x_17 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_4, 0, x_17); return x_4; } else { -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; -x_15 = lean_ctor_get(x_4, 1); -lean_inc(x_15); +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; +x_18 = lean_ctor_get(x_4, 1); +lean_inc(x_18); lean_dec(x_4); -x_16 = l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__1; -x_17 = lean_string_append(x_16, x_2); +x_19 = l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__1; +x_20 = lean_string_append(x_19, x_2); lean_dec(x_2); -x_18 = l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__2; -x_19 = lean_string_append(x_17, x_18); -x_20 = lean_alloc_ctor(18, 1, 0); -lean_ctor_set(x_20, 0, x_19); -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_20); -lean_ctor_set(x_21, 1, x_15); -return x_21; +x_21 = l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__2; +x_22 = lean_string_append(x_20, x_21); +x_23 = lean_string_append(x_22, x_1); +x_24 = l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__3; +x_25 = lean_string_append(x_23, x_24); +x_26 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_26, 0, x_25); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_18); +return x_27; } } } @@ -395,45 +520,95 @@ x_18 = l___private_Init_Data_Option_Basic_0__Option_decEqOption____x40_Init_Data lean_dec(x_13); if (x_18 == 0) { -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = l_Std_Time_Database_TZdb_idFromPath___closed__3; -x_20 = lean_string_append(x_16, x_19); -x_21 = lean_string_append(x_20, x_10); +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; +x_19 = lean_string_utf8_byte_size(x_16); +x_20 = lean_unsigned_to_nat(0u); +x_21 = l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(x_16, x_19, x_20); +x_22 = l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(x_16, x_21, x_19); +x_23 = lean_string_utf8_extract(x_16, x_21, x_22); +lean_dec(x_22); +lean_dec(x_21); +lean_dec(x_16); +x_24 = l_Std_Time_Database_TZdb_idFromPath___closed__3; +x_25 = lean_string_append(x_23, x_24); +x_26 = lean_string_utf8_byte_size(x_10); +x_27 = l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(x_10, x_26, x_20); +x_28 = l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(x_10, x_27, x_26); +x_29 = lean_string_utf8_extract(x_10, x_27, x_28); +lean_dec(x_28); +lean_dec(x_27); lean_dec(x_10); -lean_ctor_set(x_7, 0, x_21); +x_30 = lean_string_append(x_25, x_29); +lean_dec(x_29); +lean_ctor_set(x_7, 0, x_30); return x_7; } else { +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_dec(x_16); +x_31 = lean_string_utf8_byte_size(x_10); +x_32 = lean_unsigned_to_nat(0u); +x_33 = l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(x_10, x_31, x_32); +x_34 = l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(x_10, x_33, x_31); +x_35 = lean_string_utf8_extract(x_10, x_33, x_34); +lean_dec(x_34); +lean_dec(x_33); +lean_dec(x_10); +lean_ctor_set(x_7, 0, x_35); return x_7; } } else { -lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; -x_22 = lean_ctor_get(x_13, 0); -lean_inc(x_22); +lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; +x_36 = lean_ctor_get(x_13, 0); +lean_inc(x_36); lean_dec(x_13); -lean_inc(x_22); -x_23 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_23, 0, x_22); -x_24 = l_Std_Time_Database_TZdb_idFromPath___closed__2; -x_25 = l___private_Init_Data_Option_Basic_0__Option_decEqOption____x40_Init_Data_Option_Basic___hyg_4____at_Std_Time_Database_TZdb_idFromPath___spec__1(x_23, x_24); -lean_dec(x_23); -if (x_25 == 0) -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = l_Std_Time_Database_TZdb_idFromPath___closed__3; -x_27 = lean_string_append(x_22, x_26); -x_28 = lean_string_append(x_27, x_10); +lean_inc(x_36); +x_37 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_37, 0, x_36); +x_38 = l_Std_Time_Database_TZdb_idFromPath___closed__2; +x_39 = l___private_Init_Data_Option_Basic_0__Option_decEqOption____x40_Init_Data_Option_Basic___hyg_4____at_Std_Time_Database_TZdb_idFromPath___spec__1(x_37, x_38); +lean_dec(x_37); +if (x_39 == 0) +{ +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; +x_40 = lean_string_utf8_byte_size(x_36); +x_41 = lean_unsigned_to_nat(0u); +x_42 = l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(x_36, x_40, x_41); +x_43 = l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(x_36, x_42, x_40); +x_44 = lean_string_utf8_extract(x_36, x_42, x_43); +lean_dec(x_43); +lean_dec(x_42); +lean_dec(x_36); +x_45 = l_Std_Time_Database_TZdb_idFromPath___closed__3; +x_46 = lean_string_append(x_44, x_45); +x_47 = lean_string_utf8_byte_size(x_10); +x_48 = l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(x_10, x_47, x_41); +x_49 = l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(x_10, x_48, x_47); +x_50 = lean_string_utf8_extract(x_10, x_48, x_49); +lean_dec(x_49); +lean_dec(x_48); lean_dec(x_10); -lean_ctor_set(x_7, 0, x_28); +x_51 = lean_string_append(x_46, x_50); +lean_dec(x_50); +lean_ctor_set(x_7, 0, x_51); return x_7; } else { -lean_dec(x_22); +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_dec(x_36); +x_52 = lean_string_utf8_byte_size(x_10); +x_53 = lean_unsigned_to_nat(0u); +x_54 = l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(x_10, x_52, x_53); +x_55 = l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(x_10, x_54, x_52); +x_56 = lean_string_utf8_extract(x_10, x_54, x_55); +lean_dec(x_55); +lean_dec(x_54); +lean_dec(x_10); +lean_ctor_set(x_7, 0, x_56); return x_7; } } @@ -441,63 +616,86 @@ return x_7; } else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_7, 0); -lean_inc(x_29); +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_57 = lean_ctor_get(x_7, 0); +lean_inc(x_57); lean_dec(x_7); -x_30 = lean_unsigned_to_nat(2u); -x_31 = lean_nat_sub(x_4, x_30); +x_58 = lean_unsigned_to_nat(2u); +x_59 = lean_nat_sub(x_4, x_58); lean_dec(x_4); -x_32 = l_Array_get_x3f___rarg(x_3, x_31); -lean_dec(x_31); +x_60 = l_Array_get_x3f___rarg(x_3, x_59); +lean_dec(x_59); lean_dec(x_3); -if (lean_obj_tag(x_32) == 0) +if (lean_obj_tag(x_60) == 0) { -lean_object* x_33; -lean_dec(x_29); -x_33 = lean_box(0); -return x_33; +lean_object* x_61; +lean_dec(x_57); +x_61 = lean_box(0); +return x_61; } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; -x_34 = lean_ctor_get(x_32, 0); -lean_inc(x_34); -if (lean_is_exclusive(x_32)) { - lean_ctor_release(x_32, 0); - x_35 = x_32; +lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; uint8_t x_66; +x_62 = lean_ctor_get(x_60, 0); +lean_inc(x_62); +if (lean_is_exclusive(x_60)) { + lean_ctor_release(x_60, 0); + x_63 = x_60; } else { - lean_dec_ref(x_32); - x_35 = lean_box(0); + lean_dec_ref(x_60); + x_63 = lean_box(0); } -lean_inc(x_34); -if (lean_is_scalar(x_35)) { - x_36 = lean_alloc_ctor(1, 1, 0); +lean_inc(x_62); +if (lean_is_scalar(x_63)) { + x_64 = lean_alloc_ctor(1, 1, 0); } else { - x_36 = x_35; -} -lean_ctor_set(x_36, 0, x_34); -x_37 = l_Std_Time_Database_TZdb_idFromPath___closed__2; -x_38 = l___private_Init_Data_Option_Basic_0__Option_decEqOption____x40_Init_Data_Option_Basic___hyg_4____at_Std_Time_Database_TZdb_idFromPath___spec__1(x_36, x_37); -lean_dec(x_36); -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_39 = l_Std_Time_Database_TZdb_idFromPath___closed__3; -x_40 = lean_string_append(x_34, x_39); -x_41 = lean_string_append(x_40, x_29); -lean_dec(x_29); -x_42 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_42, 0, x_41); -return x_42; + x_64 = x_63; +} +lean_ctor_set(x_64, 0, x_62); +x_65 = l_Std_Time_Database_TZdb_idFromPath___closed__2; +x_66 = l___private_Init_Data_Option_Basic_0__Option_decEqOption____x40_Init_Data_Option_Basic___hyg_4____at_Std_Time_Database_TZdb_idFromPath___spec__1(x_64, x_65); +lean_dec(x_64); +if (x_66 == 0) +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_67 = lean_string_utf8_byte_size(x_62); +x_68 = lean_unsigned_to_nat(0u); +x_69 = l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(x_62, x_67, x_68); +x_70 = l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(x_62, x_69, x_67); +x_71 = lean_string_utf8_extract(x_62, x_69, x_70); +lean_dec(x_70); +lean_dec(x_69); +lean_dec(x_62); +x_72 = l_Std_Time_Database_TZdb_idFromPath___closed__3; +x_73 = lean_string_append(x_71, x_72); +x_74 = lean_string_utf8_byte_size(x_57); +x_75 = l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(x_57, x_74, x_68); +x_76 = l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(x_57, x_75, x_74); +x_77 = lean_string_utf8_extract(x_57, x_75, x_76); +lean_dec(x_76); +lean_dec(x_75); +lean_dec(x_57); +x_78 = lean_string_append(x_73, x_77); +lean_dec(x_77); +x_79 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_79, 0, x_78); +return x_79; } else { -lean_object* x_43; -lean_dec(x_34); -x_43 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_43, 0, x_29); -return x_43; +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_dec(x_62); +x_80 = lean_string_utf8_byte_size(x_57); +x_81 = lean_unsigned_to_nat(0u); +x_82 = l_Substring_takeWhileAux___at_Substring_trimLeft___spec__1(x_57, x_80, x_81); +x_83 = l_Substring_takeRightWhileAux___at_Substring_trimRight___spec__1(x_57, x_82, x_80); +x_84 = lean_string_utf8_extract(x_57, x_82, x_83); +lean_dec(x_83); +lean_dec(x_82); +lean_dec(x_57); +x_85 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_85, 0, x_84); +return x_85; } } } @@ -700,18 +898,403 @@ lean_dec(x_4); return x_5; } } -LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_TZdb_inst___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9) { _start: { -lean_object* x_4; lean_object* x_5; -x_4 = lean_ctor_get(x_1, 1); -lean_inc(x_4); +uint8_t x_10; +x_10 = lean_usize_dec_lt(x_7, x_6); +if (x_10 == 0) +{ +lean_object* x_11; +lean_dec(x_4); lean_dec(x_1); -x_5 = l_Std_Time_Database_TZdb_readRulesFromDisk(x_4, x_2, x_3); -return x_5; +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_8); +lean_ctor_set(x_11, 1, x_9); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +lean_dec(x_8); +x_12 = lean_array_uget(x_5, x_7); +x_13 = l_System_FilePath_pathExists(x_12, x_9); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_unbox(x_14); +lean_dec(x_14); +if (x_15 == 0) +{ +lean_object* x_16; size_t x_17; size_t x_18; +lean_dec(x_12); +x_16 = lean_ctor_get(x_13, 1); +lean_inc(x_16); +lean_dec(x_13); +x_17 = 1; +x_18 = lean_usize_add(x_7, x_17); +lean_inc(x_4); +{ +size_t _tmp_6 = x_18; +lean_object* _tmp_7 = x_4; +lean_object* _tmp_8 = x_16; +x_7 = _tmp_6; +x_8 = _tmp_7; +x_9 = _tmp_8; +} +goto _start; +} +else +{ +uint8_t x_20; +lean_dec(x_4); +x_20 = !lean_is_exclusive(x_13); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_13, 1); +x_22 = lean_ctor_get(x_13, 0); +lean_dec(x_22); +x_23 = l_Std_Time_Database_TZdb_readRulesFromDisk(x_12, x_1, x_21); +if (lean_obj_tag(x_23) == 0) +{ +uint8_t x_24; +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_23, 0); +x_26 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_26, 0, x_25); +x_27 = lean_box(0); +lean_ctor_set(x_13, 1, x_27); +lean_ctor_set(x_13, 0, x_26); +lean_ctor_set(x_23, 0, x_13); +return x_23; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +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, 1, 0); +lean_ctor_set(x_30, 0, x_28); +x_31 = lean_box(0); +lean_ctor_set(x_13, 1, x_31); +lean_ctor_set(x_13, 0, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_13); +lean_ctor_set(x_32, 1, x_29); +return x_32; } } -LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__2(lean_object* x_1, lean_object* x_2) { +else +{ +uint8_t x_33; +lean_free_object(x_13); +x_33 = !lean_is_exclusive(x_23); +if (x_33 == 0) +{ +return x_23; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_23, 0); +x_35 = lean_ctor_get(x_23, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_23); +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 +{ +lean_object* x_37; lean_object* x_38; +x_37 = lean_ctor_get(x_13, 1); +lean_inc(x_37); +lean_dec(x_13); +x_38 = l_Std_Time_Database_TZdb_readRulesFromDisk(x_12, x_1, x_37); +if (lean_obj_tag(x_38) == 0) +{ +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; +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_38, 1); +lean_inc(x_40); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + x_41 = x_38; +} else { + lean_dec_ref(x_38); + x_41 = lean_box(0); +} +x_42 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_42, 0, x_39); +x_43 = lean_box(0); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +if (lean_is_scalar(x_41)) { + x_45 = lean_alloc_ctor(0, 2, 0); +} else { + x_45 = x_41; +} +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_40); +return x_45; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_46 = lean_ctor_get(x_38, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_38, 1); +lean_inc(x_47); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + x_48 = x_38; +} else { + lean_dec_ref(x_38); + x_48 = lean_box(0); +} +if (lean_is_scalar(x_48)) { + x_49 = lean_alloc_ctor(1, 2, 0); +} else { + x_49 = x_48; +} +lean_ctor_set(x_49, 0, x_46); +lean_ctor_set(x_49, 1, x_47); +return x_49; +} +} +} +} +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_inst___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("cannot find ", 12, 12); +return x_1; +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_inst___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked(" in the local timezone database", 31, 31); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_4 = l_Std_Time_Database_TZdb_inst___lambda__1___closed__1; +x_5 = lean_string_append(x_4, x_1); +x_6 = l_Std_Time_Database_TZdb_inst___lambda__1___closed__2; +x_7 = lean_string_append(x_5, x_6); +x_8 = lean_alloc_ctor(18, 1, 0); +lean_ctor_set(x_8, 0, x_7); +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_3); +return x_9; +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_inst___lambda__2___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = lean_box(0); +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_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__2(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; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_box(0); +x_7 = lean_array_size(x_5); +x_8 = 0; +x_9 = l_Std_Time_Database_TZdb_inst___lambda__2___closed__1; +lean_inc(x_2); +x_10 = l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_TZdb_inst___spec__1(x_2, x_5, x_6, x_9, x_5, x_7, x_8, x_9, x_4); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +lean_dec(x_11); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_10, 1); +lean_inc(x_13); +lean_dec(x_10); +x_14 = lean_box(0); +x_15 = l_Std_Time_Database_TZdb_inst___lambda__1(x_2, x_14, x_13); +lean_dec(x_2); +return x_15; +} +else +{ +uint8_t x_16; +lean_dec(x_2); +x_16 = !lean_is_exclusive(x_10); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; +x_17 = lean_ctor_get(x_10, 0); +lean_dec(x_17); +x_18 = lean_ctor_get(x_12, 0); +lean_inc(x_18); +lean_dec(x_12); +lean_ctor_set(x_10, 0, x_18); +return x_10; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_10, 1); +lean_inc(x_19); +lean_dec(x_10); +x_20 = lean_ctor_get(x_12, 0); +lean_inc(x_20); +lean_dec(x_12); +x_21 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_19); +return x_21; +} +} +} +else +{ +uint8_t x_22; +lean_dec(x_2); +x_22 = !lean_is_exclusive(x_10); +if (x_22 == 0) +{ +return x_10; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_10, 0); +x_24 = lean_ctor_get(x_10, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_10); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +return x_25; +} +} +} +} +static lean_object* _init_l_Std_Time_Database_TZdb_inst___lambda__3___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_unchecked("TZDIR", 5, 5); +return x_1; +} +} +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = l_Std_Time_Database_TZdb_inst___lambda__3___closed__1; +x_5 = lean_io_getenv(x_4, x_3); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_box(0); +x_9 = l_Std_Time_Database_TZdb_inst___lambda__2(x_1, x_2, x_8, x_7); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_5, 1); +lean_inc(x_10); +lean_dec(x_5); +x_11 = lean_ctor_get(x_6, 0); +lean_inc(x_11); +lean_dec(x_6); +x_12 = l_Std_Time_Database_TZdb_readRulesFromDisk(x_11, x_2, x_10); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +return x_12; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_12, 0); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_12); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +else +{ +uint8_t x_17; +x_17 = !lean_is_exclusive(x_12); +if (x_17 == 0) +{ +return x_12; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_12, 0); +x_19 = lean_ctor_get(x_12, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_12); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__4(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; @@ -726,7 +1309,7 @@ static lean_object* _init_l_Std_Time_Database_TZdb_inst___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Std_Time_Database_TZdb_inst___lambda__1), 3, 0); +x_1 = lean_alloc_closure((void*)(l_Std_Time_Database_TZdb_inst___lambda__3___boxed), 3, 0); return x_1; } } @@ -734,7 +1317,7 @@ static lean_object* _init_l_Std_Time_Database_TZdb_inst___closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Std_Time_Database_TZdb_inst___lambda__2), 2, 0); +x_1 = lean_alloc_closure((void*)(l_Std_Time_Database_TZdb_inst___lambda__4), 2, 0); return x_1; } } @@ -758,6 +1341,50 @@ x_1 = l_Std_Time_Database_TZdb_inst___closed__3; return x_1; } } +LEAN_EXPORT lean_object* l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_TZdb_inst___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, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +size_t x_10; size_t x_11; lean_object* x_12; +x_10 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_11 = lean_unbox_usize(x_7); +lean_dec(x_7); +x_12 = l_Array_forIn_x27Unsafe_loop___at_Std_Time_Database_TZdb_inst___spec__1(x_1, x_2, x_3, x_4, x_5, x_10, x_11, x_8, x_9); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Std_Time_Database_TZdb_inst___lambda__1(x_1, x_2, x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__2___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_Time_Database_TZdb_inst___lambda__2(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_5; +} +} +LEAN_EXPORT lean_object* l_Std_Time_Database_TZdb_inst___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Std_Time_Database_TZdb_inst___lambda__3(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} lean_object* initialize_Std_Time_DateTime(uint8_t builtin, lean_object*); lean_object* initialize_Std_Time_Zoned_TimeZone(uint8_t builtin, lean_object*); lean_object* initialize_Std_Time_Zoned_ZoneRules(uint8_t builtin, lean_object*); @@ -785,6 +1412,22 @@ l_Std_Time_Database_TZdb_default___closed__2 = _init_l_Std_Time_Database_TZdb_de lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__2); l_Std_Time_Database_TZdb_default___closed__3 = _init_l_Std_Time_Database_TZdb_default___closed__3(); lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__3); +l_Std_Time_Database_TZdb_default___closed__4 = _init_l_Std_Time_Database_TZdb_default___closed__4(); +lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__4); +l_Std_Time_Database_TZdb_default___closed__5 = _init_l_Std_Time_Database_TZdb_default___closed__5(); +lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__5); +l_Std_Time_Database_TZdb_default___closed__6 = _init_l_Std_Time_Database_TZdb_default___closed__6(); +lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__6); +l_Std_Time_Database_TZdb_default___closed__7 = _init_l_Std_Time_Database_TZdb_default___closed__7(); +lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__7); +l_Std_Time_Database_TZdb_default___closed__8 = _init_l_Std_Time_Database_TZdb_default___closed__8(); +lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__8); +l_Std_Time_Database_TZdb_default___closed__9 = _init_l_Std_Time_Database_TZdb_default___closed__9(); +lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__9); +l_Std_Time_Database_TZdb_default___closed__10 = _init_l_Std_Time_Database_TZdb_default___closed__10(); +lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__10); +l_Std_Time_Database_TZdb_default___closed__11 = _init_l_Std_Time_Database_TZdb_default___closed__11(); +lean_mark_persistent(l_Std_Time_Database_TZdb_default___closed__11); l_Std_Time_Database_TZdb_default = _init_l_Std_Time_Database_TZdb_default(); lean_mark_persistent(l_Std_Time_Database_TZdb_default); l_Std_Time_Database_TZdb_parseTZif___closed__1 = _init_l_Std_Time_Database_TZdb_parseTZif___closed__1(); @@ -793,6 +1436,8 @@ l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__1 = _init_l_Std_Time_Databa lean_mark_persistent(l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__1); l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__2 = _init_l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__2(); lean_mark_persistent(l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__2); +l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__3 = _init_l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__3(); +lean_mark_persistent(l_Std_Time_Database_TZdb_parseTZIfFromDisk___closed__3); l_Std_Time_Database_TZdb_idFromPath___closed__1 = _init_l_Std_Time_Database_TZdb_idFromPath___closed__1(); lean_mark_persistent(l_Std_Time_Database_TZdb_idFromPath___closed__1); l_Std_Time_Database_TZdb_idFromPath___closed__2 = _init_l_Std_Time_Database_TZdb_idFromPath___closed__2(); @@ -815,6 +1460,14 @@ l_Std_Time_Database_TZdb_localRules___closed__5 = _init_l_Std_Time_Database_TZdb lean_mark_persistent(l_Std_Time_Database_TZdb_localRules___closed__5); l_Std_Time_Database_TZdb_localRules___closed__6 = _init_l_Std_Time_Database_TZdb_localRules___closed__6(); lean_mark_persistent(l_Std_Time_Database_TZdb_localRules___closed__6); +l_Std_Time_Database_TZdb_inst___lambda__1___closed__1 = _init_l_Std_Time_Database_TZdb_inst___lambda__1___closed__1(); +lean_mark_persistent(l_Std_Time_Database_TZdb_inst___lambda__1___closed__1); +l_Std_Time_Database_TZdb_inst___lambda__1___closed__2 = _init_l_Std_Time_Database_TZdb_inst___lambda__1___closed__2(); +lean_mark_persistent(l_Std_Time_Database_TZdb_inst___lambda__1___closed__2); +l_Std_Time_Database_TZdb_inst___lambda__2___closed__1 = _init_l_Std_Time_Database_TZdb_inst___lambda__2___closed__1(); +lean_mark_persistent(l_Std_Time_Database_TZdb_inst___lambda__2___closed__1); +l_Std_Time_Database_TZdb_inst___lambda__3___closed__1 = _init_l_Std_Time_Database_TZdb_inst___lambda__3___closed__1(); +lean_mark_persistent(l_Std_Time_Database_TZdb_inst___lambda__3___closed__1); l_Std_Time_Database_TZdb_inst___closed__1 = _init_l_Std_Time_Database_TZdb_inst___closed__1(); lean_mark_persistent(l_Std_Time_Database_TZdb_inst___closed__1); l_Std_Time_Database_TZdb_inst___closed__2 = _init_l_Std_Time_Database_TZdb_inst___closed__2(); diff --git a/tests/lean/run/abbrev_thm.lean b/tests/lean/run/abbrev_thm.lean new file mode 100644 index 000000000000..da13cccc8142 --- /dev/null +++ b/tests/lean/run/abbrev_thm.lean @@ -0,0 +1,9 @@ +theorem foo : True := by trivial +abbrev foo' := foo + +/-- +info: theorem foo' : True := +foo +-/ +#guard_msgs in +#print foo' diff --git a/tests/pkg/builtin_attr/test.sh b/tests/pkg/builtin_attr/test.sh index b1c0671e59ce..b80250a91498 100755 --- a/tests/pkg/builtin_attr/test.sh +++ b/tests/pkg/builtin_attr/test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -rm -rf .lake/build +rm -rf .lake lake build diff --git a/tests/pkg/deriving/test.sh b/tests/pkg/deriving/test.sh index b1c0671e59ce..b80250a91498 100755 --- a/tests/pkg/deriving/test.sh +++ b/tests/pkg/deriving/test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -rm -rf .lake/build +rm -rf .lake lake build diff --git a/tests/pkg/frontend/test.sh b/tests/pkg/frontend/test.sh index a149dc148b59..fae84b09828d 100755 --- a/tests/pkg/frontend/test.sh +++ b/tests/pkg/frontend/test.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -rm -rf .lake/build +rm -rf .lake lake build # Check that we can compile a file which shares with the executable diff --git a/tests/pkg/misc/test.sh b/tests/pkg/misc/test.sh index b1c0671e59ce..b80250a91498 100755 --- a/tests/pkg/misc/test.sh +++ b/tests/pkg/misc/test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -rm -rf .lake/build +rm -rf .lake lake build diff --git a/tests/pkg/prv/test.sh b/tests/pkg/prv/test.sh index ca8fad47ea88..833dd11922a7 100755 --- a/tests/pkg/prv/test.sh +++ b/tests/pkg/prv/test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -rm -rf .lake/build +rm -rf .lake lake build 2>&1 | grep 'error: .*: field.*private' diff --git a/tests/pkg/test_extern/test.sh b/tests/pkg/test_extern/test.sh index 33b24a7bb833..8b4f9aed9814 100755 --- a/tests/pkg/test_extern/test.sh +++ b/tests/pkg/test_extern/test.sh @@ -8,7 +8,7 @@ # Ideally there would be a more principled testing framework # that took care of all this! -rm -rf .lake/build +rm -rf .lake # Function to process the output verify_output() { diff --git a/tests/pkg/user_attr/test.sh b/tests/pkg/user_attr/test.sh index b1c0671e59ce..b80250a91498 100755 --- a/tests/pkg/user_attr/test.sh +++ b/tests/pkg/user_attr/test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -rm -rf .lake/build +rm -rf .lake lake build diff --git a/tests/pkg/user_attr_app/test.sh b/tests/pkg/user_attr_app/test.sh index 06d869b00b53..a4c662231815 100755 --- a/tests/pkg/user_attr_app/test.sh +++ b/tests/pkg/user_attr_app/test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -rm -rf .lake/build +rm -rf .lake lake build && ./.lake/build/bin/user_attr diff --git a/tests/pkg/user_ext/test.sh b/tests/pkg/user_ext/test.sh index 6e13e2a7ac30..6e1b78738eb2 100755 --- a/tests/pkg/user_ext/test.sh +++ b/tests/pkg/user_ext/test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -rm -rf .lake/build +rm -rf .lake lake build -v 2>&1 | grep 'hello, test, world'