diff --git a/stage0/src/Lean/Elab/Declaration.lean b/stage0/src/Lean/Elab/Declaration.lean index 937796e0bc..1576fa3f9d 100644 --- a/stage0/src/Lean/Elab/Declaration.lean +++ b/stage0/src/Lean/Elab/Declaration.lean @@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Sebastian Ullrich -/ import Lean.Util.CollectLevelParams +import Lean.Elab.DeclUtil import Lean.Elab.Definition import Lean.Elab.Inductive import Lean.Elab.Structure @@ -12,22 +13,6 @@ namespace Lean namespace Elab namespace Command -def expandOptDeclSig (stx : Syntax) : Syntax × Option Syntax := --- many Term.bracketedBinder >> Term.optType -let binders := stx.getArg 0; -let optType := stx.getArg 1; -- optional (parser! " : " >> termParser) -if optType.isNone then - (binders, none) -else - let typeSpec := optType.getArg 0; - (binders, some $ typeSpec.getArg 1) - -def expandDeclSig (stx : Syntax) : Syntax × Syntax := --- many Term.bracketedBinder >> Term.typeSpec -let binders := stx.getArg 0; -let typeSpec := stx.getArg 1; -(binders, typeSpec.getArg 1) - def elabAbbrev (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := -- parser! "abbrev " >> declId >> optDeclSig >> declVal let (binders, type) := expandOptDeclSig (stx.getArg 2); @@ -121,26 +106,6 @@ withDeclId declId $ fun name => do applyAttributes stx declName modifiers.attrs AttributeApplicationTime.afterTypeChecking; applyAttributes stx declName modifiers.attrs AttributeApplicationTime.afterCompilation -private def checkValidInductiveModifier (ref : Syntax) (modifiers : Modifiers) : CommandElabM Unit := do -when modifiers.isNoncomputable $ - throwError ref "invalid use of 'noncomputable' in inductive declaration"; -when modifiers.isPartial $ - throwError ref "invalid use of 'partial' in inductive declaration"; -unless (modifiers.attrs.size == 0 || (modifiers.attrs.size == 1 && (modifiers.attrs.get! 0).name == `class)) $ - throwError ref "invalid use of attributes in inductive declaration"; -pure () - -private def checkValidCtorModifier (ref : Syntax) (modifiers : Modifiers) : CommandElabM Unit := do -when modifiers.isNoncomputable $ - throwError ref "invalid use of 'noncomputable' in constructor declaration"; -when modifiers.isPartial $ - throwError ref "invalid use of 'partial' in constructor declaration"; -when modifiers.isUnsafe $ - throwError ref "invalid use of 'unsafe' in constructor declaration"; -when (modifiers.attrs.size != 0) $ - throwError ref "invalid use of attributes in constructor declaration"; -pure () - /- parser! "inductive " >> declId >> optDeclSig >> many ctor parser! try ("class " >> "inductive ") >> declId >> optDeclSig >> many ctor @@ -185,12 +150,12 @@ inductiveSyntaxToView modifiers decl 2 def elabInductive (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := do v ← inductiveSyntaxToView modifiers stx; -elabInductiveCore #[v] +elabInductiveViews #[v] def elabClassInductive (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := do let modifiers := modifiers.addAttribute { name := `class }; v ← classInductiveSyntaxToView modifiers stx; -elabInductiveCore #[v] +elabInductiveViews #[v] @[builtinCommandElab declaration] def elabDeclaration : CommandElab := @@ -233,7 +198,7 @@ views ← elems.mapM $ fun stx => do { modifiers ← elabModifiers (stx.getArg 0); inductiveSyntaxToView modifiers (stx.getArg 1) }; -elabInductiveCore views +elabInductiveViews views private def isMutualPreambleCommand (stx : Syntax) : Bool := let k := stx.getKind; diff --git a/stage0/src/Lean/Elab/Inductive.lean b/stage0/src/Lean/Elab/Inductive.lean index 4961909d12..b0eec274f2 100644 --- a/stage0/src/Lean/Elab/Inductive.lean +++ b/stage0/src/Lean/Elab/Inductive.lean @@ -15,6 +15,27 @@ namespace Lean namespace Elab namespace Command +def checkValidInductiveModifier (ref : Syntax) (modifiers : Modifiers) : CommandElabM Unit := do +when modifiers.isNoncomputable $ + throwError ref "invalid use of 'noncomputable' in inductive declaration"; +when modifiers.isPartial $ + throwError ref "invalid use of 'partial' in inductive declaration"; +unless (modifiers.attrs.size == 0 || (modifiers.attrs.size == 1 && (modifiers.attrs.get! 0).name == `class)) $ + throwError ref "invalid use of attributes in inductive declaration"; +pure () + +def checkValidCtorModifier (ref : Syntax) (modifiers : Modifiers) : CommandElabM Unit := do +when modifiers.isNoncomputable $ + throwError ref "invalid use of 'noncomputable' in constructor declaration"; +when modifiers.isPartial $ + throwError ref "invalid use of 'partial' in constructor declaration"; +when modifiers.isUnsafe $ + throwError ref "invalid use of 'unsafe' in constructor declaration"; +when (modifiers.attrs.size != 0) $ + throwError ref "invalid use of attributes in constructor declaration"; +pure () + + structure CtorView := (ref : Syntax) (modifiers : Modifiers) @@ -464,7 +485,7 @@ views.forM fun view => do { pure () } -def elabInductiveCore (views : Array InductiveView) : CommandElabM Unit := do +def elabInductiveViews (views : Array InductiveView) : CommandElabM Unit := do let view0 := views.get! 0; let ref := view0.ref; decl ← runTermElabM view0.declName $ fun vars => mkInductiveDecl vars views; diff --git a/stage0/src/Lean/Elab/Structure.lean b/stage0/src/Lean/Elab/Structure.lean index 7d7b169f3a..99986a0863 100644 --- a/stage0/src/Lean/Elab/Structure.lean +++ b/stage0/src/Lean/Elab/Structure.lean @@ -5,26 +5,178 @@ Authors: Leonardo de Moura -/ import Lean.Elab.Command import Lean.Elab.DeclModifiers +import Lean.Elab.DeclUtil +import Lean.Elab.Inductive namespace Lean namespace Elab namespace Command -namespace Structure -inductive FieldKind -| newField | fromParent | subobject +/- Recall that the `structure command syntax is +``` +parser! (structureTk <|> classTk) >> declId >> many Term.bracketedBinder >> optional «extends» >> Term.optType >> " := " >> optional structCtor >> structFields +``` +-/ -structure FieldDecl := -(fvar : Expr) -(defaultVal? : Option Expr) -(hasNewDefault : Bool) -- if true, (re-)declare default value in this structure -(kind : FieldKind) -(inferMod : Bool) +structure StructCtorView := +(ref : Syntax) +(modifiers : Modifiers) +(inferMod : Bool) -- true if `{}` is used in the constructor declaration +(name : Name) +(declName : Name) -end Structure +structure StructFieldView := +(ref : Syntax) +(modifiers : Modifiers) +(binderInfo : BinderInfo) +(inferMod : Bool) +(declName : Name) +(name : Name) +(binders : Syntax) +(type : Syntax) +(value? : Option Syntax) -def elabStructure (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := -pure () -- TODO +structure StructView := +(ref : Syntax) +(modifiers : Modifiers) +(scopeLevelNames : List Name) -- All `universe` declarations in the current scope +(allUserLevelNames : List Name) -- `scopeLevelNames` ++ explicit universe parameters provided in the `structure` command +(declName : Name) +(scopeVars : Array Expr) -- All `variable` declaration in the current scope +(params : Array Expr) -- Explicit parameters provided in the `structure` command +(parents : Array Syntax) +(ctor : StructCtorView) +(fields : Array StructFieldView) + +structure ElabStructResult := +(decl : Declaration) + +private def defaultCtorName := `mk + +/- +The structore constructor syntax is +``` +parser! try (declModifiers >> ident >> optional inferMod >> " :: ") +``` +-/ +private def expandCtor (structStx : Syntax) (structDeclName : Name) : CommandElabM StructCtorView := +let optCtor := structStx.getArg 6; +if optCtor.isNone then + pure { ref := structStx, modifiers := {}, inferMod := false, name := defaultCtorName, declName := structDeclName ++ defaultCtorName } +else do + let ctor := optCtor.getArg 0; + modifiers ← elabModifiers (ctor.getArg 0); + checkValidCtorModifier ctor modifiers; + let inferMod := !(ctor.getArg 2).isNone; + let name := ctor.getIdAt 1; + let declName := structDeclName ++ name; + declName ← applyVisibility ctor modifiers.visibility declName; + pure { ref := ctor, name := name, modifiers := modifiers, inferMod := inferMod, declName := declName } + +def checkValidFieldModifier (ref : Syntax) (modifiers : Modifiers) : CommandElabM Unit := do +when modifiers.isNoncomputable $ + throwError ref "invalid use of 'noncomputable' in field declaration"; +when modifiers.isPartial $ + throwError ref "invalid use of 'partial' in field declaration"; +when modifiers.isUnsafe $ + throwError ref "invalid use of 'unsafe' in field declaration"; +when (modifiers.attrs.size != 0) $ + throwError ref "invalid use of attributes in field declaration"; +pure () + +/- +``` +def structExplicitBinder := parser! try (declModifiers >> "(") >> many1 ident >> optional inferMod >> declSig >> optional Term.binderDefault >> ")" +def structImplicitBinder := parser! try (declModifiers >> "{") >> many1 ident >> optional inferMod >> declSig >> "}" +def structInstBinder := parser! try (declModifiers >> "[") >> many1 ident >> optional inferMod >> declSig >> "]" +def structFields := parser! many (structExplicitBinder <|> structImplicitBinder <|> structInstBinder) +``` +-/ +private def expandFields (structStx : Syntax) (structDeclName : Name) : CommandElabM (Array StructFieldView) := +let fieldBinders := (structStx.getArg 7).getArgs; +fieldBinders.foldlM + (fun (views : Array StructFieldView) fieldBinder => do + let k := fieldBinder.getKind; + binfo ← + if k == `Lean.Parser.Command.structExplicitBinder then pure BinderInfo.default + else if k == `Lean.Parser.Command.structImplicitBinder then pure BinderInfo.implicit + else if k == `Lean.Parser.Command.structInstBinder then pure BinderInfo.instImplicit + else throwError fieldBinder "unexpected kind of structure field"; + modifiers ← elabModifiers (fieldBinder.getArg 0); + checkValidFieldModifier fieldBinder modifiers; + let inferMod := !(fieldBinder.getArg 3).isNone; + let (binders, type) := expandDeclSig (fieldBinder.getArg 4); + let value? := + if binfo != BinderInfo.default then none + else + let optBinderDefault := fieldBinder.getArg 5; + if optBinderDefault.isNone then none + else + -- binderDefault := parser! " := " >> termParser + some $ (optBinderDefault.getArg 0).getArg 1; + let idents := (fieldBinder.getArg 2).getArgs; + idents.foldlM + (fun (views : Array StructFieldView) ident => do + let name := ident.getId; + let declName := structDeclName ++ name; + declName ← applyVisibility ident modifiers.visibility declName; + pure $ views.push { + ref := fieldBinder, + modifiers := modifiers, + binderInfo := binfo, + inferMod := inferMod, + declName := declName, + name := name, + binders := binders, + type := type, + value? := value? }) + views) + #[] + +private def elabStructureView (view : StructView) : TermElabM ElabStructResult := +throw $ arbitrary _ -- TODO + +/- +parser! (structureTk <|> classTk) >> declId >> many Term.bracketedBinder >> optional «extends» >> Term.optType >> " := " >> optional structCtor >> structFields + +where +def «extends» := parser! " extends " >> sepBy1 termParser ", " +def typeSpec := parser! " : " >> termParser +def optType : Parser := optional typeSpec + +def structFields := parser! many (structExplicitBinder <|> structImplicitBinder <|> structInstBinder) +def structCtor := parser! try (declModifiers >> ident >> optional inferMod >> " :: ") + +-/ +def elabStructure (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := do +checkValidInductiveModifier stx modifiers; +let isClass := (stx.getArg 0).getKind == `Lean.Parser.Command.classTk; +let modifiers := if isClass then modifiers.addAttribute { name := `class } else modifiers; +let declId := stx.getArg 1; +let params := (stx.getArg 2).getArgs; +let exts := stx.getArg 3; +let parents := if exts.isNone then #[] else (exts.getArg 1).getArgs.getSepElems; +let optType := stx.getArg 4; +type ← if optType.isNone then `(Type _) else pure $ (optType.getArg 0).getArg 1; +scopeLevelNames ← getLevelNames; +withDeclId declId $ fun name => do + declName ← mkDeclName declId modifiers name; + allUserLevelNames ← getLevelNames; + ctor ← expandCtor stx declName; + fields ← expandFields stx declName; + r ← runTermElabM declName $ fun scopeVars => Term.elabBinders params $ fun params => elabStructureView { + ref := stx, + modifiers := modifiers, + scopeLevelNames := scopeLevelNames, + allUserLevelNames := allUserLevelNames, + declName := declName, + scopeVars := scopeVars, + params := params, + parents := parents, + ctor := ctor, + fields := fields + }; + pure () -- TODO end Command end Elab diff --git a/stage0/src/Lean/Parser/Command.lean b/stage0/src/Lean/Parser/Command.lean index bdd2e5d556..966c386db4 100644 --- a/stage0/src/Lean/Parser/Command.lean +++ b/stage0/src/Lean/Parser/Command.lean @@ -57,9 +57,9 @@ def inferMod := parser! try ("{" >> "}") def ctor := parser! " | " >> declModifiers >> ident >> optional inferMod >> optDeclSig def «inductive» := parser! "inductive " >> declId >> optDeclSig >> many ctor def classInductive := parser! try ("class " >> "inductive ") >> declId >> optDeclSig >> many ctor -def structExplicitBinder := parser! try (declModifiers >> "(") >> many ident >> optional inferMod >> optDeclSig >> optional Term.binderDefault >> ")" -def structImplicitBinder := parser! try (declModifiers >> "{") >> many ident >> optional inferMod >> optDeclSig >> "}" -def structInstBinder := parser! try (declModifiers >> "[") >> declModifiers >> many ident >> optional inferMod >> optDeclSig >> "]" +def structExplicitBinder := parser! try (declModifiers >> "(") >> many1 ident >> optional inferMod >> declSig >> optional Term.binderDefault >> ")" +def structImplicitBinder := parser! try (declModifiers >> "{") >> many1 ident >> optional inferMod >> declSig >> "}" +def structInstBinder := parser! try (declModifiers >> "[") >> many1 ident >> optional inferMod >> declSig >> "]" def structFields := parser! many (structExplicitBinder <|> structImplicitBinder <|> structInstBinder) def structCtor := parser! try (declModifiers >> ident >> optional inferMod >> " :: ") def structureTk := parser! "structure " diff --git a/stage0/src/frontends/lean/structure_cmd.cpp b/stage0/src/frontends/lean/structure_cmd.cpp index 61d1566594..81d8fd73b3 100644 --- a/stage0/src/frontends/lean/structure_cmd.cpp +++ b/stage0/src/frontends/lean/structure_cmd.cpp @@ -248,7 +248,6 @@ struct structure_cmd_fn { expr m_type; buffer> m_parent_refs; buffer m_parents; - buffer m_private_parents; name m_mk; name m_mk_short; name m_private_prefix; @@ -256,7 +255,6 @@ struct structure_cmd_fn { implicit_infer_kind m_mk_infer; buffer m_fields; std::vector m_renames; - std::vector m_field_maps; bool m_explicit_universe_params; bool m_infer_result_universe; bool m_inductive_predicate; @@ -348,16 +346,13 @@ struct structure_cmd_fn { m_p.next(); while (true) { auto pos = m_p.pos(); - bool is_private_parent = false; if (m_p.curr_is_token(get_private_tk())) { - m_p.next(); - is_private_parent = true; + throw parser_error("invalid 'structure' extends, private parent structures are not supported", pos); } pair, expr> qparent = m_p.parse_qualified_expr(); m_parent_refs.push_back(qparent.first); expr const & parent = qparent.second; m_parents.push_back(parent); - m_private_parents.push_back(is_private_parent); name const & parent_name = check_parent(parent); auto parent_info = get_parent_info(parent_name); unsigned nparams = std::get<1>(parent_info); @@ -550,16 +545,13 @@ struct structure_cmd_fn { }); } - /** \brief Process extends clauses. - This method also populates the vector m_field_maps and m_fields. */ + /** \brief Process extends clauses. */ void process_extends() { lean_assert(m_fields.size() == m_parents.size()); - lean_assert(m_field_maps.empty()); for (unsigned i = 0; i < m_parents.size(); i++) { expr const & parent = m_parents[i]; name const & parent_name = check_parent(parent); - m_field_maps.push_back(field_map()); buffer args; expr parent_fn = get_app_args(parent, args); @@ -608,7 +600,6 @@ struct structure_cmd_fn { m_fields.emplace_back(subfield, some_expr(proj), field_kind::from_parent); } } - lean_assert(m_parents.size() == m_field_maps.size()); } void instantiate_mvars() { @@ -1059,7 +1050,6 @@ struct structure_cmd_fn { } void declare_coercions() { - lean_assert(m_parents.size() == m_field_maps.size()); buffer coercion_names; mk_coercion_names(coercion_names); names lnames = names(m_level_names); @@ -1070,11 +1060,10 @@ struct structure_cmd_fn { expr const & parent_fn = get_app_args(parent, parent_params); name const & parent_name = const_name(parent_fn); - if (!m_private_parents[i]) { - if (m_meta_info.m_attrs.has_class() && is_class(m_env, parent_name)) { - // if both are classes, then we also mark coercion_name as an instance - m_env = add_instance(m_env, m_name + m_fields[i].get_name(), true); - } + + if (m_meta_info.m_attrs.has_class() && is_class(m_env, parent_name)) { + // if both are classes, then we also mark coercion_name as an instance + m_env = add_instance(m_env, m_name + m_fields[i].get_name(), true); } } } @@ -1178,7 +1167,6 @@ struct structure_cmd_fn { m_parent_refs.push_back(qparent.first); expr const & parent = qparent.second;*/ m_parents.push_back(parent); - // m_private_parents.push_back(is_private_parent); name const & parent_name = check_parent(parent); auto parent_info = get_parent_info(parent_name); unsigned nparams = std::get<1>(parent_info); diff --git a/stage0/stdlib/CMakeLists.txt b/stage0/stdlib/CMakeLists.txt index 38ed88100c..4c16af9542 100644 --- a/stage0/stdlib/CMakeLists.txt +++ b/stage0/stdlib/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT ./Init.c ./Init/Coe.c ./Init/Control.c ./Init/Control/Alternative.c ./Init/Control/Applicative.c ./Init/Control/Conditional.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Functor.c ./Init/Control/Id.c ./Init/Control/Lift.c ./Init/Control/Monad.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Core.c ./Init/Data.c ./Init/Data/Array.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/QSort.c ./Init/Data/Basic.c ./Init/Data/ByteArray.c ./Init/Data/ByteArray/Basic.c ./Init/Data/Char.c ./Init/Data/Char/Basic.c ./Init/Data/Fin.c ./Init/Data/Fin/Basic.c ./Init/Data/Float.c ./Init/Data/FloatArray.c ./Init/Data/FloatArray/Basic.c ./Init/Data/Hashable.c ./Init/Data/Int.c ./Init/Data/Int/Basic.c ./Init/Data/List.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Control.c ./Init/Data/List/Instances.c ./Init/Data/Nat.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Control.c ./Init/Data/Nat/Div.c ./Init/Data/Option.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Instances.c ./Init/Data/Random.c ./Init/Data/Repr.c ./Init/Data/String.c ./Init/Data/String/Basic.c ./Init/Data/String/Extra.c ./Init/Data/ToString.c ./Init/Data/UInt.c ./Init/Fix.c ./Init/HasCoe.c ./Init/LeanInit.c ./Init/System.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/IOError.c ./Init/System/Platform.c ./Init/Util.c ./Init/WF.c ./Lean.c ./Lean/Attributes.c ./Lean/AuxRecursor.c ./Lean/Class.c ./Lean/Compiler.c ./Lean/Compiler/ClosedTermCache.c ./Lean/Compiler/ConstFolding.c ./Lean/Compiler/ExportAttr.c ./Lean/Compiler/ExternAttr.c ./Lean/Compiler/IR.c ./Lean/Compiler/IR/Basic.c ./Lean/Compiler/IR/Borrow.c ./Lean/Compiler/IR/Boxing.c ./Lean/Compiler/IR/Checker.c ./Lean/Compiler/IR/CompilerM.c ./Lean/Compiler/IR/CtorLayout.c ./Lean/Compiler/IR/ElimDeadBranches.c ./Lean/Compiler/IR/ElimDeadVars.c ./Lean/Compiler/IR/EmitC.c ./Lean/Compiler/IR/EmitUtil.c ./Lean/Compiler/IR/ExpandResetReuse.c ./Lean/Compiler/IR/Format.c ./Lean/Compiler/IR/FreeVars.c ./Lean/Compiler/IR/LiveVars.c ./Lean/Compiler/IR/NormIds.c ./Lean/Compiler/IR/PushProj.c ./Lean/Compiler/IR/RC.c ./Lean/Compiler/IR/ResetReuse.c ./Lean/Compiler/IR/SimpCase.c ./Lean/Compiler/IR/UnboxResult.c ./Lean/Compiler/ImplementedByAttr.c ./Lean/Compiler/InitAttr.c ./Lean/Compiler/InlineAttrs.c ./Lean/Compiler/NameMangling.c ./Lean/Compiler/NeverExtractAttr.c ./Lean/Compiler/Specialize.c ./Lean/Compiler/Util.c ./Lean/Data/Format.c ./Lean/Data/Json.c ./Lean/Data/Json/Basic.c ./Lean/Data/Json/FromToJson.c ./Lean/Data/Json/Parser.c ./Lean/Data/Json/Printer.c ./Lean/Data/KVMap.c ./Lean/Data/LBool.c ./Lean/Data/LOption.c ./Lean/Data/Name.c ./Lean/Data/Occurrences.c ./Lean/Data/Options.c ./Lean/Data/Position.c ./Lean/Data/SMap.c ./Lean/Data/Trie.c ./Lean/Declaration.c ./Lean/Delaborator.c ./Lean/Elab.c ./Lean/Elab/Alias.c ./Lean/Elab/App.c ./Lean/Elab/Binders.c ./Lean/Elab/BuiltinNotation.c ./Lean/Elab/CollectFVars.c ./Lean/Elab/Command.c ./Lean/Elab/DeclModifiers.c ./Lean/Elab/Declaration.c ./Lean/Elab/Definition.c ./Lean/Elab/DoNotation.c ./Lean/Elab/Exception.c ./Lean/Elab/Frontend.c ./Lean/Elab/Import.c ./Lean/Elab/Inductive.c ./Lean/Elab/Level.c ./Lean/Elab/Log.c ./Lean/Elab/Match.c ./Lean/Elab/Quotation.c ./Lean/Elab/ResolveName.c ./Lean/Elab/StrategyAttrs.c ./Lean/Elab/StructInst.c ./Lean/Elab/Structure.c ./Lean/Elab/Syntax.c ./Lean/Elab/SyntheticMVars.c ./Lean/Elab/Tactic.c ./Lean/Elab/Tactic/Basic.c ./Lean/Elab/Tactic/ElabTerm.c ./Lean/Elab/Tactic/Generalize.c ./Lean/Elab/Tactic/Induction.c ./Lean/Elab/Tactic/Injection.c ./Lean/Elab/Term.c ./Lean/Elab/Util.c ./Lean/Environment.c ./Lean/EqnCompiler.c ./Lean/EqnCompiler/MatchPattern.c ./Lean/Eval.c ./Lean/Expr.c ./Lean/HeadIndex.c ./Lean/Hygiene.c ./Lean/KeyedDeclsAttribute.c ./Lean/Level.c ./Lean/Linter.c ./Lean/LocalContext.c ./Lean/Message.c ./Lean/Meta.c ./Lean/Meta/AbstractMVars.c ./Lean/Meta/AppBuilder.c ./Lean/Meta/Basic.c ./Lean/Meta/Check.c ./Lean/Meta/DiscrTree.c ./Lean/Meta/DiscrTreeTypes.c ./Lean/Meta/Exception.c ./Lean/Meta/ExprDefEq.c ./Lean/Meta/FunInfo.c ./Lean/Meta/GeneralizeTelescope.c ./Lean/Meta/InferType.c ./Lean/Meta/Instances.c ./Lean/Meta/KAbstract.c ./Lean/Meta/LevelDefEq.c ./Lean/Meta/Message.c ./Lean/Meta/Offset.c ./Lean/Meta/RecursorInfo.c ./Lean/Meta/Reduce.c ./Lean/Meta/SynthInstance.c ./Lean/Meta/Tactic.c ./Lean/Meta/Tactic/Apply.c ./Lean/Meta/Tactic/Assert.c ./Lean/Meta/Tactic/Assumption.c ./Lean/Meta/Tactic/Cases.c ./Lean/Meta/Tactic/Clear.c ./Lean/Meta/Tactic/FVarSubst.c ./Lean/Meta/Tactic/Generalize.c ./Lean/Meta/Tactic/Induction.c ./Lean/Meta/Tactic/Injection.c ./Lean/Meta/Tactic/Intro.c ./Lean/Meta/Tactic/LocalDecl.c ./Lean/Meta/Tactic/Revert.c ./Lean/Meta/Tactic/Rewrite.c ./Lean/Meta/Tactic/Subst.c ./Lean/Meta/Tactic/Target.c ./Lean/Meta/Tactic/Util.c ./Lean/Meta/WHNF.c ./Lean/MetavarContext.c ./Lean/Modifiers.c ./Lean/Parser.c ./Lean/Parser/Command.c ./Lean/Parser/Level.c ./Lean/Parser/Module.c ./Lean/Parser/Parser.c ./Lean/Parser/Syntax.c ./Lean/Parser/Tactic.c ./Lean/Parser/Term.c ./Lean/Parser/Transform.c ./Lean/PrettyPrinter.c ./Lean/PrettyPrinter/Parenthesizer.c ./Lean/ProjFns.c ./Lean/ReducibilityAttrs.c ./Lean/Runtime.c ./Lean/Scopes.c ./Lean/Structure.c ./Lean/Syntax.c ./Lean/ToExpr.c ./Lean/Util.c ./Lean/Util/Closure.c ./Lean/Util/CollectFVars.c ./Lean/Util/CollectLevelParams.c ./Lean/Util/CollectMVars.c ./Lean/Util/Constructions.c ./Lean/Util/FindExpr.c ./Lean/Util/FindMVar.c ./Lean/Util/FoldConsts.c ./Lean/Util/MonadCache.c ./Lean/Util/PPExt.c ./Lean/Util/PPGoal.c ./Lean/Util/Path.c ./Lean/Util/Profile.c ./Lean/Util/RecDepth.c ./Lean/Util/Recognizers.c ./Lean/Util/ReplaceExpr.c ./Lean/Util/ReplaceLevel.c ./Lean/Util/Sorry.c ./Lean/Util/Trace.c ./Lean/Util/WHNF.c ./Std.c ./Std/Data.c ./Std/Data/AssocList.c ./Std/Data/BinomialHeap.c ./Std/Data/DList.c ./Std/Data/HashMap.c ./Std/Data/HashSet.c ./Std/Data/PersistentArray.c ./Std/Data/PersistentHashMap.c ./Std/Data/PersistentHashSet.c ./Std/Data/Queue.c ./Std/Data/RBMap.c ./Std/Data/RBTree.c ./Std/Data/Stack.c ./Std/ShareCommon.c ) +add_library (stage0 OBJECT ./Init.c ./Init/Coe.c ./Init/Control.c ./Init/Control/Alternative.c ./Init/Control/Applicative.c ./Init/Control/Conditional.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Functor.c ./Init/Control/Id.c ./Init/Control/Lift.c ./Init/Control/Monad.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Core.c ./Init/Data.c ./Init/Data/Array.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/QSort.c ./Init/Data/Basic.c ./Init/Data/ByteArray.c ./Init/Data/ByteArray/Basic.c ./Init/Data/Char.c ./Init/Data/Char/Basic.c ./Init/Data/Fin.c ./Init/Data/Fin/Basic.c ./Init/Data/Float.c ./Init/Data/FloatArray.c ./Init/Data/FloatArray/Basic.c ./Init/Data/Hashable.c ./Init/Data/Int.c ./Init/Data/Int/Basic.c ./Init/Data/List.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Control.c ./Init/Data/List/Instances.c ./Init/Data/Nat.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Control.c ./Init/Data/Nat/Div.c ./Init/Data/Option.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Instances.c ./Init/Data/Random.c ./Init/Data/Repr.c ./Init/Data/String.c ./Init/Data/String/Basic.c ./Init/Data/String/Extra.c ./Init/Data/ToString.c ./Init/Data/UInt.c ./Init/Fix.c ./Init/HasCoe.c ./Init/LeanInit.c ./Init/System.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/IOError.c ./Init/System/Platform.c ./Init/Util.c ./Init/WF.c ./Lean.c ./Lean/Attributes.c ./Lean/AuxRecursor.c ./Lean/Class.c ./Lean/Compiler.c ./Lean/Compiler/ClosedTermCache.c ./Lean/Compiler/ConstFolding.c ./Lean/Compiler/ExportAttr.c ./Lean/Compiler/ExternAttr.c ./Lean/Compiler/IR.c ./Lean/Compiler/IR/Basic.c ./Lean/Compiler/IR/Borrow.c ./Lean/Compiler/IR/Boxing.c ./Lean/Compiler/IR/Checker.c ./Lean/Compiler/IR/CompilerM.c ./Lean/Compiler/IR/CtorLayout.c ./Lean/Compiler/IR/ElimDeadBranches.c ./Lean/Compiler/IR/ElimDeadVars.c ./Lean/Compiler/IR/EmitC.c ./Lean/Compiler/IR/EmitUtil.c ./Lean/Compiler/IR/ExpandResetReuse.c ./Lean/Compiler/IR/Format.c ./Lean/Compiler/IR/FreeVars.c ./Lean/Compiler/IR/LiveVars.c ./Lean/Compiler/IR/NormIds.c ./Lean/Compiler/IR/PushProj.c ./Lean/Compiler/IR/RC.c ./Lean/Compiler/IR/ResetReuse.c ./Lean/Compiler/IR/SimpCase.c ./Lean/Compiler/IR/UnboxResult.c ./Lean/Compiler/ImplementedByAttr.c ./Lean/Compiler/InitAttr.c ./Lean/Compiler/InlineAttrs.c ./Lean/Compiler/NameMangling.c ./Lean/Compiler/NeverExtractAttr.c ./Lean/Compiler/Specialize.c ./Lean/Compiler/Util.c ./Lean/Data/Format.c ./Lean/Data/Json.c ./Lean/Data/Json/Basic.c ./Lean/Data/Json/FromToJson.c ./Lean/Data/Json/Parser.c ./Lean/Data/Json/Printer.c ./Lean/Data/KVMap.c ./Lean/Data/LBool.c ./Lean/Data/LOption.c ./Lean/Data/Name.c ./Lean/Data/Occurrences.c ./Lean/Data/Options.c ./Lean/Data/Position.c ./Lean/Data/SMap.c ./Lean/Data/Trie.c ./Lean/Declaration.c ./Lean/Delaborator.c ./Lean/Elab.c ./Lean/Elab/Alias.c ./Lean/Elab/App.c ./Lean/Elab/Binders.c ./Lean/Elab/BuiltinNotation.c ./Lean/Elab/CollectFVars.c ./Lean/Elab/Command.c ./Lean/Elab/DeclModifiers.c ./Lean/Elab/DeclUtil.c ./Lean/Elab/Declaration.c ./Lean/Elab/Definition.c ./Lean/Elab/DoNotation.c ./Lean/Elab/Exception.c ./Lean/Elab/Frontend.c ./Lean/Elab/Import.c ./Lean/Elab/Inductive.c ./Lean/Elab/Level.c ./Lean/Elab/Log.c ./Lean/Elab/Match.c ./Lean/Elab/Quotation.c ./Lean/Elab/ResolveName.c ./Lean/Elab/StrategyAttrs.c ./Lean/Elab/StructInst.c ./Lean/Elab/Structure.c ./Lean/Elab/Syntax.c ./Lean/Elab/SyntheticMVars.c ./Lean/Elab/Tactic.c ./Lean/Elab/Tactic/Basic.c ./Lean/Elab/Tactic/ElabTerm.c ./Lean/Elab/Tactic/Generalize.c ./Lean/Elab/Tactic/Induction.c ./Lean/Elab/Tactic/Injection.c ./Lean/Elab/Term.c ./Lean/Elab/Util.c ./Lean/Environment.c ./Lean/EqnCompiler.c ./Lean/EqnCompiler/MatchPattern.c ./Lean/Eval.c ./Lean/Expr.c ./Lean/HeadIndex.c ./Lean/Hygiene.c ./Lean/KeyedDeclsAttribute.c ./Lean/Level.c ./Lean/Linter.c ./Lean/LocalContext.c ./Lean/Message.c ./Lean/Meta.c ./Lean/Meta/AbstractMVars.c ./Lean/Meta/AppBuilder.c ./Lean/Meta/Basic.c ./Lean/Meta/Check.c ./Lean/Meta/DiscrTree.c ./Lean/Meta/DiscrTreeTypes.c ./Lean/Meta/Exception.c ./Lean/Meta/ExprDefEq.c ./Lean/Meta/FunInfo.c ./Lean/Meta/GeneralizeTelescope.c ./Lean/Meta/InferType.c ./Lean/Meta/Instances.c ./Lean/Meta/KAbstract.c ./Lean/Meta/LevelDefEq.c ./Lean/Meta/Message.c ./Lean/Meta/Offset.c ./Lean/Meta/RecursorInfo.c ./Lean/Meta/Reduce.c ./Lean/Meta/SynthInstance.c ./Lean/Meta/Tactic.c ./Lean/Meta/Tactic/Apply.c ./Lean/Meta/Tactic/Assert.c ./Lean/Meta/Tactic/Assumption.c ./Lean/Meta/Tactic/Cases.c ./Lean/Meta/Tactic/Clear.c ./Lean/Meta/Tactic/FVarSubst.c ./Lean/Meta/Tactic/Generalize.c ./Lean/Meta/Tactic/Induction.c ./Lean/Meta/Tactic/Injection.c ./Lean/Meta/Tactic/Intro.c ./Lean/Meta/Tactic/LocalDecl.c ./Lean/Meta/Tactic/Revert.c ./Lean/Meta/Tactic/Rewrite.c ./Lean/Meta/Tactic/Subst.c ./Lean/Meta/Tactic/Target.c ./Lean/Meta/Tactic/Util.c ./Lean/Meta/WHNF.c ./Lean/MetavarContext.c ./Lean/Modifiers.c ./Lean/Parser.c ./Lean/Parser/Command.c ./Lean/Parser/Level.c ./Lean/Parser/Module.c ./Lean/Parser/Parser.c ./Lean/Parser/Syntax.c ./Lean/Parser/Tactic.c ./Lean/Parser/Term.c ./Lean/Parser/Transform.c ./Lean/PrettyPrinter.c ./Lean/PrettyPrinter/Parenthesizer.c ./Lean/ProjFns.c ./Lean/ReducibilityAttrs.c ./Lean/Runtime.c ./Lean/Scopes.c ./Lean/Structure.c ./Lean/Syntax.c ./Lean/ToExpr.c ./Lean/Util.c ./Lean/Util/Closure.c ./Lean/Util/CollectFVars.c ./Lean/Util/CollectLevelParams.c ./Lean/Util/CollectMVars.c ./Lean/Util/Constructions.c ./Lean/Util/FindExpr.c ./Lean/Util/FindMVar.c ./Lean/Util/FoldConsts.c ./Lean/Util/MonadCache.c ./Lean/Util/PPExt.c ./Lean/Util/PPGoal.c ./Lean/Util/Path.c ./Lean/Util/Profile.c ./Lean/Util/RecDepth.c ./Lean/Util/Recognizers.c ./Lean/Util/ReplaceExpr.c ./Lean/Util/ReplaceLevel.c ./Lean/Util/Sorry.c ./Lean/Util/Trace.c ./Lean/Util/WHNF.c ./Std.c ./Std/Data.c ./Std/Data/AssocList.c ./Std/Data/BinomialHeap.c ./Std/Data/DList.c ./Std/Data/HashMap.c ./Std/Data/HashSet.c ./Std/Data/PersistentArray.c ./Std/Data/PersistentHashMap.c ./Std/Data/PersistentHashSet.c ./Std/Data/Queue.c ./Std/Data/RBMap.c ./Std/Data/RBTree.c ./Std/Data/Stack.c ./Std/ShareCommon.c ) diff --git a/stage0/stdlib/Lean/Elab/DeclUtil.c b/stage0/stdlib/Lean/Elab/DeclUtil.c new file mode 100644 index 0000000000..0de11be5cc --- /dev/null +++ b/stage0/stdlib/Lean/Elab/DeclUtil.c @@ -0,0 +1,104 @@ +// Lean compiler output +// Module: Lean.Elab.DeclUtil +// Imports: Init +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* l_Lean_Elab_expandOptDeclSig(lean_object*); +lean_object* l_Lean_Elab_expandOptDeclSig___boxed(lean_object*); +lean_object* l_Lean_Elab_expandDeclSig___boxed(lean_object*); +lean_object* l_Lean_Elab_expandDeclSig(lean_object*); +uint8_t l_Lean_Syntax_isNone(lean_object*); +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_expandOptDeclSig(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Syntax_getArg(x_1, x_2); +x_4 = lean_unsigned_to_nat(1u); +x_5 = l_Lean_Syntax_getArg(x_1, x_4); +x_6 = l_Lean_Syntax_isNone(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_7 = l_Lean_Syntax_getArg(x_5, x_2); +lean_dec(x_5); +x_8 = l_Lean_Syntax_getArg(x_7, x_4); +lean_dec(x_7); +x_9 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_9, 0, x_8); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_3); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; +lean_dec(x_5); +x_11 = lean_box(0); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_3); +lean_ctor_set(x_12, 1, x_11); +return x_12; +} +} +} +lean_object* l_Lean_Elab_expandOptDeclSig___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_expandOptDeclSig(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_expandDeclSig(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Syntax_getArg(x_1, x_2); +x_4 = lean_unsigned_to_nat(1u); +x_5 = l_Lean_Syntax_getArg(x_1, x_4); +x_6 = l_Lean_Syntax_getArg(x_5, x_4); +lean_dec(x_5); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_3); +lean_ctor_set(x_7, 1, x_6); +return x_7; +} +} +lean_object* l_Lean_Elab_expandDeclSig___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_expandDeclSig(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* initialize_Init(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Lean_Elab_DeclUtil(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_mk_io_result(lean_box(0)); +_G_initialized = true; +res = initialize_Init(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_mk_io_result(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Lean/Elab/Declaration.c b/stage0/stdlib/Lean/Elab/Declaration.c index 25bced4ebc..7617697b0d 100644 --- a/stage0/stdlib/Lean/Elab/Declaration.c +++ b/stage0/stdlib/Lean/Elab/Declaration.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Elab.Declaration -// Imports: Init Lean.Util.CollectLevelParams Lean.Elab.Definition Lean.Elab.Inductive Lean.Elab.Structure +// Imports: Init Lean.Util.CollectLevelParams Lean.Elab.DeclUtil Lean.Elab.Definition Lean.Elab.Inductive Lean.Elab.Structure #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -15,24 +15,18 @@ extern "C" { #endif lean_object* l_Lean_Elab_Command_elabDeclaration(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkForall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__2; +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__2; +lean_object* l_Lean_Elab_expandOptDeclSig(lean_object*); extern lean_object* l_Lean_Parser_Command_abbrev___elambda__1___closed__2; +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__7; lean_object* l_Lean_Elab_Command_addDecl(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAxiom___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabConstant___closed__4; lean_object* l_unreachable_x21___rarg(lean_object*); extern lean_object* l_Lean_nullKind; -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__8; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__6; -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__4; lean_object* l_Lean_Syntax_getOptional_x3f(lean_object*); -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__10; -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__2; -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__9; lean_object* l_Lean_Elab_Command_elabConstant___closed__2; lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_commandElabAttribute; @@ -42,114 +36,95 @@ lean_object* l_Array_extract___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withDeclId___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabExample___closed__1; lean_object* l_Lean_Elab_Command_elabConstant___closed__1; -lean_object* l_Lean_Elab_Command_elabInductiveCore(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__6; -lean_object* l___private_Lean_Elab_Declaration_4__classInductiveSyntaxToView(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; extern lean_object* l_Lean_Parser_Command_section___elambda__1___closed__2; lean_object* l___private_Lean_Elab_Command_6__mkTermContext(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_expandDeclSig(lean_object*); lean_object* l_Lean_Elab_Command_elabExample___closed__2; extern lean_object* l_Lean_Parser_Command_declaration___elambda__1___closed__2; lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabDeclaration(lean_object*); extern lean_object* l_Lean_Parser_Command_mutual___elambda__1___closed__2; lean_object* l___private_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_8__splitMutualPreamble___boxed(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Declaration_2__classInductiveSyntaxToView(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Elab_Term_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__6; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__5; lean_object* l___regBuiltin_Lean_Elab_Command_elabMutual(lean_object*); extern lean_object* l_Lean_Parser_Command_mutual___elambda__1___closed__1; lean_object* lean_string_utf8_byte_size(lean_object*); -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__3; extern lean_object* l_Lean_Parser_Command_example___elambda__1___closed__2; lean_object* l___private_Lean_Elab_SyntheticMVars_11__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__6; lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_section___elambda__1___closed__1; lean_object* l___regBuiltin_Lean_Elab_Command_elabDeclaration___closed__1; lean_object* l_Lean_Elab_Command_applyVisibility(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkAppStx___closed__8; lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__1; +uint8_t l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_check___elambda__1___closed__2; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Quotation_4__getHeadInfo___elambda__3___closed__3; extern lean_object* l_Lean_Parser_Command_classInductive___elambda__1___closed__2; extern lean_object* l_Lean_mkTermIdFromIdent___closed__2; lean_object* l_Lean_Elab_Command_elabInstance___closed__4; lean_object* l_Lean_Elab_Command_mkDeclName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__5; -lean_object* l_Lean_Elab_Command_expandOptDeclSig___boxed(lean_object*); +lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__3; lean_object* l_Lean_Elab_Term_levelMVarToParam(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_7__isMutualPreambleCommand___boxed(lean_object*); +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__12; +lean_object* l___private_Lean_Elab_Declaration_6__splitMutualPreamble(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAxiom___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__11; lean_object* l_Lean_Elab_Command_elabAxiom(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_tacticBlock___elambda__1___closed__7; lean_object* l_Lean_Elab_Command_elabInstance___closed__1; extern lean_object* l_Lean_Parser_Command_set__option___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabInstance___closed__2; -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__7; -lean_object* l___private_Lean_Elab_Declaration_8__splitMutualPreamble(lean_object*, lean_object*); lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); -uint8_t l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_5__isMutualInductive___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__8; extern lean_object* l_Lean_Parser_Command_def___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__1; -lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabInductiveViews(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabConstant(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__1; lean_object* l_Lean_Elab_Command_elabAxiom___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_expandOptDeclSig(lean_object*); -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__7; +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__5; +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__3; lean_object* l_Lean_Elab_Command_elabClassInductive(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Term_5__expandCDot___main___closed__4; -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__3; -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__7; lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_5__isMutualInductive___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__5; extern lean_object* l_Lean_Parser_Command_instance___elambda__1___closed__1; extern lean_object* l_Lean_Parser_Command_variable___elambda__1___closed__2; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_6__elabMutualInductive___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCommand___main(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__10; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_4__elabMutualInductive___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Declaration_6__splitMutualPreamble___main(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_open___elambda__1___closed__2; +lean_object* l___private_Lean_Elab_Declaration_3__isMutualInductive___boxed(lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__2; lean_object* l_Lean_Elab_Command_elabMutual___closed__2; +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__9; lean_object* l_Lean_Elab_Command_elabTheorem(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDef(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_registerClassAttr___closed__2; +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__4; lean_object* l_Lean_Elab_Command_elabAxiom___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_sortDeclLevelParams(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabInstance___closed__5; lean_object* l___private_Lean_Elab_Command_2__getState(lean_object*, lean_object*); -uint8_t l___private_Lean_Elab_Declaration_5__isMutualInductive(lean_object*); extern lean_object* l_Lean_nullKind___closed__2; -lean_object* l_Lean_Elab_Command_elabClassInductive___closed__1; +uint8_t l___private_Lean_Elab_Declaration_3__isMutualInductive(lean_object*); extern lean_object* l_Lean_Parser_Command_instance___elambda__1___closed__2; extern lean_object* l_Lean_mkReducibilityAttrs___closed__4; lean_object* l_Lean_mkAtomFrom(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_universe___elambda__1___closed__2; -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__2; -lean_object* l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Quotation_8__letBindRhss___main___closed__11; +uint8_t l___private_Lean_Elab_Declaration_5__isMutualPreambleCommand(lean_object*); +lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAbbrev___closed__3; -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__12; lean_object* lean_environment_main_module(lean_object*); extern lean_object* l_Lean_Parser_Command_end___elambda__1___closed__1; lean_object* l_Lean_Elab_Command_elabMutual(lean_object*, lean_object*, lean_object*); @@ -157,148 +132,77 @@ lean_object* l_Lean_Elab_Command_elabInstance(lean_object*, lean_object*, lean_o lean_object* l___private_Lean_Elab_Command_7__mkTermState(lean_object*); extern lean_object* l_Lean_Parser_Command_axiom___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_getCurrMacroScope(lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__4; extern lean_object* l_Lean_SourceInfo_inhabited___closed__1; lean_object* l_Lean_Elab_Command_getMainModule(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabInstance___closed__3; lean_object* l_Lean_Syntax_getArgs(lean_object*); -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getKind(lean_object*); -lean_object* l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_5__isMutualInductive___boxed(lean_object*); +lean_object* l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAbbrev___closed__2; -extern lean_object* l_Lean_Elab_Command_Attribute_inhabited; +extern lean_object* l_Lean_Elab_Command_elabStructure___closed__1; +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__10; +lean_object* l_Lean_Elab_Command_elabStructure(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_addAttribute(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMutual___closed__3; -lean_object* l___private_Lean_Elab_Declaration_6__elabMutualInductive(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_expandDeclSig(lean_object*); lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_structure___elambda__1___closed__2; extern lean_object* l_Lean_mkAppStx___closed__9; lean_object* l_Lean_Elab_Command_elabConstant___closed__6; -uint8_t l___private_Lean_Elab_Declaration_7__isMutualPreambleCommand(lean_object*); +lean_object* l___private_Lean_Elab_Declaration_6__splitMutualPreamble___main___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__5; extern lean_object* l_Lean_Parser_Command_inductive___elambda__1___closed__2; +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__1; lean_object* l___private_Lean_Elab_Command_9__getVarDecls(lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__4; lean_object* l_Lean_Elab_Command_getEnv(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__6; extern lean_object* l_Lean_Parser_Command_universes___elambda__1___closed__2; lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__1; extern lean_object* l_Lean_mkOptionalNode___closed__1; lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabModifiers(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__11; -lean_object* l___private_Lean_Elab_Declaration_8__splitMutualPreamble___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDefLike(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_expandDeclSig___boxed(lean_object*); +lean_object* l___private_Lean_Elab_Declaration_6__splitMutualPreamble___boxed(lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__5; lean_object* l_Lean_Elab_Command_elabDeclaration___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__12; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__4; uint8_t l_Lean_Elab_Command_Modifiers_isProtected(lean_object*); extern lean_object* l_Lean_Parser_Command_variables___elambda__1___closed__2; +lean_object* l___private_Lean_Elab_Declaration_4__elabMutualInductive(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Elab_Command_Modifiers_isPrivate(lean_object*); -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__9; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__2; extern lean_object* l_Lean_mkOptionalNode___closed__2; +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__3; lean_object* l_Lean_Elab_Command_elabAxiom___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabConstant___closed__5; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__1; +lean_object* l_Lean_Elab_Command_checkValidCtorModifier(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabInductive(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_Declaration_8__splitMutualPreamble___main___boxed(lean_object*, lean_object*); +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__6; lean_object* l_Lean_Elab_Command_elabDeclaration___closed__1; lean_object* l_Lean_Elab_Command_elabDeclaration___closed__3; -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__2; lean_object* l_Lean_Elab_Command_elabConstant___closed__3; +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__11; lean_object* l_Lean_Elab_Command_elabAbbrev___closed__1; -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__9; -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__8; +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAbbrev___closed__4; lean_object* l_Lean_CollectLevelParams_main___main(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_liftTermElabM___rarg___closed__1; -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__3; lean_object* l___regBuiltin_Lean_Elab_Command_elabMutual___closed__1; -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__5; extern lean_object* l_Lean_Parser_Command_constant___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Command_theorem___elambda__1___closed__2; -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__4; +lean_object* l___private_Lean_Elab_Declaration_5__isMutualPreambleCommand___boxed(lean_object*); +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAxiom___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__8; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_declId___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabMutual___closed__1; -lean_object* l_Lean_Elab_Command_expandOptDeclSig(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Syntax_getArg(x_1, x_2); -x_4 = lean_unsigned_to_nat(1u); -x_5 = l_Lean_Syntax_getArg(x_1, x_4); -x_6 = l_Lean_Syntax_isNone(x_5); -if (x_6 == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_7 = l_Lean_Syntax_getArg(x_5, x_2); -lean_dec(x_5); -x_8 = l_Lean_Syntax_getArg(x_7, x_4); -lean_dec(x_7); -x_9 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_9, 0, x_8); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_3); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -else -{ -lean_object* x_11; lean_object* x_12; -lean_dec(x_5); -x_11 = lean_box(0); -x_12 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_12, 0, x_3); -lean_ctor_set(x_12, 1, x_11); -return x_12; -} -} -} -lean_object* l_Lean_Elab_Command_expandOptDeclSig___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_Elab_Command_expandOptDeclSig(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_expandDeclSig(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Syntax_getArg(x_1, x_2); -x_4 = lean_unsigned_to_nat(1u); -x_5 = l_Lean_Syntax_getArg(x_1, x_4); -x_6 = l_Lean_Syntax_getArg(x_5, x_4); -lean_dec(x_5); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_3); -lean_ctor_set(x_7, 1, x_6); -return x_7; -} -} -lean_object* l_Lean_Elab_Command_expandDeclSig___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_Elab_Command_expandDeclSig(x_1); -lean_dec(x_1); -return x_2; -} -} lean_object* _init_l_Lean_Elab_Command_elabAbbrev___closed__1() { _start: { @@ -347,7 +251,7 @@ _start: lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; x_5 = lean_unsigned_to_nat(2u); x_6 = l_Lean_Syntax_getArg(x_2, x_5); -x_7 = l_Lean_Elab_Command_expandOptDeclSig(x_6); +x_7 = l_Lean_Elab_expandOptDeclSig(x_6); lean_dec(x_6); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); @@ -381,7 +285,7 @@ _start: lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; x_5 = lean_unsigned_to_nat(2u); x_6 = l_Lean_Syntax_getArg(x_2, x_5); -x_7 = l_Lean_Elab_Command_expandOptDeclSig(x_6); +x_7 = l_Lean_Elab_expandOptDeclSig(x_6); lean_dec(x_6); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); @@ -411,7 +315,7 @@ _start: lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; x_5 = lean_unsigned_to_nat(2u); x_6 = l_Lean_Syntax_getArg(x_2, x_5); -x_7 = l_Lean_Elab_Command_expandDeclSig(x_6); +x_7 = l_Lean_Elab_expandDeclSig(x_6); lean_dec(x_6); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); @@ -508,7 +412,7 @@ _start: lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_5 = lean_unsigned_to_nat(2u); x_6 = l_Lean_Syntax_getArg(x_2, x_5); -x_7 = l_Lean_Elab_Command_expandDeclSig(x_6); +x_7 = l_Lean_Elab_expandDeclSig(x_6); lean_dec(x_6); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); @@ -721,7 +625,7 @@ _start: lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_5 = lean_unsigned_to_nat(2u); x_6 = l_Lean_Syntax_getArg(x_2, x_5); -x_7 = l_Lean_Elab_Command_expandDeclSig(x_6); +x_7 = l_Lean_Elab_expandDeclSig(x_6); lean_dec(x_6); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); @@ -834,7 +738,7 @@ _start: lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; x_5 = lean_unsigned_to_nat(1u); x_6 = l_Lean_Syntax_getArg(x_2, x_5); -x_7 = l_Lean_Elab_Command_expandDeclSig(x_6); +x_7 = l_Lean_Elab_expandDeclSig(x_6); lean_dec(x_6); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); @@ -1893,7 +1797,7 @@ x_5 = lean_unsigned_to_nat(1u); x_6 = l_Lean_Syntax_getArg(x_2, x_5); x_7 = lean_unsigned_to_nat(2u); x_8 = l_Lean_Syntax_getArg(x_2, x_7); -x_9 = l_Lean_Elab_Command_expandDeclSig(x_8); +x_9 = l_Lean_Elab_expandDeclSig(x_8); lean_dec(x_8); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); @@ -1980,644 +1884,7 @@ lean_dec(x_1); return x_10; } } -lean_object* _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("invalid use of attributes in inductive declaration"); -return x_1; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__4() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("invalid use of 'partial' in inductive declaration"); -return x_1; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__4; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__5; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__7() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("invalid use of 'noncomputable' in inductive declaration"); -return x_1; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__8() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__7; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__9() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__8; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; -x_5 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 1); -x_6 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 2); -x_7 = lean_ctor_get(x_2, 1); -x_8 = lean_array_get_size(x_7); -x_9 = lean_unsigned_to_nat(0u); -x_10 = lean_nat_dec_eq(x_8, x_9); -if (x_5 == 0) -{ -uint8_t x_53; -x_53 = 0; -x_11 = x_53; -goto block_52; -} -else -{ -uint8_t x_54; -x_54 = 1; -x_11 = x_54; -goto block_52; -} -block_52: -{ -uint8_t x_12; -if (x_6 == 0) -{ -uint8_t x_50; -x_50 = 0; -x_12 = x_50; -goto block_49; -} -else -{ -uint8_t x_51; -x_51 = 1; -x_12 = x_51; -goto block_49; -} -block_49: -{ -uint8_t x_13; -if (x_10 == 0) -{ -lean_object* x_41; uint8_t x_42; -x_41 = lean_unsigned_to_nat(1u); -x_42 = lean_nat_dec_eq(x_8, x_41); -lean_dec(x_8); -if (x_42 == 0) -{ -x_13 = x_10; -goto block_40; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; -x_43 = l_Lean_Elab_Command_Attribute_inhabited; -x_44 = lean_array_get(x_43, x_7, x_9); -x_45 = lean_ctor_get(x_44, 0); -lean_inc(x_45); -lean_dec(x_44); -x_46 = l_Lean_registerClassAttr___closed__2; -x_47 = lean_name_eq(x_45, x_46); -lean_dec(x_45); -x_13 = x_47; -goto block_40; -} -} -else -{ -uint8_t x_48; -lean_dec(x_8); -x_48 = 1; -x_13 = x_48; -goto block_40; -} -block_40: -{ -uint8_t x_14; -if (x_13 == 0) -{ -uint8_t x_38; -x_38 = 0; -x_14 = x_38; -goto block_37; -} -else -{ -uint8_t x_39; -x_39 = 1; -x_14 = x_39; -goto block_37; -} -block_37: -{ -lean_object* x_15; -if (x_11 == 0) -{ -x_15 = x_4; -goto block_30; -} -else -{ -lean_object* x_31; lean_object* x_32; uint8_t x_33; -x_31 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__9; -x_32 = l_Lean_Elab_Command_throwError___rarg(x_1, x_31, x_3, x_4); -x_33 = !lean_is_exclusive(x_32); -if (x_33 == 0) -{ -return x_32; -} -else -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_34 = lean_ctor_get(x_32, 0); -x_35 = lean_ctor_get(x_32, 1); -lean_inc(x_35); -lean_inc(x_34); -lean_dec(x_32); -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; -} -} -block_30: -{ -if (x_12 == 0) -{ -if (x_14 == 0) -{ -lean_object* x_16; lean_object* x_17; uint8_t x_18; -x_16 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__3; -x_17 = l_Lean_Elab_Command_throwError___rarg(x_1, x_16, x_3, x_15); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -else -{ -lean_object* x_22; lean_object* x_23; -lean_dec(x_3); -x_22 = lean_box(0); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_15); -return x_23; -} -} -else -{ -lean_object* x_24; lean_object* x_25; uint8_t x_26; -x_24 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__6; -x_25 = l_Lean_Elab_Command_throwError___rarg(x_1, x_24, x_3, x_15); -x_26 = !lean_is_exclusive(x_25); -if (x_26 == 0) -{ -return x_25; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_25, 0); -x_28 = lean_ctor_get(x_25, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_25); -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -return x_29; -} -} -} -} -} -} -} -} -} -lean_object* l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___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___private_Lean_Elab_Declaration_1__checkValidInductiveModifier(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("invalid use of attributes in constructor declaration"); -return x_1; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__4() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("invalid use of 'unsafe' in constructor declaration"); -return x_1; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__4; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__5; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__7() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("invalid use of 'partial' in constructor declaration"); -return x_1; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__8() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__7; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__9() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__8; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__10() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("invalid use of 'noncomputable' in constructor declaration"); -return x_1; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__11() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__10; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__12() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__11; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; uint8_t x_6; uint8_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; uint8_t x_12; -x_5 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 1); -x_6 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 2); -x_7 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 3); -x_8 = lean_ctor_get(x_2, 1); -x_9 = lean_array_get_size(x_8); -x_10 = lean_unsigned_to_nat(0u); -x_11 = lean_nat_dec_eq(x_9, x_10); -lean_dec(x_9); -if (x_5 == 0) -{ -uint8_t x_58; -x_58 = 0; -x_12 = x_58; -goto block_57; -} -else -{ -uint8_t x_59; -x_59 = 1; -x_12 = x_59; -goto block_57; -} -block_57: -{ -uint8_t x_13; -if (x_6 == 0) -{ -uint8_t x_55; -x_55 = 0; -x_13 = x_55; -goto block_54; -} -else -{ -uint8_t x_56; -x_56 = 1; -x_13 = x_56; -goto block_54; -} -block_54: -{ -uint8_t x_14; -if (x_7 == 0) -{ -uint8_t x_52; -x_52 = 0; -x_14 = x_52; -goto block_51; -} -else -{ -uint8_t x_53; -x_53 = 1; -x_14 = x_53; -goto block_51; -} -block_51: -{ -uint8_t x_15; -if (x_11 == 0) -{ -uint8_t x_49; -x_49 = 1; -x_15 = x_49; -goto block_48; -} -else -{ -uint8_t x_50; -x_50 = 0; -x_15 = x_50; -goto block_48; -} -block_48: -{ -uint8_t x_16; -if (x_15 == 0) -{ -uint8_t x_46; -x_46 = 0; -x_16 = x_46; -goto block_45; -} -else -{ -uint8_t x_47; -x_47 = 1; -x_16 = x_47; -goto block_45; -} -block_45: -{ -lean_object* x_17; -if (x_12 == 0) -{ -if (x_13 == 0) -{ -x_17 = x_4; -goto block_32; -} -else -{ -lean_object* x_33; lean_object* x_34; uint8_t x_35; -x_33 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__9; -x_34 = l_Lean_Elab_Command_throwError___rarg(x_1, x_33, x_3, x_4); -x_35 = !lean_is_exclusive(x_34); -if (x_35 == 0) -{ -return x_34; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_34, 0); -x_37 = lean_ctor_get(x_34, 1); -lean_inc(x_37); -lean_inc(x_36); -lean_dec(x_34); -x_38 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_38, 0, x_36); -lean_ctor_set(x_38, 1, x_37); -return x_38; -} -} -} -else -{ -lean_object* x_39; lean_object* x_40; uint8_t x_41; -x_39 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__12; -x_40 = l_Lean_Elab_Command_throwError___rarg(x_1, x_39, x_3, x_4); -x_41 = !lean_is_exclusive(x_40); -if (x_41 == 0) -{ -return x_40; -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_40, 0); -x_43 = lean_ctor_get(x_40, 1); -lean_inc(x_43); -lean_inc(x_42); -lean_dec(x_40); -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_42); -lean_ctor_set(x_44, 1, x_43); -return x_44; -} -} -block_32: -{ -if (x_14 == 0) -{ -if (x_16 == 0) -{ -lean_object* x_18; lean_object* x_19; -lean_dec(x_3); -x_18 = lean_box(0); -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_18); -lean_ctor_set(x_19, 1, x_17); -return x_19; -} -else -{ -lean_object* x_20; lean_object* x_21; uint8_t x_22; -x_20 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__3; -x_21 = l_Lean_Elab_Command_throwError___rarg(x_1, x_20, x_3, x_17); -x_22 = !lean_is_exclusive(x_21); -if (x_22 == 0) -{ -return x_21; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_21, 0); -x_24 = lean_ctor_get(x_21, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_21); -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; -} -} -} -else -{ -lean_object* x_26; lean_object* x_27; uint8_t x_28; -x_26 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__6; -x_27 = l_Lean_Elab_Command_throwError___rarg(x_1, x_26, x_3, x_17); -x_28 = !lean_is_exclusive(x_27); -if (x_28 == 0) -{ -return x_27; -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = lean_ctor_get(x_27, 0); -x_30 = lean_ctor_get(x_27, 1); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_27); -x_31 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -return x_31; -} -} -} -} -} -} -} -} -} -} -lean_object* l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___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___private_Lean_Elab_Declaration_2__checkValidCtorModifier(x_1, x_2, x_3, x_4); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__1() { +lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__1() { _start: { lean_object* x_1; @@ -2625,27 +1892,27 @@ x_1 = lean_mk_string("invalid 'protected' constructor in a 'private' inductive d return x_1; } } -lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__2() { +lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__1; +x_1 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__1; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__3() { +lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__2; +x_1 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__2; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__4() { +lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__4() { _start: { lean_object* x_1; @@ -2653,27 +1920,27 @@ x_1 = lean_mk_string("invalid 'private' constructor in a 'private' inductive dat return x_1; } } -lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__5() { +lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__5() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__4; +x_1 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__4; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__6() { +lean_object* _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__6() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__5; +x_1 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__5; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; @@ -2791,7 +2058,7 @@ if (x_30 == 0) { lean_object* x_31; lean_inc(x_5); -x_31 = l___private_Lean_Elab_Declaration_2__checkValidCtorModifier(x_14, x_18, x_5, x_19); +x_31 = l_Lean_Elab_Command_checkValidCtorModifier(x_14, x_18, x_5, x_19); if (lean_obj_tag(x_31) == 0) { lean_object* x_32; lean_object* x_33; @@ -2815,7 +2082,7 @@ x_38 = l_Lean_Syntax_isNone(x_37); lean_dec(x_37); x_39 = lean_unsigned_to_nat(4u); x_40 = l_Lean_Syntax_getArg(x_14, x_39); -x_41 = l_Lean_Elab_Command_expandOptDeclSig(x_40); +x_41 = l_Lean_Elab_expandOptDeclSig(x_40); lean_dec(x_40); if (x_38 == 0) { @@ -2934,7 +2201,7 @@ lean_dec(x_24); lean_dec(x_18); lean_dec(x_13); lean_dec(x_3); -x_66 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__3; +x_66 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__3; x_67 = l_Lean_Elab_Command_throwError___rarg(x_14, x_66, x_5, x_19); lean_dec(x_14); x_68 = !lean_is_exclusive(x_67); @@ -2965,7 +2232,7 @@ lean_dec(x_24); lean_dec(x_18); lean_dec(x_13); lean_dec(x_3); -x_72 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__6; +x_72 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__6; x_73 = l_Lean_Elab_Command_throwError___rarg(x_14, x_72, x_5, x_19); lean_dec(x_14); x_74 = !lean_is_exclusive(x_73); @@ -3021,7 +2288,7 @@ return x_93; } } } -lean_object* l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; @@ -3056,7 +2323,7 @@ x_20 = x_19; x_21 = lean_unsigned_to_nat(0u); lean_inc(x_14); lean_inc(x_2); -x_22 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___boxed), 6, 4); +x_22 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___boxed), 6, 4); lean_closure_set(x_22, 0, x_2); lean_closure_set(x_22, 1, x_14); lean_closure_set(x_22, 2, x_21); @@ -3196,7 +2463,7 @@ return x_43; } } } -lean_object* l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -3204,10 +2471,10 @@ x_6 = lean_unsigned_to_nat(1u); x_7 = lean_nat_add(x_3, x_6); x_8 = l_Lean_Syntax_getArg(x_2, x_7); lean_dec(x_7); -x_9 = l_Lean_Elab_Command_expandOptDeclSig(x_8); +x_9 = l_Lean_Elab_expandOptDeclSig(x_8); lean_dec(x_8); lean_inc(x_4); -x_10 = l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier(x_2, x_1, x_4, x_5); +x_10 = l_Lean_Elab_Command_checkValidInductiveModifier(x_2, x_1, x_4, x_5); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; @@ -3221,7 +2488,7 @@ lean_inc(x_13); lean_dec(x_9); x_14 = l_Lean_Syntax_getArg(x_2, x_3); lean_inc(x_14); -x_15 = lean_alloc_closure((void*)(l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___lambda__1___boxed), 9, 6); +x_15 = lean_alloc_closure((void*)(l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___lambda__1___boxed), 9, 6); lean_closure_set(x_15, 0, x_14); lean_closure_set(x_15, 1, x_1); lean_closure_set(x_15, 2, x_3); @@ -3261,32 +2528,32 @@ return x_20; } } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___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* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; -x_7 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_2); lean_dec(x_1); return x_7; } } -lean_object* l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { lean_object* x_10; -x_10 = l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +x_10 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_3); lean_dec(x_1); return x_10; } } -lean_object* l___private_Lean_Elab_Declaration_4__classInductiveSyntaxToView(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l___private_Lean_Elab_Declaration_2__classInductiveSyntaxToView(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; lean_object* x_6; x_5 = lean_unsigned_to_nat(2u); -x_6 = l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView(x_1, x_2, x_5, x_3, x_4); +x_6 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(x_1, x_2, x_5, x_3, x_4); return x_6; } } @@ -3296,7 +2563,7 @@ _start: lean_object* x_5; lean_object* x_6; x_5 = lean_unsigned_to_nat(1u); lean_inc(x_3); -x_6 = l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView(x_1, x_2, x_5, x_3, x_4); +x_6 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(x_1, x_2, x_5, x_3, x_4); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; @@ -3307,7 +2574,7 @@ lean_inc(x_8); lean_dec(x_6); x_9 = l_Lean_mkOptionalNode___closed__2; x_10 = lean_array_push(x_9, x_7); -x_11 = l_Lean_Elab_Command_elabInductiveCore(x_10, x_3, x_8); +x_11 = l_Lean_Elab_Command_elabInductiveViews(x_10, x_3, x_8); return x_11; } else @@ -3335,27 +2602,15 @@ return x_15; } } } -lean_object* _init_l_Lean_Elab_Command_elabClassInductive___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_registerClassAttr___closed__2; -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_object* l_Lean_Elab_Command_elabClassInductive(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; lean_object* x_7; lean_object* x_8; -x_5 = l_Lean_Elab_Command_elabClassInductive___closed__1; +x_5 = l_Lean_Elab_Command_elabStructure___closed__1; x_6 = l_Lean_Elab_Command_Modifiers_addAttribute(x_1, x_5); x_7 = lean_unsigned_to_nat(2u); lean_inc(x_3); -x_8 = l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView(x_6, x_2, x_7, x_3, x_4); +x_8 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(x_6, x_2, x_7, x_3, x_4); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; @@ -3366,7 +2621,7 @@ lean_inc(x_10); lean_dec(x_8); x_11 = l_Lean_mkOptionalNode___closed__2; x_12 = lean_array_push(x_11, x_9); -x_13 = l_Lean_Elab_Command_elabInductiveCore(x_12, x_3, x_10); +x_13 = l_Lean_Elab_Command_elabInductiveViews(x_12, x_3, x_10); return x_13; } else @@ -3433,339 +2688,173 @@ x_6 = l_Lean_Elab_Command_elabModifiers(x_5, x_2, x_3); lean_dec(x_5); if (lean_obj_tag(x_6) == 0) { -uint8_t x_7; -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_6, 1); +lean_inc(x_8); +lean_dec(x_6); +x_9 = lean_unsigned_to_nat(1u); +x_10 = l_Lean_Syntax_getArg(x_1, x_9); +lean_inc(x_10); +x_11 = l_Lean_Syntax_getKind(x_10); +x_12 = l_Lean_Parser_Command_abbrev___elambda__1___closed__2; +x_13 = lean_name_eq(x_11, x_12); +if (x_13 == 0) { -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -x_10 = lean_unsigned_to_nat(1u); -x_11 = l_Lean_Syntax_getArg(x_1, x_10); -lean_inc(x_11); -x_12 = l_Lean_Syntax_getKind(x_11); -x_13 = l_Lean_Parser_Command_abbrev___elambda__1___closed__2; -x_14 = lean_name_eq(x_12, x_13); -if (x_14 == 0) +lean_object* x_14; uint8_t x_15; +x_14 = l_Lean_Parser_Command_def___elambda__1___closed__2; +x_15 = lean_name_eq(x_11, x_14); +if (x_15 == 0) { -lean_object* x_15; uint8_t x_16; -x_15 = l_Lean_Parser_Command_def___elambda__1___closed__2; -x_16 = lean_name_eq(x_12, x_15); -if (x_16 == 0) +lean_object* x_16; uint8_t x_17; +x_16 = l_Lean_Parser_Command_theorem___elambda__1___closed__2; +x_17 = lean_name_eq(x_11, x_16); +if (x_17 == 0) { -lean_object* x_17; uint8_t x_18; -x_17 = l_Lean_Parser_Command_theorem___elambda__1___closed__2; -x_18 = lean_name_eq(x_12, x_17); -if (x_18 == 0) +lean_object* x_18; uint8_t x_19; +x_18 = l_Lean_Parser_Command_constant___elambda__1___closed__2; +x_19 = lean_name_eq(x_11, x_18); +if (x_19 == 0) { -lean_object* x_19; uint8_t x_20; -x_19 = l_Lean_Parser_Command_constant___elambda__1___closed__2; -x_20 = lean_name_eq(x_12, x_19); -if (x_20 == 0) +lean_object* x_20; uint8_t x_21; +x_20 = l_Lean_Parser_Command_instance___elambda__1___closed__2; +x_21 = lean_name_eq(x_11, x_20); +if (x_21 == 0) { -lean_object* x_21; uint8_t x_22; -x_21 = l_Lean_Parser_Command_instance___elambda__1___closed__2; -x_22 = lean_name_eq(x_12, x_21); -if (x_22 == 0) +lean_object* x_22; uint8_t x_23; +x_22 = l_Lean_Parser_Command_axiom___elambda__1___closed__2; +x_23 = lean_name_eq(x_11, x_22); +if (x_23 == 0) { -lean_object* x_23; uint8_t x_24; -x_23 = l_Lean_Parser_Command_axiom___elambda__1___closed__2; -x_24 = lean_name_eq(x_12, x_23); -if (x_24 == 0) +lean_object* x_24; uint8_t x_25; +x_24 = l_Lean_Parser_Command_example___elambda__1___closed__2; +x_25 = lean_name_eq(x_11, x_24); +if (x_25 == 0) { -lean_object* x_25; uint8_t x_26; -x_25 = l_Lean_Parser_Command_example___elambda__1___closed__2; -x_26 = lean_name_eq(x_12, x_25); -if (x_26 == 0) +lean_object* x_26; uint8_t x_27; +x_26 = l_Lean_Parser_Command_inductive___elambda__1___closed__2; +x_27 = lean_name_eq(x_11, x_26); +if (x_27 == 0) { -lean_object* x_27; uint8_t x_28; -x_27 = l_Lean_Parser_Command_inductive___elambda__1___closed__2; -x_28 = lean_name_eq(x_12, x_27); -if (x_28 == 0) +lean_object* x_28; uint8_t x_29; +x_28 = l_Lean_Parser_Command_classInductive___elambda__1___closed__2; +x_29 = lean_name_eq(x_11, x_28); +if (x_29 == 0) { -lean_object* x_29; uint8_t x_30; -x_29 = l_Lean_Parser_Command_classInductive___elambda__1___closed__2; -x_30 = lean_name_eq(x_12, x_29); -if (x_30 == 0) -{ -lean_object* x_31; uint8_t x_32; +lean_object* x_30; uint8_t x_31; +x_30 = l_Lean_Parser_Command_structure___elambda__1___closed__2; +x_31 = lean_name_eq(x_11, x_30); lean_dec(x_11); -lean_dec(x_8); -x_31 = l_Lean_Parser_Command_structure___elambda__1___closed__2; -x_32 = lean_name_eq(x_12, x_31); -lean_dec(x_12); -if (x_32 == 0) +if (x_31 == 0) { -lean_object* x_33; lean_object* x_34; -lean_free_object(x_6); -x_33 = l_Lean_Elab_Command_elabDeclaration___closed__3; -x_34 = l_Lean_Elab_Command_throwError___rarg(x_1, x_33, x_2, x_9); +lean_object* x_32; lean_object* x_33; +lean_dec(x_10); +lean_dec(x_7); +x_32 = l_Lean_Elab_Command_elabDeclaration___closed__3; +x_33 = l_Lean_Elab_Command_throwError___rarg(x_1, x_32, x_2, x_8); +return x_33; +} +else +{ +lean_object* x_34; +x_34 = l_Lean_Elab_Command_elabStructure(x_7, x_10, x_2, x_8); return x_34; } +} else { lean_object* x_35; -lean_dec(x_2); -x_35 = lean_box(0); -lean_ctor_set(x_6, 0, x_35); -return x_6; +lean_dec(x_11); +x_35 = l_Lean_Elab_Command_elabClassInductive(x_7, x_10, x_2, x_8); +return x_35; } } else { lean_object* x_36; -lean_dec(x_12); -lean_free_object(x_6); -x_36 = l_Lean_Elab_Command_elabClassInductive(x_8, x_11, x_2, x_9); +lean_dec(x_11); +x_36 = l_Lean_Elab_Command_elabInductive(x_7, x_10, x_2, x_8); return x_36; } } else { lean_object* x_37; -lean_dec(x_12); -lean_free_object(x_6); -x_37 = l_Lean_Elab_Command_elabInductive(x_8, x_11, x_2, x_9); +lean_dec(x_11); +x_37 = l_Lean_Elab_Command_elabExample(x_7, x_10, x_2, x_8); return x_37; } } else { lean_object* x_38; -lean_dec(x_12); -lean_free_object(x_6); -x_38 = l_Lean_Elab_Command_elabExample(x_8, x_11, x_2, x_9); +lean_dec(x_11); +x_38 = l_Lean_Elab_Command_elabAxiom(x_7, x_10, x_2, x_8); return x_38; } } else { lean_object* x_39; -lean_dec(x_12); -lean_free_object(x_6); -x_39 = l_Lean_Elab_Command_elabAxiom(x_8, x_11, x_2, x_9); +lean_dec(x_11); +x_39 = l_Lean_Elab_Command_elabInstance(x_7, x_10, x_2, x_8); return x_39; } } else { lean_object* x_40; -lean_dec(x_12); -lean_free_object(x_6); -x_40 = l_Lean_Elab_Command_elabInstance(x_8, x_11, x_2, x_9); +lean_dec(x_11); +x_40 = l_Lean_Elab_Command_elabConstant(x_7, x_10, x_2, x_8); return x_40; } } else { lean_object* x_41; -lean_dec(x_12); -lean_free_object(x_6); -x_41 = l_Lean_Elab_Command_elabConstant(x_8, x_11, x_2, x_9); +lean_dec(x_11); +x_41 = l_Lean_Elab_Command_elabTheorem(x_7, x_10, x_2, x_8); return x_41; } } else { lean_object* x_42; -lean_dec(x_12); -lean_free_object(x_6); -x_42 = l_Lean_Elab_Command_elabTheorem(x_8, x_11, x_2, x_9); +lean_dec(x_11); +x_42 = l_Lean_Elab_Command_elabDef(x_7, x_10, x_2, x_8); return x_42; } } else { lean_object* x_43; -lean_dec(x_12); -lean_free_object(x_6); -x_43 = l_Lean_Elab_Command_elabDef(x_8, x_11, x_2, x_9); +lean_dec(x_11); +x_43 = l_Lean_Elab_Command_elabAbbrev(x_7, x_10, x_2, x_8); return x_43; } } else { -lean_object* x_44; -lean_dec(x_12); -lean_free_object(x_6); -x_44 = l_Lean_Elab_Command_elabAbbrev(x_8, x_11, x_2, x_9); -return x_44; -} -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51; -x_45 = lean_ctor_get(x_6, 0); -x_46 = lean_ctor_get(x_6, 1); -lean_inc(x_46); -lean_inc(x_45); -lean_dec(x_6); -x_47 = lean_unsigned_to_nat(1u); -x_48 = l_Lean_Syntax_getArg(x_1, x_47); -lean_inc(x_48); -x_49 = l_Lean_Syntax_getKind(x_48); -x_50 = l_Lean_Parser_Command_abbrev___elambda__1___closed__2; -x_51 = lean_name_eq(x_49, x_50); -if (x_51 == 0) -{ -lean_object* x_52; uint8_t x_53; -x_52 = l_Lean_Parser_Command_def___elambda__1___closed__2; -x_53 = lean_name_eq(x_49, x_52); -if (x_53 == 0) -{ -lean_object* x_54; uint8_t x_55; -x_54 = l_Lean_Parser_Command_theorem___elambda__1___closed__2; -x_55 = lean_name_eq(x_49, x_54); -if (x_55 == 0) -{ -lean_object* x_56; uint8_t x_57; -x_56 = l_Lean_Parser_Command_constant___elambda__1___closed__2; -x_57 = lean_name_eq(x_49, x_56); -if (x_57 == 0) -{ -lean_object* x_58; uint8_t x_59; -x_58 = l_Lean_Parser_Command_instance___elambda__1___closed__2; -x_59 = lean_name_eq(x_49, x_58); -if (x_59 == 0) -{ -lean_object* x_60; uint8_t x_61; -x_60 = l_Lean_Parser_Command_axiom___elambda__1___closed__2; -x_61 = lean_name_eq(x_49, x_60); -if (x_61 == 0) -{ -lean_object* x_62; uint8_t x_63; -x_62 = l_Lean_Parser_Command_example___elambda__1___closed__2; -x_63 = lean_name_eq(x_49, x_62); -if (x_63 == 0) -{ -lean_object* x_64; uint8_t x_65; -x_64 = l_Lean_Parser_Command_inductive___elambda__1___closed__2; -x_65 = lean_name_eq(x_49, x_64); -if (x_65 == 0) -{ -lean_object* x_66; uint8_t x_67; -x_66 = l_Lean_Parser_Command_classInductive___elambda__1___closed__2; -x_67 = lean_name_eq(x_49, x_66); -if (x_67 == 0) -{ -lean_object* x_68; uint8_t x_69; -lean_dec(x_48); -lean_dec(x_45); -x_68 = l_Lean_Parser_Command_structure___elambda__1___closed__2; -x_69 = lean_name_eq(x_49, x_68); -lean_dec(x_49); -if (x_69 == 0) -{ -lean_object* x_70; lean_object* x_71; -x_70 = l_Lean_Elab_Command_elabDeclaration___closed__3; -x_71 = l_Lean_Elab_Command_throwError___rarg(x_1, x_70, x_2, x_46); -return x_71; -} -else -{ -lean_object* x_72; lean_object* x_73; +uint8_t x_44; lean_dec(x_2); -x_72 = lean_box(0); -x_73 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_73, 0, x_72); -lean_ctor_set(x_73, 1, x_46); -return x_73; -} -} -else -{ -lean_object* x_74; -lean_dec(x_49); -x_74 = l_Lean_Elab_Command_elabClassInductive(x_45, x_48, x_2, x_46); -return x_74; -} -} -else -{ -lean_object* x_75; -lean_dec(x_49); -x_75 = l_Lean_Elab_Command_elabInductive(x_45, x_48, x_2, x_46); -return x_75; -} -} -else -{ -lean_object* x_76; -lean_dec(x_49); -x_76 = l_Lean_Elab_Command_elabExample(x_45, x_48, x_2, x_46); -return x_76; -} -} -else -{ -lean_object* x_77; -lean_dec(x_49); -x_77 = l_Lean_Elab_Command_elabAxiom(x_45, x_48, x_2, x_46); -return x_77; -} -} -else -{ -lean_object* x_78; -lean_dec(x_49); -x_78 = l_Lean_Elab_Command_elabInstance(x_45, x_48, x_2, x_46); -return x_78; -} -} -else -{ -lean_object* x_79; -lean_dec(x_49); -x_79 = l_Lean_Elab_Command_elabConstant(x_45, x_48, x_2, x_46); -return x_79; -} -} -else -{ -lean_object* x_80; -lean_dec(x_49); -x_80 = l_Lean_Elab_Command_elabTheorem(x_45, x_48, x_2, x_46); -return x_80; -} -} -else -{ -lean_object* x_81; -lean_dec(x_49); -x_81 = l_Lean_Elab_Command_elabDef(x_45, x_48, x_2, x_46); -return x_81; -} -} -else -{ -lean_object* x_82; -lean_dec(x_49); -x_82 = l_Lean_Elab_Command_elabAbbrev(x_45, x_48, x_2, x_46); -return x_82; -} -} -} -else -{ -uint8_t x_83; -lean_dec(x_2); -x_83 = !lean_is_exclusive(x_6); -if (x_83 == 0) +x_44 = !lean_is_exclusive(x_6); +if (x_44 == 0) { return x_6; } else { -lean_object* x_84; lean_object* x_85; lean_object* x_86; -x_84 = lean_ctor_get(x_6, 0); -x_85 = lean_ctor_get(x_6, 1); -lean_inc(x_85); -lean_inc(x_84); +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_6, 0); +x_46 = lean_ctor_get(x_6, 1); +lean_inc(x_46); +lean_inc(x_45); lean_dec(x_6); -x_86 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_86, 0, x_84); -lean_ctor_set(x_86, 1, x_85); -return x_86; +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; } } } @@ -3798,7 +2887,7 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -uint8_t l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_5__isMutualInductive___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +uint8_t l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; @@ -3839,7 +2928,7 @@ goto _start; } } } -uint8_t l___private_Lean_Elab_Declaration_5__isMutualInductive(lean_object* x_1) { +uint8_t l___private_Lean_Elab_Declaration_3__isMutualInductive(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; @@ -3849,7 +2938,7 @@ x_4 = l_Lean_Syntax_getArgs(x_3); lean_dec(x_3); x_5 = lean_array_get_size(x_4); x_6 = lean_unsigned_to_nat(0u); -x_7 = l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_5__isMutualInductive___spec__1(x_1, x_4, x_5, x_6); +x_7 = l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1(x_1, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); if (x_7 == 0) @@ -3866,11 +2955,11 @@ return x_9; } } } -lean_object* l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_5__isMutualInductive___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; -x_5 = l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_5__isMutualInductive___spec__1(x_1, x_2, x_3, x_4); +x_5 = l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); @@ -3878,17 +2967,17 @@ x_6 = lean_box(x_5); return x_6; } } -lean_object* l___private_Lean_Elab_Declaration_5__isMutualInductive___boxed(lean_object* x_1) { +lean_object* l___private_Lean_Elab_Declaration_3__isMutualInductive___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; -x_2 = l___private_Lean_Elab_Declaration_5__isMutualInductive(x_1); +x_2 = l___private_Lean_Elab_Declaration_3__isMutualInductive(x_1); lean_dec(x_1); x_3 = lean_box(x_2); return x_3; } } -lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_6__elabMutualInductive___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_4__elabMutualInductive___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; uint8_t x_6; @@ -3929,7 +3018,7 @@ x_17 = lean_unsigned_to_nat(1u); x_18 = l_Lean_Syntax_getArg(x_12, x_17); lean_dec(x_12); lean_inc(x_3); -x_19 = l___private_Lean_Elab_Declaration_3__inductiveSyntaxToView(x_15, x_18, x_17, x_3, x_16); +x_19 = l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(x_15, x_18, x_17, x_3, x_16); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; @@ -4002,13 +3091,13 @@ return x_33; } } } -lean_object* l___private_Lean_Elab_Declaration_6__elabMutualInductive(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l___private_Lean_Elab_Declaration_4__elabMutualInductive(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; x_4 = x_1; x_5 = lean_unsigned_to_nat(0u); -x_6 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_6__elabMutualInductive___spec__1), 4, 2); +x_6 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_4__elabMutualInductive___spec__1), 4, 2); lean_closure_set(x_6, 0, x_5); lean_closure_set(x_6, 1, x_4); x_7 = x_6; @@ -4022,7 +3111,7 @@ lean_inc(x_9); x_10 = lean_ctor_get(x_8, 1); lean_inc(x_10); lean_dec(x_8); -x_11 = l_Lean_Elab_Command_elabInductiveCore(x_9, x_2, x_10); +x_11 = l_Lean_Elab_Command_elabInductiveViews(x_9, x_2, x_10); return x_11; } else @@ -4050,7 +3139,7 @@ return x_15; } } } -uint8_t l___private_Lean_Elab_Declaration_7__isMutualPreambleCommand(lean_object* x_1) { +uint8_t l___private_Lean_Elab_Declaration_5__isMutualPreambleCommand(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; uint8_t x_4; @@ -4139,16 +3228,16 @@ return x_22; } } } -lean_object* l___private_Lean_Elab_Declaration_7__isMutualPreambleCommand___boxed(lean_object* x_1) { +lean_object* l___private_Lean_Elab_Declaration_5__isMutualPreambleCommand___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; -x_2 = l___private_Lean_Elab_Declaration_7__isMutualPreambleCommand(x_1); +x_2 = l___private_Lean_Elab_Declaration_5__isMutualPreambleCommand(x_1); x_3 = lean_box(x_2); return x_3; } } -lean_object* l___private_Lean_Elab_Declaration_8__splitMutualPreamble___main(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Elab_Declaration_6__splitMutualPreamble___main(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; uint8_t x_4; @@ -4166,7 +3255,7 @@ else { lean_object* x_6; uint8_t x_7; x_6 = lean_array_fget(x_1, x_2); -x_7 = l___private_Lean_Elab_Declaration_7__isMutualPreambleCommand(x_6); +x_7 = l___private_Lean_Elab_Declaration_5__isMutualPreambleCommand(x_6); if (x_7 == 0) { lean_object* x_8; uint8_t x_9; @@ -4207,33 +3296,33 @@ goto _start; } } } -lean_object* l___private_Lean_Elab_Declaration_8__splitMutualPreamble___main___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Elab_Declaration_6__splitMutualPreamble___main___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Lean_Elab_Declaration_8__splitMutualPreamble___main(x_1, x_2); +x_3 = l___private_Lean_Elab_Declaration_6__splitMutualPreamble___main(x_1, x_2); lean_dec(x_1); return x_3; } } -lean_object* l___private_Lean_Elab_Declaration_8__splitMutualPreamble(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Elab_Declaration_6__splitMutualPreamble(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Lean_Elab_Declaration_8__splitMutualPreamble___main(x_1, x_2); +x_3 = l___private_Lean_Elab_Declaration_6__splitMutualPreamble___main(x_1, x_2); return x_3; } } -lean_object* l___private_Lean_Elab_Declaration_8__splitMutualPreamble___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Lean_Elab_Declaration_6__splitMutualPreamble___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Lean_Elab_Declaration_8__splitMutualPreamble(x_1, x_2); +x_3 = l___private_Lean_Elab_Declaration_6__splitMutualPreamble(x_1, x_2); lean_dec(x_1); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__1() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -4245,39 +3334,39 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__2() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_empty___closed__1; -x_2 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__1; +x_2 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__1; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__3() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__2; +x_1 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__2; x_2 = l___private_Lean_Elab_Term_5__expandCDot___main___closed__4; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__4() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Command_section___elambda__1___closed__2; -x_2 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__3; +x_2 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__3; 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; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__5() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__5() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -4289,17 +3378,17 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__6() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_empty___closed__1; -x_2 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__5; +x_2 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__5; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__7() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -4311,59 +3400,59 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__8() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_empty___closed__1; -x_2 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__7; +x_2 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__7; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__9() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__8; +x_1 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__8; x_2 = l___private_Lean_Elab_Term_5__expandCDot___main___closed__4; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__10() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Command_end___elambda__1___closed__1; -x_2 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__9; +x_2 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__9; 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; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__11() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__11() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_mkOptionalNode___closed__2; -x_2 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__4; +x_2 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__4; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__12() { +lean_object* _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_mkOptionalNode___closed__2; -x_2 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__10; +x_2 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__10; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f(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; @@ -4372,7 +3461,7 @@ x_5 = l_Lean_Syntax_getArg(x_1, x_4); x_6 = l_Lean_Syntax_getArgs(x_5); lean_dec(x_5); x_7 = lean_unsigned_to_nat(0u); -x_8 = l___private_Lean_Elab_Declaration_8__splitMutualPreamble___main(x_6, x_7); +x_8 = l___private_Lean_Elab_Declaration_6__splitMutualPreamble___main(x_6, x_7); lean_dec(x_6); if (lean_obj_tag(x_8) == 0) { @@ -4403,22 +3492,22 @@ x_17 = l_Lean_nullKind___closed__2; x_18 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); -x_19 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__6; +x_19 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__6; x_20 = lean_array_push(x_19, x_18); -x_21 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__7; +x_21 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__7; x_22 = lean_array_push(x_20, x_21); x_23 = l_Lean_Parser_Command_mutual___elambda__1___closed__2; x_24 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_22); -x_25 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__11; +x_25 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__11; x_26 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_13, x_13, x_7, x_25); lean_dec(x_13); x_27 = l_Lean_mkOptionalNode___closed__2; x_28 = lean_array_push(x_27, x_24); x_29 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_28, x_28, x_7, x_26); lean_dec(x_28); -x_30 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__12; +x_30 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__12; x_31 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_30, x_30, x_7, x_29); x_32 = l_Lean_nullKind; x_33 = lean_alloc_ctor(1, 2, 0); @@ -4448,22 +3537,22 @@ x_40 = l_Lean_nullKind___closed__2; x_41 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_39); -x_42 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__6; +x_42 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__6; x_43 = lean_array_push(x_42, x_41); -x_44 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__7; +x_44 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__7; x_45 = lean_array_push(x_43, x_44); x_46 = l_Lean_Parser_Command_mutual___elambda__1___closed__2; x_47 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_47, 0, x_46); lean_ctor_set(x_47, 1, x_45); -x_48 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__11; +x_48 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__11; x_49 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_36, x_36, x_7, x_48); lean_dec(x_36); x_50 = l_Lean_mkOptionalNode___closed__2; x_51 = lean_array_push(x_50, x_47); x_52 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_51, x_51, x_7, x_49); lean_dec(x_51); -x_53 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__12; +x_53 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__12; x_54 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_53, x_53, x_7, x_52); x_55 = l_Lean_nullKind; x_56 = lean_alloc_ctor(1, 2, 0); @@ -4479,11 +3568,11 @@ return x_58; } } } -lean_object* l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f(x_1, x_2, x_3); +x_4 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; @@ -4554,7 +3643,7 @@ x_41 = lean_environment_main_module(x_35); x_42 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_42, 0, x_41); lean_ctor_set(x_42, 1, x_32); -x_43 = l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f(x_1, x_42, x_40); +x_43 = l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f(x_1, x_42, x_40); lean_dec(x_42); x_44 = lean_ctor_get(x_43, 0); lean_inc(x_44); @@ -4759,7 +3848,7 @@ block_30: if (lean_obj_tag(x_4) == 0) { uint8_t x_6; -x_6 = l___private_Lean_Elab_Declaration_5__isMutualInductive(x_1); +x_6 = l___private_Lean_Elab_Declaration_3__isMutualInductive(x_1); if (x_6 == 0) { lean_object* x_7; lean_object* x_8; @@ -4776,7 +3865,7 @@ x_10 = l_Lean_Syntax_getArg(x_1, x_9); lean_dec(x_1); x_11 = l_Lean_Syntax_getArgs(x_10); lean_dec(x_10); -x_12 = l___private_Lean_Elab_Declaration_6__elabMutualInductive(x_11, x_2, x_5); +x_12 = l___private_Lean_Elab_Declaration_4__elabMutualInductive(x_11, x_2, x_5); return x_12; } } @@ -4863,6 +3952,7 @@ return x_5; } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Util_CollectLevelParams(lean_object*); +lean_object* initialize_Lean_Elab_DeclUtil(lean_object*); lean_object* initialize_Lean_Elab_Definition(lean_object*); lean_object* initialize_Lean_Elab_Inductive(lean_object*); lean_object* initialize_Lean_Elab_Structure(lean_object*); @@ -4877,6 +3967,9 @@ lean_dec_ref(res); res = initialize_Lean_Util_CollectLevelParams(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Elab_DeclUtil(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Lean_Elab_Definition(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -4920,62 +4013,18 @@ l_Lean_Elab_Command_elabExample___closed__1 = _init_l_Lean_Elab_Command_elabExam lean_mark_persistent(l_Lean_Elab_Command_elabExample___closed__1); l_Lean_Elab_Command_elabExample___closed__2 = _init_l_Lean_Elab_Command_elabExample___closed__2(); lean_mark_persistent(l_Lean_Elab_Command_elabExample___closed__2); -l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__1 = _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__1(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__1); -l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__2 = _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__2(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__2); -l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__3 = _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__3(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__3); -l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__4 = _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__4(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__4); -l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__5 = _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__5(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__5); -l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__6 = _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__6(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__6); -l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__7 = _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__7(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__7); -l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__8 = _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__8(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__8); -l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__9 = _init_l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__9(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_1__checkValidInductiveModifier___closed__9); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__1 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__1(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__1); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__2 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__2(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__2); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__3 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__3(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__3); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__4 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__4(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__4); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__5 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__5(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__5); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__6 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__6(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__6); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__7 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__7(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__7); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__8 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__8(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__8); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__9 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__9(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__9); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__10 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__10(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__10); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__11 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__11(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__11); -l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__12 = _init_l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__12(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_2__checkValidCtorModifier___closed__12); -l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__1 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__1(); -lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__1); -l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__2 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__2(); -lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__2); -l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__3 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__3(); -lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__3); -l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__4 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__4(); -lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__4); -l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__5 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__5(); -lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__5); -l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__6 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__6(); -lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_3__inductiveSyntaxToView___spec__1___closed__6); -l_Lean_Elab_Command_elabClassInductive___closed__1 = _init_l_Lean_Elab_Command_elabClassInductive___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_elabClassInductive___closed__1); +l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__1 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__1(); +lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__1); +l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__2 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__2(); +lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__2); +l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__3 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__3(); +lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__3); +l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__4 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__4(); +lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__4); +l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__5 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__5(); +lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__5); +l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__6 = _init_l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__6(); +lean_mark_persistent(l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__6); l_Lean_Elab_Command_elabDeclaration___closed__1 = _init_l_Lean_Elab_Command_elabDeclaration___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_elabDeclaration___closed__1); l_Lean_Elab_Command_elabDeclaration___closed__2 = _init_l_Lean_Elab_Command_elabDeclaration___closed__2(); @@ -4987,30 +4036,30 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Command_elabDeclaration___closed__ res = l___regBuiltin_Lean_Elab_Command_elabDeclaration(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__1 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__1(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__1); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__2 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__2(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__2); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__3 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__3(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__3); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__4 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__4(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__4); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__5 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__5(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__5); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__6 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__6(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__6); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__7 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__7(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__7); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__8 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__8(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__8); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__9 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__9(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__9); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__10 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__10(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__10); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__11 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__11(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__11); -l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__12 = _init_l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__12(); -lean_mark_persistent(l___private_Lean_Elab_Declaration_9__expandMutualPreamble_x3f___closed__12); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__1 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__1); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__2 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__2(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__2); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__3 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__3(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__3); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__4 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__4(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__4); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__5 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__5(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__5); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__6 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__6(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__6); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__7 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__7(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__7); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__8 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__8(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__8); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__9 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__9(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__9); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__10 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__10(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__10); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__11 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__11(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__11); +l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__12 = _init_l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__12(); +lean_mark_persistent(l___private_Lean_Elab_Declaration_7__expandMutualPreamble_x3f___closed__12); l_Lean_Elab_Command_elabMutual___closed__1 = _init_l_Lean_Elab_Command_elabMutual___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_elabMutual___closed__1); l_Lean_Elab_Command_elabMutual___closed__2 = _init_l_Lean_Elab_Command_elabMutual___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Inductive.c b/stage0/stdlib/Lean/Elab/Inductive.c index f076afe6a5..54352556a2 100644 --- a/stage0/stdlib/Lean/Elab/Inductive.c +++ b/stage0/stdlib/Lean/Elab/Inductive.c @@ -27,18 +27,20 @@ lean_object* lean_mk_cases_on(lean_object*, lean_object*); extern lean_object* l_Lean_Expr_eq_x3f___closed__2; lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__18; lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Inductive_4__checkLevelNames___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___closed__6; lean_object* l___private_Lean_Elab_Inductive_21__shouldInferResultUniverse___closed__1; lean_object* l_Lean_Elab_Command_addDecl(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkSort(lean_object*); lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_30__updateParams___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___closed__5; lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__15; lean_object* l___private_Lean_Elab_Inductive_13__withInductiveLocalDeclsAux___main___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_iterateMAux___main___at_Lean_ppGoal___spec__6___closed__3; lean_object* l___private_Lean_Elab_Inductive_21__shouldInferResultUniverse___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_unreachable_x21___rarg(lean_object*); lean_object* l_Lean_Meta_isClassExpensive___main(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabInductiveCore___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__4; extern lean_object* l_Lean_MessageData_ofList___closed__3; uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); @@ -65,7 +67,6 @@ lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_hasOutParams___spec__5(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_6__throwUnexpectedInductiveType___rarg___closed__3; lean_object* l___private_Lean_Elab_Inductive_29__withUsed(lean_object*); -lean_object* l_Lean_Elab_Command_elabInductiveCore(lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_33__replaceIndFVarsWithConsts___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isClassQuick___main(lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; @@ -89,9 +90,11 @@ lean_object* l___private_Lean_Elab_Inductive_8__eqvFirstTypeResult___lambda__1__ lean_object* l___private_Lean_Elab_Inductive_22__addLevel___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_1__elabHeaderAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_19__getResultingUniverse(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__10; lean_object* l_Std_HashMapImp_insert___at___private_Lean_MetavarContext_2__visit___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_24__collectUniversesFromCtorType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_16__elabCtors___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveViews___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_17__levelMVarToParamAux___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_21__shouldInferResultUniverse___closed__4; @@ -116,8 +119,10 @@ lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_33__replaceIn lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_16__elabCtors___spec__1___lambda__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_16__elabCtors___spec__1___lambda__1___closed__2; lean_object* l___private_Lean_Elab_SyntheticMVars_11__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__9; lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__14; lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__10; +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__8; lean_object* l___private_Lean_Elab_Inductive_6__throwUnexpectedInductiveType___rarg___closed__2; lean_object* l___private_Lean_Elab_Inductive_31__collectLevelParamsInInductive(lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_16__elabCtors___spec__1___lambda__1___closed__9; @@ -134,6 +139,7 @@ lean_object* l___private_Lean_Elab_Inductive_7__getResultingType___lambda__1___b lean_object* l___private_Lean_Elab_Inductive_22__addLevel___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CtorView_inhabited; extern lean_object* l_Array_forMAux___main___at_Lean_Meta_clear___spec__5___closed__8; +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___closed__7; lean_object* l___private_Lean_Elab_Inductive_6__throwUnexpectedInductiveType___rarg___closed__1; lean_object* l___private_Lean_Elab_Inductive_13__withInductiveLocalDeclsAux___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_23__collectUniversesFromCtorTypeAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -160,6 +166,7 @@ lean_object* l_List_map___main___at___private_Lean_Elab_Inductive_35__applyInfer uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_16__elabCtors___spec__1___lambda__1___closed__6; lean_object* l___private_Lean_Elab_Inductive_26__updateResultingUniverse(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveViews___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Inductive_37__mkAuxConstructions___spec__1(uint8_t, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_26__updateResultingUniverse___closed__2; uint8_t l_Lean_Level_isParam(lean_object*); @@ -177,6 +184,7 @@ extern lean_object* l_Lean_Expr_heq_x3f___closed__2; lean_object* l___private_Lean_Elab_Inductive_2__checkNumParams___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_5__mkTypeFor(lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabInductiveViews(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_22__addLevel(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_PersistentHashMap_find_x21___rarg___closed__2; lean_object* l___private_Lean_Elab_Inductive_36__mkInductiveDecl___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -193,9 +201,9 @@ lean_object* l___private_Lean_Elab_Inductive_32__mkIndFVar2Const(lean_object*, l lean_object* l___private_Lean_Elab_Inductive_1__elabHeaderAux___main___lambda__1___closed__1; lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__12; lean_object* l_Lean_Elab_Term_assignLevelMVar(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_ElabHeaderResult_inhabited___closed__1; lean_object* l_List_map___main___at___private_Lean_Elab_Inductive_26__updateResultingUniverse___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__11; lean_object* lean_mk_brec_on(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabTermAux___main(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_1__elabHeaderAux___main___lambda__1___closed__3; @@ -203,6 +211,7 @@ lean_object* l___private_Lean_Elab_Inductive_24__collectUniversesFromCtorType(le lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Inductive_2__checkNumParams___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_8__eqvFirstTypeResult(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_20__tmpIndParam___closed__3; +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___closed__3; lean_object* l___private_Lean_Elab_Inductive_21__shouldInferResultUniverse___closed__2; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -212,6 +221,7 @@ lean_object* l___private_Lean_Elab_Inductive_6__throwUnexpectedInductiveType(lea lean_object* l___private_Lean_Elab_Inductive_21__shouldInferResultUniverse___closed__6; lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Inductive_2__checkNumParams___spec__1___closed__1; lean_object* l_List_map___main___at___private_Lean_Elab_Inductive_26__updateResultingUniverse___spec__3(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___main___at___private_Lean_Elab_Inductive_26__updateResultingUniverse___spec__2___lambda__1(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_1__elabHeaderAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); @@ -224,6 +234,7 @@ lean_object* l___private_Lean_Elab_Inductive_21__shouldInferResultUniverse___clo extern lean_object* l_Lean_Meta_AbstractMVars_abstractExprMVars___main___closed__3; lean_object* l___private_Lean_Elab_Inductive_23__collectUniversesFromCtorTypeAux___main___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_19__getResultingUniverse___closed__1; +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__6; lean_object* l___private_Lean_Elab_Inductive_17__levelMVarToParamAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_mk_no_confusion(lean_object*, lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main___at___private_Lean_Elab_Inductive_33__replaceIndFVarsWithConsts___spec__5(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -244,11 +255,13 @@ lean_object* l_Nat_foldMAux___main___at___private_Lean_Elab_Inductive_36__mkIndu lean_object* l___private_Lean_Elab_Inductive_19__getResultingUniverse___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); uint8_t l_Lean_Expr_Data_binderInfo(uint64_t); +extern lean_object* l_Lean_registerClassAttr___closed__2; lean_object* l___private_Lean_Elab_Inductive_30__updateParams(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_10__checkHeader(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_1__elabHeaderAux___main___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main___at___private_Lean_Elab_Inductive_33__replaceIndFVarsWithConsts___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_19__getResultingUniverse___closed__4; +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__2; lean_object* l_Lean_Elab_Command_sortDeclLevelParams(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_1__elabHeaderAux___main___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_proj(lean_object*, lean_object*); @@ -269,9 +282,11 @@ lean_object* l___private_Lean_Elab_Inductive_21__shouldInferResultUniverse___clo lean_object* l_List_foldl___main___at___private_Lean_Elab_Inductive_31__collectLevelParamsInInductive___spec__2(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_36__mkInductiveDecl___lambda__2___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* l_List_mapM___main___at___private_Lean_Elab_Inductive_33__replaceIndFVarsWithConsts___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__1; lean_object* l_List_foldl___main___at___private_Lean_Elab_Inductive_31__collectLevelParamsInInductive___spec__1(lean_object*, lean_object*); size_t lean_ptr_addr(lean_object*); lean_object* l___private_Lean_Elab_Inductive_20__tmpIndParam; +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_ReplaceImpl_replaceUnsafeM___main___at___private_Lean_Elab_Inductive_33__replaceIndFVarsWithConsts___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_34__mkCtor2InferMod___boxed(lean_object*); uint8_t l_Lean_BinderInfo_beq(uint8_t, uint8_t); @@ -292,7 +307,6 @@ lean_object* l___private_Lean_Elab_Inductive_18__levelMVarToParam___boxed(lean_o lean_object* l_Lean_Elab_Command_InductiveView_inhabited___closed__1; lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__9; lean_object* l_Lean_Syntax_getArgs(lean_object*); -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveCore___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_4__forallTelescopeReducingAuxAux___main___at___private_Lean_Elab_Inductive_33__replaceIndFVarsWithConsts___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_33__replaceIndFVarsWithConsts(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Inductive_4__checkLevelNames___spec__1___closed__1; @@ -307,25 +321,32 @@ extern lean_object* l_Lean_Expr_ReplaceLevelImpl_initCache; extern lean_object* l_Std_HashMap_find_x21___rarg___closed__1; lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Inductive_4__checkLevelNames___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__11; +extern lean_object* l_Lean_Elab_Command_Attribute_inhabited; lean_object* l_List_foldlM___main___at___private_Lean_Elab_Inductive_28__removeUnused___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_36__mkInductiveDecl___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_7__getResultingType(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__1; lean_object* l___private_Lean_Meta_Basic_5__forallTelescopeReducingAux___at___private_Lean_Elab_Inductive_33__replaceIndFVarsWithConsts___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_contains___at___private_Lean_Elab_Inductive_22__addLevel___main___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabInductiveViews___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Definition_1__removeUnused___closed__1; uint8_t l_Lean_Expr_isFVar(lean_object*); +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_7__getResultingType___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_ReplaceLevelImpl_replaceUnsafeM___main___at___private_Lean_Elab_Inductive_26__updateResultingUniverse___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_30__updateParams___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___closed__2; extern lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__5; lean_object* lean_expr_update_lambda(lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___closed__8; +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__7; lean_object* l___private_Lean_Elab_Command_9__getVarDecls(lean_object*); lean_object* l___private_Lean_Elab_Inductive_12__elabHeader(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Inductive_3__checkUnsafe___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__2; lean_object* l_Lean_Elab_Command_getEnv(lean_object*, lean_object*); extern lean_object* l_Lean_TraceState_Inhabited___closed__1; +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___closed__9; lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_17__levelMVarToParamAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); @@ -338,11 +359,13 @@ lean_object* l_Lean_Meta_withNewLocalInstances___main___at___private_Lean_Elab_I lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_toList___rarg(lean_object*); lean_object* l___private_Lean_Elab_Inductive_22__addLevel___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___closed__1; lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Inductive_34__mkCtor2InferMod___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Expr_Inhabited; lean_object* l_Lean_Elab_Command_CtorView_inhabited___closed__1; lean_object* l_List_forM___main___at___private_Lean_Elab_Inductive_27__traceIndTypes___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___closed__4; lean_object* l_Lean_Elab_Command_CtorView_inhabited___closed__2; lean_object* l_Lean_Elab_Term_mkFreshLevelMVar(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_ReplaceLevelImpl_replaceUnsafeM___main___at___private_Lean_Elab_Inductive_26__updateResultingUniverse___spec__4(lean_object*, size_t, lean_object*, lean_object*); @@ -352,8 +375,10 @@ lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main_ lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Inductive_2__checkNumParams___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___main___at___private_Lean_Elab_Inductive_35__applyInferMod___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Lean_Elab_Inductive_28__removeUnused___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__3; lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Inductive_34__mkCtor2InferMod___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_37__mkAuxConstructions___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__5; lean_object* l_List_map___main___at___private_Lean_Elab_Inductive_26__updateResultingUniverse___spec__6(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_23__collectUniversesFromCtorTypeAux___main___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_23__collectUniversesFromCtorTypeAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -361,6 +386,7 @@ lean_object* l___private_Lean_Elab_Inductive_37__mkAuxConstructions___closed__1; lean_object* l_Lean_Expr_inferImplicit___main(lean_object*, lean_object*, uint8_t); lean_object* l___private_Lean_Elab_Inductive_28__removeUnused(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_resettingSynthInstanceCache___rarg___closed__1; +lean_object* l_Lean_Elab_Command_checkValidCtorModifier(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_9__checkParamsAndResultType___main___closed__6; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_18__levelMVarToParam(lean_object*, lean_object*, lean_object*, lean_object*); @@ -383,6 +409,7 @@ lean_object* l___private_Lean_Elab_Inductive_36__mkInductiveDecl(lean_object*, l lean_object* l___private_Lean_Elab_Term_2__fromMetaException(lean_object*, lean_object*, lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_16__elabCtors___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_20__tmpIndParam___closed__1; +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instantiateLevelMVars(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_contains___at___private_Lean_Elab_Inductive_22__addLevel___main___spec__1___boxed(lean_object*, lean_object*); @@ -393,6 +420,7 @@ lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_17__levelMVar lean_object* l_Lean_Elab_Term_mkForall___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_33__replaceIndFVarsWithConsts___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_const(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___closed__12; lean_object* l___private_Lean_Elab_Inductive_19__getResultingUniverse___closed__5; lean_object* l_List_mapM___main___at___private_Lean_Elab_Inductive_16__elabCtors___spec__1___lambda__1___closed__5; lean_object* l_Lean_Meta_forallTelescopeReducing___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -412,6 +440,643 @@ lean_object* l_monadInhabited___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_getFVarLocalDecl(lean_object*, lean_object*, lean_object*); lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Inductive_37__mkAuxConstructions___spec__2(uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Inductive_3__checkUnsafe(lean_object*, lean_object*, lean_object*); +lean_object* _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of attributes in inductive declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidInductiveModifier___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidInductiveModifier___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of 'partial' in inductive declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidInductiveModifier___closed__4; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidInductiveModifier___closed__5; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of 'noncomputable' in inductive declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidInductiveModifier___closed__7; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidInductiveModifier___closed__8; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; uint8_t x_11; +x_5 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 1); +x_6 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 2); +x_7 = lean_ctor_get(x_2, 1); +x_8 = lean_array_get_size(x_7); +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_nat_dec_eq(x_8, x_9); +if (x_5 == 0) +{ +uint8_t x_53; +x_53 = 0; +x_11 = x_53; +goto block_52; +} +else +{ +uint8_t x_54; +x_54 = 1; +x_11 = x_54; +goto block_52; +} +block_52: +{ +uint8_t x_12; +if (x_6 == 0) +{ +uint8_t x_50; +x_50 = 0; +x_12 = x_50; +goto block_49; +} +else +{ +uint8_t x_51; +x_51 = 1; +x_12 = x_51; +goto block_49; +} +block_49: +{ +uint8_t x_13; +if (x_10 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_unsigned_to_nat(1u); +x_42 = lean_nat_dec_eq(x_8, x_41); +lean_dec(x_8); +if (x_42 == 0) +{ +x_13 = x_10; +goto block_40; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; +x_43 = l_Lean_Elab_Command_Attribute_inhabited; +x_44 = lean_array_get(x_43, x_7, x_9); +x_45 = lean_ctor_get(x_44, 0); +lean_inc(x_45); +lean_dec(x_44); +x_46 = l_Lean_registerClassAttr___closed__2; +x_47 = lean_name_eq(x_45, x_46); +lean_dec(x_45); +x_13 = x_47; +goto block_40; +} +} +else +{ +uint8_t x_48; +lean_dec(x_8); +x_48 = 1; +x_13 = x_48; +goto block_40; +} +block_40: +{ +uint8_t x_14; +if (x_13 == 0) +{ +uint8_t x_38; +x_38 = 0; +x_14 = x_38; +goto block_37; +} +else +{ +uint8_t x_39; +x_39 = 1; +x_14 = x_39; +goto block_37; +} +block_37: +{ +lean_object* x_15; +if (x_11 == 0) +{ +x_15 = x_4; +goto block_30; +} +else +{ +lean_object* x_31; lean_object* x_32; uint8_t x_33; +x_31 = l_Lean_Elab_Command_checkValidInductiveModifier___closed__9; +x_32 = l_Lean_Elab_Command_throwError___rarg(x_1, x_31, x_3, x_4); +x_33 = !lean_is_exclusive(x_32); +if (x_33 == 0) +{ +return x_32; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_32, 0); +x_35 = lean_ctor_get(x_32, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_32); +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; +} +} +block_30: +{ +if (x_12 == 0) +{ +if (x_14 == 0) +{ +lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_16 = l_Lean_Elab_Command_checkValidInductiveModifier___closed__3; +x_17 = l_Lean_Elab_Command_throwError___rarg(x_1, x_16, x_3, x_15); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +return x_17; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_17); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +else +{ +lean_object* x_22; lean_object* x_23; +lean_dec(x_3); +x_22 = lean_box(0); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_15); +return x_23; +} +} +else +{ +lean_object* x_24; lean_object* x_25; uint8_t x_26; +x_24 = l_Lean_Elab_Command_checkValidInductiveModifier___closed__6; +x_25 = l_Lean_Elab_Command_throwError___rarg(x_1, x_24, x_3, x_15); +x_26 = !lean_is_exclusive(x_25); +if (x_26 == 0) +{ +return x_25; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_25, 0); +x_28 = lean_ctor_get(x_25, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_25); +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +return x_29; +} +} +} +} +} +} +} +} +} +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier___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_Lean_Elab_Command_checkValidInductiveModifier(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of attributes in constructor declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidCtorModifier___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidCtorModifier___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of 'unsafe' in constructor declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidCtorModifier___closed__4; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidCtorModifier___closed__5; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of 'partial' in constructor declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidCtorModifier___closed__7; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidCtorModifier___closed__8; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__10() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of 'noncomputable' in constructor declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidCtorModifier___closed__10; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidCtorModifier___closed__11; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_checkValidCtorModifier(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; uint8_t x_6; uint8_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; uint8_t x_12; +x_5 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 1); +x_6 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 2); +x_7 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 3); +x_8 = lean_ctor_get(x_2, 1); +x_9 = lean_array_get_size(x_8); +x_10 = lean_unsigned_to_nat(0u); +x_11 = lean_nat_dec_eq(x_9, x_10); +lean_dec(x_9); +if (x_5 == 0) +{ +uint8_t x_58; +x_58 = 0; +x_12 = x_58; +goto block_57; +} +else +{ +uint8_t x_59; +x_59 = 1; +x_12 = x_59; +goto block_57; +} +block_57: +{ +uint8_t x_13; +if (x_6 == 0) +{ +uint8_t x_55; +x_55 = 0; +x_13 = x_55; +goto block_54; +} +else +{ +uint8_t x_56; +x_56 = 1; +x_13 = x_56; +goto block_54; +} +block_54: +{ +uint8_t x_14; +if (x_7 == 0) +{ +uint8_t x_52; +x_52 = 0; +x_14 = x_52; +goto block_51; +} +else +{ +uint8_t x_53; +x_53 = 1; +x_14 = x_53; +goto block_51; +} +block_51: +{ +uint8_t x_15; +if (x_11 == 0) +{ +uint8_t x_49; +x_49 = 1; +x_15 = x_49; +goto block_48; +} +else +{ +uint8_t x_50; +x_50 = 0; +x_15 = x_50; +goto block_48; +} +block_48: +{ +uint8_t x_16; +if (x_15 == 0) +{ +uint8_t x_46; +x_46 = 0; +x_16 = x_46; +goto block_45; +} +else +{ +uint8_t x_47; +x_47 = 1; +x_16 = x_47; +goto block_45; +} +block_45: +{ +lean_object* x_17; +if (x_12 == 0) +{ +if (x_13 == 0) +{ +x_17 = x_4; +goto block_32; +} +else +{ +lean_object* x_33; lean_object* x_34; uint8_t x_35; +x_33 = l_Lean_Elab_Command_checkValidCtorModifier___closed__9; +x_34 = l_Lean_Elab_Command_throwError___rarg(x_1, x_33, x_3, x_4); +x_35 = !lean_is_exclusive(x_34); +if (x_35 == 0) +{ +return x_34; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_34, 0); +x_37 = lean_ctor_get(x_34, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_34); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +} +else +{ +lean_object* x_39; lean_object* x_40; uint8_t x_41; +x_39 = l_Lean_Elab_Command_checkValidCtorModifier___closed__12; +x_40 = l_Lean_Elab_Command_throwError___rarg(x_1, x_39, x_3, x_4); +x_41 = !lean_is_exclusive(x_40); +if (x_41 == 0) +{ +return x_40; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_40, 0); +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_40); +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +return x_44; +} +} +block_32: +{ +if (x_14 == 0) +{ +if (x_16 == 0) +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_3); +x_18 = lean_box(0); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_17); +return x_19; +} +else +{ +lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_20 = l_Lean_Elab_Command_checkValidCtorModifier___closed__3; +x_21 = l_Lean_Elab_Command_throwError___rarg(x_1, x_20, x_3, x_17); +x_22 = !lean_is_exclusive(x_21); +if (x_22 == 0) +{ +return x_21; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_21, 0); +x_24 = lean_ctor_get(x_21, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_21); +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; +} +} +} +else +{ +lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_26 = l_Lean_Elab_Command_checkValidCtorModifier___closed__6; +x_27 = l_Lean_Elab_Command_throwError___rarg(x_1, x_26, x_3, x_17); +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +return x_27; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_27, 0); +x_30 = lean_ctor_get(x_27, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_27); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +} +} +} +} +} +} +} +lean_object* l_Lean_Elab_Command_checkValidCtorModifier___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_Lean_Elab_Command_checkValidCtorModifier(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} lean_object* _init_l_Lean_Elab_Command_CtorView_inhabited___closed__1() { _start: { @@ -19871,7 +20536,7 @@ lean_dec(x_1); return x_4; } } -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveCore___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveViews___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; @@ -19946,7 +20611,7 @@ return x_24; } } } -lean_object* l_Lean_Elab_Command_elabInductiveCore___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_Elab_Command_elabInductiveViews___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; @@ -19954,7 +20619,7 @@ x_5 = l___private_Lean_Elab_Inductive_36__mkInductiveDecl(x_2, x_1, x_3, x_4); return x_5; } } -lean_object* l_Lean_Elab_Command_elabInductiveCore(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Elab_Command_elabInductiveViews(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; @@ -19969,7 +20634,7 @@ lean_dec(x_6); x_35 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_35, 0, x_34); lean_inc(x_1); -x_36 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabInductiveCore___lambda__1), 4, 1); +x_36 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabInductiveViews___lambda__1), 4, 1); lean_closure_set(x_36, 0, x_1); lean_inc(x_2); x_37 = l___private_Lean_Elab_Command_2__getState(x_2, x_3); @@ -20470,7 +21135,7 @@ lean_object* x_13; lean_object* x_14; x_13 = lean_ctor_get(x_12, 1); lean_inc(x_13); lean_dec(x_12); -x_14 = l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveCore___spec__1(x_7, x_1, x_5, x_2, x_13); +x_14 = l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveViews___spec__1(x_7, x_1, x_5, x_2, x_13); lean_dec(x_1); lean_dec(x_7); if (lean_obj_tag(x_14) == 0) @@ -20576,11 +21241,11 @@ return x_32; } } } -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveCore___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* l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveViews___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; -x_6 = l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveCore___spec__1(x_1, x_2, x_3, x_4, x_5); +x_6 = l_Array_forMAux___main___at_Lean_Elab_Command_elabInductiveViews___spec__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); lean_dec(x_1); return x_6; @@ -20623,6 +21288,48 @@ lean_dec_ref(res); res = initialize_Lean_Elab_Definition(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Elab_Command_checkValidInductiveModifier___closed__1 = _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidInductiveModifier___closed__1); +l_Lean_Elab_Command_checkValidInductiveModifier___closed__2 = _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidInductiveModifier___closed__2); +l_Lean_Elab_Command_checkValidInductiveModifier___closed__3 = _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidInductiveModifier___closed__3); +l_Lean_Elab_Command_checkValidInductiveModifier___closed__4 = _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidInductiveModifier___closed__4); +l_Lean_Elab_Command_checkValidInductiveModifier___closed__5 = _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidInductiveModifier___closed__5); +l_Lean_Elab_Command_checkValidInductiveModifier___closed__6 = _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidInductiveModifier___closed__6); +l_Lean_Elab_Command_checkValidInductiveModifier___closed__7 = _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__7(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidInductiveModifier___closed__7); +l_Lean_Elab_Command_checkValidInductiveModifier___closed__8 = _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__8(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidInductiveModifier___closed__8); +l_Lean_Elab_Command_checkValidInductiveModifier___closed__9 = _init_l_Lean_Elab_Command_checkValidInductiveModifier___closed__9(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidInductiveModifier___closed__9); +l_Lean_Elab_Command_checkValidCtorModifier___closed__1 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__1); +l_Lean_Elab_Command_checkValidCtorModifier___closed__2 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__2); +l_Lean_Elab_Command_checkValidCtorModifier___closed__3 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__3); +l_Lean_Elab_Command_checkValidCtorModifier___closed__4 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__4); +l_Lean_Elab_Command_checkValidCtorModifier___closed__5 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__5); +l_Lean_Elab_Command_checkValidCtorModifier___closed__6 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__6); +l_Lean_Elab_Command_checkValidCtorModifier___closed__7 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__7(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__7); +l_Lean_Elab_Command_checkValidCtorModifier___closed__8 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__8(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__8); +l_Lean_Elab_Command_checkValidCtorModifier___closed__9 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__9(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__9); +l_Lean_Elab_Command_checkValidCtorModifier___closed__10 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__10(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__10); +l_Lean_Elab_Command_checkValidCtorModifier___closed__11 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__11(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__11); +l_Lean_Elab_Command_checkValidCtorModifier___closed__12 = _init_l_Lean_Elab_Command_checkValidCtorModifier___closed__12(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidCtorModifier___closed__12); l_Lean_Elab_Command_CtorView_inhabited___closed__1 = _init_l_Lean_Elab_Command_CtorView_inhabited___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_CtorView_inhabited___closed__1); l_Lean_Elab_Command_CtorView_inhabited___closed__2 = _init_l_Lean_Elab_Command_CtorView_inhabited___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Structure.c b/stage0/stdlib/Lean/Elab/Structure.c index 1da3b3a73e..bf71a2dd5b 100644 --- a/stage0/stdlib/Lean/Elab/Structure.c +++ b/stage0/stdlib/Lean/Elab/Structure.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Elab.Structure -// Imports: Init Lean.Elab.Command Lean.Elab.DeclModifiers +// Imports: Init Lean.Elab.Command Lean.Elab.DeclModifiers Lean.Elab.DeclUtil Lean.Elab.Inductive #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -13,42 +13,2517 @@ #ifdef __cplusplus extern "C" { #endif -lean_object* l_Lean_Elab_Command_elabStructure___rarg(lean_object*); -lean_object* l_Lean_Elab_Command_elabStructure___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabStructure(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabStructure___rarg(lean_object* x_1) { +lean_object* l_Lean_Elab_Command_elabStructure___lambda__1___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_unreachable_x21___rarg(lean_object*); +lean_object* l_Lean_Elab_Command_elabStructure___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__5; +uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__3; +lean_object* l_Lean_Elab_Command_withDeclId___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Array_empty___closed__1; +lean_object* l___private_Lean_Elab_Command_6__mkTermContext(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); +lean_object* l___private_Lean_Elab_Structure_3__expandFields(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__7; +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_applyVisibility(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabStructure___lambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___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* l_Lean_Elab_Command_mkDeclName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__12; +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__10; +lean_object* lean_array_fget(lean_object*, lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__3(lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___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_object*, lean_object*); +lean_object* l___private_Lean_Elab_Structure_1__defaultCtorName; +lean_object* l_Lean_Elab_Command_elabStructure___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Structure_2__expandCtor___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabStructure___lambda__2___closed__1; +lean_object* l_Lean_Syntax_getId(lean_object*); +lean_object* lean_name_mk_string(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__2; +lean_object* l_Lean_Elab_Command_elabStructure___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__9; +lean_object* l___private_Lean_Elab_Structure_4__elabStructureView(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__1; +extern lean_object* l_Lean_registerClassAttr___closed__2; +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__11; +lean_object* l___private_Lean_Elab_Command_2__getState(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__3; +lean_object* l___private_Lean_Elab_Structure_2__expandCtor(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Structure_3__expandFields___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_BinderInfo_beq(uint8_t, uint8_t); +lean_object* l___private_Lean_Elab_Structure_1__defaultCtorName___closed__1; +lean_object* l___private_Lean_Elab_Command_7__mkTermState(lean_object*); +lean_object* l_Lean_Elab_Command_getCurrMacroScope(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_getMainModule(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArgs(lean_object*); +lean_object* l_Lean_Syntax_getKind(lean_object*); +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__8; +lean_object* l_Lean_Elab_Command_elabStructure___closed__1; +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__4; +lean_object* l_Lean_Elab_Command_elabStructure(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_addAttribute(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +lean_object* l_Lean_Elab_expandDeclSig(lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__2; +lean_object* l___private_Lean_Elab_Structure_4__elabStructureView___boxed(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__2(lean_object*, lean_object*, uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Command_9__getVarDecls(lean_object*); +uint8_t l_Lean_Syntax_isNone(lean_object*); +extern lean_object* l_Lean_prodToExpr___rarg___lambda__1___closed__3; +lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabModifiers(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Command_CtorView_inhabited___closed__1; +lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__1; +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +lean_object* l___private_Lean_Elab_Structure_4__elabStructureView___rarg(lean_object*); +lean_object* l_Lean_Elab_Command_checkValidCtorModifier(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_checkValidFieldModifier(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_checkValidInductiveModifier(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Command_liftTermElabM___rarg___closed__1; +extern lean_object* l_Lean_Parser_Command_classTk___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__6; +lean_object* l_Lean_Elab_Command_elabStructure___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* _init_l___private_Lean_Elab_Structure_1__defaultCtorName___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_prodToExpr___rarg___lambda__1___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___private_Lean_Elab_Structure_1__defaultCtorName() { +_start: +{ +lean_object* x_1; +x_1 = l___private_Lean_Elab_Structure_1__defaultCtorName___closed__1; +return x_1; +} +} +lean_object* l___private_Lean_Elab_Structure_2__expandCtor(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; uint8_t x_7; +x_5 = lean_unsigned_to_nat(6u); +x_6 = l_Lean_Syntax_getArg(x_1, x_5); +x_7 = l_Lean_Syntax_isNone(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_dec(x_1); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_Lean_Syntax_getArg(x_6, x_8); +lean_dec(x_6); +x_10 = l_Lean_Syntax_getArg(x_9, x_8); +lean_inc(x_3); +x_11 = l_Lean_Elab_Command_elabModifiers(x_10, x_3, x_4); +lean_dec(x_10); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +x_14 = lean_unsigned_to_nat(2u); +x_15 = l_Lean_Syntax_getArg(x_9, x_14); +x_16 = l_Lean_Syntax_isNone(x_15); +lean_dec(x_15); +x_17 = lean_unsigned_to_nat(1u); +x_18 = l_Lean_Syntax_getIdAt(x_9, x_17); +lean_inc(x_18); +x_19 = l_Lean_Name_append___main(x_2, x_18); +x_20 = lean_ctor_get_uint8(x_12, sizeof(void*)*2); +lean_inc(x_3); +x_21 = l_Lean_Elab_Command_checkValidCtorModifier(x_9, x_12, x_3, x_13); +if (x_16 == 0) +{ +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_22; lean_object* x_23; +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = l_Lean_Elab_Command_applyVisibility(x_9, x_20, x_19, x_3, x_22); +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; uint8_t x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_23, 0); +x_26 = 1; +x_27 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_27, 0, x_9); +lean_ctor_set(x_27, 1, x_12); +lean_ctor_set(x_27, 2, x_18); +lean_ctor_set(x_27, 3, x_25); +lean_ctor_set_uint8(x_27, sizeof(void*)*4, x_26); +lean_ctor_set(x_23, 0, x_27); +return x_23; +} +else +{ +lean_object* x_28; lean_object* x_29; uint8_t 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 = 1; +x_31 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_31, 0, x_9); +lean_ctor_set(x_31, 1, x_12); +lean_ctor_set(x_31, 2, x_18); +lean_ctor_set(x_31, 3, x_28); +lean_ctor_set_uint8(x_31, sizeof(void*)*4, x_30); +x_32 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_29); +return x_32; +} +} +else +{ +uint8_t x_33; +lean_dec(x_18); +lean_dec(x_12); +lean_dec(x_9); +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 +{ +uint8_t x_37; +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_12); +lean_dec(x_9); +lean_dec(x_3); +x_37 = !lean_is_exclusive(x_21); +if (x_37 == 0) +{ +return x_21; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_21, 0); +x_39 = lean_ctor_get(x_21, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_21); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +} +else +{ +if (lean_obj_tag(x_21) == 0) +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_21, 1); +lean_inc(x_41); +lean_dec(x_21); +x_42 = l_Lean_Elab_Command_applyVisibility(x_9, x_20, x_19, x_3, x_41); +if (lean_obj_tag(x_42) == 0) +{ +uint8_t x_43; +x_43 = !lean_is_exclusive(x_42); +if (x_43 == 0) +{ +lean_object* x_44; uint8_t x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_42, 0); +x_45 = 0; +x_46 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_46, 0, x_9); +lean_ctor_set(x_46, 1, x_12); +lean_ctor_set(x_46, 2, x_18); +lean_ctor_set(x_46, 3, x_44); +lean_ctor_set_uint8(x_46, sizeof(void*)*4, x_45); +lean_ctor_set(x_42, 0, x_46); +return x_42; +} +else +{ +lean_object* x_47; lean_object* x_48; uint8_t x_49; lean_object* x_50; lean_object* x_51; +x_47 = lean_ctor_get(x_42, 0); +x_48 = lean_ctor_get(x_42, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_42); +x_49 = 0; +x_50 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_50, 0, x_9); +lean_ctor_set(x_50, 1, x_12); +lean_ctor_set(x_50, 2, x_18); +lean_ctor_set(x_50, 3, x_47); +lean_ctor_set_uint8(x_50, sizeof(void*)*4, x_49); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_48); +return x_51; +} +} +else +{ +uint8_t x_52; +lean_dec(x_18); +lean_dec(x_12); +lean_dec(x_9); +x_52 = !lean_is_exclusive(x_42); +if (x_52 == 0) +{ +return x_42; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_42, 0); +x_54 = lean_ctor_get(x_42, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_42); +x_55 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_55, 0, x_53); +lean_ctor_set(x_55, 1, x_54); +return x_55; +} +} +} +else +{ +uint8_t x_56; +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_12); +lean_dec(x_9); +lean_dec(x_3); +x_56 = !lean_is_exclusive(x_21); +if (x_56 == 0) +{ +return x_21; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_21, 0); +x_58 = lean_ctor_get(x_21, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_21); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +return x_59; +} +} +} +} +else +{ +uint8_t x_60; +lean_dec(x_9); +lean_dec(x_3); +x_60 = !lean_is_exclusive(x_11); +if (x_60 == 0) +{ +return x_11; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_11, 0); +x_62 = lean_ctor_get(x_11, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_11); +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_61); +lean_ctor_set(x_63, 1, x_62); +return x_63; +} +} +} +else +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; uint8_t x_67; lean_object* x_68; lean_object* x_69; +lean_dec(x_6); +lean_dec(x_3); +x_64 = l___private_Lean_Elab_Structure_1__defaultCtorName; +x_65 = l_Lean_Name_append___main(x_2, x_64); +x_66 = l_Lean_Elab_Command_CtorView_inhabited___closed__1; +x_67 = 0; +x_68 = lean_alloc_ctor(0, 4, 1); +lean_ctor_set(x_68, 0, x_1); +lean_ctor_set(x_68, 1, x_66); +lean_ctor_set(x_68, 2, x_64); +lean_ctor_set(x_68, 3, x_65); +lean_ctor_set_uint8(x_68, sizeof(void*)*4, x_67); +x_69 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_69, 0, x_68); +lean_ctor_set(x_69, 1, x_4); +return x_69; +} +} +} +lean_object* l___private_Lean_Elab_Structure_2__expandCtor___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___private_Lean_Elab_Structure_2__expandCtor(x_1, x_2, x_3, x_4); +lean_dec(x_2); +return x_5; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of attributes in field declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidFieldModifier___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidFieldModifier___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of 'unsafe' in field declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidFieldModifier___closed__4; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidFieldModifier___closed__5; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of 'partial' in field declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidFieldModifier___closed__7; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidFieldModifier___closed__8; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__10() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid use of 'noncomputable' in field declaration"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidFieldModifier___closed__10; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_checkValidFieldModifier___closed__11; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_checkValidFieldModifier(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; uint8_t x_6; uint8_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; uint8_t x_12; +x_5 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 1); +x_6 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 2); +x_7 = lean_ctor_get_uint8(x_2, sizeof(void*)*2 + 3); +x_8 = lean_ctor_get(x_2, 1); +x_9 = lean_array_get_size(x_8); +x_10 = lean_unsigned_to_nat(0u); +x_11 = lean_nat_dec_eq(x_9, x_10); +lean_dec(x_9); +if (x_5 == 0) +{ +uint8_t x_58; +x_58 = 0; +x_12 = x_58; +goto block_57; +} +else +{ +uint8_t x_59; +x_59 = 1; +x_12 = x_59; +goto block_57; +} +block_57: +{ +uint8_t x_13; +if (x_6 == 0) +{ +uint8_t x_55; +x_55 = 0; +x_13 = x_55; +goto block_54; +} +else +{ +uint8_t x_56; +x_56 = 1; +x_13 = x_56; +goto block_54; +} +block_54: +{ +uint8_t x_14; +if (x_7 == 0) +{ +uint8_t x_52; +x_52 = 0; +x_14 = x_52; +goto block_51; +} +else +{ +uint8_t x_53; +x_53 = 1; +x_14 = x_53; +goto block_51; +} +block_51: +{ +uint8_t x_15; +if (x_11 == 0) +{ +uint8_t x_49; +x_49 = 1; +x_15 = x_49; +goto block_48; +} +else +{ +uint8_t x_50; +x_50 = 0; +x_15 = x_50; +goto block_48; +} +block_48: +{ +uint8_t x_16; +if (x_15 == 0) +{ +uint8_t x_46; +x_46 = 0; +x_16 = x_46; +goto block_45; +} +else +{ +uint8_t x_47; +x_47 = 1; +x_16 = x_47; +goto block_45; +} +block_45: +{ +lean_object* x_17; +if (x_12 == 0) +{ +if (x_13 == 0) +{ +x_17 = x_4; +goto block_32; +} +else +{ +lean_object* x_33; lean_object* x_34; uint8_t x_35; +x_33 = l_Lean_Elab_Command_checkValidFieldModifier___closed__9; +x_34 = l_Lean_Elab_Command_throwError___rarg(x_1, x_33, x_3, x_4); +x_35 = !lean_is_exclusive(x_34); +if (x_35 == 0) +{ +return x_34; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_34, 0); +x_37 = lean_ctor_get(x_34, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_34); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +} +else +{ +lean_object* x_39; lean_object* x_40; uint8_t x_41; +x_39 = l_Lean_Elab_Command_checkValidFieldModifier___closed__12; +x_40 = l_Lean_Elab_Command_throwError___rarg(x_1, x_39, x_3, x_4); +x_41 = !lean_is_exclusive(x_40); +if (x_41 == 0) +{ +return x_40; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_40, 0); +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_40); +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +return x_44; +} +} +block_32: +{ +if (x_14 == 0) +{ +if (x_16 == 0) +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_3); +x_18 = lean_box(0); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_17); +return x_19; +} +else +{ +lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_20 = l_Lean_Elab_Command_checkValidFieldModifier___closed__3; +x_21 = l_Lean_Elab_Command_throwError___rarg(x_1, x_20, x_3, x_17); +x_22 = !lean_is_exclusive(x_21); +if (x_22 == 0) +{ +return x_21; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_21, 0); +x_24 = lean_ctor_get(x_21, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_21); +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; +} +} +} +else +{ +lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_26 = l_Lean_Elab_Command_checkValidFieldModifier___closed__6; +x_27 = l_Lean_Elab_Command_throwError___rarg(x_1, x_26, x_3, x_17); +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +return x_27; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_27, 0); +x_30 = lean_ctor_get(x_27, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_27); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +} +} +} +} +} +} +} +lean_object* l_Lean_Elab_Command_checkValidFieldModifier___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_Lean_Elab_Command_checkValidFieldModifier(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* 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_14; uint8_t x_15; +x_14 = lean_array_get_size(x_9); +x_15 = lean_nat_dec_lt(x_10, x_14); +lean_dec(x_14); +if (x_15 == 0) +{ +lean_object* x_16; +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_13); +return x_16; +} +else +{ +lean_object* x_17; 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_17 = lean_array_fget(x_9, x_10); +x_18 = lean_unsigned_to_nat(1u); +x_19 = lean_nat_add(x_10, x_18); +lean_dec(x_10); +x_20 = l_Lean_Syntax_getId(x_17); +lean_inc(x_20); +x_21 = l_Lean_Name_append___main(x_1, x_20); +x_22 = lean_ctor_get_uint8(x_4, sizeof(void*)*2); +lean_inc(x_12); +x_23 = l_Lean_Elab_Command_applyVisibility(x_17, x_22, x_21, x_12, x_13); +lean_dec(x_17); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_4); +lean_inc(x_2); +x_26 = lean_alloc_ctor(0, 7, 2); +lean_ctor_set(x_26, 0, x_2); +lean_ctor_set(x_26, 1, x_4); +lean_ctor_set(x_26, 2, x_24); +lean_ctor_set(x_26, 3, x_20); +lean_ctor_set(x_26, 4, x_6); +lean_ctor_set(x_26, 5, x_7); +lean_ctor_set(x_26, 6, x_8); +lean_ctor_set_uint8(x_26, sizeof(void*)*7, x_3); +lean_ctor_set_uint8(x_26, sizeof(void*)*7 + 1, x_5); +x_27 = lean_array_push(x_11, x_26); +x_10 = x_19; +x_11 = x_27; +x_13 = x_25; +goto _start; +} +else +{ +uint8_t x_29; +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +x_29 = !lean_is_exclusive(x_23); +if (x_29 == 0) +{ +return x_23; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_23, 0); +x_31 = lean_ctor_get(x_23, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_23); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +return x_32; +} +} +} +} +} +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__2(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* 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_14; uint8_t x_15; +x_14 = lean_array_get_size(x_9); +x_15 = lean_nat_dec_lt(x_10, x_14); +lean_dec(x_14); +if (x_15 == 0) +{ +lean_object* x_16; +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_13); +return x_16; +} +else +{ +lean_object* x_17; 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_17 = lean_array_fget(x_9, x_10); +x_18 = lean_unsigned_to_nat(1u); +x_19 = lean_nat_add(x_10, x_18); +lean_dec(x_10); +x_20 = l_Lean_Syntax_getId(x_17); +lean_inc(x_20); +x_21 = l_Lean_Name_append___main(x_1, x_20); +x_22 = lean_ctor_get_uint8(x_4, sizeof(void*)*2); +lean_inc(x_12); +x_23 = l_Lean_Elab_Command_applyVisibility(x_17, x_22, x_21, x_12, x_13); +lean_dec(x_17); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_4); +lean_inc(x_2); +x_26 = lean_alloc_ctor(0, 7, 2); +lean_ctor_set(x_26, 0, x_2); +lean_ctor_set(x_26, 1, x_4); +lean_ctor_set(x_26, 2, x_24); +lean_ctor_set(x_26, 3, x_20); +lean_ctor_set(x_26, 4, x_6); +lean_ctor_set(x_26, 5, x_7); +lean_ctor_set(x_26, 6, x_8); +lean_ctor_set_uint8(x_26, sizeof(void*)*7, x_3); +lean_ctor_set_uint8(x_26, sizeof(void*)*7 + 1, x_5); +x_27 = lean_array_push(x_11, x_26); +x_10 = x_19; +x_11 = x_27; +x_13 = x_25; +goto _start; +} +else +{ +uint8_t x_29; +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +x_29 = !lean_is_exclusive(x_23); +if (x_29 == 0) +{ +return x_23; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_23, 0); +x_31 = lean_ctor_get(x_23, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_23); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +return x_32; +} +} +} +} +} +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__3(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* 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_14; uint8_t x_15; +x_14 = lean_array_get_size(x_9); +x_15 = lean_nat_dec_lt(x_10, x_14); +lean_dec(x_14); +if (x_15 == 0) +{ +lean_object* x_16; +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_13); +return x_16; +} +else +{ +lean_object* x_17; 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_17 = lean_array_fget(x_9, x_10); +x_18 = lean_unsigned_to_nat(1u); +x_19 = lean_nat_add(x_10, x_18); +lean_dec(x_10); +x_20 = l_Lean_Syntax_getId(x_17); +lean_inc(x_20); +x_21 = l_Lean_Name_append___main(x_1, x_20); +x_22 = lean_ctor_get_uint8(x_4, sizeof(void*)*2); +lean_inc(x_12); +x_23 = l_Lean_Elab_Command_applyVisibility(x_17, x_22, x_21, x_12, x_13); +lean_dec(x_17); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_4); +lean_inc(x_2); +x_26 = lean_alloc_ctor(0, 7, 2); +lean_ctor_set(x_26, 0, x_2); +lean_ctor_set(x_26, 1, x_4); +lean_ctor_set(x_26, 2, x_24); +lean_ctor_set(x_26, 3, x_20); +lean_ctor_set(x_26, 4, x_6); +lean_ctor_set(x_26, 5, x_7); +lean_ctor_set(x_26, 6, x_8); +lean_ctor_set_uint8(x_26, sizeof(void*)*7, x_3); +lean_ctor_set_uint8(x_26, sizeof(void*)*7 + 1, x_5); +x_27 = lean_array_push(x_11, x_26); +x_10 = x_19; +x_11 = x_27; +x_13 = x_25; +goto _start; +} +else +{ +uint8_t x_29; +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +x_29 = !lean_is_exclusive(x_23); +if (x_29 == 0) +{ +return x_23; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_23, 0); +x_31 = lean_ctor_get(x_23, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_23); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +return x_32; +} +} +} +} +} +lean_object* _init_l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unexpected kind of structure field"); +return x_1; +} +} +lean_object* _init_l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__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, lean_object* x_7) { +_start: +{ +lean_object* x_8; uint8_t x_9; +x_8 = lean_array_get_size(x_3); +x_9 = lean_nat_dec_lt(x_4, x_8); +lean_dec(x_8); +if (x_9 == 0) +{ +lean_object* x_10; +lean_dec(x_6); +lean_dec(x_4); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_5); +lean_ctor_set(x_10, 1, x_7); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_87; lean_object* x_88; uint8_t x_89; +x_11 = lean_array_fget(x_3, x_4); +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_4, x_12); +lean_dec(x_4); +lean_inc(x_11); +x_87 = l_Lean_Syntax_getKind(x_11); +x_88 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_89 = lean_name_eq(x_87, x_88); +if (x_89 == 0) +{ +lean_object* x_90; uint8_t x_91; +x_90 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_91 = lean_name_eq(x_87, x_90); +if (x_91 == 0) +{ +lean_object* x_92; uint8_t x_93; +x_92 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_93 = lean_name_eq(x_87, x_92); +lean_dec(x_87); +if (x_93 == 0) +{ +lean_object* x_94; lean_object* x_95; uint8_t x_96; +lean_dec(x_13); +lean_dec(x_5); +x_94 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__3; +x_95 = l_Lean_Elab_Command_throwError___rarg(x_11, x_94, x_6, x_7); +lean_dec(x_11); +x_96 = !lean_is_exclusive(x_95); +if (x_96 == 0) +{ +return x_95; +} +else +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_97 = lean_ctor_get(x_95, 0); +x_98 = lean_ctor_get(x_95, 1); +lean_inc(x_98); +lean_inc(x_97); +lean_dec(x_95); +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; +} +} +else +{ +uint8_t x_100; +x_100 = 3; +x_14 = x_100; +x_15 = x_7; +goto block_86; +} +} +else +{ +uint8_t x_101; +lean_dec(x_87); +x_101 = 1; +x_14 = x_101; +x_15 = x_7; +goto block_86; +} +} +else +{ +uint8_t x_102; +lean_dec(x_87); +x_102 = 0; +x_14 = x_102; +x_15 = x_7; +goto block_86; +} +block_86: +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_unsigned_to_nat(0u); +x_17 = l_Lean_Syntax_getArg(x_11, x_16); +lean_inc(x_6); +x_18 = l_Lean_Elab_Command_elabModifiers(x_17, x_6, x_15); +lean_dec(x_17); +if (lean_obj_tag(x_18) == 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; lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_69; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_unsigned_to_nat(3u); +x_22 = l_Lean_Syntax_getArg(x_11, x_21); +x_23 = l_Lean_Syntax_isNone(x_22); +lean_dec(x_22); +x_24 = lean_unsigned_to_nat(4u); +x_25 = l_Lean_Syntax_getArg(x_11, x_24); +x_26 = l_Lean_Elab_expandDeclSig(x_25); +lean_dec(x_25); +lean_inc(x_6); +x_69 = l_Lean_Elab_Command_checkValidFieldModifier(x_11, x_19, x_6, x_20); +if (x_23 == 0) +{ +if (lean_obj_tag(x_69) == 0) +{ +lean_object* x_70; uint8_t x_71; +x_70 = lean_ctor_get(x_69, 1); +lean_inc(x_70); +lean_dec(x_69); +x_71 = 1; +x_27 = x_71; +x_28 = x_70; +goto block_68; +} +else +{ +uint8_t x_72; +lean_dec(x_26); +lean_dec(x_19); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_6); +lean_dec(x_5); +x_72 = !lean_is_exclusive(x_69); +if (x_72 == 0) +{ +return x_69; +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_73 = lean_ctor_get(x_69, 0); +x_74 = lean_ctor_get(x_69, 1); +lean_inc(x_74); +lean_inc(x_73); +lean_dec(x_69); +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_73); +lean_ctor_set(x_75, 1, x_74); +return x_75; +} +} +} +else +{ +if (lean_obj_tag(x_69) == 0) +{ +lean_object* x_76; uint8_t x_77; +x_76 = lean_ctor_get(x_69, 1); +lean_inc(x_76); +lean_dec(x_69); +x_77 = 0; +x_27 = x_77; +x_28 = x_76; +goto block_68; +} +else +{ +uint8_t x_78; +lean_dec(x_26); +lean_dec(x_19); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_6); +lean_dec(x_5); +x_78 = !lean_is_exclusive(x_69); +if (x_78 == 0) +{ +return x_69; +} +else +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_79 = lean_ctor_get(x_69, 0); +x_80 = lean_ctor_get(x_69, 1); +lean_inc(x_80); +lean_inc(x_79); +lean_dec(x_69); +x_81 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_81, 0, x_79); +lean_ctor_set(x_81, 1, x_80); +return x_81; +} +} +} +block_68: +{ +lean_object* x_29; lean_object* x_30; uint8_t x_31; uint8_t x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_29 = lean_ctor_get(x_26, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_26, 1); +lean_inc(x_30); +lean_dec(x_26); +x_31 = 0; +x_32 = l_Lean_BinderInfo_beq(x_14, x_31); +x_33 = lean_unsigned_to_nat(2u); +x_34 = l_Lean_Syntax_getArg(x_11, x_33); +x_35 = l_Lean_Syntax_getArgs(x_34); +lean_dec(x_34); +if (x_32 == 0) +{ +lean_object* x_36; lean_object* x_37; +x_36 = lean_box(0); +lean_inc(x_6); +x_37 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__1(x_2, x_11, x_14, x_19, x_27, x_29, x_30, x_36, x_35, x_16, x_5, x_6, x_28); +lean_dec(x_35); +if (lean_obj_tag(x_37) == 0) +{ +lean_object* x_38; lean_object* x_39; +x_38 = lean_ctor_get(x_37, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_37, 1); +lean_inc(x_39); +lean_dec(x_37); +x_4 = x_13; +x_5 = x_38; +x_7 = x_39; +goto _start; +} +else +{ +uint8_t x_41; +lean_dec(x_13); +lean_dec(x_6); +x_41 = !lean_is_exclusive(x_37); +if (x_41 == 0) +{ +return x_37; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_37, 0); +x_43 = lean_ctor_get(x_37, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_37); +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +return x_44; +} +} +} +else +{ +lean_object* x_45; lean_object* x_46; uint8_t x_47; +x_45 = lean_unsigned_to_nat(5u); +x_46 = l_Lean_Syntax_getArg(x_11, x_45); +x_47 = l_Lean_Syntax_isNone(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_48 = l_Lean_Syntax_getArg(x_46, x_16); +lean_dec(x_46); +x_49 = l_Lean_Syntax_getArg(x_48, x_12); +lean_dec(x_48); +x_50 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_50, 0, x_49); +lean_inc(x_6); +x_51 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__2(x_2, x_11, x_14, x_19, x_27, x_29, x_30, x_50, x_35, x_16, x_5, x_6, x_28); +lean_dec(x_35); +if (lean_obj_tag(x_51) == 0) +{ +lean_object* x_52; lean_object* x_53; +x_52 = lean_ctor_get(x_51, 0); +lean_inc(x_52); +x_53 = lean_ctor_get(x_51, 1); +lean_inc(x_53); +lean_dec(x_51); +x_4 = x_13; +x_5 = x_52; +x_7 = x_53; +goto _start; +} +else +{ +uint8_t x_55; +lean_dec(x_13); +lean_dec(x_6); +x_55 = !lean_is_exclusive(x_51); +if (x_55 == 0) +{ +return x_51; +} +else +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_51, 0); +x_57 = lean_ctor_get(x_51, 1); +lean_inc(x_57); +lean_inc(x_56); +lean_dec(x_51); +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; +} +} +} +else +{ +lean_object* x_59; lean_object* x_60; +lean_dec(x_46); +x_59 = lean_box(0); +lean_inc(x_6); +x_60 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__3(x_2, x_11, x_14, x_19, x_27, x_29, x_30, x_59, x_35, x_16, x_5, x_6, x_28); +lean_dec(x_35); +if (lean_obj_tag(x_60) == 0) +{ +lean_object* x_61; lean_object* x_62; +x_61 = lean_ctor_get(x_60, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_60, 1); +lean_inc(x_62); +lean_dec(x_60); +x_4 = x_13; +x_5 = x_61; +x_7 = x_62; +goto _start; +} +else +{ +uint8_t x_64; +lean_dec(x_13); +lean_dec(x_6); +x_64 = !lean_is_exclusive(x_60); +if (x_64 == 0) +{ +return x_60; +} +else +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_65 = lean_ctor_get(x_60, 0); +x_66 = lean_ctor_get(x_60, 1); +lean_inc(x_66); +lean_inc(x_65); +lean_dec(x_60); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_65); +lean_ctor_set(x_67, 1, x_66); +return x_67; +} +} +} +} +} +} +else +{ +uint8_t x_82; +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_6); +lean_dec(x_5); +x_82 = !lean_is_exclusive(x_18); +if (x_82 == 0) +{ +return x_18; +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_18, 0); +x_84 = lean_ctor_get(x_18, 1); +lean_inc(x_84); +lean_inc(x_83); +lean_dec(x_18); +x_85 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_85, 0, x_83); +lean_ctor_set(x_85, 1, x_84); +return x_85; +} +} +} +} +} +} +lean_object* l___private_Lean_Elab_Structure_3__expandFields(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; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_5 = lean_unsigned_to_nat(7u); +x_6 = l_Lean_Syntax_getArg(x_1, x_5); +x_7 = l_Lean_Syntax_getArgs(x_6); +lean_dec(x_6); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_Array_empty___closed__1; +x_10 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4(x_1, x_2, x_7, x_8, x_9, x_3, x_4); +lean_dec(x_7); +return x_10; +} +} +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___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, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +uint8_t x_14; uint8_t x_15; lean_object* x_16; +x_14 = lean_unbox(x_3); +lean_dec(x_3); +x_15 = lean_unbox(x_5); +lean_dec(x_5); +x_16 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__1(x_1, x_2, x_14, x_4, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_9); +lean_dec(x_1); +return x_16; +} +} +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__2___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_14; uint8_t x_15; lean_object* x_16; +x_14 = lean_unbox(x_3); +lean_dec(x_3); +x_15 = lean_unbox(x_5); +lean_dec(x_5); +x_16 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__2(x_1, x_2, x_14, x_4, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_9); +lean_dec(x_1); +return x_16; +} +} +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__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) { +_start: +{ +uint8_t x_14; uint8_t x_15; lean_object* x_16; +x_14 = lean_unbox(x_3); +lean_dec(x_3); +x_15 = lean_unbox(x_5); +lean_dec(x_5); +x_16 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__3(x_1, x_2, x_14, x_4, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_9); +lean_dec(x_1); +return x_16; +} +} +lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__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) { +_start: +{ +lean_object* x_8; +x_8 = l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_8; +} +} +lean_object* l___private_Lean_Elab_Structure_3__expandFields___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___private_Lean_Elab_Structure_3__expandFields(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l___private_Lean_Elab_Structure_4__elabStructureView___rarg(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = lean_box(0); -x_3 = lean_alloc_ctor(0, 2, 0); +x_2 = lean_box(1); +x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); return x_3; } } -lean_object* l_Lean_Elab_Command_elabStructure(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l___private_Lean_Elab_Structure_4__elabStructureView(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_4; -x_4 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabStructure___rarg), 1, 0); -return x_4; +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l___private_Lean_Elab_Structure_4__elabStructureView___rarg), 1, 0); +return x_3; } } -lean_object* l_Lean_Elab_Command_elabStructure___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l___private_Lean_Elab_Structure_4__elabStructureView___boxed(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabStructure(x_1, x_2, x_3); +lean_object* x_3; +x_3 = l___private_Lean_Elab_Structure_4__elabStructureView(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabStructure___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_box(1); +x_5 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_5, 0, x_4); +lean_ctor_set(x_5, 1, x_3); +return x_5; +} +} +lean_object* _init_l_Lean_Elab_Command_elabStructure___lambda__2___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabStructure___lambda__1___boxed), 3, 0); +return x_1; +} +} +lean_object* l_Lean_Elab_Command_elabStructure___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; +x_5 = l_Lean_Elab_Command_elabStructure___lambda__2___closed__1; +x_6 = l_Lean_Elab_Term_elabBinders___rarg(x_1, x_5, x_3, x_4); +return x_6; +} +} +lean_object* l_Lean_Elab_Command_elabStructure___lambda__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, lean_object* x_7) { +_start: +{ +lean_object* x_8; +lean_inc(x_6); +x_8 = l_Lean_Elab_Command_mkDeclName(x_1, x_2, x_5, x_6, x_7); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +lean_inc(x_6); +x_11 = l_Lean_Elab_Command_getLevelNames(x_6, x_10); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +lean_inc(x_6); +lean_inc(x_3); +x_13 = l___private_Lean_Elab_Structure_2__expandCtor(x_3, x_9, x_6, x_12); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_13, 1); +lean_inc(x_14); +lean_dec(x_13); +lean_inc(x_6); +x_15 = l___private_Lean_Elab_Structure_3__expandFields(x_3, x_9, x_6, x_14); lean_dec(x_3); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_16 = lean_ctor_get(x_15, 1); +lean_inc(x_16); +lean_dec(x_15); +x_17 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_17, 0, x_9); +x_18 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabStructure___lambda__2___boxed), 4, 1); +lean_closure_set(x_18, 0, x_4); +lean_inc(x_6); +x_19 = l___private_Lean_Elab_Command_2__getState(x_6, x_16); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = l___private_Lean_Elab_Command_9__getVarDecls(x_20); +lean_dec(x_20); +lean_inc(x_6); +x_23 = l___private_Lean_Elab_Command_2__getState(x_6, x_21); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +lean_dec(x_23); +x_26 = l___private_Lean_Elab_Command_6__mkTermContext(x_6, x_24, x_17); +x_27 = l___private_Lean_Elab_Command_7__mkTermState(x_24); +lean_dec(x_24); +x_28 = l_Lean_Elab_Term_elabBinders___rarg(x_22, x_18, x_26, x_27); +lean_dec(x_22); +if (lean_obj_tag(x_28) == 0) +{ +lean_object* x_29; lean_object* x_30; +x_29 = lean_ctor_get(x_28, 1); +lean_inc(x_29); +lean_dec(x_28); +lean_inc(x_6); +x_30 = l___private_Lean_Elab_Command_2__getState(x_6, x_25); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; +x_31 = lean_ctor_get(x_29, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_30, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_30, 1); +lean_inc(x_33); +lean_dec(x_30); +x_34 = lean_ctor_get(x_31, 0); +lean_inc(x_34); +lean_dec(x_31); +x_35 = lean_ctor_get(x_29, 2); +lean_inc(x_35); +lean_dec(x_29); +x_36 = !lean_is_exclusive(x_32); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_32, 1); +lean_dec(x_37); +x_38 = lean_ctor_get(x_32, 0); +lean_dec(x_38); +lean_ctor_set(x_32, 1, x_35); +lean_ctor_set(x_32, 0, x_34); +x_39 = l___private_Lean_Elab_Command_3__setState(x_32, x_6, x_33); +if (lean_obj_tag(x_39) == 0) +{ +uint8_t x_40; +x_40 = !lean_is_exclusive(x_39); +if (x_40 == 0) +{ +lean_object* x_41; lean_object* x_42; +x_41 = lean_ctor_get(x_39, 0); +lean_dec(x_41); +x_42 = lean_box(0); +lean_ctor_set(x_39, 0, x_42); +return x_39; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_39, 1); +lean_inc(x_43); +lean_dec(x_39); +x_44 = lean_box(0); +x_45 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_43); +return x_45; +} +} +else +{ +uint8_t x_46; +x_46 = !lean_is_exclusive(x_39); +if (x_46 == 0) +{ +return x_39; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_39, 0); +x_48 = lean_ctor_get(x_39, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_39); +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_50 = lean_ctor_get(x_32, 2); +x_51 = lean_ctor_get(x_32, 3); +x_52 = lean_ctor_get(x_32, 4); +lean_inc(x_52); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_32); +x_53 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_53, 0, x_34); +lean_ctor_set(x_53, 1, x_35); +lean_ctor_set(x_53, 2, x_50); +lean_ctor_set(x_53, 3, x_51); +lean_ctor_set(x_53, 4, x_52); +x_54 = l___private_Lean_Elab_Command_3__setState(x_53, x_6, x_33); +if (lean_obj_tag(x_54) == 0) +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_55 = lean_ctor_get(x_54, 1); +lean_inc(x_55); +if (lean_is_exclusive(x_54)) { + lean_ctor_release(x_54, 0); + lean_ctor_release(x_54, 1); + x_56 = x_54; +} else { + lean_dec_ref(x_54); + x_56 = lean_box(0); +} +x_57 = lean_box(0); +if (lean_is_scalar(x_56)) { + x_58 = lean_alloc_ctor(0, 2, 0); +} else { + x_58 = x_56; +} +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_55); +return x_58; +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_59 = lean_ctor_get(x_54, 0); +lean_inc(x_59); +x_60 = lean_ctor_get(x_54, 1); +lean_inc(x_60); +if (lean_is_exclusive(x_54)) { + lean_ctor_release(x_54, 0); + lean_ctor_release(x_54, 1); + x_61 = x_54; +} else { + lean_dec_ref(x_54); + x_61 = lean_box(0); +} +if (lean_is_scalar(x_61)) { + x_62 = lean_alloc_ctor(1, 2, 0); +} else { + x_62 = x_61; +} +lean_ctor_set(x_62, 0, x_59); +lean_ctor_set(x_62, 1, x_60); +return x_62; +} +} +} +else +{ +uint8_t x_63; +lean_dec(x_29); +lean_dec(x_6); +x_63 = !lean_is_exclusive(x_30); +if (x_63 == 0) +{ +return x_30; +} +else +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_64 = lean_ctor_get(x_30, 0); +x_65 = lean_ctor_get(x_30, 1); +lean_inc(x_65); +lean_inc(x_64); +lean_dec(x_30); +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_64); +lean_ctor_set(x_66, 1, x_65); +return x_66; +} +} +} +else +{ +lean_object* x_67; +x_67 = lean_ctor_get(x_28, 0); +lean_inc(x_67); +if (lean_obj_tag(x_67) == 0) +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_28, 1); +lean_inc(x_68); +lean_dec(x_28); +x_69 = lean_ctor_get(x_67, 0); +lean_inc(x_69); +lean_dec(x_67); +lean_inc(x_6); +x_70 = l___private_Lean_Elab_Command_2__getState(x_6, x_25); +if (lean_obj_tag(x_70) == 0) +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; uint8_t x_76; +x_71 = lean_ctor_get(x_68, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_70, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_70, 1); +lean_inc(x_73); +lean_dec(x_70); +x_74 = lean_ctor_get(x_71, 0); +lean_inc(x_74); +lean_dec(x_71); +x_75 = lean_ctor_get(x_68, 2); +lean_inc(x_75); +lean_dec(x_68); +x_76 = !lean_is_exclusive(x_72); +if (x_76 == 0) +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_72, 1); +lean_dec(x_77); +x_78 = lean_ctor_get(x_72, 0); +lean_dec(x_78); +lean_ctor_set(x_72, 1, x_75); +lean_ctor_set(x_72, 0, x_74); +x_79 = l___private_Lean_Elab_Command_3__setState(x_72, x_6, x_73); +if (lean_obj_tag(x_79) == 0) +{ +uint8_t x_80; +x_80 = !lean_is_exclusive(x_79); +if (x_80 == 0) +{ +lean_object* x_81; +x_81 = lean_ctor_get(x_79, 0); +lean_dec(x_81); +lean_ctor_set_tag(x_79, 1); +lean_ctor_set(x_79, 0, x_69); +return x_79; +} +else +{ +lean_object* x_82; lean_object* x_83; +x_82 = lean_ctor_get(x_79, 1); +lean_inc(x_82); +lean_dec(x_79); +x_83 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_83, 0, x_69); +lean_ctor_set(x_83, 1, x_82); +return x_83; +} +} +else +{ +uint8_t x_84; +lean_dec(x_69); +x_84 = !lean_is_exclusive(x_79); +if (x_84 == 0) +{ +return x_79; +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_79, 0); +x_86 = lean_ctor_get(x_79, 1); +lean_inc(x_86); +lean_inc(x_85); +lean_dec(x_79); +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_85); +lean_ctor_set(x_87, 1, x_86); +return x_87; +} +} +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_88 = lean_ctor_get(x_72, 2); +x_89 = lean_ctor_get(x_72, 3); +x_90 = lean_ctor_get(x_72, 4); +lean_inc(x_90); +lean_inc(x_89); +lean_inc(x_88); +lean_dec(x_72); +x_91 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_91, 0, x_74); +lean_ctor_set(x_91, 1, x_75); +lean_ctor_set(x_91, 2, x_88); +lean_ctor_set(x_91, 3, x_89); +lean_ctor_set(x_91, 4, x_90); +x_92 = l___private_Lean_Elab_Command_3__setState(x_91, x_6, x_73); +if (lean_obj_tag(x_92) == 0) +{ +lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_93 = lean_ctor_get(x_92, 1); +lean_inc(x_93); +if (lean_is_exclusive(x_92)) { + lean_ctor_release(x_92, 0); + lean_ctor_release(x_92, 1); + x_94 = x_92; +} else { + lean_dec_ref(x_92); + x_94 = lean_box(0); +} +if (lean_is_scalar(x_94)) { + x_95 = lean_alloc_ctor(1, 2, 0); +} else { + x_95 = x_94; + lean_ctor_set_tag(x_95, 1); +} +lean_ctor_set(x_95, 0, x_69); +lean_ctor_set(x_95, 1, x_93); +return x_95; +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; +lean_dec(x_69); +x_96 = lean_ctor_get(x_92, 0); +lean_inc(x_96); +x_97 = lean_ctor_get(x_92, 1); +lean_inc(x_97); +if (lean_is_exclusive(x_92)) { + lean_ctor_release(x_92, 0); + lean_ctor_release(x_92, 1); + x_98 = x_92; +} else { + lean_dec_ref(x_92); + x_98 = lean_box(0); +} +if (lean_is_scalar(x_98)) { + x_99 = lean_alloc_ctor(1, 2, 0); +} else { + x_99 = x_98; +} +lean_ctor_set(x_99, 0, x_96); +lean_ctor_set(x_99, 1, x_97); +return x_99; +} +} +} +else +{ +uint8_t x_100; +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_6); +x_100 = !lean_is_exclusive(x_70); +if (x_100 == 0) +{ +return x_70; +} +else +{ +lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_101 = lean_ctor_get(x_70, 0); +x_102 = lean_ctor_get(x_70, 1); +lean_inc(x_102); +lean_inc(x_101); +lean_dec(x_70); +x_103 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_103, 0, x_101); +lean_ctor_set(x_103, 1, x_102); +return x_103; +} +} +} +else +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; +lean_dec(x_28); +x_104 = l_Lean_Elab_Command_liftTermElabM___rarg___closed__1; +x_105 = l_unreachable_x21___rarg(x_104); +x_106 = lean_apply_2(x_105, x_6, x_25); +if (lean_obj_tag(x_106) == 0) +{ +uint8_t x_107; +x_107 = !lean_is_exclusive(x_106); +if (x_107 == 0) +{ +lean_object* x_108; lean_object* x_109; +x_108 = lean_ctor_get(x_106, 0); +lean_dec(x_108); +x_109 = lean_box(0); +lean_ctor_set(x_106, 0, x_109); +return x_106; +} +else +{ +lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_110 = lean_ctor_get(x_106, 1); +lean_inc(x_110); +lean_dec(x_106); +x_111 = lean_box(0); +x_112 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_112, 0, x_111); +lean_ctor_set(x_112, 1, x_110); +return x_112; +} +} +else +{ +uint8_t x_113; +x_113 = !lean_is_exclusive(x_106); +if (x_113 == 0) +{ +return x_106; +} +else +{ +lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_114 = lean_ctor_get(x_106, 0); +x_115 = lean_ctor_get(x_106, 1); +lean_inc(x_115); +lean_inc(x_114); +lean_dec(x_106); +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_117; +lean_dec(x_22); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_6); +x_117 = !lean_is_exclusive(x_23); +if (x_117 == 0) +{ +return x_23; +} +else +{ +lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_118 = lean_ctor_get(x_23, 0); +x_119 = lean_ctor_get(x_23, 1); +lean_inc(x_119); +lean_inc(x_118); +lean_dec(x_23); +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 +{ +uint8_t x_121; +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_6); +x_121 = !lean_is_exclusive(x_19); +if (x_121 == 0) +{ +return x_19; +} +else +{ +lean_object* x_122; lean_object* x_123; lean_object* x_124; +x_122 = lean_ctor_get(x_19, 0); +x_123 = lean_ctor_get(x_19, 1); +lean_inc(x_123); +lean_inc(x_122); +lean_dec(x_19); +x_124 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_124, 0, x_122); +lean_ctor_set(x_124, 1, x_123); +return x_124; +} +} +} +else +{ +uint8_t x_125; +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_4); +x_125 = !lean_is_exclusive(x_15); +if (x_125 == 0) +{ +return x_15; +} +else +{ +lean_object* x_126; lean_object* x_127; lean_object* x_128; +x_126 = lean_ctor_get(x_15, 0); +x_127 = lean_ctor_get(x_15, 1); +lean_inc(x_127); +lean_inc(x_126); +lean_dec(x_15); +x_128 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_128, 0, x_126); +lean_ctor_set(x_128, 1, x_127); +return x_128; +} +} +} +else +{ +uint8_t x_129; +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_129 = !lean_is_exclusive(x_13); +if (x_129 == 0) +{ +return x_13; +} +else +{ +lean_object* x_130; lean_object* x_131; lean_object* x_132; +x_130 = lean_ctor_get(x_13, 0); +x_131 = lean_ctor_get(x_13, 1); +lean_inc(x_131); +lean_inc(x_130); +lean_dec(x_13); +x_132 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_132, 0, x_130); +lean_ctor_set(x_132, 1, x_131); +return x_132; +} +} +} +else +{ +uint8_t x_133; +lean_dec(x_9); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_133 = !lean_is_exclusive(x_11); +if (x_133 == 0) +{ +return x_11; +} +else +{ +lean_object* x_134; lean_object* x_135; lean_object* x_136; +x_134 = lean_ctor_get(x_11, 0); +x_135 = lean_ctor_get(x_11, 1); +lean_inc(x_135); +lean_inc(x_134); +lean_dec(x_11); +x_136 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_136, 0, x_134); +lean_ctor_set(x_136, 1, x_135); +return x_136; +} +} +} +else +{ +uint8_t x_137; +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +x_137 = !lean_is_exclusive(x_8); +if (x_137 == 0) +{ +return x_8; +} +else +{ +lean_object* x_138; lean_object* x_139; lean_object* x_140; +x_138 = lean_ctor_get(x_8, 0); +x_139 = lean_ctor_get(x_8, 1); +lean_inc(x_139); +lean_inc(x_138); +lean_dec(x_8); +x_140 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_140, 0, x_138); +lean_ctor_set(x_140, 1, x_139); +return x_140; +} +} +} +} +lean_object* _init_l_Lean_Elab_Command_elabStructure___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_registerClassAttr___closed__2; +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_object* l_Lean_Elab_Command_elabStructure(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; lean_object* x_7; lean_object* x_8; uint8_t 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; uint8_t x_17; lean_object* x_18; lean_object* x_19; +x_5 = lean_unsigned_to_nat(0u); +x_6 = l_Lean_Syntax_getArg(x_2, x_5); +x_7 = l_Lean_Syntax_getKind(x_6); +x_8 = l_Lean_Parser_Command_classTk___elambda__1___closed__2; +x_9 = lean_name_eq(x_7, x_8); +lean_dec(x_7); +x_10 = lean_unsigned_to_nat(1u); +x_11 = l_Lean_Syntax_getArg(x_2, x_10); +x_12 = lean_unsigned_to_nat(2u); +x_13 = l_Lean_Syntax_getArg(x_2, x_12); +x_14 = l_Lean_Syntax_getArgs(x_13); +lean_dec(x_13); +x_15 = lean_unsigned_to_nat(4u); +x_16 = l_Lean_Syntax_getArg(x_2, x_15); +x_17 = l_Lean_Syntax_isNone(x_16); +lean_dec(x_16); +lean_inc(x_3); +x_18 = l_Lean_Elab_Command_checkValidInductiveModifier(x_2, x_1, x_3, x_4); +if (x_9 == 0) +{ +x_19 = x_1; +goto block_48; +} +else +{ +lean_object* x_49; lean_object* x_50; +x_49 = l_Lean_Elab_Command_elabStructure___closed__1; +x_50 = l_Lean_Elab_Command_Modifiers_addAttribute(x_1, x_49); +x_19 = x_50; +goto block_48; +} +block_48: +{ +lean_object* x_20; +if (x_17 == 0) +{ +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_30; +x_30 = lean_ctor_get(x_18, 1); +lean_inc(x_30); +lean_dec(x_18); +x_20 = x_30; +goto block_29; +} +else +{ +uint8_t x_31; +lean_dec(x_19); +lean_dec(x_14); +lean_dec(x_11); +lean_dec(x_3); +lean_dec(x_2); +x_31 = !lean_is_exclusive(x_18); +if (x_31 == 0) +{ +return x_18; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_18, 0); +x_33 = lean_ctor_get(x_18, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_18); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; +} +} +} +else +{ +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_35 = lean_ctor_get(x_18, 1); +lean_inc(x_35); +lean_dec(x_18); +x_36 = l_Lean_Elab_Command_getCurrMacroScope(x_3, x_35); +x_37 = lean_ctor_get(x_36, 1); +lean_inc(x_37); +lean_dec(x_36); +lean_inc(x_3); +x_38 = l_Lean_Elab_Command_getMainModule(x_3, x_37); +if (lean_obj_tag(x_38) == 0) +{ +lean_object* x_39; +x_39 = lean_ctor_get(x_38, 1); +lean_inc(x_39); +lean_dec(x_38); +x_20 = x_39; +goto block_29; +} +else +{ +uint8_t x_40; +lean_dec(x_19); +lean_dec(x_14); +lean_dec(x_11); +lean_dec(x_3); +lean_dec(x_2); +x_40 = !lean_is_exclusive(x_38); +if (x_40 == 0) +{ +return x_38; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_38, 0); +x_42 = lean_ctor_get(x_38, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_38); +x_43 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +return x_43; +} +} +} +else +{ +uint8_t x_44; +lean_dec(x_19); +lean_dec(x_14); +lean_dec(x_11); +lean_dec(x_3); +lean_dec(x_2); +x_44 = !lean_is_exclusive(x_18); +if (x_44 == 0) +{ +return x_18; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_18, 0); +x_46 = lean_ctor_get(x_18, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_18); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_45); +lean_ctor_set(x_47, 1, x_46); +return x_47; +} +} +} +block_29: +{ +lean_object* x_21; +lean_inc(x_3); +x_21 = l_Lean_Elab_Command_getLevelNames(x_3, x_20); +if (lean_obj_tag(x_21) == 0) +{ +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); +lean_inc(x_11); +x_23 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabStructure___lambda__3___boxed), 7, 4); +lean_closure_set(x_23, 0, x_11); +lean_closure_set(x_23, 1, x_19); +lean_closure_set(x_23, 2, x_2); +lean_closure_set(x_23, 3, x_14); +x_24 = l_Lean_Elab_Command_withDeclId___rarg(x_11, x_23, x_3, x_22); +lean_dec(x_11); +return x_24; +} +else +{ +uint8_t x_25; +lean_dec(x_19); +lean_dec(x_14); +lean_dec(x_11); +lean_dec(x_3); +lean_dec(x_2); +x_25 = !lean_is_exclusive(x_21); +if (x_25 == 0) +{ +return x_21; +} +else +{ +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_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; +} +} +} +} +} +} +lean_object* l_Lean_Elab_Command_elabStructure___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_Command_elabStructure___lambda__1(x_1, x_2, x_3); lean_dec(x_2); lean_dec(x_1); return x_4; } } +lean_object* l_Lean_Elab_Command_elabStructure___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_Lean_Elab_Command_elabStructure___lambda__2(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_Elab_Command_elabStructure___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) { +_start: +{ +lean_object* x_8; +x_8 = l_Lean_Elab_Command_elabStructure___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_2); +lean_dec(x_1); +return x_8; +} +} lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Elab_Command(lean_object*); lean_object* initialize_Lean_Elab_DeclModifiers(lean_object*); +lean_object* initialize_Lean_Elab_DeclUtil(lean_object*); +lean_object* initialize_Lean_Elab_Inductive(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Elab_Structure(lean_object* w) { lean_object * res; @@ -63,6 +2538,50 @@ lean_dec_ref(res); res = initialize_Lean_Elab_DeclModifiers(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_Elab_DeclUtil(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Elab_Inductive(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l___private_Lean_Elab_Structure_1__defaultCtorName___closed__1 = _init_l___private_Lean_Elab_Structure_1__defaultCtorName___closed__1(); +lean_mark_persistent(l___private_Lean_Elab_Structure_1__defaultCtorName___closed__1); +l___private_Lean_Elab_Structure_1__defaultCtorName = _init_l___private_Lean_Elab_Structure_1__defaultCtorName(); +lean_mark_persistent(l___private_Lean_Elab_Structure_1__defaultCtorName); +l_Lean_Elab_Command_checkValidFieldModifier___closed__1 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__1); +l_Lean_Elab_Command_checkValidFieldModifier___closed__2 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__2); +l_Lean_Elab_Command_checkValidFieldModifier___closed__3 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__3); +l_Lean_Elab_Command_checkValidFieldModifier___closed__4 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__4); +l_Lean_Elab_Command_checkValidFieldModifier___closed__5 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__5); +l_Lean_Elab_Command_checkValidFieldModifier___closed__6 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__6); +l_Lean_Elab_Command_checkValidFieldModifier___closed__7 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__7(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__7); +l_Lean_Elab_Command_checkValidFieldModifier___closed__8 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__8(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__8); +l_Lean_Elab_Command_checkValidFieldModifier___closed__9 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__9(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__9); +l_Lean_Elab_Command_checkValidFieldModifier___closed__10 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__10(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__10); +l_Lean_Elab_Command_checkValidFieldModifier___closed__11 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__11(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__11); +l_Lean_Elab_Command_checkValidFieldModifier___closed__12 = _init_l_Lean_Elab_Command_checkValidFieldModifier___closed__12(); +lean_mark_persistent(l_Lean_Elab_Command_checkValidFieldModifier___closed__12); +l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__1 = _init_l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__1(); +lean_mark_persistent(l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__1); +l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__2 = _init_l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__2(); +lean_mark_persistent(l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__2); +l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__3 = _init_l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__3(); +lean_mark_persistent(l_Array_iterateMAux___main___at___private_Lean_Elab_Structure_3__expandFields___spec__4___closed__3); +l_Lean_Elab_Command_elabStructure___lambda__2___closed__1 = _init_l_Lean_Elab_Command_elabStructure___lambda__2___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabStructure___lambda__2___closed__1); +l_Lean_Elab_Command_elabStructure___closed__1 = _init_l_Lean_Elab_Command_elabStructure___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabStructure___closed__1); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Lean/Parser/Command.c b/stage0/stdlib/Lean/Parser/Command.c index 73473a66da..fade7cc85b 100644 --- a/stage0/stdlib/Lean/Parser/Command.c +++ b/stage0/stdlib/Lean/Parser/Command.c @@ -511,7 +511,6 @@ lean_object* l___regBuiltinParser_Lean_Parser_Command_exit(lean_object*); lean_object* l_Lean_Parser_Command_attrInstance; lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__8; lean_object* l_Lean_Parser_Command_inductive___closed__9; -lean_object* l_Lean_Parser_Command_structExplicitBinder___closed__13; lean_object* l_Lean_Parser_optionaInfo(lean_object*); lean_object* l_Lean_Parser_Command_def___elambda__1___closed__1; lean_object* l_Lean_Parser_Command_mutualElement___closed__1; @@ -848,7 +847,6 @@ lean_object* l_Lean_Parser_Command_universe___elambda__1(lean_object*, lean_obje lean_object* l___private_Lean_Parser_Parser_2__sepByFnAux___main___at_Lean_Parser_Command_openRenaming___elambda__1___spec__2(uint8_t, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_binderDefault___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_constant___closed__3; -lean_object* l_Lean_Parser_Command_structInstBinder___closed__11; lean_object* l_Lean_Parser_Command_classInductive___closed__6; lean_object* l_Lean_Parser_Command_mutualElement___closed__6; lean_object* l_Lean_Parser_Command_end___elambda__1___closed__1; @@ -16183,7 +16181,7 @@ x_8 = lean_ctor_get(x_7, 3); lean_inc(x_8); if (lean_obj_tag(x_8) == 0) { -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_39; lean_object* x_62; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_93; lean_object* x_94; +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_39; lean_object* x_62; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_111; lean_object* x_112; x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_7, 1); @@ -16191,121 +16189,121 @@ lean_inc(x_10); x_11 = lean_array_get_size(x_9); lean_dec(x_9); lean_inc(x_1); -x_93 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_7); -x_94 = lean_ctor_get(x_93, 3); -lean_inc(x_94); -if (lean_obj_tag(x_94) == 0) +x_111 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_7); +x_112 = lean_ctor_get(x_111, 3); +lean_inc(x_112); +if (lean_obj_tag(x_112) == 0) { -lean_object* x_95; lean_object* x_96; lean_object* x_97; -x_95 = lean_ctor_get(x_93, 1); -lean_inc(x_95); -lean_inc(x_1); -x_96 = l_Lean_Parser_tokenFn(x_1, x_93); -x_97 = lean_ctor_get(x_96, 3); -lean_inc(x_97); -if (lean_obj_tag(x_97) == 0) -{ -lean_object* x_98; lean_object* x_99; -x_98 = lean_ctor_get(x_96, 0); -lean_inc(x_98); -x_99 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_98); -lean_dec(x_98); -if (lean_obj_tag(x_99) == 2) -{ -lean_object* x_100; lean_object* x_101; uint8_t x_102; -x_100 = lean_ctor_get(x_99, 1); -lean_inc(x_100); -lean_dec(x_99); -x_101 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__3; -x_102 = lean_string_dec_eq(x_100, x_101); -lean_dec(x_100); -if (x_102 == 0) -{ -lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; -x_103 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; -x_104 = l_Lean_Parser_ParserState_mkErrorsAt(x_96, x_103, x_95); -x_105 = lean_ctor_get(x_104, 0); -lean_inc(x_105); -x_106 = lean_ctor_get(x_104, 2); -lean_inc(x_106); -x_107 = lean_ctor_get(x_104, 3); -lean_inc(x_107); -x_86 = x_104; -x_87 = x_105; -x_88 = x_106; -x_89 = x_107; -goto block_92; -} -else -{ -lean_object* x_108; lean_object* x_109; lean_object* x_110; -lean_dec(x_95); -x_108 = lean_ctor_get(x_96, 0); -lean_inc(x_108); -x_109 = lean_ctor_get(x_96, 2); -lean_inc(x_109); -x_110 = lean_ctor_get(x_96, 3); -lean_inc(x_110); -x_86 = x_96; -x_87 = x_108; -x_88 = x_109; -x_89 = x_110; -goto block_92; -} -} -else -{ -lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; -lean_dec(x_99); -x_111 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; -x_112 = l_Lean_Parser_ParserState_mkErrorsAt(x_96, x_111, x_95); -x_113 = lean_ctor_get(x_112, 0); +lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_113 = lean_ctor_get(x_111, 1); lean_inc(x_113); -x_114 = lean_ctor_get(x_112, 2); -lean_inc(x_114); -x_115 = lean_ctor_get(x_112, 3); +lean_inc(x_1); +x_114 = l_Lean_Parser_tokenFn(x_1, x_111); +x_115 = lean_ctor_get(x_114, 3); lean_inc(x_115); -x_86 = x_112; -x_87 = x_113; -x_88 = x_114; -x_89 = x_115; -goto block_92; -} -} -else +if (lean_obj_tag(x_115) == 0) { -lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; -lean_dec(x_97); -x_116 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; -x_117 = l_Lean_Parser_ParserState_mkErrorsAt(x_96, x_116, x_95); -x_118 = lean_ctor_get(x_117, 0); +lean_object* x_116; lean_object* x_117; +x_116 = lean_ctor_get(x_114, 0); +lean_inc(x_116); +x_117 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_116); +lean_dec(x_116); +if (lean_obj_tag(x_117) == 2) +{ +lean_object* x_118; lean_object* x_119; uint8_t x_120; +x_118 = lean_ctor_get(x_117, 1); lean_inc(x_118); -x_119 = lean_ctor_get(x_117, 2); -lean_inc(x_119); -x_120 = lean_ctor_get(x_117, 3); -lean_inc(x_120); -x_86 = x_117; -x_87 = x_118; -x_88 = x_119; -x_89 = x_120; -goto block_92; +lean_dec(x_117); +x_119 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__3; +x_120 = lean_string_dec_eq(x_118, x_119); +lean_dec(x_118); +if (x_120 == 0) +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; +x_121 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; +x_122 = l_Lean_Parser_ParserState_mkErrorsAt(x_114, x_121, x_113); +x_123 = lean_ctor_get(x_122, 0); +lean_inc(x_123); +x_124 = lean_ctor_get(x_122, 2); +lean_inc(x_124); +x_125 = lean_ctor_get(x_122, 3); +lean_inc(x_125); +x_104 = x_122; +x_105 = x_123; +x_106 = x_124; +x_107 = x_125; +goto block_110; +} +else +{ +lean_object* x_126; lean_object* x_127; lean_object* x_128; +lean_dec(x_113); +x_126 = lean_ctor_get(x_114, 0); +lean_inc(x_126); +x_127 = lean_ctor_get(x_114, 2); +lean_inc(x_127); +x_128 = lean_ctor_get(x_114, 3); +lean_inc(x_128); +x_104 = x_114; +x_105 = x_126; +x_106 = x_127; +x_107 = x_128; +goto block_110; } } else { -lean_object* x_121; lean_object* x_122; lean_object* x_123; -lean_dec(x_94); -x_121 = lean_ctor_get(x_93, 0); -lean_inc(x_121); -x_122 = lean_ctor_get(x_93, 2); -lean_inc(x_122); -x_123 = lean_ctor_get(x_93, 3); -lean_inc(x_123); -x_86 = x_93; -x_87 = x_121; -x_88 = x_122; -x_89 = x_123; -goto block_92; +lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; +lean_dec(x_117); +x_129 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; +x_130 = l_Lean_Parser_ParserState_mkErrorsAt(x_114, x_129, x_113); +x_131 = lean_ctor_get(x_130, 0); +lean_inc(x_131); +x_132 = lean_ctor_get(x_130, 2); +lean_inc(x_132); +x_133 = lean_ctor_get(x_130, 3); +lean_inc(x_133); +x_104 = x_130; +x_105 = x_131; +x_106 = x_132; +x_107 = x_133; +goto block_110; +} +} +else +{ +lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; +lean_dec(x_115); +x_134 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; +x_135 = l_Lean_Parser_ParserState_mkErrorsAt(x_114, x_134, x_113); +x_136 = lean_ctor_get(x_135, 0); +lean_inc(x_136); +x_137 = lean_ctor_get(x_135, 2); +lean_inc(x_137); +x_138 = lean_ctor_get(x_135, 3); +lean_inc(x_138); +x_104 = x_135; +x_105 = x_136; +x_106 = x_137; +x_107 = x_138; +goto block_110; +} +} +else +{ +lean_object* x_139; lean_object* x_140; lean_object* x_141; +lean_dec(x_112); +x_139 = lean_ctor_get(x_111, 0); +lean_inc(x_139); +x_140 = lean_ctor_get(x_111, 2); +lean_inc(x_140); +x_141 = lean_ctor_get(x_111, 3); +lean_inc(x_141); +x_104 = x_111; +x_105 = x_139; +x_106 = x_140; +x_107 = x_141; +goto block_110; } block_38: { @@ -16395,7 +16393,7 @@ if (lean_obj_tag(x_40) == 0) { lean_object* x_41; lean_object* x_42; lean_inc(x_1); -x_41 = l_Lean_Parser_Command_optDeclSig___elambda__1(x_1, x_39); +x_41 = l_Lean_Parser_Command_declSig___elambda__1(x_1, x_39); x_42 = lean_ctor_get(x_41, 3); lean_inc(x_42); if (lean_obj_tag(x_42) == 0) @@ -16468,113 +16466,186 @@ x_60 = l_Lean_Parser_ParserState_mkNode(x_39, x_59, x_11); return x_60; } } -block_85: +block_103: { lean_object* x_63; x_63 = lean_ctor_get(x_62, 3); lean_inc(x_63); if (lean_obj_tag(x_63) == 0) { -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_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; x_64 = lean_ctor_get(x_62, 0); lean_inc(x_64); x_65 = lean_array_get_size(x_64); lean_dec(x_64); lean_inc(x_1); -x_66 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_62); -x_67 = l_Lean_nullKind; -x_68 = l_Lean_Parser_ParserState_mkNode(x_66, x_67, x_65); -x_69 = lean_ctor_get(x_68, 3); -lean_inc(x_69); -if (lean_obj_tag(x_69) == 0) +x_66 = l_Lean_Parser_ident___elambda__1(x_1, x_62); +x_67 = lean_ctor_get(x_66, 3); +lean_inc(x_67); +if (lean_obj_tag(x_67) == 0) { -lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_70 = lean_ctor_get(x_68, 0); -lean_inc(x_70); -x_71 = lean_array_get_size(x_70); -lean_dec(x_70); -x_72 = lean_ctor_get(x_68, 1); -lean_inc(x_72); +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_inc(x_1); -x_73 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_68); -x_74 = lean_ctor_get(x_73, 3); +x_68 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_66); +x_69 = l_Lean_nullKind; +x_70 = l_Lean_Parser_ParserState_mkNode(x_68, x_69, x_65); +x_71 = lean_ctor_get(x_70, 3); +lean_inc(x_71); +if (lean_obj_tag(x_71) == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_72 = lean_ctor_get(x_70, 0); +lean_inc(x_72); +x_73 = lean_array_get_size(x_72); +lean_dec(x_72); +x_74 = lean_ctor_get(x_70, 1); lean_inc(x_74); -if (lean_obj_tag(x_74) == 0) -{ -lean_object* x_75; -lean_dec(x_72); -x_75 = l_Lean_Parser_ParserState_mkNode(x_73, x_67, x_71); -x_39 = x_75; -goto block_61; -} -else -{ -lean_object* x_76; uint8_t x_77; -lean_dec(x_74); -x_76 = lean_ctor_get(x_73, 1); +lean_inc(x_1); +x_75 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_70); +x_76 = lean_ctor_get(x_75, 3); lean_inc(x_76); -x_77 = lean_nat_dec_eq(x_76, x_72); -lean_dec(x_76); -if (x_77 == 0) +if (lean_obj_tag(x_76) == 0) { -lean_object* x_78; -lean_dec(x_72); -x_78 = l_Lean_Parser_ParserState_mkNode(x_73, x_67, x_71); -x_39 = x_78; +lean_object* x_77; +lean_dec(x_74); +x_77 = l_Lean_Parser_ParserState_mkNode(x_75, x_69, x_73); +x_39 = x_77; goto block_61; } else { -lean_object* x_79; lean_object* x_80; -x_79 = l_Lean_Parser_ParserState_restore(x_73, x_71, x_72); -x_80 = l_Lean_Parser_ParserState_mkNode(x_79, x_67, x_71); +lean_object* x_78; uint8_t x_79; +lean_dec(x_76); +x_78 = lean_ctor_get(x_75, 1); +lean_inc(x_78); +x_79 = lean_nat_dec_eq(x_78, x_74); +lean_dec(x_78); +if (x_79 == 0) +{ +lean_object* x_80; +lean_dec(x_74); +x_80 = l_Lean_Parser_ParserState_mkNode(x_75, x_69, x_73); x_39 = x_80; goto block_61; } -} -} else { lean_object* x_81; lean_object* x_82; -lean_dec(x_69); -lean_dec(x_1); -x_81 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_82 = l_Lean_Parser_ParserState_mkNode(x_68, x_81, x_11); -return x_82; +x_81 = l_Lean_Parser_ParserState_restore(x_75, x_73, x_74); +x_82 = l_Lean_Parser_ParserState_mkNode(x_81, x_69, x_73); +x_39 = x_82; +goto block_61; +} } } else { lean_object* x_83; lean_object* x_84; -lean_dec(x_63); +lean_dec(x_71); lean_dec(x_1); x_83 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_84 = l_Lean_Parser_ParserState_mkNode(x_62, x_83, x_11); +x_84 = l_Lean_Parser_ParserState_mkNode(x_70, x_83, x_11); return x_84; } } -block_92: +else { -if (lean_obj_tag(x_89) == 0) +lean_object* x_85; lean_object* x_86; lean_object* x_87; +lean_dec(x_67); +x_85 = l_Lean_nullKind; +x_86 = l_Lean_Parser_ParserState_mkNode(x_66, x_85, x_65); +x_87 = lean_ctor_get(x_86, 3); +lean_inc(x_87); +if (lean_obj_tag(x_87) == 0) { +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_88 = lean_ctor_get(x_86, 0); +lean_inc(x_88); +x_89 = lean_array_get_size(x_88); lean_dec(x_88); -lean_dec(x_87); -lean_dec(x_10); -x_62 = x_86; -goto block_85; +x_90 = lean_ctor_get(x_86, 1); +lean_inc(x_90); +lean_inc(x_1); +x_91 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_86); +x_92 = lean_ctor_get(x_91, 3); +lean_inc(x_92); +if (lean_obj_tag(x_92) == 0) +{ +lean_object* x_93; +lean_dec(x_90); +x_93 = l_Lean_Parser_ParserState_mkNode(x_91, x_85, x_89); +x_39 = x_93; +goto block_61; } else { -lean_object* x_90; lean_object* x_91; -lean_dec(x_86); -x_90 = l_Array_shrink___main___rarg(x_87, x_11); -x_91 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_91, 0, x_90); -lean_ctor_set(x_91, 1, x_10); -lean_ctor_set(x_91, 2, x_88); -lean_ctor_set(x_91, 3, x_89); -x_62 = x_91; -goto block_85; +lean_object* x_94; uint8_t x_95; +lean_dec(x_92); +x_94 = lean_ctor_get(x_91, 1); +lean_inc(x_94); +x_95 = lean_nat_dec_eq(x_94, x_90); +lean_dec(x_94); +if (x_95 == 0) +{ +lean_object* x_96; +lean_dec(x_90); +x_96 = l_Lean_Parser_ParserState_mkNode(x_91, x_85, x_89); +x_39 = x_96; +goto block_61; +} +else +{ +lean_object* x_97; lean_object* x_98; +x_97 = l_Lean_Parser_ParserState_restore(x_91, x_89, x_90); +x_98 = l_Lean_Parser_ParserState_mkNode(x_97, x_85, x_89); +x_39 = x_98; +goto block_61; +} +} +} +else +{ +lean_object* x_99; lean_object* x_100; +lean_dec(x_87); +lean_dec(x_1); +x_99 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_100 = l_Lean_Parser_ParserState_mkNode(x_86, x_99, x_11); +return x_100; +} +} +} +else +{ +lean_object* x_101; lean_object* x_102; +lean_dec(x_63); +lean_dec(x_1); +x_101 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_102 = l_Lean_Parser_ParserState_mkNode(x_62, x_101, x_11); +return x_102; +} +} +block_110: +{ +if (lean_obj_tag(x_107) == 0) +{ +lean_dec(x_106); +lean_dec(x_105); +lean_dec(x_10); +x_62 = x_104; +goto block_103; +} +else +{ +lean_object* x_108; lean_object* x_109; +lean_dec(x_104); +x_108 = l_Array_shrink___main___rarg(x_105, x_11); +x_109 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_109, 0, x_108); +lean_ctor_set(x_109, 1, x_10); +lean_ctor_set(x_109, 2, x_106); +lean_ctor_set(x_109, 3, x_107); +x_62 = x_109; +goto block_103; } } } @@ -16587,475 +16658,550 @@ return x_7; } else { -lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; -x_124 = lean_ctor_get(x_2, 0); -lean_inc(x_124); -x_125 = lean_array_get_size(x_124); -lean_dec(x_124); -x_126 = lean_ctor_get(x_2, 1); -lean_inc(x_126); -lean_inc(x_1); -x_127 = lean_apply_2(x_4, x_1, x_2); -x_128 = lean_ctor_get(x_127, 3); -lean_inc(x_128); -if (lean_obj_tag(x_128) == 0) -{ -lean_dec(x_126); -lean_dec(x_125); -lean_dec(x_1); -return x_127; -} -else -{ -lean_object* x_129; lean_object* x_130; uint8_t x_131; -x_129 = lean_ctor_get(x_128, 0); -lean_inc(x_129); -lean_dec(x_128); -x_130 = lean_ctor_get(x_127, 1); -lean_inc(x_130); -x_131 = lean_nat_dec_eq(x_130, x_126); -lean_dec(x_130); -if (x_131 == 0) -{ -lean_dec(x_129); -lean_dec(x_126); -lean_dec(x_125); -lean_dec(x_1); -return x_127; -} -else -{ -lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; -lean_inc(x_126); -x_132 = l_Lean_Parser_ParserState_restore(x_127, x_125, x_126); -lean_dec(x_125); -x_133 = lean_unsigned_to_nat(1024u); -x_134 = l_Lean_Parser_checkPrecFn(x_133, x_1, x_132); -x_135 = lean_ctor_get(x_134, 3); -lean_inc(x_135); -if (lean_obj_tag(x_135) == 0) -{ -lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_171; lean_object* x_196; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_229; lean_object* x_230; -x_136 = lean_ctor_get(x_134, 0); -lean_inc(x_136); -x_137 = lean_ctor_get(x_134, 1); -lean_inc(x_137); -x_138 = lean_array_get_size(x_136); -lean_dec(x_136); -lean_inc(x_1); -x_229 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_134); -x_230 = lean_ctor_get(x_229, 3); -lean_inc(x_230); -if (lean_obj_tag(x_230) == 0) -{ -lean_object* x_231; lean_object* x_232; lean_object* x_233; -x_231 = lean_ctor_get(x_229, 1); -lean_inc(x_231); -lean_inc(x_1); -x_232 = l_Lean_Parser_tokenFn(x_1, x_229); -x_233 = lean_ctor_get(x_232, 3); -lean_inc(x_233); -if (lean_obj_tag(x_233) == 0) -{ -lean_object* x_234; lean_object* x_235; -x_234 = lean_ctor_get(x_232, 0); -lean_inc(x_234); -x_235 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_234); -lean_dec(x_234); -if (lean_obj_tag(x_235) == 2) -{ -lean_object* x_236; lean_object* x_237; uint8_t x_238; -x_236 = lean_ctor_get(x_235, 1); -lean_inc(x_236); -lean_dec(x_235); -x_237 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__3; -x_238 = lean_string_dec_eq(x_236, x_237); -lean_dec(x_236); -if (x_238 == 0) -{ -lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; -x_239 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; -x_240 = l_Lean_Parser_ParserState_mkErrorsAt(x_232, x_239, x_231); -x_241 = lean_ctor_get(x_240, 0); -lean_inc(x_241); -x_242 = lean_ctor_get(x_240, 2); -lean_inc(x_242); -x_243 = lean_ctor_get(x_240, 3); -lean_inc(x_243); -x_222 = x_240; -x_223 = x_241; -x_224 = x_242; -x_225 = x_243; -goto block_228; -} -else -{ -lean_object* x_244; lean_object* x_245; lean_object* x_246; -lean_dec(x_231); -x_244 = lean_ctor_get(x_232, 0); -lean_inc(x_244); -x_245 = lean_ctor_get(x_232, 2); -lean_inc(x_245); -x_246 = lean_ctor_get(x_232, 3); -lean_inc(x_246); -x_222 = x_232; -x_223 = x_244; -x_224 = x_245; -x_225 = x_246; -goto block_228; -} -} -else -{ -lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; -lean_dec(x_235); -x_247 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; -x_248 = l_Lean_Parser_ParserState_mkErrorsAt(x_232, x_247, x_231); -x_249 = lean_ctor_get(x_248, 0); -lean_inc(x_249); -x_250 = lean_ctor_get(x_248, 2); -lean_inc(x_250); -x_251 = lean_ctor_get(x_248, 3); -lean_inc(x_251); -x_222 = x_248; -x_223 = x_249; -x_224 = x_250; -x_225 = x_251; -goto block_228; -} -} -else -{ -lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; -lean_dec(x_233); -x_252 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; -x_253 = l_Lean_Parser_ParserState_mkErrorsAt(x_232, x_252, x_231); -x_254 = lean_ctor_get(x_253, 0); -lean_inc(x_254); -x_255 = lean_ctor_get(x_253, 2); -lean_inc(x_255); -x_256 = lean_ctor_get(x_253, 3); -lean_inc(x_256); -x_222 = x_253; -x_223 = x_254; -x_224 = x_255; -x_225 = x_256; -goto block_228; -} -} -else -{ -lean_object* x_257; lean_object* x_258; lean_object* x_259; -lean_dec(x_230); -x_257 = lean_ctor_get(x_229, 0); -lean_inc(x_257); -x_258 = lean_ctor_get(x_229, 2); -lean_inc(x_258); -x_259 = lean_ctor_get(x_229, 3); -lean_inc(x_259); -x_222 = x_229; -x_223 = x_257; -x_224 = x_258; -x_225 = x_259; -goto block_228; -} -block_170: -{ -lean_object* x_140; -x_140 = lean_ctor_get(x_139, 3); -lean_inc(x_140); -if (lean_obj_tag(x_140) == 0) -{ -lean_object* x_141; lean_object* x_142; lean_object* x_143; -x_141 = lean_ctor_get(x_139, 1); -lean_inc(x_141); -x_142 = l_Lean_Parser_tokenFn(x_1, x_139); -x_143 = lean_ctor_get(x_142, 3); -lean_inc(x_143); -if (lean_obj_tag(x_143) == 0) -{ -lean_object* x_144; lean_object* x_145; -x_144 = lean_ctor_get(x_142, 0); +lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; +x_142 = lean_ctor_get(x_2, 0); +lean_inc(x_142); +x_143 = lean_array_get_size(x_142); +lean_dec(x_142); +x_144 = lean_ctor_get(x_2, 1); lean_inc(x_144); -x_145 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_144); -lean_dec(x_144); -if (lean_obj_tag(x_145) == 2) -{ -lean_object* x_146; lean_object* x_147; uint8_t x_148; -x_146 = lean_ctor_get(x_145, 1); -lean_inc(x_146); -lean_dec(x_145); -x_147 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__4; -x_148 = lean_string_dec_eq(x_146, x_147); -lean_dec(x_146); -if (x_148 == 0) -{ -lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; -x_149 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; -x_150 = l_Lean_Parser_ParserState_mkErrorsAt(x_142, x_149, x_141); -x_151 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_152 = l_Lean_Parser_ParserState_mkNode(x_150, x_151, x_138); -x_153 = l_Lean_Parser_mergeOrElseErrors(x_152, x_129, x_126); -lean_dec(x_126); -return x_153; -} -else -{ -lean_object* x_154; lean_object* x_155; lean_object* x_156; -lean_dec(x_141); -x_154 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_155 = l_Lean_Parser_ParserState_mkNode(x_142, x_154, x_138); -x_156 = l_Lean_Parser_mergeOrElseErrors(x_155, x_129, x_126); -lean_dec(x_126); -return x_156; -} -} -else -{ -lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; -lean_dec(x_145); -x_157 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; -x_158 = l_Lean_Parser_ParserState_mkErrorsAt(x_142, x_157, x_141); -x_159 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_160 = l_Lean_Parser_ParserState_mkNode(x_158, x_159, x_138); -x_161 = l_Lean_Parser_mergeOrElseErrors(x_160, x_129, x_126); -lean_dec(x_126); -return x_161; -} -} -else -{ -lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; -lean_dec(x_143); -x_162 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; -x_163 = l_Lean_Parser_ParserState_mkErrorsAt(x_142, x_162, x_141); -x_164 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_165 = l_Lean_Parser_ParserState_mkNode(x_163, x_164, x_138); -x_166 = l_Lean_Parser_mergeOrElseErrors(x_165, x_129, x_126); -lean_dec(x_126); -return x_166; -} -} -else -{ -lean_object* x_167; lean_object* x_168; lean_object* x_169; -lean_dec(x_140); -lean_dec(x_1); -x_167 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_168 = l_Lean_Parser_ParserState_mkNode(x_139, x_167, x_138); -x_169 = l_Lean_Parser_mergeOrElseErrors(x_168, x_129, x_126); -lean_dec(x_126); -return x_169; -} -} -block_195: -{ -lean_object* x_172; -x_172 = lean_ctor_get(x_171, 3); -lean_inc(x_172); -if (lean_obj_tag(x_172) == 0) -{ -lean_object* x_173; lean_object* x_174; lean_inc(x_1); -x_173 = l_Lean_Parser_Command_optDeclSig___elambda__1(x_1, x_171); -x_174 = lean_ctor_get(x_173, 3); -lean_inc(x_174); -if (lean_obj_tag(x_174) == 0) +x_145 = lean_apply_2(x_4, x_1, x_2); +x_146 = lean_ctor_get(x_145, 3); +lean_inc(x_146); +if (lean_obj_tag(x_146) == 0) +{ +lean_dec(x_144); +lean_dec(x_143); +lean_dec(x_1); +return x_145; +} +else +{ +lean_object* x_147; lean_object* x_148; uint8_t x_149; +x_147 = lean_ctor_get(x_146, 0); +lean_inc(x_147); +lean_dec(x_146); +x_148 = lean_ctor_get(x_145, 1); +lean_inc(x_148); +x_149 = lean_nat_dec_eq(x_148, x_144); +lean_dec(x_148); +if (x_149 == 0) +{ +lean_dec(x_147); +lean_dec(x_144); +lean_dec(x_143); +lean_dec(x_1); +return x_145; +} +else +{ +lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; +lean_inc(x_144); +x_150 = l_Lean_Parser_ParserState_restore(x_145, x_143, x_144); +lean_dec(x_143); +x_151 = lean_unsigned_to_nat(1024u); +x_152 = l_Lean_Parser_checkPrecFn(x_151, x_1, x_150); +x_153 = lean_ctor_get(x_152, 3); +lean_inc(x_153); +if (lean_obj_tag(x_153) == 0) +{ +lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_189; lean_object* x_214; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_266; lean_object* x_267; +x_154 = lean_ctor_get(x_152, 0); +lean_inc(x_154); +x_155 = lean_ctor_get(x_152, 1); +lean_inc(x_155); +x_156 = lean_array_get_size(x_154); +lean_dec(x_154); +lean_inc(x_1); +x_266 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_152); +x_267 = lean_ctor_get(x_266, 3); +lean_inc(x_267); +if (lean_obj_tag(x_267) == 0) +{ +lean_object* x_268; lean_object* x_269; lean_object* x_270; +x_268 = lean_ctor_get(x_266, 1); +lean_inc(x_268); +lean_inc(x_1); +x_269 = l_Lean_Parser_tokenFn(x_1, x_266); +x_270 = lean_ctor_get(x_269, 3); +lean_inc(x_270); +if (lean_obj_tag(x_270) == 0) +{ +lean_object* x_271; lean_object* x_272; +x_271 = lean_ctor_get(x_269, 0); +lean_inc(x_271); +x_272 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_271); +lean_dec(x_271); +if (lean_obj_tag(x_272) == 2) +{ +lean_object* x_273; lean_object* x_274; uint8_t x_275; +x_273 = lean_ctor_get(x_272, 1); +lean_inc(x_273); +lean_dec(x_272); +x_274 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__3; +x_275 = lean_string_dec_eq(x_273, x_274); +lean_dec(x_273); +if (x_275 == 0) +{ +lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; +x_276 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; +x_277 = l_Lean_Parser_ParserState_mkErrorsAt(x_269, x_276, x_268); +x_278 = lean_ctor_get(x_277, 0); +lean_inc(x_278); +x_279 = lean_ctor_get(x_277, 2); +lean_inc(x_279); +x_280 = lean_ctor_get(x_277, 3); +lean_inc(x_280); +x_259 = x_277; +x_260 = x_278; +x_261 = x_279; +x_262 = x_280; +goto block_265; +} +else +{ +lean_object* x_281; lean_object* x_282; lean_object* x_283; +lean_dec(x_268); +x_281 = lean_ctor_get(x_269, 0); +lean_inc(x_281); +x_282 = lean_ctor_get(x_269, 2); +lean_inc(x_282); +x_283 = lean_ctor_get(x_269, 3); +lean_inc(x_283); +x_259 = x_269; +x_260 = x_281; +x_261 = x_282; +x_262 = x_283; +goto block_265; +} +} +else +{ +lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; +lean_dec(x_272); +x_284 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; +x_285 = l_Lean_Parser_ParserState_mkErrorsAt(x_269, x_284, x_268); +x_286 = lean_ctor_get(x_285, 0); +lean_inc(x_286); +x_287 = lean_ctor_get(x_285, 2); +lean_inc(x_287); +x_288 = lean_ctor_get(x_285, 3); +lean_inc(x_288); +x_259 = x_285; +x_260 = x_286; +x_261 = x_287; +x_262 = x_288; +goto block_265; +} +} +else +{ +lean_object* x_289; lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; +lean_dec(x_270); +x_289 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__10; +x_290 = l_Lean_Parser_ParserState_mkErrorsAt(x_269, x_289, x_268); +x_291 = lean_ctor_get(x_290, 0); +lean_inc(x_291); +x_292 = lean_ctor_get(x_290, 2); +lean_inc(x_292); +x_293 = lean_ctor_get(x_290, 3); +lean_inc(x_293); +x_259 = x_290; +x_260 = x_291; +x_261 = x_292; +x_262 = x_293; +goto block_265; +} +} +else +{ +lean_object* x_294; lean_object* x_295; lean_object* x_296; +lean_dec(x_267); +x_294 = lean_ctor_get(x_266, 0); +lean_inc(x_294); +x_295 = lean_ctor_get(x_266, 2); +lean_inc(x_295); +x_296 = lean_ctor_get(x_266, 3); +lean_inc(x_296); +x_259 = x_266; +x_260 = x_294; +x_261 = x_295; +x_262 = x_296; +goto block_265; +} +block_188: +{ +lean_object* x_158; +x_158 = lean_ctor_get(x_157, 3); +lean_inc(x_158); +if (lean_obj_tag(x_158) == 0) +{ +lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_159 = lean_ctor_get(x_157, 1); +lean_inc(x_159); +x_160 = l_Lean_Parser_tokenFn(x_1, x_157); +x_161 = lean_ctor_get(x_160, 3); +lean_inc(x_161); +if (lean_obj_tag(x_161) == 0) +{ +lean_object* x_162; lean_object* x_163; +x_162 = lean_ctor_get(x_160, 0); +lean_inc(x_162); +x_163 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_162); +lean_dec(x_162); +if (lean_obj_tag(x_163) == 2) +{ +lean_object* x_164; lean_object* x_165; uint8_t x_166; +x_164 = lean_ctor_get(x_163, 1); +lean_inc(x_164); +lean_dec(x_163); +x_165 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__4; +x_166 = lean_string_dec_eq(x_164, x_165); +lean_dec(x_164); +if (x_166 == 0) +{ +lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; +x_167 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; +x_168 = l_Lean_Parser_ParserState_mkErrorsAt(x_160, x_167, x_159); +x_169 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_170 = l_Lean_Parser_ParserState_mkNode(x_168, x_169, x_156); +x_171 = l_Lean_Parser_mergeOrElseErrors(x_170, x_147, x_144); +lean_dec(x_144); +return x_171; +} +else +{ +lean_object* x_172; lean_object* x_173; lean_object* x_174; +lean_dec(x_159); +x_172 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_173 = l_Lean_Parser_ParserState_mkNode(x_160, x_172, x_156); +x_174 = l_Lean_Parser_mergeOrElseErrors(x_173, x_147, x_144); +lean_dec(x_144); +return x_174; +} +} +else { lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; -x_175 = lean_ctor_get(x_173, 0); -lean_inc(x_175); -x_176 = lean_array_get_size(x_175); -lean_dec(x_175); -x_177 = lean_ctor_get(x_173, 1); -lean_inc(x_177); +lean_dec(x_163); +x_175 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; +x_176 = l_Lean_Parser_ParserState_mkErrorsAt(x_160, x_175, x_159); +x_177 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_178 = l_Lean_Parser_ParserState_mkNode(x_176, x_177, x_156); +x_179 = l_Lean_Parser_mergeOrElseErrors(x_178, x_147, x_144); +lean_dec(x_144); +return x_179; +} +} +else +{ +lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; +lean_dec(x_161); +x_180 = l_Lean_Parser_antiquotNestedExpr___elambda__1___closed__7; +x_181 = l_Lean_Parser_ParserState_mkErrorsAt(x_160, x_180, x_159); +x_182 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_183 = l_Lean_Parser_ParserState_mkNode(x_181, x_182, x_156); +x_184 = l_Lean_Parser_mergeOrElseErrors(x_183, x_147, x_144); +lean_dec(x_144); +return x_184; +} +} +else +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; +lean_dec(x_158); +lean_dec(x_1); +x_185 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_186 = l_Lean_Parser_ParserState_mkNode(x_157, x_185, x_156); +x_187 = l_Lean_Parser_mergeOrElseErrors(x_186, x_147, x_144); +lean_dec(x_144); +return x_187; +} +} +block_213: +{ +lean_object* x_190; +x_190 = lean_ctor_get(x_189, 3); +lean_inc(x_190); +if (lean_obj_tag(x_190) == 0) +{ +lean_object* x_191; lean_object* x_192; lean_inc(x_1); -x_178 = l_Lean_Parser_Term_binderDefault___elambda__1(x_1, x_173); -x_179 = lean_ctor_get(x_178, 3); -lean_inc(x_179); -if (lean_obj_tag(x_179) == 0) +x_191 = l_Lean_Parser_Command_declSig___elambda__1(x_1, x_189); +x_192 = lean_ctor_get(x_191, 3); +lean_inc(x_192); +if (lean_obj_tag(x_192) == 0) { -lean_object* x_180; lean_object* x_181; -lean_dec(x_177); -x_180 = l_Lean_nullKind; -x_181 = l_Lean_Parser_ParserState_mkNode(x_178, x_180, x_176); -x_139 = x_181; -goto block_170; -} -else -{ -lean_object* x_182; uint8_t x_183; -lean_dec(x_179); -x_182 = lean_ctor_get(x_178, 1); -lean_inc(x_182); -x_183 = lean_nat_dec_eq(x_182, x_177); -lean_dec(x_182); -if (x_183 == 0) -{ -lean_object* x_184; lean_object* x_185; -lean_dec(x_177); -x_184 = l_Lean_nullKind; -x_185 = l_Lean_Parser_ParserState_mkNode(x_178, x_184, x_176); -x_139 = x_185; -goto block_170; -} -else -{ -lean_object* x_186; lean_object* x_187; lean_object* x_188; -x_186 = l_Lean_Parser_ParserState_restore(x_178, x_176, x_177); -x_187 = l_Lean_nullKind; -x_188 = l_Lean_Parser_ParserState_mkNode(x_186, x_187, x_176); -x_139 = x_188; -goto block_170; -} -} -} -else -{ -lean_object* x_189; lean_object* x_190; lean_object* x_191; -lean_dec(x_174); -lean_dec(x_1); -x_189 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_190 = l_Lean_Parser_ParserState_mkNode(x_173, x_189, x_138); -x_191 = l_Lean_Parser_mergeOrElseErrors(x_190, x_129, x_126); -lean_dec(x_126); -return x_191; -} -} -else -{ -lean_object* x_192; lean_object* x_193; lean_object* x_194; -lean_dec(x_172); -lean_dec(x_1); -x_192 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_193 = l_Lean_Parser_ParserState_mkNode(x_171, x_192, x_138); -x_194 = l_Lean_Parser_mergeOrElseErrors(x_193, x_129, x_126); -lean_dec(x_126); -return x_194; -} -} -block_221: -{ -lean_object* x_197; +lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; +x_193 = lean_ctor_get(x_191, 0); +lean_inc(x_193); +x_194 = lean_array_get_size(x_193); +lean_dec(x_193); +x_195 = lean_ctor_get(x_191, 1); +lean_inc(x_195); +lean_inc(x_1); +x_196 = l_Lean_Parser_Term_binderDefault___elambda__1(x_1, x_191); x_197 = lean_ctor_get(x_196, 3); lean_inc(x_197); if (lean_obj_tag(x_197) == 0) { -lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; -x_198 = lean_ctor_get(x_196, 0); -lean_inc(x_198); -x_199 = lean_array_get_size(x_198); -lean_dec(x_198); -lean_inc(x_1); -x_200 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_196); -x_201 = l_Lean_nullKind; -x_202 = l_Lean_Parser_ParserState_mkNode(x_200, x_201, x_199); -x_203 = lean_ctor_get(x_202, 3); -lean_inc(x_203); -if (lean_obj_tag(x_203) == 0) -{ -lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; -x_204 = lean_ctor_get(x_202, 0); -lean_inc(x_204); -x_205 = lean_array_get_size(x_204); -lean_dec(x_204); -x_206 = lean_ctor_get(x_202, 1); -lean_inc(x_206); -lean_inc(x_1); -x_207 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_202); -x_208 = lean_ctor_get(x_207, 3); -lean_inc(x_208); -if (lean_obj_tag(x_208) == 0) -{ -lean_object* x_209; -lean_dec(x_206); -x_209 = l_Lean_Parser_ParserState_mkNode(x_207, x_201, x_205); -x_171 = x_209; -goto block_195; +lean_object* x_198; lean_object* x_199; +lean_dec(x_195); +x_198 = l_Lean_nullKind; +x_199 = l_Lean_Parser_ParserState_mkNode(x_196, x_198, x_194); +x_157 = x_199; +goto block_188; } else { -lean_object* x_210; uint8_t x_211; -lean_dec(x_208); -x_210 = lean_ctor_get(x_207, 1); -lean_inc(x_210); -x_211 = lean_nat_dec_eq(x_210, x_206); -lean_dec(x_210); -if (x_211 == 0) -{ -lean_object* x_212; -lean_dec(x_206); -x_212 = l_Lean_Parser_ParserState_mkNode(x_207, x_201, x_205); -x_171 = x_212; -goto block_195; -} -else -{ -lean_object* x_213; lean_object* x_214; -x_213 = l_Lean_Parser_ParserState_restore(x_207, x_205, x_206); -x_214 = l_Lean_Parser_ParserState_mkNode(x_213, x_201, x_205); -x_171 = x_214; -goto block_195; -} -} -} -else -{ -lean_object* x_215; lean_object* x_216; lean_object* x_217; -lean_dec(x_203); -lean_dec(x_1); -x_215 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_216 = l_Lean_Parser_ParserState_mkNode(x_202, x_215, x_138); -x_217 = l_Lean_Parser_mergeOrElseErrors(x_216, x_129, x_126); -lean_dec(x_126); -return x_217; -} -} -else -{ -lean_object* x_218; lean_object* x_219; lean_object* x_220; +lean_object* x_200; uint8_t x_201; lean_dec(x_197); +x_200 = lean_ctor_get(x_196, 1); +lean_inc(x_200); +x_201 = lean_nat_dec_eq(x_200, x_195); +lean_dec(x_200); +if (x_201 == 0) +{ +lean_object* x_202; lean_object* x_203; +lean_dec(x_195); +x_202 = l_Lean_nullKind; +x_203 = l_Lean_Parser_ParserState_mkNode(x_196, x_202, x_194); +x_157 = x_203; +goto block_188; +} +else +{ +lean_object* x_204; lean_object* x_205; lean_object* x_206; +x_204 = l_Lean_Parser_ParserState_restore(x_196, x_194, x_195); +x_205 = l_Lean_nullKind; +x_206 = l_Lean_Parser_ParserState_mkNode(x_204, x_205, x_194); +x_157 = x_206; +goto block_188; +} +} +} +else +{ +lean_object* x_207; lean_object* x_208; lean_object* x_209; +lean_dec(x_192); lean_dec(x_1); -x_218 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; -x_219 = l_Lean_Parser_ParserState_mkNode(x_196, x_218, x_138); -x_220 = l_Lean_Parser_mergeOrElseErrors(x_219, x_129, x_126); -lean_dec(x_126); -return x_220; +x_207 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_208 = l_Lean_Parser_ParserState_mkNode(x_191, x_207, x_156); +x_209 = l_Lean_Parser_mergeOrElseErrors(x_208, x_147, x_144); +lean_dec(x_144); +return x_209; } } -block_228: +else { -if (lean_obj_tag(x_225) == 0) +lean_object* x_210; lean_object* x_211; lean_object* x_212; +lean_dec(x_190); +lean_dec(x_1); +x_210 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_211 = l_Lean_Parser_ParserState_mkNode(x_189, x_210, x_156); +x_212 = l_Lean_Parser_mergeOrElseErrors(x_211, x_147, x_144); +lean_dec(x_144); +return x_212; +} +} +block_258: { +lean_object* x_215; +x_215 = lean_ctor_get(x_214, 3); +lean_inc(x_215); +if (lean_obj_tag(x_215) == 0) +{ +lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; +x_216 = lean_ctor_get(x_214, 0); +lean_inc(x_216); +x_217 = lean_array_get_size(x_216); +lean_dec(x_216); +lean_inc(x_1); +x_218 = l_Lean_Parser_ident___elambda__1(x_1, x_214); +x_219 = lean_ctor_get(x_218, 3); +lean_inc(x_219); +if (lean_obj_tag(x_219) == 0) +{ +lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; +lean_inc(x_1); +x_220 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_218); +x_221 = l_Lean_nullKind; +x_222 = l_Lean_Parser_ParserState_mkNode(x_220, x_221, x_217); +x_223 = lean_ctor_get(x_222, 3); +lean_inc(x_223); +if (lean_obj_tag(x_223) == 0) +{ +lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; +x_224 = lean_ctor_get(x_222, 0); +lean_inc(x_224); +x_225 = lean_array_get_size(x_224); lean_dec(x_224); +x_226 = lean_ctor_get(x_222, 1); +lean_inc(x_226); +lean_inc(x_1); +x_227 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_222); +x_228 = lean_ctor_get(x_227, 3); +lean_inc(x_228); +if (lean_obj_tag(x_228) == 0) +{ +lean_object* x_229; +lean_dec(x_226); +x_229 = l_Lean_Parser_ParserState_mkNode(x_227, x_221, x_225); +x_189 = x_229; +goto block_213; +} +else +{ +lean_object* x_230; uint8_t x_231; +lean_dec(x_228); +x_230 = lean_ctor_get(x_227, 1); +lean_inc(x_230); +x_231 = lean_nat_dec_eq(x_230, x_226); +lean_dec(x_230); +if (x_231 == 0) +{ +lean_object* x_232; +lean_dec(x_226); +x_232 = l_Lean_Parser_ParserState_mkNode(x_227, x_221, x_225); +x_189 = x_232; +goto block_213; +} +else +{ +lean_object* x_233; lean_object* x_234; +x_233 = l_Lean_Parser_ParserState_restore(x_227, x_225, x_226); +x_234 = l_Lean_Parser_ParserState_mkNode(x_233, x_221, x_225); +x_189 = x_234; +goto block_213; +} +} +} +else +{ +lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_dec(x_223); -lean_dec(x_137); -x_196 = x_222; -goto block_221; -} -else -{ -lean_object* x_226; lean_object* x_227; -lean_dec(x_222); -x_226 = l_Array_shrink___main___rarg(x_223, x_138); -x_227 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_227, 0, x_226); -lean_ctor_set(x_227, 1, x_137); -lean_ctor_set(x_227, 2, x_224); -lean_ctor_set(x_227, 3, x_225); -x_196 = x_227; -goto block_221; -} -} -} -else -{ -lean_object* x_260; -lean_dec(x_135); lean_dec(x_1); -x_260 = l_Lean_Parser_mergeOrElseErrors(x_134, x_129, x_126); -lean_dec(x_126); -return x_260; +x_235 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_236 = l_Lean_Parser_ParserState_mkNode(x_222, x_235, x_156); +x_237 = l_Lean_Parser_mergeOrElseErrors(x_236, x_147, x_144); +lean_dec(x_144); +return x_237; +} +} +else +{ +lean_object* x_238; lean_object* x_239; lean_object* x_240; +lean_dec(x_219); +x_238 = l_Lean_nullKind; +x_239 = l_Lean_Parser_ParserState_mkNode(x_218, x_238, x_217); +x_240 = lean_ctor_get(x_239, 3); +lean_inc(x_240); +if (lean_obj_tag(x_240) == 0) +{ +lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; +x_241 = lean_ctor_get(x_239, 0); +lean_inc(x_241); +x_242 = lean_array_get_size(x_241); +lean_dec(x_241); +x_243 = lean_ctor_get(x_239, 1); +lean_inc(x_243); +lean_inc(x_1); +x_244 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_239); +x_245 = lean_ctor_get(x_244, 3); +lean_inc(x_245); +if (lean_obj_tag(x_245) == 0) +{ +lean_object* x_246; +lean_dec(x_243); +x_246 = l_Lean_Parser_ParserState_mkNode(x_244, x_238, x_242); +x_189 = x_246; +goto block_213; +} +else +{ +lean_object* x_247; uint8_t x_248; +lean_dec(x_245); +x_247 = lean_ctor_get(x_244, 1); +lean_inc(x_247); +x_248 = lean_nat_dec_eq(x_247, x_243); +lean_dec(x_247); +if (x_248 == 0) +{ +lean_object* x_249; +lean_dec(x_243); +x_249 = l_Lean_Parser_ParserState_mkNode(x_244, x_238, x_242); +x_189 = x_249; +goto block_213; +} +else +{ +lean_object* x_250; lean_object* x_251; +x_250 = l_Lean_Parser_ParserState_restore(x_244, x_242, x_243); +x_251 = l_Lean_Parser_ParserState_mkNode(x_250, x_238, x_242); +x_189 = x_251; +goto block_213; +} +} +} +else +{ +lean_object* x_252; lean_object* x_253; lean_object* x_254; +lean_dec(x_240); +lean_dec(x_1); +x_252 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_253 = l_Lean_Parser_ParserState_mkNode(x_239, x_252, x_156); +x_254 = l_Lean_Parser_mergeOrElseErrors(x_253, x_147, x_144); +lean_dec(x_144); +return x_254; +} +} +} +else +{ +lean_object* x_255; lean_object* x_256; lean_object* x_257; +lean_dec(x_215); +lean_dec(x_1); +x_255 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_256 = l_Lean_Parser_ParserState_mkNode(x_214, x_255, x_156); +x_257 = l_Lean_Parser_mergeOrElseErrors(x_256, x_147, x_144); +lean_dec(x_144); +return x_257; +} +} +block_265: +{ +if (lean_obj_tag(x_262) == 0) +{ +lean_dec(x_261); +lean_dec(x_260); +lean_dec(x_155); +x_214 = x_259; +goto block_258; +} +else +{ +lean_object* x_263; lean_object* x_264; +lean_dec(x_259); +x_263 = l_Array_shrink___main___rarg(x_260, x_156); +x_264 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_264, 0, x_263); +lean_ctor_set(x_264, 1, x_155); +lean_ctor_set(x_264, 2, x_261); +lean_ctor_set(x_264, 3, x_262); +x_214 = x_264; +goto block_258; +} +} +} +else +{ +lean_object* x_297; +lean_dec(x_153); +lean_dec(x_1); +x_297 = l_Lean_Parser_mergeOrElseErrors(x_152, x_147, x_144); +lean_dec(x_144); +return x_297; } } } @@ -17078,17 +17224,6 @@ lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_ident; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -x_3 = l_Lean_Parser_noFirstTokenInfo(x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Parser_Term_binderDefault; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); @@ -17096,43 +17231,55 @@ x_3 = l_Lean_Parser_optionaInfo(x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__4() { +lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__3; +x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__2; x_2 = l_Lean_Parser_antiquotNestedExpr___closed__3; x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); return x_3; } } -lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__5() { +lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Command_optDeclSig; +x_1 = l_Lean_Parser_Command_declSig; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); -x_3 = l_Lean_Parser_Command_structExplicitBinder___closed__4; +x_3 = l_Lean_Parser_Command_structExplicitBinder___closed__3; x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); return x_4; } } +lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Command_ctor___closed__1; +x_2 = l_Lean_Parser_Command_structExplicitBinder___closed__4; +x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); +return x_3; +} +} lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__6() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_ctor___closed__1; -x_2 = l_Lean_Parser_Command_structExplicitBinder___closed__5; -x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); -return x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_ident; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Parser_Command_structExplicitBinder___closed__5; +x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); +return x_4; } } lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__2; +x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__1; x_2 = l_Lean_Parser_Command_structExplicitBinder___closed__6; x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); return x_3; @@ -17142,9 +17289,9 @@ lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__1; +x_1 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; x_2 = l_Lean_Parser_Command_structExplicitBinder___closed__7; -x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); +x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); return x_3; } } @@ -17152,35 +17299,25 @@ lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__9() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__2; +x_1 = l_Lean_Parser_epsilonInfo; x_2 = l_Lean_Parser_Command_structExplicitBinder___closed__8; -x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); +x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); return x_3; } } lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__10() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_epsilonInfo; -x_2 = l_Lean_Parser_Command_structExplicitBinder___closed__9; -x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__11() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Parser_Command_structExplicitBinder___elambda__1___closed__4; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); -x_3 = l_Lean_Parser_Command_structExplicitBinder___closed__10; +x_3 = l_Lean_Parser_Command_structExplicitBinder___closed__9; x_4 = l_Lean_Parser_orelseInfo(x_2, x_3); return x_4; } } -lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__12() { +lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__11() { _start: { lean_object* x_1; @@ -17188,12 +17325,12 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Command_structExplicitBinder___el return x_1; } } -lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__13() { +lean_object* _init_l_Lean_Parser_Command_structExplicitBinder___closed__12() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__11; -x_2 = l_Lean_Parser_Command_structExplicitBinder___closed__12; +x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__10; +x_2 = l_Lean_Parser_Command_structExplicitBinder___closed__11; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -17204,7 +17341,7 @@ lean_object* _init_l_Lean_Parser_Command_structExplicitBinder() { _start: { lean_object* x_1; -x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__13; +x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__12; return x_1; } } @@ -17267,7 +17404,7 @@ x_8 = lean_ctor_get(x_7, 3); lean_inc(x_8); if (lean_obj_tag(x_8) == 0) { -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_43; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_74; lean_object* x_75; +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_43; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_92; lean_object* x_93; x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_7, 1); @@ -17275,121 +17412,121 @@ lean_inc(x_10); x_11 = lean_array_get_size(x_9); lean_dec(x_9); lean_inc(x_1); -x_74 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_7); -x_75 = lean_ctor_get(x_74, 3); -lean_inc(x_75); -if (lean_obj_tag(x_75) == 0) +x_92 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_7); +x_93 = lean_ctor_get(x_92, 3); +lean_inc(x_93); +if (lean_obj_tag(x_93) == 0) { -lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_76 = lean_ctor_get(x_74, 1); -lean_inc(x_76); -lean_inc(x_1); -x_77 = l_Lean_Parser_tokenFn(x_1, x_74); -x_78 = lean_ctor_get(x_77, 3); -lean_inc(x_78); -if (lean_obj_tag(x_78) == 0) -{ -lean_object* x_79; lean_object* x_80; -x_79 = lean_ctor_get(x_77, 0); -lean_inc(x_79); -x_80 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_79); -lean_dec(x_79); -if (lean_obj_tag(x_80) == 2) -{ -lean_object* x_81; lean_object* x_82; uint8_t x_83; -x_81 = lean_ctor_get(x_80, 1); -lean_inc(x_81); -lean_dec(x_80); -x_82 = l_Lean_Parser_Term_structInst___elambda__1___closed__5; -x_83 = lean_string_dec_eq(x_81, x_82); -lean_dec(x_81); -if (x_83 == 0) -{ -lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_84 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; -x_85 = l_Lean_Parser_ParserState_mkErrorsAt(x_77, x_84, x_76); -x_86 = lean_ctor_get(x_85, 0); -lean_inc(x_86); -x_87 = lean_ctor_get(x_85, 2); -lean_inc(x_87); -x_88 = lean_ctor_get(x_85, 3); -lean_inc(x_88); -x_67 = x_85; -x_68 = x_86; -x_69 = x_87; -x_70 = x_88; -goto block_73; -} -else -{ -lean_object* x_89; lean_object* x_90; lean_object* x_91; -lean_dec(x_76); -x_89 = lean_ctor_get(x_77, 0); -lean_inc(x_89); -x_90 = lean_ctor_get(x_77, 2); -lean_inc(x_90); -x_91 = lean_ctor_get(x_77, 3); -lean_inc(x_91); -x_67 = x_77; -x_68 = x_89; -x_69 = x_90; -x_70 = x_91; -goto block_73; -} -} -else -{ -lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; -lean_dec(x_80); -x_92 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; -x_93 = l_Lean_Parser_ParserState_mkErrorsAt(x_77, x_92, x_76); -x_94 = lean_ctor_get(x_93, 0); +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_92, 1); lean_inc(x_94); -x_95 = lean_ctor_get(x_93, 2); -lean_inc(x_95); -x_96 = lean_ctor_get(x_93, 3); +lean_inc(x_1); +x_95 = l_Lean_Parser_tokenFn(x_1, x_92); +x_96 = lean_ctor_get(x_95, 3); lean_inc(x_96); -x_67 = x_93; -x_68 = x_94; -x_69 = x_95; -x_70 = x_96; -goto block_73; -} -} -else +if (lean_obj_tag(x_96) == 0) { -lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; -lean_dec(x_78); -x_97 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; -x_98 = l_Lean_Parser_ParserState_mkErrorsAt(x_77, x_97, x_76); -x_99 = lean_ctor_get(x_98, 0); +lean_object* x_97; lean_object* x_98; +x_97 = lean_ctor_get(x_95, 0); +lean_inc(x_97); +x_98 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_97); +lean_dec(x_97); +if (lean_obj_tag(x_98) == 2) +{ +lean_object* x_99; lean_object* x_100; uint8_t x_101; +x_99 = lean_ctor_get(x_98, 1); lean_inc(x_99); -x_100 = lean_ctor_get(x_98, 2); -lean_inc(x_100); -x_101 = lean_ctor_get(x_98, 3); -lean_inc(x_101); -x_67 = x_98; -x_68 = x_99; -x_69 = x_100; -x_70 = x_101; -goto block_73; +lean_dec(x_98); +x_100 = l_Lean_Parser_Term_structInst___elambda__1___closed__5; +x_101 = lean_string_dec_eq(x_99, x_100); +lean_dec(x_99); +if (x_101 == 0) +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; +x_102 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; +x_103 = l_Lean_Parser_ParserState_mkErrorsAt(x_95, x_102, x_94); +x_104 = lean_ctor_get(x_103, 0); +lean_inc(x_104); +x_105 = lean_ctor_get(x_103, 2); +lean_inc(x_105); +x_106 = lean_ctor_get(x_103, 3); +lean_inc(x_106); +x_85 = x_103; +x_86 = x_104; +x_87 = x_105; +x_88 = x_106; +goto block_91; +} +else +{ +lean_object* x_107; lean_object* x_108; lean_object* x_109; +lean_dec(x_94); +x_107 = lean_ctor_get(x_95, 0); +lean_inc(x_107); +x_108 = lean_ctor_get(x_95, 2); +lean_inc(x_108); +x_109 = lean_ctor_get(x_95, 3); +lean_inc(x_109); +x_85 = x_95; +x_86 = x_107; +x_87 = x_108; +x_88 = x_109; +goto block_91; } } else { -lean_object* x_102; lean_object* x_103; lean_object* x_104; -lean_dec(x_75); -x_102 = lean_ctor_get(x_74, 0); -lean_inc(x_102); -x_103 = lean_ctor_get(x_74, 2); -lean_inc(x_103); -x_104 = lean_ctor_get(x_74, 3); -lean_inc(x_104); -x_67 = x_74; -x_68 = x_102; -x_69 = x_103; -x_70 = x_104; -goto block_73; +lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +lean_dec(x_98); +x_110 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; +x_111 = l_Lean_Parser_ParserState_mkErrorsAt(x_95, x_110, x_94); +x_112 = lean_ctor_get(x_111, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_111, 2); +lean_inc(x_113); +x_114 = lean_ctor_get(x_111, 3); +lean_inc(x_114); +x_85 = x_111; +x_86 = x_112; +x_87 = x_113; +x_88 = x_114; +goto block_91; +} +} +else +{ +lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; +lean_dec(x_96); +x_115 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; +x_116 = l_Lean_Parser_ParserState_mkErrorsAt(x_95, x_115, x_94); +x_117 = lean_ctor_get(x_116, 0); +lean_inc(x_117); +x_118 = lean_ctor_get(x_116, 2); +lean_inc(x_118); +x_119 = lean_ctor_get(x_116, 3); +lean_inc(x_119); +x_85 = x_116; +x_86 = x_117; +x_87 = x_118; +x_88 = x_119; +goto block_91; +} +} +else +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; +lean_dec(x_93); +x_120 = lean_ctor_get(x_92, 0); +lean_inc(x_120); +x_121 = lean_ctor_get(x_92, 2); +lean_inc(x_121); +x_122 = lean_ctor_get(x_92, 3); +lean_inc(x_122); +x_85 = x_92; +x_86 = x_120; +x_87 = x_121; +x_88 = x_122; +goto block_91; } block_42: { @@ -17400,7 +17537,7 @@ if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_inc(x_1); -x_14 = l_Lean_Parser_Command_optDeclSig___elambda__1(x_1, x_12); +x_14 = l_Lean_Parser_Command_declSig___elambda__1(x_1, x_12); x_15 = lean_ctor_get(x_14, 3); lean_inc(x_15); if (lean_obj_tag(x_15) == 0) @@ -17487,113 +17624,186 @@ x_41 = l_Lean_Parser_ParserState_mkNode(x_12, x_40, x_11); return x_41; } } -block_66: +block_84: { lean_object* x_44; x_44 = lean_ctor_get(x_43, 3); lean_inc(x_44); if (lean_obj_tag(x_44) == 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; +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_45 = lean_ctor_get(x_43, 0); lean_inc(x_45); x_46 = lean_array_get_size(x_45); lean_dec(x_45); lean_inc(x_1); -x_47 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_43); -x_48 = l_Lean_nullKind; -x_49 = l_Lean_Parser_ParserState_mkNode(x_47, x_48, x_46); -x_50 = lean_ctor_get(x_49, 3); -lean_inc(x_50); -if (lean_obj_tag(x_50) == 0) +x_47 = l_Lean_Parser_ident___elambda__1(x_1, x_43); +x_48 = lean_ctor_get(x_47, 3); +lean_inc(x_48); +if (lean_obj_tag(x_48) == 0) { -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_51 = lean_ctor_get(x_49, 0); -lean_inc(x_51); -x_52 = lean_array_get_size(x_51); -lean_dec(x_51); -x_53 = lean_ctor_get(x_49, 1); -lean_inc(x_53); +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_inc(x_1); -x_54 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_49); -x_55 = lean_ctor_get(x_54, 3); +x_49 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_47); +x_50 = l_Lean_nullKind; +x_51 = l_Lean_Parser_ParserState_mkNode(x_49, x_50, x_46); +x_52 = lean_ctor_get(x_51, 3); +lean_inc(x_52); +if (lean_obj_tag(x_52) == 0) +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_53 = lean_ctor_get(x_51, 0); +lean_inc(x_53); +x_54 = lean_array_get_size(x_53); +lean_dec(x_53); +x_55 = lean_ctor_get(x_51, 1); lean_inc(x_55); -if (lean_obj_tag(x_55) == 0) -{ -lean_object* x_56; -lean_dec(x_53); -x_56 = l_Lean_Parser_ParserState_mkNode(x_54, x_48, x_52); -x_12 = x_56; -goto block_42; -} -else -{ -lean_object* x_57; uint8_t x_58; -lean_dec(x_55); -x_57 = lean_ctor_get(x_54, 1); +lean_inc(x_1); +x_56 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_51); +x_57 = lean_ctor_get(x_56, 3); lean_inc(x_57); -x_58 = lean_nat_dec_eq(x_57, x_53); -lean_dec(x_57); -if (x_58 == 0) +if (lean_obj_tag(x_57) == 0) { -lean_object* x_59; -lean_dec(x_53); -x_59 = l_Lean_Parser_ParserState_mkNode(x_54, x_48, x_52); -x_12 = x_59; +lean_object* x_58; +lean_dec(x_55); +x_58 = l_Lean_Parser_ParserState_mkNode(x_56, x_50, x_54); +x_12 = x_58; goto block_42; } else { -lean_object* x_60; lean_object* x_61; -x_60 = l_Lean_Parser_ParserState_restore(x_54, x_52, x_53); -x_61 = l_Lean_Parser_ParserState_mkNode(x_60, x_48, x_52); +lean_object* x_59; uint8_t x_60; +lean_dec(x_57); +x_59 = lean_ctor_get(x_56, 1); +lean_inc(x_59); +x_60 = lean_nat_dec_eq(x_59, x_55); +lean_dec(x_59); +if (x_60 == 0) +{ +lean_object* x_61; +lean_dec(x_55); +x_61 = l_Lean_Parser_ParserState_mkNode(x_56, x_50, x_54); x_12 = x_61; goto block_42; } -} -} else { lean_object* x_62; lean_object* x_63; -lean_dec(x_50); -lean_dec(x_1); -x_62 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_63 = l_Lean_Parser_ParserState_mkNode(x_49, x_62, x_11); -return x_63; +x_62 = l_Lean_Parser_ParserState_restore(x_56, x_54, x_55); +x_63 = l_Lean_Parser_ParserState_mkNode(x_62, x_50, x_54); +x_12 = x_63; +goto block_42; +} } } else { lean_object* x_64; lean_object* x_65; -lean_dec(x_44); +lean_dec(x_52); lean_dec(x_1); x_64 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_65 = l_Lean_Parser_ParserState_mkNode(x_43, x_64, x_11); +x_65 = l_Lean_Parser_ParserState_mkNode(x_51, x_64, x_11); return x_65; } } -block_73: +else { -if (lean_obj_tag(x_70) == 0) +lean_object* x_66; lean_object* x_67; lean_object* x_68; +lean_dec(x_48); +x_66 = l_Lean_nullKind; +x_67 = l_Lean_Parser_ParserState_mkNode(x_47, x_66, x_46); +x_68 = lean_ctor_get(x_67, 3); +lean_inc(x_68); +if (lean_obj_tag(x_68) == 0) { +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_69 = lean_ctor_get(x_67, 0); +lean_inc(x_69); +x_70 = lean_array_get_size(x_69); lean_dec(x_69); -lean_dec(x_68); -lean_dec(x_10); -x_43 = x_67; -goto block_66; +x_71 = lean_ctor_get(x_67, 1); +lean_inc(x_71); +lean_inc(x_1); +x_72 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_67); +x_73 = lean_ctor_get(x_72, 3); +lean_inc(x_73); +if (lean_obj_tag(x_73) == 0) +{ +lean_object* x_74; +lean_dec(x_71); +x_74 = l_Lean_Parser_ParserState_mkNode(x_72, x_66, x_70); +x_12 = x_74; +goto block_42; } else { -lean_object* x_71; lean_object* x_72; -lean_dec(x_67); -x_71 = l_Array_shrink___main___rarg(x_68, x_11); -x_72 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_72, 0, x_71); -lean_ctor_set(x_72, 1, x_10); -lean_ctor_set(x_72, 2, x_69); -lean_ctor_set(x_72, 3, x_70); -x_43 = x_72; -goto block_66; +lean_object* x_75; uint8_t x_76; +lean_dec(x_73); +x_75 = lean_ctor_get(x_72, 1); +lean_inc(x_75); +x_76 = lean_nat_dec_eq(x_75, x_71); +lean_dec(x_75); +if (x_76 == 0) +{ +lean_object* x_77; +lean_dec(x_71); +x_77 = l_Lean_Parser_ParserState_mkNode(x_72, x_66, x_70); +x_12 = x_77; +goto block_42; +} +else +{ +lean_object* x_78; lean_object* x_79; +x_78 = l_Lean_Parser_ParserState_restore(x_72, x_70, x_71); +x_79 = l_Lean_Parser_ParserState_mkNode(x_78, x_66, x_70); +x_12 = x_79; +goto block_42; +} +} +} +else +{ +lean_object* x_80; lean_object* x_81; +lean_dec(x_68); +lean_dec(x_1); +x_80 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_81 = l_Lean_Parser_ParserState_mkNode(x_67, x_80, x_11); +return x_81; +} +} +} +else +{ +lean_object* x_82; lean_object* x_83; +lean_dec(x_44); +lean_dec(x_1); +x_82 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_83 = l_Lean_Parser_ParserState_mkNode(x_43, x_82, x_11); +return x_83; +} +} +block_91: +{ +if (lean_obj_tag(x_88) == 0) +{ +lean_dec(x_87); +lean_dec(x_86); +lean_dec(x_10); +x_43 = x_85; +goto block_84; +} +else +{ +lean_object* x_89; lean_object* x_90; +lean_dec(x_85); +x_89 = l_Array_shrink___main___rarg(x_86, x_11); +x_90 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_10); +lean_ctor_set(x_90, 2, x_87); +lean_ctor_set(x_90, 3, x_88); +x_43 = x_90; +goto block_84; } } } @@ -17606,408 +17816,483 @@ return x_7; } else { -lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; -x_105 = lean_ctor_get(x_2, 0); -lean_inc(x_105); -x_106 = lean_array_get_size(x_105); -lean_dec(x_105); -x_107 = lean_ctor_get(x_2, 1); -lean_inc(x_107); -lean_inc(x_1); -x_108 = lean_apply_2(x_4, x_1, x_2); -x_109 = lean_ctor_get(x_108, 3); -lean_inc(x_109); -if (lean_obj_tag(x_109) == 0) -{ -lean_dec(x_107); -lean_dec(x_106); -lean_dec(x_1); -return x_108; -} -else -{ -lean_object* x_110; lean_object* x_111; uint8_t x_112; -x_110 = lean_ctor_get(x_109, 0); -lean_inc(x_110); -lean_dec(x_109); -x_111 = lean_ctor_get(x_108, 1); -lean_inc(x_111); -x_112 = lean_nat_dec_eq(x_111, x_107); -lean_dec(x_111); -if (x_112 == 0) -{ -lean_dec(x_110); -lean_dec(x_107); -lean_dec(x_106); -lean_dec(x_1); -return x_108; -} -else -{ -lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; -lean_inc(x_107); -x_113 = l_Lean_Parser_ParserState_restore(x_108, x_106, x_107); -lean_dec(x_106); -x_114 = lean_unsigned_to_nat(1024u); -x_115 = l_Lean_Parser_checkPrecFn(x_114, x_1, x_113); -x_116 = lean_ctor_get(x_115, 3); -lean_inc(x_116); -if (lean_obj_tag(x_116) == 0) -{ -lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_157; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_190; lean_object* x_191; -x_117 = lean_ctor_get(x_115, 0); -lean_inc(x_117); -x_118 = lean_ctor_get(x_115, 1); -lean_inc(x_118); -x_119 = lean_array_get_size(x_117); -lean_dec(x_117); -lean_inc(x_1); -x_190 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_115); -x_191 = lean_ctor_get(x_190, 3); -lean_inc(x_191); -if (lean_obj_tag(x_191) == 0) -{ -lean_object* x_192; lean_object* x_193; lean_object* x_194; -x_192 = lean_ctor_get(x_190, 1); -lean_inc(x_192); -lean_inc(x_1); -x_193 = l_Lean_Parser_tokenFn(x_1, x_190); -x_194 = lean_ctor_get(x_193, 3); -lean_inc(x_194); -if (lean_obj_tag(x_194) == 0) -{ -lean_object* x_195; lean_object* x_196; -x_195 = lean_ctor_get(x_193, 0); -lean_inc(x_195); -x_196 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_195); -lean_dec(x_195); -if (lean_obj_tag(x_196) == 2) -{ -lean_object* x_197; lean_object* x_198; uint8_t x_199; -x_197 = lean_ctor_get(x_196, 1); -lean_inc(x_197); -lean_dec(x_196); -x_198 = l_Lean_Parser_Term_structInst___elambda__1___closed__5; -x_199 = lean_string_dec_eq(x_197, x_198); -lean_dec(x_197); -if (x_199 == 0) -{ -lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; -x_200 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; -x_201 = l_Lean_Parser_ParserState_mkErrorsAt(x_193, x_200, x_192); -x_202 = lean_ctor_get(x_201, 0); -lean_inc(x_202); -x_203 = lean_ctor_get(x_201, 2); -lean_inc(x_203); -x_204 = lean_ctor_get(x_201, 3); -lean_inc(x_204); -x_183 = x_201; -x_184 = x_202; -x_185 = x_203; -x_186 = x_204; -goto block_189; -} -else -{ -lean_object* x_205; lean_object* x_206; lean_object* x_207; -lean_dec(x_192); -x_205 = lean_ctor_get(x_193, 0); -lean_inc(x_205); -x_206 = lean_ctor_get(x_193, 2); -lean_inc(x_206); -x_207 = lean_ctor_get(x_193, 3); -lean_inc(x_207); -x_183 = x_193; -x_184 = x_205; -x_185 = x_206; -x_186 = x_207; -goto block_189; -} -} -else -{ -lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; -lean_dec(x_196); -x_208 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; -x_209 = l_Lean_Parser_ParserState_mkErrorsAt(x_193, x_208, x_192); -x_210 = lean_ctor_get(x_209, 0); -lean_inc(x_210); -x_211 = lean_ctor_get(x_209, 2); -lean_inc(x_211); -x_212 = lean_ctor_get(x_209, 3); -lean_inc(x_212); -x_183 = x_209; -x_184 = x_210; -x_185 = x_211; -x_186 = x_212; -goto block_189; -} -} -else -{ -lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; -lean_dec(x_194); -x_213 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; -x_214 = l_Lean_Parser_ParserState_mkErrorsAt(x_193, x_213, x_192); -x_215 = lean_ctor_get(x_214, 0); -lean_inc(x_215); -x_216 = lean_ctor_get(x_214, 2); -lean_inc(x_216); -x_217 = lean_ctor_get(x_214, 3); -lean_inc(x_217); -x_183 = x_214; -x_184 = x_215; -x_185 = x_216; -x_186 = x_217; -goto block_189; -} -} -else -{ -lean_object* x_218; lean_object* x_219; lean_object* x_220; -lean_dec(x_191); -x_218 = lean_ctor_get(x_190, 0); -lean_inc(x_218); -x_219 = lean_ctor_get(x_190, 2); -lean_inc(x_219); -x_220 = lean_ctor_get(x_190, 3); -lean_inc(x_220); -x_183 = x_190; -x_184 = x_218; -x_185 = x_219; -x_186 = x_220; -goto block_189; -} -block_156: -{ -lean_object* x_121; -x_121 = lean_ctor_get(x_120, 3); -lean_inc(x_121); -if (lean_obj_tag(x_121) == 0) -{ -lean_object* x_122; lean_object* x_123; -lean_inc(x_1); -x_122 = l_Lean_Parser_Command_optDeclSig___elambda__1(x_1, x_120); -x_123 = lean_ctor_get(x_122, 3); +lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; +x_123 = lean_ctor_get(x_2, 0); lean_inc(x_123); -if (lean_obj_tag(x_123) == 0) -{ -lean_object* x_124; lean_object* x_125; lean_object* x_126; -x_124 = lean_ctor_get(x_122, 1); -lean_inc(x_124); -x_125 = l_Lean_Parser_tokenFn(x_1, x_122); -x_126 = lean_ctor_get(x_125, 3); -lean_inc(x_126); -if (lean_obj_tag(x_126) == 0) -{ -lean_object* x_127; lean_object* x_128; -x_127 = lean_ctor_get(x_125, 0); -lean_inc(x_127); -x_128 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_127); -lean_dec(x_127); -if (lean_obj_tag(x_128) == 2) -{ -lean_object* x_129; lean_object* x_130; uint8_t x_131; -x_129 = lean_ctor_get(x_128, 1); -lean_inc(x_129); -lean_dec(x_128); -x_130 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__7; -x_131 = lean_string_dec_eq(x_129, x_130); -lean_dec(x_129); -if (x_131 == 0) -{ -lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; -x_132 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__11; -x_133 = l_Lean_Parser_ParserState_mkErrorsAt(x_125, x_132, x_124); -x_134 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_135 = l_Lean_Parser_ParserState_mkNode(x_133, x_134, x_119); -x_136 = l_Lean_Parser_mergeOrElseErrors(x_135, x_110, x_107); -lean_dec(x_107); -return x_136; -} -else -{ -lean_object* x_137; lean_object* x_138; lean_object* x_139; -lean_dec(x_124); -x_137 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_138 = l_Lean_Parser_ParserState_mkNode(x_125, x_137, x_119); -x_139 = l_Lean_Parser_mergeOrElseErrors(x_138, x_110, x_107); -lean_dec(x_107); -return x_139; -} -} -else -{ -lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; -lean_dec(x_128); -x_140 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__11; -x_141 = l_Lean_Parser_ParserState_mkErrorsAt(x_125, x_140, x_124); -x_142 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_143 = l_Lean_Parser_ParserState_mkNode(x_141, x_142, x_119); -x_144 = l_Lean_Parser_mergeOrElseErrors(x_143, x_110, x_107); -lean_dec(x_107); -return x_144; -} -} -else -{ -lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; -lean_dec(x_126); -x_145 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__11; -x_146 = l_Lean_Parser_ParserState_mkErrorsAt(x_125, x_145, x_124); -x_147 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_148 = l_Lean_Parser_ParserState_mkNode(x_146, x_147, x_119); -x_149 = l_Lean_Parser_mergeOrElseErrors(x_148, x_110, x_107); -lean_dec(x_107); -return x_149; -} -} -else -{ -lean_object* x_150; lean_object* x_151; lean_object* x_152; +x_124 = lean_array_get_size(x_123); lean_dec(x_123); -lean_dec(x_1); -x_150 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_151 = l_Lean_Parser_ParserState_mkNode(x_122, x_150, x_119); -x_152 = l_Lean_Parser_mergeOrElseErrors(x_151, x_110, x_107); -lean_dec(x_107); -return x_152; -} -} -else -{ -lean_object* x_153; lean_object* x_154; lean_object* x_155; -lean_dec(x_121); -lean_dec(x_1); -x_153 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_154 = l_Lean_Parser_ParserState_mkNode(x_120, x_153, x_119); -x_155 = l_Lean_Parser_mergeOrElseErrors(x_154, x_110, x_107); -lean_dec(x_107); -return x_155; -} -} -block_182: -{ -lean_object* x_158; -x_158 = lean_ctor_get(x_157, 3); -lean_inc(x_158); -if (lean_obj_tag(x_158) == 0) -{ -lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; -x_159 = lean_ctor_get(x_157, 0); -lean_inc(x_159); -x_160 = lean_array_get_size(x_159); -lean_dec(x_159); +x_125 = lean_ctor_get(x_2, 1); +lean_inc(x_125); lean_inc(x_1); -x_161 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_157); -x_162 = l_Lean_nullKind; -x_163 = l_Lean_Parser_ParserState_mkNode(x_161, x_162, x_160); -x_164 = lean_ctor_get(x_163, 3); -lean_inc(x_164); -if (lean_obj_tag(x_164) == 0) +x_126 = lean_apply_2(x_4, x_1, x_2); +x_127 = lean_ctor_get(x_126, 3); +lean_inc(x_127); +if (lean_obj_tag(x_127) == 0) { -lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; -x_165 = lean_ctor_get(x_163, 0); -lean_inc(x_165); -x_166 = lean_array_get_size(x_165); -lean_dec(x_165); -x_167 = lean_ctor_get(x_163, 1); -lean_inc(x_167); +lean_dec(x_125); +lean_dec(x_124); +lean_dec(x_1); +return x_126; +} +else +{ +lean_object* x_128; lean_object* x_129; uint8_t x_130; +x_128 = lean_ctor_get(x_127, 0); +lean_inc(x_128); +lean_dec(x_127); +x_129 = lean_ctor_get(x_126, 1); +lean_inc(x_129); +x_130 = lean_nat_dec_eq(x_129, x_125); +lean_dec(x_129); +if (x_130 == 0) +{ +lean_dec(x_128); +lean_dec(x_125); +lean_dec(x_124); +lean_dec(x_1); +return x_126; +} +else +{ +lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; +lean_inc(x_125); +x_131 = l_Lean_Parser_ParserState_restore(x_126, x_124, x_125); +lean_dec(x_124); +x_132 = lean_unsigned_to_nat(1024u); +x_133 = l_Lean_Parser_checkPrecFn(x_132, x_1, x_131); +x_134 = lean_ctor_get(x_133, 3); +lean_inc(x_134); +if (lean_obj_tag(x_134) == 0) +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_175; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_227; lean_object* x_228; +x_135 = lean_ctor_get(x_133, 0); +lean_inc(x_135); +x_136 = lean_ctor_get(x_133, 1); +lean_inc(x_136); +x_137 = lean_array_get_size(x_135); +lean_dec(x_135); lean_inc(x_1); -x_168 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_163); -x_169 = lean_ctor_get(x_168, 3); -lean_inc(x_169); -if (lean_obj_tag(x_169) == 0) +x_227 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_133); +x_228 = lean_ctor_get(x_227, 3); +lean_inc(x_228); +if (lean_obj_tag(x_228) == 0) { -lean_object* x_170; -lean_dec(x_167); -x_170 = l_Lean_Parser_ParserState_mkNode(x_168, x_162, x_166); -x_120 = x_170; -goto block_156; +lean_object* x_229; lean_object* x_230; lean_object* x_231; +x_229 = lean_ctor_get(x_227, 1); +lean_inc(x_229); +lean_inc(x_1); +x_230 = l_Lean_Parser_tokenFn(x_1, x_227); +x_231 = lean_ctor_get(x_230, 3); +lean_inc(x_231); +if (lean_obj_tag(x_231) == 0) +{ +lean_object* x_232; lean_object* x_233; +x_232 = lean_ctor_get(x_230, 0); +lean_inc(x_232); +x_233 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_232); +lean_dec(x_232); +if (lean_obj_tag(x_233) == 2) +{ +lean_object* x_234; lean_object* x_235; uint8_t x_236; +x_234 = lean_ctor_get(x_233, 1); +lean_inc(x_234); +lean_dec(x_233); +x_235 = l_Lean_Parser_Term_structInst___elambda__1___closed__5; +x_236 = lean_string_dec_eq(x_234, x_235); +lean_dec(x_234); +if (x_236 == 0) +{ +lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; +x_237 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; +x_238 = l_Lean_Parser_ParserState_mkErrorsAt(x_230, x_237, x_229); +x_239 = lean_ctor_get(x_238, 0); +lean_inc(x_239); +x_240 = lean_ctor_get(x_238, 2); +lean_inc(x_240); +x_241 = lean_ctor_get(x_238, 3); +lean_inc(x_241); +x_220 = x_238; +x_221 = x_239; +x_222 = x_240; +x_223 = x_241; +goto block_226; } else { -lean_object* x_171; uint8_t x_172; -lean_dec(x_169); -x_171 = lean_ctor_get(x_168, 1); -lean_inc(x_171); -x_172 = lean_nat_dec_eq(x_171, x_167); -lean_dec(x_171); -if (x_172 == 0) -{ -lean_object* x_173; -lean_dec(x_167); -x_173 = l_Lean_Parser_ParserState_mkNode(x_168, x_162, x_166); -x_120 = x_173; -goto block_156; -} -else -{ -lean_object* x_174; lean_object* x_175; -x_174 = l_Lean_Parser_ParserState_restore(x_168, x_166, x_167); -x_175 = l_Lean_Parser_ParserState_mkNode(x_174, x_162, x_166); -x_120 = x_175; -goto block_156; -} +lean_object* x_242; lean_object* x_243; lean_object* x_244; +lean_dec(x_229); +x_242 = lean_ctor_get(x_230, 0); +lean_inc(x_242); +x_243 = lean_ctor_get(x_230, 2); +lean_inc(x_243); +x_244 = lean_ctor_get(x_230, 3); +lean_inc(x_244); +x_220 = x_230; +x_221 = x_242; +x_222 = x_243; +x_223 = x_244; +goto block_226; } } else { -lean_object* x_176; lean_object* x_177; lean_object* x_178; -lean_dec(x_164); +lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; +lean_dec(x_233); +x_245 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; +x_246 = l_Lean_Parser_ParserState_mkErrorsAt(x_230, x_245, x_229); +x_247 = lean_ctor_get(x_246, 0); +lean_inc(x_247); +x_248 = lean_ctor_get(x_246, 2); +lean_inc(x_248); +x_249 = lean_ctor_get(x_246, 3); +lean_inc(x_249); +x_220 = x_246; +x_221 = x_247; +x_222 = x_248; +x_223 = x_249; +goto block_226; +} +} +else +{ +lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; +lean_dec(x_231); +x_250 = l_Lean_Parser_Term_structInst___elambda__1___closed__17; +x_251 = l_Lean_Parser_ParserState_mkErrorsAt(x_230, x_250, x_229); +x_252 = lean_ctor_get(x_251, 0); +lean_inc(x_252); +x_253 = lean_ctor_get(x_251, 2); +lean_inc(x_253); +x_254 = lean_ctor_get(x_251, 3); +lean_inc(x_254); +x_220 = x_251; +x_221 = x_252; +x_222 = x_253; +x_223 = x_254; +goto block_226; +} +} +else +{ +lean_object* x_255; lean_object* x_256; lean_object* x_257; +lean_dec(x_228); +x_255 = lean_ctor_get(x_227, 0); +lean_inc(x_255); +x_256 = lean_ctor_get(x_227, 2); +lean_inc(x_256); +x_257 = lean_ctor_get(x_227, 3); +lean_inc(x_257); +x_220 = x_227; +x_221 = x_255; +x_222 = x_256; +x_223 = x_257; +goto block_226; +} +block_174: +{ +lean_object* x_139; +x_139 = lean_ctor_get(x_138, 3); +lean_inc(x_139); +if (lean_obj_tag(x_139) == 0) +{ +lean_object* x_140; lean_object* x_141; +lean_inc(x_1); +x_140 = l_Lean_Parser_Command_declSig___elambda__1(x_1, x_138); +x_141 = lean_ctor_get(x_140, 3); +lean_inc(x_141); +if (lean_obj_tag(x_141) == 0) +{ +lean_object* x_142; lean_object* x_143; lean_object* x_144; +x_142 = lean_ctor_get(x_140, 1); +lean_inc(x_142); +x_143 = l_Lean_Parser_tokenFn(x_1, x_140); +x_144 = lean_ctor_get(x_143, 3); +lean_inc(x_144); +if (lean_obj_tag(x_144) == 0) +{ +lean_object* x_145; lean_object* x_146; +x_145 = lean_ctor_get(x_143, 0); +lean_inc(x_145); +x_146 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_145); +lean_dec(x_145); +if (lean_obj_tag(x_146) == 2) +{ +lean_object* x_147; lean_object* x_148; uint8_t x_149; +x_147 = lean_ctor_get(x_146, 1); +lean_inc(x_147); +lean_dec(x_146); +x_148 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__7; +x_149 = lean_string_dec_eq(x_147, x_148); +lean_dec(x_147); +if (x_149 == 0) +{ +lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; +x_150 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__11; +x_151 = l_Lean_Parser_ParserState_mkErrorsAt(x_143, x_150, x_142); +x_152 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_153 = l_Lean_Parser_ParserState_mkNode(x_151, x_152, x_137); +x_154 = l_Lean_Parser_mergeOrElseErrors(x_153, x_128, x_125); +lean_dec(x_125); +return x_154; +} +else +{ +lean_object* x_155; lean_object* x_156; lean_object* x_157; +lean_dec(x_142); +x_155 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_156 = l_Lean_Parser_ParserState_mkNode(x_143, x_155, x_137); +x_157 = l_Lean_Parser_mergeOrElseErrors(x_156, x_128, x_125); +lean_dec(x_125); +return x_157; +} +} +else +{ +lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; +lean_dec(x_146); +x_158 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__11; +x_159 = l_Lean_Parser_ParserState_mkErrorsAt(x_143, x_158, x_142); +x_160 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_161 = l_Lean_Parser_ParserState_mkNode(x_159, x_160, x_137); +x_162 = l_Lean_Parser_mergeOrElseErrors(x_161, x_128, x_125); +lean_dec(x_125); +return x_162; +} +} +else +{ +lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; +lean_dec(x_144); +x_163 = l_Lean_Parser_Term_explicitUniv___elambda__1___closed__11; +x_164 = l_Lean_Parser_ParserState_mkErrorsAt(x_143, x_163, x_142); +x_165 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_166 = l_Lean_Parser_ParserState_mkNode(x_164, x_165, x_137); +x_167 = l_Lean_Parser_mergeOrElseErrors(x_166, x_128, x_125); +lean_dec(x_125); +return x_167; +} +} +else +{ +lean_object* x_168; lean_object* x_169; lean_object* x_170; +lean_dec(x_141); lean_dec(x_1); -x_176 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_177 = l_Lean_Parser_ParserState_mkNode(x_163, x_176, x_119); -x_178 = l_Lean_Parser_mergeOrElseErrors(x_177, x_110, x_107); -lean_dec(x_107); -return x_178; +x_168 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_169 = l_Lean_Parser_ParserState_mkNode(x_140, x_168, x_137); +x_170 = l_Lean_Parser_mergeOrElseErrors(x_169, x_128, x_125); +lean_dec(x_125); +return x_170; } } else { -lean_object* x_179; lean_object* x_180; lean_object* x_181; -lean_dec(x_158); +lean_object* x_171; lean_object* x_172; lean_object* x_173; +lean_dec(x_139); lean_dec(x_1); -x_179 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; -x_180 = l_Lean_Parser_ParserState_mkNode(x_157, x_179, x_119); -x_181 = l_Lean_Parser_mergeOrElseErrors(x_180, x_110, x_107); -lean_dec(x_107); -return x_181; +x_171 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_172 = l_Lean_Parser_ParserState_mkNode(x_138, x_171, x_137); +x_173 = l_Lean_Parser_mergeOrElseErrors(x_172, x_128, x_125); +lean_dec(x_125); +return x_173; } } -block_189: +block_219: { -if (lean_obj_tag(x_186) == 0) +lean_object* x_176; +x_176 = lean_ctor_get(x_175, 3); +lean_inc(x_176); +if (lean_obj_tag(x_176) == 0) { +lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; +x_177 = lean_ctor_get(x_175, 0); +lean_inc(x_177); +x_178 = lean_array_get_size(x_177); +lean_dec(x_177); +lean_inc(x_1); +x_179 = l_Lean_Parser_ident___elambda__1(x_1, x_175); +x_180 = lean_ctor_get(x_179, 3); +lean_inc(x_180); +if (lean_obj_tag(x_180) == 0) +{ +lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; +lean_inc(x_1); +x_181 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_179); +x_182 = l_Lean_nullKind; +x_183 = l_Lean_Parser_ParserState_mkNode(x_181, x_182, x_178); +x_184 = lean_ctor_get(x_183, 3); +lean_inc(x_184); +if (lean_obj_tag(x_184) == 0) +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; +x_185 = lean_ctor_get(x_183, 0); +lean_inc(x_185); +x_186 = lean_array_get_size(x_185); lean_dec(x_185); +x_187 = lean_ctor_get(x_183, 1); +lean_inc(x_187); +lean_inc(x_1); +x_188 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_183); +x_189 = lean_ctor_get(x_188, 3); +lean_inc(x_189); +if (lean_obj_tag(x_189) == 0) +{ +lean_object* x_190; +lean_dec(x_187); +x_190 = l_Lean_Parser_ParserState_mkNode(x_188, x_182, x_186); +x_138 = x_190; +goto block_174; +} +else +{ +lean_object* x_191; uint8_t x_192; +lean_dec(x_189); +x_191 = lean_ctor_get(x_188, 1); +lean_inc(x_191); +x_192 = lean_nat_dec_eq(x_191, x_187); +lean_dec(x_191); +if (x_192 == 0) +{ +lean_object* x_193; +lean_dec(x_187); +x_193 = l_Lean_Parser_ParserState_mkNode(x_188, x_182, x_186); +x_138 = x_193; +goto block_174; +} +else +{ +lean_object* x_194; lean_object* x_195; +x_194 = l_Lean_Parser_ParserState_restore(x_188, x_186, x_187); +x_195 = l_Lean_Parser_ParserState_mkNode(x_194, x_182, x_186); +x_138 = x_195; +goto block_174; +} +} +} +else +{ +lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_dec(x_184); -lean_dec(x_118); -x_157 = x_183; -goto block_182; -} -else -{ -lean_object* x_187; lean_object* x_188; -lean_dec(x_183); -x_187 = l_Array_shrink___main___rarg(x_184, x_119); -x_188 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_188, 0, x_187); -lean_ctor_set(x_188, 1, x_118); -lean_ctor_set(x_188, 2, x_185); -lean_ctor_set(x_188, 3, x_186); -x_157 = x_188; -goto block_182; -} -} -} -else -{ -lean_object* x_221; -lean_dec(x_116); lean_dec(x_1); -x_221 = l_Lean_Parser_mergeOrElseErrors(x_115, x_110, x_107); -lean_dec(x_107); -return x_221; +x_196 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_197 = l_Lean_Parser_ParserState_mkNode(x_183, x_196, x_137); +x_198 = l_Lean_Parser_mergeOrElseErrors(x_197, x_128, x_125); +lean_dec(x_125); +return x_198; +} +} +else +{ +lean_object* x_199; lean_object* x_200; lean_object* x_201; +lean_dec(x_180); +x_199 = l_Lean_nullKind; +x_200 = l_Lean_Parser_ParserState_mkNode(x_179, x_199, x_178); +x_201 = lean_ctor_get(x_200, 3); +lean_inc(x_201); +if (lean_obj_tag(x_201) == 0) +{ +lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; +x_202 = lean_ctor_get(x_200, 0); +lean_inc(x_202); +x_203 = lean_array_get_size(x_202); +lean_dec(x_202); +x_204 = lean_ctor_get(x_200, 1); +lean_inc(x_204); +lean_inc(x_1); +x_205 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_200); +x_206 = lean_ctor_get(x_205, 3); +lean_inc(x_206); +if (lean_obj_tag(x_206) == 0) +{ +lean_object* x_207; +lean_dec(x_204); +x_207 = l_Lean_Parser_ParserState_mkNode(x_205, x_199, x_203); +x_138 = x_207; +goto block_174; +} +else +{ +lean_object* x_208; uint8_t x_209; +lean_dec(x_206); +x_208 = lean_ctor_get(x_205, 1); +lean_inc(x_208); +x_209 = lean_nat_dec_eq(x_208, x_204); +lean_dec(x_208); +if (x_209 == 0) +{ +lean_object* x_210; +lean_dec(x_204); +x_210 = l_Lean_Parser_ParserState_mkNode(x_205, x_199, x_203); +x_138 = x_210; +goto block_174; +} +else +{ +lean_object* x_211; lean_object* x_212; +x_211 = l_Lean_Parser_ParserState_restore(x_205, x_203, x_204); +x_212 = l_Lean_Parser_ParserState_mkNode(x_211, x_199, x_203); +x_138 = x_212; +goto block_174; +} +} +} +else +{ +lean_object* x_213; lean_object* x_214; lean_object* x_215; +lean_dec(x_201); +lean_dec(x_1); +x_213 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_214 = l_Lean_Parser_ParserState_mkNode(x_200, x_213, x_137); +x_215 = l_Lean_Parser_mergeOrElseErrors(x_214, x_128, x_125); +lean_dec(x_125); +return x_215; +} +} +} +else +{ +lean_object* x_216; lean_object* x_217; lean_object* x_218; +lean_dec(x_176); +lean_dec(x_1); +x_216 = l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__2; +x_217 = l_Lean_Parser_ParserState_mkNode(x_175, x_216, x_137); +x_218 = l_Lean_Parser_mergeOrElseErrors(x_217, x_128, x_125); +lean_dec(x_125); +return x_218; +} +} +block_226: +{ +if (lean_obj_tag(x_223) == 0) +{ +lean_dec(x_222); +lean_dec(x_221); +lean_dec(x_136); +x_175 = x_220; +goto block_219; +} +else +{ +lean_object* x_224; lean_object* x_225; +lean_dec(x_220); +x_224 = l_Array_shrink___main___rarg(x_221, x_137); +x_225 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_225, 0, x_224); +lean_ctor_set(x_225, 1, x_136); +lean_ctor_set(x_225, 2, x_222); +lean_ctor_set(x_225, 3, x_223); +x_175 = x_225; +goto block_219; +} +} +} +else +{ +lean_object* x_258; +lean_dec(x_134); +lean_dec(x_1); +x_258 = l_Lean_Parser_mergeOrElseErrors(x_133, x_128, x_125); +lean_dec(x_125); +return x_258; } } } @@ -18030,7 +18315,7 @@ lean_object* _init_l_Lean_Parser_Command_structImplicitBinder___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Command_optDeclSig; +x_1 = l_Lean_Parser_Command_declSig; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l_Lean_Parser_Term_explicitUniv___closed__4; @@ -18051,11 +18336,13 @@ return x_3; lean_object* _init_l_Lean_Parser_Command_structImplicitBinder___closed__4() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__2; -x_2 = l_Lean_Parser_Command_structImplicitBinder___closed__3; -x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); -return x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_ident; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Parser_Command_structImplicitBinder___closed__3; +x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); +return x_4; } } lean_object* _init_l_Lean_Parser_Command_structImplicitBinder___closed__5() { @@ -18187,7 +18474,7 @@ x_8 = lean_ctor_get(x_7, 3); lean_inc(x_8); if (lean_obj_tag(x_8) == 0) { -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_43; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_78; lean_object* x_79; +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_43; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_92; lean_object* x_93; x_9 = lean_ctor_get(x_7, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_7, 1); @@ -18195,121 +18482,121 @@ lean_inc(x_10); x_11 = lean_array_get_size(x_9); lean_dec(x_9); lean_inc(x_1); -x_78 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_7); -x_79 = lean_ctor_get(x_78, 3); -lean_inc(x_79); -if (lean_obj_tag(x_79) == 0) -{ -lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_80 = lean_ctor_get(x_78, 1); -lean_inc(x_80); -lean_inc(x_1); -x_81 = l_Lean_Parser_tokenFn(x_1, x_78); -x_82 = lean_ctor_get(x_81, 3); -lean_inc(x_82); -if (lean_obj_tag(x_82) == 0) -{ -lean_object* x_83; lean_object* x_84; -x_83 = lean_ctor_get(x_81, 0); -lean_inc(x_83); -x_84 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_83); -lean_dec(x_83); -if (lean_obj_tag(x_84) == 2) -{ -lean_object* x_85; lean_object* x_86; uint8_t x_87; -x_85 = lean_ctor_get(x_84, 1); -lean_inc(x_85); -lean_dec(x_84); -x_86 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__5; -x_87 = lean_string_dec_eq(x_85, x_86); -lean_dec(x_85); -if (x_87 == 0) -{ -lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_88 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; -x_89 = l_Lean_Parser_ParserState_mkErrorsAt(x_81, x_88, x_80); -x_90 = lean_ctor_get(x_89, 0); -lean_inc(x_90); -x_91 = lean_ctor_get(x_89, 2); -lean_inc(x_91); -x_92 = lean_ctor_get(x_89, 3); -lean_inc(x_92); -x_71 = x_89; -x_72 = x_90; -x_73 = x_91; -x_74 = x_92; -goto block_77; -} -else -{ -lean_object* x_93; lean_object* x_94; lean_object* x_95; -lean_dec(x_80); -x_93 = lean_ctor_get(x_81, 0); +x_92 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_7); +x_93 = lean_ctor_get(x_92, 3); lean_inc(x_93); -x_94 = lean_ctor_get(x_81, 2); +if (lean_obj_tag(x_93) == 0) +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_92, 1); lean_inc(x_94); -x_95 = lean_ctor_get(x_81, 3); -lean_inc(x_95); -x_71 = x_81; -x_72 = x_93; -x_73 = x_94; -x_74 = x_95; -goto block_77; -} -} -else +lean_inc(x_1); +x_95 = l_Lean_Parser_tokenFn(x_1, x_92); +x_96 = lean_ctor_get(x_95, 3); +lean_inc(x_96); +if (lean_obj_tag(x_96) == 0) { -lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; -lean_dec(x_84); -x_96 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; -x_97 = l_Lean_Parser_ParserState_mkErrorsAt(x_81, x_96, x_80); -x_98 = lean_ctor_get(x_97, 0); -lean_inc(x_98); -x_99 = lean_ctor_get(x_97, 2); +lean_object* x_97; lean_object* x_98; +x_97 = lean_ctor_get(x_95, 0); +lean_inc(x_97); +x_98 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_97); +lean_dec(x_97); +if (lean_obj_tag(x_98) == 2) +{ +lean_object* x_99; lean_object* x_100; uint8_t x_101; +x_99 = lean_ctor_get(x_98, 1); lean_inc(x_99); -x_100 = lean_ctor_get(x_97, 3); -lean_inc(x_100); -x_71 = x_97; -x_72 = x_98; -x_73 = x_99; -x_74 = x_100; -goto block_77; -} -} -else +lean_dec(x_98); +x_100 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__5; +x_101 = lean_string_dec_eq(x_99, x_100); +lean_dec(x_99); +if (x_101 == 0) { -lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; -lean_dec(x_82); -x_101 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; -x_102 = l_Lean_Parser_ParserState_mkErrorsAt(x_81, x_101, x_80); -x_103 = lean_ctor_get(x_102, 0); -lean_inc(x_103); -x_104 = lean_ctor_get(x_102, 2); +lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; +x_102 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; +x_103 = l_Lean_Parser_ParserState_mkErrorsAt(x_95, x_102, x_94); +x_104 = lean_ctor_get(x_103, 0); lean_inc(x_104); -x_105 = lean_ctor_get(x_102, 3); +x_105 = lean_ctor_get(x_103, 2); lean_inc(x_105); -x_71 = x_102; -x_72 = x_103; -x_73 = x_104; -x_74 = x_105; -goto block_77; +x_106 = lean_ctor_get(x_103, 3); +lean_inc(x_106); +x_85 = x_103; +x_86 = x_104; +x_87 = x_105; +x_88 = x_106; +goto block_91; +} +else +{ +lean_object* x_107; lean_object* x_108; lean_object* x_109; +lean_dec(x_94); +x_107 = lean_ctor_get(x_95, 0); +lean_inc(x_107); +x_108 = lean_ctor_get(x_95, 2); +lean_inc(x_108); +x_109 = lean_ctor_get(x_95, 3); +lean_inc(x_109); +x_85 = x_95; +x_86 = x_107; +x_87 = x_108; +x_88 = x_109; +goto block_91; } } else { -lean_object* x_106; lean_object* x_107; lean_object* x_108; -lean_dec(x_79); -x_106 = lean_ctor_get(x_78, 0); -lean_inc(x_106); -x_107 = lean_ctor_get(x_78, 2); -lean_inc(x_107); -x_108 = lean_ctor_get(x_78, 3); -lean_inc(x_108); -x_71 = x_78; -x_72 = x_106; -x_73 = x_107; -x_74 = x_108; -goto block_77; +lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +lean_dec(x_98); +x_110 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; +x_111 = l_Lean_Parser_ParserState_mkErrorsAt(x_95, x_110, x_94); +x_112 = lean_ctor_get(x_111, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_111, 2); +lean_inc(x_113); +x_114 = lean_ctor_get(x_111, 3); +lean_inc(x_114); +x_85 = x_111; +x_86 = x_112; +x_87 = x_113; +x_88 = x_114; +goto block_91; +} +} +else +{ +lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; +lean_dec(x_96); +x_115 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; +x_116 = l_Lean_Parser_ParserState_mkErrorsAt(x_95, x_115, x_94); +x_117 = lean_ctor_get(x_116, 0); +lean_inc(x_117); +x_118 = lean_ctor_get(x_116, 2); +lean_inc(x_118); +x_119 = lean_ctor_get(x_116, 3); +lean_inc(x_119); +x_85 = x_116; +x_86 = x_117; +x_87 = x_118; +x_88 = x_119; +goto block_91; +} +} +else +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; +lean_dec(x_93); +x_120 = lean_ctor_get(x_92, 0); +lean_inc(x_120); +x_121 = lean_ctor_get(x_92, 2); +lean_inc(x_121); +x_122 = lean_ctor_get(x_92, 3); +lean_inc(x_122); +x_85 = x_92; +x_86 = x_120; +x_87 = x_121; +x_88 = x_122; +goto block_91; } block_42: { @@ -18320,7 +18607,7 @@ if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_inc(x_1); -x_14 = l_Lean_Parser_Command_optDeclSig___elambda__1(x_1, x_12); +x_14 = l_Lean_Parser_Command_declSig___elambda__1(x_1, x_12); x_15 = lean_ctor_get(x_14, 3); lean_inc(x_15); if (lean_obj_tag(x_15) == 0) @@ -18407,29 +18694,29 @@ x_41 = l_Lean_Parser_ParserState_mkNode(x_12, x_40, x_11); return x_41; } } -block_70: +block_84: { lean_object* x_44; x_44 = lean_ctor_get(x_43, 3); lean_inc(x_44); if (lean_obj_tag(x_44) == 0) { -lean_object* x_45; lean_object* x_46; +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_43, 0); +lean_inc(x_45); +x_46 = lean_array_get_size(x_45); +lean_dec(x_45); lean_inc(x_1); -x_45 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_43); -x_46 = lean_ctor_get(x_45, 3); -lean_inc(x_46); -if (lean_obj_tag(x_46) == 0) +x_47 = l_Lean_Parser_ident___elambda__1(x_1, x_43); +x_48 = lean_ctor_get(x_47, 3); +lean_inc(x_48); +if (lean_obj_tag(x_48) == 0) { -lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_47 = lean_ctor_get(x_45, 0); -lean_inc(x_47); -x_48 = lean_array_get_size(x_47); -lean_dec(x_47); +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_inc(x_1); -x_49 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_45); +x_49 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_47); x_50 = l_Lean_nullKind; -x_51 = l_Lean_Parser_ParserState_mkNode(x_49, x_50, x_48); +x_51 = l_Lean_Parser_ParserState_mkNode(x_49, x_50, x_46); x_52 = lean_ctor_get(x_51, 3); lean_inc(x_52); if (lean_obj_tag(x_52) == 0) @@ -18491,46 +18778,102 @@ return x_65; } else { -lean_object* x_66; lean_object* x_67; -lean_dec(x_46); -lean_dec(x_1); -x_66 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_67 = l_Lean_Parser_ParserState_mkNode(x_45, x_66, x_11); -return x_67; +lean_object* x_66; lean_object* x_67; lean_object* x_68; +lean_dec(x_48); +x_66 = l_Lean_nullKind; +x_67 = l_Lean_Parser_ParserState_mkNode(x_47, x_66, x_46); +x_68 = lean_ctor_get(x_67, 3); +lean_inc(x_68); +if (lean_obj_tag(x_68) == 0) +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_69 = lean_ctor_get(x_67, 0); +lean_inc(x_69); +x_70 = lean_array_get_size(x_69); +lean_dec(x_69); +x_71 = lean_ctor_get(x_67, 1); +lean_inc(x_71); +lean_inc(x_1); +x_72 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_67); +x_73 = lean_ctor_get(x_72, 3); +lean_inc(x_73); +if (lean_obj_tag(x_73) == 0) +{ +lean_object* x_74; +lean_dec(x_71); +x_74 = l_Lean_Parser_ParserState_mkNode(x_72, x_66, x_70); +x_12 = x_74; +goto block_42; +} +else +{ +lean_object* x_75; uint8_t x_76; +lean_dec(x_73); +x_75 = lean_ctor_get(x_72, 1); +lean_inc(x_75); +x_76 = lean_nat_dec_eq(x_75, x_71); +lean_dec(x_75); +if (x_76 == 0) +{ +lean_object* x_77; +lean_dec(x_71); +x_77 = l_Lean_Parser_ParserState_mkNode(x_72, x_66, x_70); +x_12 = x_77; +goto block_42; +} +else +{ +lean_object* x_78; lean_object* x_79; +x_78 = l_Lean_Parser_ParserState_restore(x_72, x_70, x_71); +x_79 = l_Lean_Parser_ParserState_mkNode(x_78, x_66, x_70); +x_12 = x_79; +goto block_42; +} } } else { -lean_object* x_68; lean_object* x_69; +lean_object* x_80; lean_object* x_81; +lean_dec(x_68); +lean_dec(x_1); +x_80 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_81 = l_Lean_Parser_ParserState_mkNode(x_67, x_80, x_11); +return x_81; +} +} +} +else +{ +lean_object* x_82; lean_object* x_83; lean_dec(x_44); lean_dec(x_1); -x_68 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_69 = l_Lean_Parser_ParserState_mkNode(x_43, x_68, x_11); -return x_69; +x_82 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_83 = l_Lean_Parser_ParserState_mkNode(x_43, x_82, x_11); +return x_83; } } -block_77: +block_91: { -if (lean_obj_tag(x_74) == 0) +if (lean_obj_tag(x_88) == 0) { -lean_dec(x_73); -lean_dec(x_72); +lean_dec(x_87); +lean_dec(x_86); lean_dec(x_10); -x_43 = x_71; -goto block_70; +x_43 = x_85; +goto block_84; } else { -lean_object* x_75; lean_object* x_76; -lean_dec(x_71); -x_75 = l_Array_shrink___main___rarg(x_72, x_11); -x_76 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_76, 0, x_75); -lean_ctor_set(x_76, 1, x_10); -lean_ctor_set(x_76, 2, x_73); -lean_ctor_set(x_76, 3, x_74); -x_43 = x_76; -goto block_70; +lean_object* x_89; lean_object* x_90; +lean_dec(x_85); +x_89 = l_Array_shrink___main___rarg(x_86, x_11); +x_90 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_10); +lean_ctor_set(x_90, 2, x_87); +lean_ctor_set(x_90, 3, x_88); +x_43 = x_90; +goto block_84; } } } @@ -18543,427 +18886,483 @@ return x_7; } else { -lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; -x_109 = lean_ctor_get(x_2, 0); -lean_inc(x_109); -x_110 = lean_array_get_size(x_109); -lean_dec(x_109); -x_111 = lean_ctor_get(x_2, 1); -lean_inc(x_111); -lean_inc(x_1); -x_112 = lean_apply_2(x_4, x_1, x_2); -x_113 = lean_ctor_get(x_112, 3); -lean_inc(x_113); -if (lean_obj_tag(x_113) == 0) -{ -lean_dec(x_111); -lean_dec(x_110); -lean_dec(x_1); -return x_112; -} -else -{ -lean_object* x_114; lean_object* x_115; uint8_t x_116; -x_114 = lean_ctor_get(x_113, 0); -lean_inc(x_114); -lean_dec(x_113); -x_115 = lean_ctor_get(x_112, 1); -lean_inc(x_115); -x_116 = lean_nat_dec_eq(x_115, x_111); -lean_dec(x_115); -if (x_116 == 0) -{ -lean_dec(x_114); -lean_dec(x_111); -lean_dec(x_110); -lean_dec(x_1); -return x_112; -} -else -{ -lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; -lean_inc(x_111); -x_117 = l_Lean_Parser_ParserState_restore(x_112, x_110, x_111); -lean_dec(x_110); -x_118 = lean_unsigned_to_nat(1024u); -x_119 = l_Lean_Parser_checkPrecFn(x_118, x_1, x_117); -x_120 = lean_ctor_get(x_119, 3); -lean_inc(x_120); -if (lean_obj_tag(x_120) == 0) -{ -lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_161; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_199; lean_object* x_200; -x_121 = lean_ctor_get(x_119, 0); -lean_inc(x_121); -x_122 = lean_ctor_get(x_119, 1); -lean_inc(x_122); -x_123 = lean_array_get_size(x_121); -lean_dec(x_121); -lean_inc(x_1); -x_199 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_119); -x_200 = lean_ctor_get(x_199, 3); -lean_inc(x_200); -if (lean_obj_tag(x_200) == 0) -{ -lean_object* x_201; lean_object* x_202; lean_object* x_203; -x_201 = lean_ctor_get(x_199, 1); -lean_inc(x_201); -lean_inc(x_1); -x_202 = l_Lean_Parser_tokenFn(x_1, x_199); -x_203 = lean_ctor_get(x_202, 3); -lean_inc(x_203); -if (lean_obj_tag(x_203) == 0) -{ -lean_object* x_204; lean_object* x_205; -x_204 = lean_ctor_get(x_202, 0); -lean_inc(x_204); -x_205 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_204); -lean_dec(x_204); -if (lean_obj_tag(x_205) == 2) -{ -lean_object* x_206; lean_object* x_207; uint8_t x_208; -x_206 = lean_ctor_get(x_205, 1); -lean_inc(x_206); -lean_dec(x_205); -x_207 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__5; -x_208 = lean_string_dec_eq(x_206, x_207); -lean_dec(x_206); -if (x_208 == 0) -{ -lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; -x_209 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; -x_210 = l_Lean_Parser_ParserState_mkErrorsAt(x_202, x_209, x_201); -x_211 = lean_ctor_get(x_210, 0); -lean_inc(x_211); -x_212 = lean_ctor_get(x_210, 2); -lean_inc(x_212); -x_213 = lean_ctor_get(x_210, 3); -lean_inc(x_213); -x_192 = x_210; -x_193 = x_211; -x_194 = x_212; -x_195 = x_213; -goto block_198; -} -else -{ -lean_object* x_214; lean_object* x_215; lean_object* x_216; -lean_dec(x_201); -x_214 = lean_ctor_get(x_202, 0); -lean_inc(x_214); -x_215 = lean_ctor_get(x_202, 2); -lean_inc(x_215); -x_216 = lean_ctor_get(x_202, 3); -lean_inc(x_216); -x_192 = x_202; -x_193 = x_214; -x_194 = x_215; -x_195 = x_216; -goto block_198; -} -} -else -{ -lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; -lean_dec(x_205); -x_217 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; -x_218 = l_Lean_Parser_ParserState_mkErrorsAt(x_202, x_217, x_201); -x_219 = lean_ctor_get(x_218, 0); -lean_inc(x_219); -x_220 = lean_ctor_get(x_218, 2); -lean_inc(x_220); -x_221 = lean_ctor_get(x_218, 3); -lean_inc(x_221); -x_192 = x_218; -x_193 = x_219; -x_194 = x_220; -x_195 = x_221; -goto block_198; -} -} -else -{ -lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; -lean_dec(x_203); -x_222 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; -x_223 = l_Lean_Parser_ParserState_mkErrorsAt(x_202, x_222, x_201); -x_224 = lean_ctor_get(x_223, 0); -lean_inc(x_224); -x_225 = lean_ctor_get(x_223, 2); -lean_inc(x_225); -x_226 = lean_ctor_get(x_223, 3); -lean_inc(x_226); -x_192 = x_223; -x_193 = x_224; -x_194 = x_225; -x_195 = x_226; -goto block_198; -} -} -else -{ -lean_object* x_227; lean_object* x_228; lean_object* x_229; -lean_dec(x_200); -x_227 = lean_ctor_get(x_199, 0); -lean_inc(x_227); -x_228 = lean_ctor_get(x_199, 2); -lean_inc(x_228); -x_229 = lean_ctor_get(x_199, 3); -lean_inc(x_229); -x_192 = x_199; -x_193 = x_227; -x_194 = x_228; -x_195 = x_229; -goto block_198; -} -block_160: -{ -lean_object* x_125; -x_125 = lean_ctor_get(x_124, 3); +lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; +x_123 = lean_ctor_get(x_2, 0); +lean_inc(x_123); +x_124 = lean_array_get_size(x_123); +lean_dec(x_123); +x_125 = lean_ctor_get(x_2, 1); lean_inc(x_125); -if (lean_obj_tag(x_125) == 0) -{ -lean_object* x_126; lean_object* x_127; lean_inc(x_1); -x_126 = l_Lean_Parser_Command_optDeclSig___elambda__1(x_1, x_124); +x_126 = lean_apply_2(x_4, x_1, x_2); x_127 = lean_ctor_get(x_126, 3); lean_inc(x_127); if (lean_obj_tag(x_127) == 0) { -lean_object* x_128; lean_object* x_129; lean_object* x_130; -x_128 = lean_ctor_get(x_126, 1); -lean_inc(x_128); -x_129 = l_Lean_Parser_tokenFn(x_1, x_126); -x_130 = lean_ctor_get(x_129, 3); -lean_inc(x_130); -if (lean_obj_tag(x_130) == 0) -{ -lean_object* x_131; lean_object* x_132; -x_131 = lean_ctor_get(x_129, 0); -lean_inc(x_131); -x_132 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_131); -lean_dec(x_131); -if (lean_obj_tag(x_132) == 2) -{ -lean_object* x_133; lean_object* x_134; uint8_t x_135; -x_133 = lean_ctor_get(x_132, 1); -lean_inc(x_133); -lean_dec(x_132); -x_134 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__6; -x_135 = lean_string_dec_eq(x_133, x_134); -lean_dec(x_133); -if (x_135 == 0) -{ -lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; -x_136 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__9; -x_137 = l_Lean_Parser_ParserState_mkErrorsAt(x_129, x_136, x_128); -x_138 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_139 = l_Lean_Parser_ParserState_mkNode(x_137, x_138, x_123); -x_140 = l_Lean_Parser_mergeOrElseErrors(x_139, x_114, x_111); -lean_dec(x_111); -return x_140; -} -else -{ -lean_object* x_141; lean_object* x_142; lean_object* x_143; -lean_dec(x_128); -x_141 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_142 = l_Lean_Parser_ParserState_mkNode(x_129, x_141, x_123); -x_143 = l_Lean_Parser_mergeOrElseErrors(x_142, x_114, x_111); -lean_dec(x_111); -return x_143; -} -} -else -{ -lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; -lean_dec(x_132); -x_144 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__9; -x_145 = l_Lean_Parser_ParserState_mkErrorsAt(x_129, x_144, x_128); -x_146 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_147 = l_Lean_Parser_ParserState_mkNode(x_145, x_146, x_123); -x_148 = l_Lean_Parser_mergeOrElseErrors(x_147, x_114, x_111); -lean_dec(x_111); -return x_148; -} -} -else -{ -lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; -lean_dec(x_130); -x_149 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__9; -x_150 = l_Lean_Parser_ParserState_mkErrorsAt(x_129, x_149, x_128); -x_151 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_152 = l_Lean_Parser_ParserState_mkNode(x_150, x_151, x_123); -x_153 = l_Lean_Parser_mergeOrElseErrors(x_152, x_114, x_111); -lean_dec(x_111); -return x_153; -} -} -else -{ -lean_object* x_154; lean_object* x_155; lean_object* x_156; -lean_dec(x_127); -lean_dec(x_1); -x_154 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_155 = l_Lean_Parser_ParserState_mkNode(x_126, x_154, x_123); -x_156 = l_Lean_Parser_mergeOrElseErrors(x_155, x_114, x_111); -lean_dec(x_111); -return x_156; -} -} -else -{ -lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_dec(x_125); +lean_dec(x_124); lean_dec(x_1); -x_157 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_158 = l_Lean_Parser_ParserState_mkNode(x_124, x_157, x_123); -x_159 = l_Lean_Parser_mergeOrElseErrors(x_158, x_114, x_111); -lean_dec(x_111); -return x_159; +return x_126; +} +else +{ +lean_object* x_128; lean_object* x_129; uint8_t x_130; +x_128 = lean_ctor_get(x_127, 0); +lean_inc(x_128); +lean_dec(x_127); +x_129 = lean_ctor_get(x_126, 1); +lean_inc(x_129); +x_130 = lean_nat_dec_eq(x_129, x_125); +lean_dec(x_129); +if (x_130 == 0) +{ +lean_dec(x_128); +lean_dec(x_125); +lean_dec(x_124); +lean_dec(x_1); +return x_126; +} +else +{ +lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; +lean_inc(x_125); +x_131 = l_Lean_Parser_ParserState_restore(x_126, x_124, x_125); +lean_dec(x_124); +x_132 = lean_unsigned_to_nat(1024u); +x_133 = l_Lean_Parser_checkPrecFn(x_132, x_1, x_131); +x_134 = lean_ctor_get(x_133, 3); +lean_inc(x_134); +if (lean_obj_tag(x_134) == 0) +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_175; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_227; lean_object* x_228; +x_135 = lean_ctor_get(x_133, 0); +lean_inc(x_135); +x_136 = lean_ctor_get(x_133, 1); +lean_inc(x_136); +x_137 = lean_array_get_size(x_135); +lean_dec(x_135); +lean_inc(x_1); +x_227 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_133); +x_228 = lean_ctor_get(x_227, 3); +lean_inc(x_228); +if (lean_obj_tag(x_228) == 0) +{ +lean_object* x_229; lean_object* x_230; lean_object* x_231; +x_229 = lean_ctor_get(x_227, 1); +lean_inc(x_229); +lean_inc(x_1); +x_230 = l_Lean_Parser_tokenFn(x_1, x_227); +x_231 = lean_ctor_get(x_230, 3); +lean_inc(x_231); +if (lean_obj_tag(x_231) == 0) +{ +lean_object* x_232; lean_object* x_233; +x_232 = lean_ctor_get(x_230, 0); +lean_inc(x_232); +x_233 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_232); +lean_dec(x_232); +if (lean_obj_tag(x_233) == 2) +{ +lean_object* x_234; lean_object* x_235; uint8_t x_236; +x_234 = lean_ctor_get(x_233, 1); +lean_inc(x_234); +lean_dec(x_233); +x_235 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__5; +x_236 = lean_string_dec_eq(x_234, x_235); +lean_dec(x_234); +if (x_236 == 0) +{ +lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; +x_237 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; +x_238 = l_Lean_Parser_ParserState_mkErrorsAt(x_230, x_237, x_229); +x_239 = lean_ctor_get(x_238, 0); +lean_inc(x_239); +x_240 = lean_ctor_get(x_238, 2); +lean_inc(x_240); +x_241 = lean_ctor_get(x_238, 3); +lean_inc(x_241); +x_220 = x_238; +x_221 = x_239; +x_222 = x_240; +x_223 = x_241; +goto block_226; +} +else +{ +lean_object* x_242; lean_object* x_243; lean_object* x_244; +lean_dec(x_229); +x_242 = lean_ctor_get(x_230, 0); +lean_inc(x_242); +x_243 = lean_ctor_get(x_230, 2); +lean_inc(x_243); +x_244 = lean_ctor_get(x_230, 3); +lean_inc(x_244); +x_220 = x_230; +x_221 = x_242; +x_222 = x_243; +x_223 = x_244; +goto block_226; } } -block_191: +else { -lean_object* x_162; -x_162 = lean_ctor_get(x_161, 3); -lean_inc(x_162); -if (lean_obj_tag(x_162) == 0) +lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; +lean_dec(x_233); +x_245 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; +x_246 = l_Lean_Parser_ParserState_mkErrorsAt(x_230, x_245, x_229); +x_247 = lean_ctor_get(x_246, 0); +lean_inc(x_247); +x_248 = lean_ctor_get(x_246, 2); +lean_inc(x_248); +x_249 = lean_ctor_get(x_246, 3); +lean_inc(x_249); +x_220 = x_246; +x_221 = x_247; +x_222 = x_248; +x_223 = x_249; +goto block_226; +} +} +else { -lean_object* x_163; lean_object* x_164; +lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; +lean_dec(x_231); +x_250 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__12; +x_251 = l_Lean_Parser_ParserState_mkErrorsAt(x_230, x_250, x_229); +x_252 = lean_ctor_get(x_251, 0); +lean_inc(x_252); +x_253 = lean_ctor_get(x_251, 2); +lean_inc(x_253); +x_254 = lean_ctor_get(x_251, 3); +lean_inc(x_254); +x_220 = x_251; +x_221 = x_252; +x_222 = x_253; +x_223 = x_254; +goto block_226; +} +} +else +{ +lean_object* x_255; lean_object* x_256; lean_object* x_257; +lean_dec(x_228); +x_255 = lean_ctor_get(x_227, 0); +lean_inc(x_255); +x_256 = lean_ctor_get(x_227, 2); +lean_inc(x_256); +x_257 = lean_ctor_get(x_227, 3); +lean_inc(x_257); +x_220 = x_227; +x_221 = x_255; +x_222 = x_256; +x_223 = x_257; +goto block_226; +} +block_174: +{ +lean_object* x_139; +x_139 = lean_ctor_get(x_138, 3); +lean_inc(x_139); +if (lean_obj_tag(x_139) == 0) +{ +lean_object* x_140; lean_object* x_141; lean_inc(x_1); -x_163 = l_Lean_Parser_Command_declModifiers___elambda__1(x_1, x_161); -x_164 = lean_ctor_get(x_163, 3); -lean_inc(x_164); -if (lean_obj_tag(x_164) == 0) +x_140 = l_Lean_Parser_Command_declSig___elambda__1(x_1, x_138); +x_141 = lean_ctor_get(x_140, 3); +lean_inc(x_141); +if (lean_obj_tag(x_141) == 0) { -lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; -x_165 = lean_ctor_get(x_163, 0); -lean_inc(x_165); -x_166 = lean_array_get_size(x_165); -lean_dec(x_165); -lean_inc(x_1); -x_167 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_163); -x_168 = l_Lean_nullKind; -x_169 = l_Lean_Parser_ParserState_mkNode(x_167, x_168, x_166); -x_170 = lean_ctor_get(x_169, 3); -lean_inc(x_170); -if (lean_obj_tag(x_170) == 0) +lean_object* x_142; lean_object* x_143; lean_object* x_144; +x_142 = lean_ctor_get(x_140, 1); +lean_inc(x_142); +x_143 = l_Lean_Parser_tokenFn(x_1, x_140); +x_144 = lean_ctor_get(x_143, 3); +lean_inc(x_144); +if (lean_obj_tag(x_144) == 0) { -lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; -x_171 = lean_ctor_get(x_169, 0); -lean_inc(x_171); -x_172 = lean_array_get_size(x_171); -lean_dec(x_171); -x_173 = lean_ctor_get(x_169, 1); -lean_inc(x_173); -lean_inc(x_1); -x_174 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_169); -x_175 = lean_ctor_get(x_174, 3); -lean_inc(x_175); -if (lean_obj_tag(x_175) == 0) +lean_object* x_145; lean_object* x_146; +x_145 = lean_ctor_get(x_143, 0); +lean_inc(x_145); +x_146 = l_Array_back___at_Lean_Parser_checkStackTopFn___spec__1(x_145); +lean_dec(x_145); +if (lean_obj_tag(x_146) == 2) +{ +lean_object* x_147; lean_object* x_148; uint8_t x_149; +x_147 = lean_ctor_get(x_146, 1); +lean_inc(x_147); +lean_dec(x_146); +x_148 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__6; +x_149 = lean_string_dec_eq(x_147, x_148); +lean_dec(x_147); +if (x_149 == 0) +{ +lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; +x_150 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__9; +x_151 = l_Lean_Parser_ParserState_mkErrorsAt(x_143, x_150, x_142); +x_152 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_153 = l_Lean_Parser_ParserState_mkNode(x_151, x_152, x_137); +x_154 = l_Lean_Parser_mergeOrElseErrors(x_153, x_128, x_125); +lean_dec(x_125); +return x_154; +} +else +{ +lean_object* x_155; lean_object* x_156; lean_object* x_157; +lean_dec(x_142); +x_155 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_156 = l_Lean_Parser_ParserState_mkNode(x_143, x_155, x_137); +x_157 = l_Lean_Parser_mergeOrElseErrors(x_156, x_128, x_125); +lean_dec(x_125); +return x_157; +} +} +else +{ +lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; +lean_dec(x_146); +x_158 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__9; +x_159 = l_Lean_Parser_ParserState_mkErrorsAt(x_143, x_158, x_142); +x_160 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_161 = l_Lean_Parser_ParserState_mkNode(x_159, x_160, x_137); +x_162 = l_Lean_Parser_mergeOrElseErrors(x_161, x_128, x_125); +lean_dec(x_125); +return x_162; +} +} +else +{ +lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; +lean_dec(x_144); +x_163 = l_Lean_Parser_Term_structInstArrayRef___elambda__1___closed__9; +x_164 = l_Lean_Parser_ParserState_mkErrorsAt(x_143, x_163, x_142); +x_165 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_166 = l_Lean_Parser_ParserState_mkNode(x_164, x_165, x_137); +x_167 = l_Lean_Parser_mergeOrElseErrors(x_166, x_128, x_125); +lean_dec(x_125); +return x_167; +} +} +else +{ +lean_object* x_168; lean_object* x_169; lean_object* x_170; +lean_dec(x_141); +lean_dec(x_1); +x_168 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_169 = l_Lean_Parser_ParserState_mkNode(x_140, x_168, x_137); +x_170 = l_Lean_Parser_mergeOrElseErrors(x_169, x_128, x_125); +lean_dec(x_125); +return x_170; +} +} +else +{ +lean_object* x_171; lean_object* x_172; lean_object* x_173; +lean_dec(x_139); +lean_dec(x_1); +x_171 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_172 = l_Lean_Parser_ParserState_mkNode(x_138, x_171, x_137); +x_173 = l_Lean_Parser_mergeOrElseErrors(x_172, x_128, x_125); +lean_dec(x_125); +return x_173; +} +} +block_219: { lean_object* x_176; -lean_dec(x_173); -x_176 = l_Lean_Parser_ParserState_mkNode(x_174, x_168, x_172); -x_124 = x_176; -goto block_160; -} -else +x_176 = lean_ctor_get(x_175, 3); +lean_inc(x_176); +if (lean_obj_tag(x_176) == 0) { -lean_object* x_177; uint8_t x_178; -lean_dec(x_175); -x_177 = lean_ctor_get(x_174, 1); +lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; +x_177 = lean_ctor_get(x_175, 0); lean_inc(x_177); -x_178 = lean_nat_dec_eq(x_177, x_173); +x_178 = lean_array_get_size(x_177); lean_dec(x_177); -if (x_178 == 0) +lean_inc(x_1); +x_179 = l_Lean_Parser_ident___elambda__1(x_1, x_175); +x_180 = lean_ctor_get(x_179, 3); +lean_inc(x_180); +if (lean_obj_tag(x_180) == 0) { -lean_object* x_179; -lean_dec(x_173); -x_179 = l_Lean_Parser_ParserState_mkNode(x_174, x_168, x_172); -x_124 = x_179; -goto block_160; +lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; +lean_inc(x_1); +x_181 = l_Lean_Parser_manyAux___main___at_Lean_Parser_Command_structExplicitBinder___elambda__1___spec__1(x_1, x_179); +x_182 = l_Lean_nullKind; +x_183 = l_Lean_Parser_ParserState_mkNode(x_181, x_182, x_178); +x_184 = lean_ctor_get(x_183, 3); +lean_inc(x_184); +if (lean_obj_tag(x_184) == 0) +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; +x_185 = lean_ctor_get(x_183, 0); +lean_inc(x_185); +x_186 = lean_array_get_size(x_185); +lean_dec(x_185); +x_187 = lean_ctor_get(x_183, 1); +lean_inc(x_187); +lean_inc(x_1); +x_188 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_183); +x_189 = lean_ctor_get(x_188, 3); +lean_inc(x_189); +if (lean_obj_tag(x_189) == 0) +{ +lean_object* x_190; +lean_dec(x_187); +x_190 = l_Lean_Parser_ParserState_mkNode(x_188, x_182, x_186); +x_138 = x_190; +goto block_174; } else { -lean_object* x_180; lean_object* x_181; -x_180 = l_Lean_Parser_ParserState_restore(x_174, x_172, x_173); -x_181 = l_Lean_Parser_ParserState_mkNode(x_180, x_168, x_172); -x_124 = x_181; -goto block_160; +lean_object* x_191; uint8_t x_192; +lean_dec(x_189); +x_191 = lean_ctor_get(x_188, 1); +lean_inc(x_191); +x_192 = lean_nat_dec_eq(x_191, x_187); +lean_dec(x_191); +if (x_192 == 0) +{ +lean_object* x_193; +lean_dec(x_187); +x_193 = l_Lean_Parser_ParserState_mkNode(x_188, x_182, x_186); +x_138 = x_193; +goto block_174; +} +else +{ +lean_object* x_194; lean_object* x_195; +x_194 = l_Lean_Parser_ParserState_restore(x_188, x_186, x_187); +x_195 = l_Lean_Parser_ParserState_mkNode(x_194, x_182, x_186); +x_138 = x_195; +goto block_174; } } } else { -lean_object* x_182; lean_object* x_183; lean_object* x_184; -lean_dec(x_170); +lean_object* x_196; lean_object* x_197; lean_object* x_198; +lean_dec(x_184); lean_dec(x_1); -x_182 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_183 = l_Lean_Parser_ParserState_mkNode(x_169, x_182, x_123); -x_184 = l_Lean_Parser_mergeOrElseErrors(x_183, x_114, x_111); -lean_dec(x_111); -return x_184; +x_196 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_197 = l_Lean_Parser_ParserState_mkNode(x_183, x_196, x_137); +x_198 = l_Lean_Parser_mergeOrElseErrors(x_197, x_128, x_125); +lean_dec(x_125); +return x_198; } } else { -lean_object* x_185; lean_object* x_186; lean_object* x_187; -lean_dec(x_164); +lean_object* x_199; lean_object* x_200; lean_object* x_201; +lean_dec(x_180); +x_199 = l_Lean_nullKind; +x_200 = l_Lean_Parser_ParserState_mkNode(x_179, x_199, x_178); +x_201 = lean_ctor_get(x_200, 3); +lean_inc(x_201); +if (lean_obj_tag(x_201) == 0) +{ +lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; +x_202 = lean_ctor_get(x_200, 0); +lean_inc(x_202); +x_203 = lean_array_get_size(x_202); +lean_dec(x_202); +x_204 = lean_ctor_get(x_200, 1); +lean_inc(x_204); +lean_inc(x_1); +x_205 = l_Lean_Parser_Command_inferMod___elambda__1(x_1, x_200); +x_206 = lean_ctor_get(x_205, 3); +lean_inc(x_206); +if (lean_obj_tag(x_206) == 0) +{ +lean_object* x_207; +lean_dec(x_204); +x_207 = l_Lean_Parser_ParserState_mkNode(x_205, x_199, x_203); +x_138 = x_207; +goto block_174; +} +else +{ +lean_object* x_208; uint8_t x_209; +lean_dec(x_206); +x_208 = lean_ctor_get(x_205, 1); +lean_inc(x_208); +x_209 = lean_nat_dec_eq(x_208, x_204); +lean_dec(x_208); +if (x_209 == 0) +{ +lean_object* x_210; +lean_dec(x_204); +x_210 = l_Lean_Parser_ParserState_mkNode(x_205, x_199, x_203); +x_138 = x_210; +goto block_174; +} +else +{ +lean_object* x_211; lean_object* x_212; +x_211 = l_Lean_Parser_ParserState_restore(x_205, x_203, x_204); +x_212 = l_Lean_Parser_ParserState_mkNode(x_211, x_199, x_203); +x_138 = x_212; +goto block_174; +} +} +} +else +{ +lean_object* x_213; lean_object* x_214; lean_object* x_215; +lean_dec(x_201); lean_dec(x_1); -x_185 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_186 = l_Lean_Parser_ParserState_mkNode(x_163, x_185, x_123); -x_187 = l_Lean_Parser_mergeOrElseErrors(x_186, x_114, x_111); -lean_dec(x_111); -return x_187; +x_213 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_214 = l_Lean_Parser_ParserState_mkNode(x_200, x_213, x_137); +x_215 = l_Lean_Parser_mergeOrElseErrors(x_214, x_128, x_125); +lean_dec(x_125); +return x_215; +} } } else { -lean_object* x_188; lean_object* x_189; lean_object* x_190; -lean_dec(x_162); +lean_object* x_216; lean_object* x_217; lean_object* x_218; +lean_dec(x_176); lean_dec(x_1); -x_188 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; -x_189 = l_Lean_Parser_ParserState_mkNode(x_161, x_188, x_123); -x_190 = l_Lean_Parser_mergeOrElseErrors(x_189, x_114, x_111); -lean_dec(x_111); -return x_190; +x_216 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_217 = l_Lean_Parser_ParserState_mkNode(x_175, x_216, x_137); +x_218 = l_Lean_Parser_mergeOrElseErrors(x_217, x_128, x_125); +lean_dec(x_125); +return x_218; } } -block_198: +block_226: { -if (lean_obj_tag(x_195) == 0) +if (lean_obj_tag(x_223) == 0) { -lean_dec(x_194); -lean_dec(x_193); -lean_dec(x_122); -x_161 = x_192; -goto block_191; +lean_dec(x_222); +lean_dec(x_221); +lean_dec(x_136); +x_175 = x_220; +goto block_219; } else { -lean_object* x_196; lean_object* x_197; -lean_dec(x_192); -x_196 = l_Array_shrink___main___rarg(x_193, x_123); -x_197 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_197, 0, x_196); -lean_ctor_set(x_197, 1, x_122); -lean_ctor_set(x_197, 2, x_194); -lean_ctor_set(x_197, 3, x_195); -x_161 = x_197; -goto block_191; +lean_object* x_224; lean_object* x_225; +lean_dec(x_220); +x_224 = l_Array_shrink___main___rarg(x_221, x_137); +x_225 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_225, 0, x_224); +lean_ctor_set(x_225, 1, x_136); +lean_ctor_set(x_225, 2, x_222); +lean_ctor_set(x_225, 3, x_223); +x_175 = x_225; +goto block_219; } } } else { -lean_object* x_230; -lean_dec(x_120); +lean_object* x_258; +lean_dec(x_134); lean_dec(x_1); -x_230 = l_Lean_Parser_mergeOrElseErrors(x_119, x_114, x_111); -lean_dec(x_111); -return x_230; +x_258 = l_Lean_Parser_mergeOrElseErrors(x_133, x_128, x_125); +lean_dec(x_125); +return x_258; } } } @@ -18986,7 +19385,7 @@ lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Command_optDeclSig; +x_1 = l_Lean_Parser_Command_declSig; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l_Lean_Parser_Term_structInstArrayRef___closed__2; @@ -19007,32 +19406,32 @@ return x_3; lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__4() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structExplicitBinder___closed__2; -x_2 = l_Lean_Parser_Command_structInstBinder___closed__3; -x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); -return x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_ident; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Parser_Command_structInstBinder___closed__3; +x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); +return x_4; } } lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__5() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Command_declModifiers; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -x_3 = l_Lean_Parser_Command_structInstBinder___closed__4; -x_4 = l_Lean_Parser_andthenInfo(x_2, x_3); -return x_4; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Command_structInstBinder___closed__1; +x_2 = l_Lean_Parser_Command_structInstBinder___closed__4; +x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); +return x_3; } } lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__6() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structInstBinder___closed__1; +x_1 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; x_2 = l_Lean_Parser_Command_structInstBinder___closed__5; -x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); +x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); return x_3; } } @@ -19040,35 +19439,25 @@ lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__2; +x_1 = l_Lean_Parser_epsilonInfo; x_2 = l_Lean_Parser_Command_structInstBinder___closed__6; -x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); +x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); return x_3; } } lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__8() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_epsilonInfo; -x_2 = l_Lean_Parser_Command_structInstBinder___closed__7; -x_3 = l_Lean_Parser_andthenInfo(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__9() { -_start: -{ lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_Parser_Command_structInstBinder___elambda__1___closed__4; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); -x_3 = l_Lean_Parser_Command_structInstBinder___closed__8; +x_3 = l_Lean_Parser_Command_structInstBinder___closed__7; x_4 = l_Lean_Parser_orelseInfo(x_2, x_3); return x_4; } } -lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__10() { +lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__9() { _start: { lean_object* x_1; @@ -19076,12 +19465,12 @@ x_1 = lean_alloc_closure((void*)(l_Lean_Parser_Command_structInstBinder___elambd return x_1; } } -lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__11() { +lean_object* _init_l_Lean_Parser_Command_structInstBinder___closed__10() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_structInstBinder___closed__9; -x_2 = l_Lean_Parser_Command_structInstBinder___closed__10; +x_1 = l_Lean_Parser_Command_structInstBinder___closed__8; +x_2 = l_Lean_Parser_Command_structInstBinder___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); @@ -19092,7 +19481,7 @@ lean_object* _init_l_Lean_Parser_Command_structInstBinder() { _start: { lean_object* x_1; -x_1 = l_Lean_Parser_Command_structInstBinder___closed__11; +x_1 = l_Lean_Parser_Command_structInstBinder___closed__10; return x_1; } } @@ -39220,8 +39609,6 @@ l_Lean_Parser_Command_structExplicitBinder___closed__11 = _init_l_Lean_Parser_Co lean_mark_persistent(l_Lean_Parser_Command_structExplicitBinder___closed__11); l_Lean_Parser_Command_structExplicitBinder___closed__12 = _init_l_Lean_Parser_Command_structExplicitBinder___closed__12(); lean_mark_persistent(l_Lean_Parser_Command_structExplicitBinder___closed__12); -l_Lean_Parser_Command_structExplicitBinder___closed__13 = _init_l_Lean_Parser_Command_structExplicitBinder___closed__13(); -lean_mark_persistent(l_Lean_Parser_Command_structExplicitBinder___closed__13); l_Lean_Parser_Command_structExplicitBinder = _init_l_Lean_Parser_Command_structExplicitBinder(); lean_mark_persistent(l_Lean_Parser_Command_structExplicitBinder); l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__1 = _init_l_Lean_Parser_Command_structImplicitBinder___elambda__1___closed__1(); @@ -39282,8 +39669,6 @@ l_Lean_Parser_Command_structInstBinder___closed__9 = _init_l_Lean_Parser_Command lean_mark_persistent(l_Lean_Parser_Command_structInstBinder___closed__9); l_Lean_Parser_Command_structInstBinder___closed__10 = _init_l_Lean_Parser_Command_structInstBinder___closed__10(); lean_mark_persistent(l_Lean_Parser_Command_structInstBinder___closed__10); -l_Lean_Parser_Command_structInstBinder___closed__11 = _init_l_Lean_Parser_Command_structInstBinder___closed__11(); -lean_mark_persistent(l_Lean_Parser_Command_structInstBinder___closed__11); l_Lean_Parser_Command_structInstBinder = _init_l_Lean_Parser_Command_structInstBinder(); lean_mark_persistent(l_Lean_Parser_Command_structInstBinder); l_Lean_Parser_Command_structFields___elambda__1___closed__1 = _init_l_Lean_Parser_Command_structFields___elambda__1___closed__1();