From 49d2994dd6762e2b4c3b9ea937e2c1cdd457096e Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 6 Jan 2020 12:12:45 -0800 Subject: [PATCH] chore: update stage0 --- stage0/src/Init/Lean/Elab/Command.lean | 61 +- stage0/src/Init/Lean/Elab/Declaration.lean | 2 +- stage0/src/Init/Lean/Elab/Definition.lean | 133 +- stage0/src/Init/Lean/MetavarContext.lean | 6 + stage0/src/Init/Lean/Util/CollectFVars.lean | 41 + .../Init/Lean/Util/CollectLevelParams.lean | 57 +- stage0/stdlib/CMakeLists.txt | 2 +- stage0/stdlib/Init/Lean/Elab/Command.c | 1841 +++++--- stage0/stdlib/Init/Lean/Elab/DeclModifiers.c | 369 +- stage0/stdlib/Init/Lean/Elab/Declaration.c | 325 +- stage0/stdlib/Init/Lean/Elab/Definition.c | 3983 +++++++++++++---- stage0/stdlib/Init/Lean/Elab/Frontend.c | 984 ++-- stage0/stdlib/Init/Lean/MetavarContext.c | 96 +- stage0/stdlib/Init/Lean/Util/CollectFVars.c | 1421 ++++++ .../Init/Lean/Util/CollectLevelParams.c | 2727 +++++------ 15 files changed, 8100 insertions(+), 3948 deletions(-) create mode 100644 stage0/src/Init/Lean/Util/CollectFVars.lean create mode 100644 stage0/stdlib/Init/Lean/Util/CollectFVars.c diff --git a/stage0/src/Init/Lean/Elab/Command.lean b/stage0/src/Init/Lean/Elab/Command.lean index c1e0e5c654..e95618d2ba 100644 --- a/stage0/src/Init/Lean/Elab/Command.lean +++ b/stage0/src/Init/Lean/Elab/Command.lean @@ -41,6 +41,7 @@ structure Context := (fileMap : FileMap) (stateRef : IO.Ref State) (cmdPos : String.Pos := 0) +(macroStack : List Syntax := []) (currMacroScope : MacroScope := 0) abbrev CommandElabCoreM (ε) := ReaderT Context (EIO ε) @@ -79,6 +80,46 @@ instance CommandElabM.monadLog : MonadLog CommandElabM := getFileName := do ctx ← read; pure ctx.fileName, logMessage := fun msg => modify $ fun s => { messages := s.messages.add msg, .. s } } +/- If `ref` does not have position information, then try to use macroStack -/ +private def getBetterRef (ref : Syntax) : CommandElabM Syntax := +match ref.getPos with +| some _ => pure ref +| none => do + ctx ← read; + match ctx.macroStack.find? $ fun (macro : Syntax) => macro.getPos != none with + | some macro => pure macro + | none => pure ref + +private def prettyPrint (stx : Syntax) : CommandElabM Format := +match stx.reprint with -- TODO use syntax pretty printer +| some str => pure $ format str +| none => pure $ format stx + +private def addMacroStack (msgData : MessageData) : CommandElabM MessageData := do +ctx ← read; +if ctx.macroStack.isEmpty then pure msgData +else + ctx.macroStack.foldlM + (fun (msgData : MessageData) (macro : Syntax) => do + macroFmt ← prettyPrint macro; + pure (msgData ++ Format.line ++ "while expanding" ++ MessageData.nest 2 (Format.line ++ macroFmt))) + msgData + +/-- + Throws an error with the given `msgData` and extracting position information from `ref`. + If `ref` does not contain position information, then use `cmdPos` -/ +def throwError {α} (ref : Syntax) (msgData : MessageData) : CommandElabM α := do +ref ← getBetterRef ref; +msgData ← addMacroStack msgData; +msg ← mkMessage msgData MessageSeverity.error ref; +throw msg + +def throwUnexpectedSyntax {α} (ref : Syntax) (expectedMsg : Option String := none) : CommandElabM α := do +refFmt ← prettyPrint ref; +match expectedMsg with +| none => throwError ref ("unexpected syntax" ++ MessageData.nest 2 (Format.line ++ refFmt)) +| some ex => throwError ref ("unexpected syntax, expected '" ++ ex ++ "'" ++ MessageData.nest 2 (Format.line ++ refFmt)) + protected def getCurrMacroScope : CommandElabM Nat := do ctx ← read; pure ctx.currMacroScope @@ -145,9 +186,13 @@ stx.ifNode | none => throwError stx ("command '" ++ toString k ++ "' has not been implemented")) (fun _ => throwError stx ("unexpected command")) +/- Elaborate `x` with `stx` on the macro stack -/ +@[inline] def withMacroExpansion {α} (stx : Syntax) (x : CommandElabM α) : CommandElabM α := +adaptReader (fun (ctx : Context) => { macroStack := stx :: ctx.macroStack, .. ctx }) x + /-- Adapt a syntax transformation to a regular, command-producing elaborator. -/ def adaptExpander (exp : Syntax → CommandElabM Syntax) : CommandElab := -fun stx => do +fun stx => withMacroExpansion stx.val $ do stx ← exp stx.val; elabCommand stx @@ -157,6 +202,7 @@ let scope := s.scopes.head!; fileName := ctx.fileName, fileMap := ctx.fileMap, cmdPos := ctx.cmdPos, + macroStack := ctx.macroStack, currMacroScope := ctx.currMacroScope, currNamespace := scope.currNamespace, levelNames := scope.levelNames, @@ -229,14 +275,15 @@ private def addNamespace (ref : Syntax) (header : Name) : CommandElabM Unit := addScopes ref "namespace" true header @[builtinCommandElab «namespace»] def elabNamespace : CommandElab := -fun stx => addNamespace stx.val (stx.getIdAt 1) +fun stx => match_syntax stx.val with + | `(namespace $n) => addNamespace stx.val n.getId + | _ => throwUnexpectedSyntax stx.val "namespace" @[builtinCommandElab «section»] def elabSection : CommandElab := -fun stx => do - let header? := (stx.getArg 1).getOptionalIdent?; - match header? with - | some header => addScopes stx.val "section" false header - | none => do currNamespace ← getCurrNamespace; addScope "section" "" currNamespace +fun stx => match_syntax stx.val with + | `(section $header:ident) => addScopes stx.val "section" false header.getId + | `(section) => do currNamespace ← getCurrNamespace; addScope "section" "" currNamespace + | _ => throwUnexpectedSyntax stx.val "section" def getScopes : CommandElabM (List Scope) := do s ← get; pure s.scopes diff --git a/stage0/src/Init/Lean/Elab/Declaration.lean b/stage0/src/Init/Lean/Elab/Declaration.lean index 25464a78ca..47189daebf 100644 --- a/stage0/src/Init/Lean/Elab/Declaration.lean +++ b/stage0/src/Init/Lean/Elab/Declaration.lean @@ -101,7 +101,7 @@ withDeclId declId $ fun name => do type ← Term.mkForall typeStx xs type; (type, _) ← Term.mkForallUsedOnly typeStx vars type; type ← Term.levelMVarToParam type; - let usedParams := collectLevelParams type; + let usedParams := (collectLevelParams {} type).params; let levelParams := sortDeclLevelParams explictLevelNames usedParams; pure $ Declaration.axiomDecl { name := declName, diff --git a/stage0/src/Init/Lean/Elab/Definition.lean b/stage0/src/Init/Lean/Elab/Definition.lean index f8b5a241f4..9355aab29c 100644 --- a/stage0/src/Init/Lean/Elab/Definition.lean +++ b/stage0/src/Init/Lean/Elab/Definition.lean @@ -4,16 +4,31 @@ Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Sebastian Ullrich -/ prelude +import Init.Lean.Util.CollectLevelParams +import Init.Lean.Util.CollectFVars import Init.Lean.Elab.DeclModifiers +import Init.Lean.Elab.TermBinders namespace Lean namespace Elab - namespace Command inductive DefKind | «def» | «theorem» | «example» | «opaque» +def DefKind.isTheorem : DefKind → Bool +| DefKind.theorem => true +| _ => false + +def DefKind.isDefOrOpaque : DefKind → Bool +| DefKind.def => true +| DefKind.opaque => true +| _ => false + +def DefKind.isExample : DefKind → Bool +| DefKind.example => true +| _ => false + structure DefView := (kind : DefKind) (ref : Syntax) @@ -23,24 +38,116 @@ structure DefView := (type? : Option Syntax) (val : Syntax) +def collectUsedFVars (ref : Syntax) (used : CollectFVars.State) (e : Expr) : TermElabM CollectFVars.State := do +e ← Term.instantiateMVars ref e; +pure $ collectFVars used e + +def collectUsedFVarsAtFVars (ref : Syntax) (used : CollectFVars.State) (fvars : Array Expr) : TermElabM CollectFVars.State := +fvars.foldlM + (fun used fvar => do + fvarType ← Term.inferType ref fvar; + collectUsedFVars ref used fvarType) + used + +def removeUnused (ref : Syntax) (vars : Array Expr) (xs : Array Expr) (e : Expr) (eType : Expr) + : TermElabM (LocalContext × LocalInstances × Array Expr) := do +let used : CollectFVars.State := {}; +used ← collectUsedFVars ref used eType; +used ← collectUsedFVars ref used e; +used ← collectUsedFVarsAtFVars ref used xs; +localInsts ← Term.getLocalInsts; +lctx ← Term.getLCtx; +(lctx, localInsts, newVars, _) ← vars.foldrM + (fun var (result : LocalContext × LocalInstances × Array Expr × CollectFVars.State) => + let (lctx, localInsts, newVars, used) := result; + if used.fvarSet.contains var.fvarId! then do + varType ← Term.inferType ref var; + used ← collectUsedFVars ref used varType; + pure (lctx, localInsts, newVars.push var, used) + else + pure (lctx.erase var.fvarId!, localInsts.erase var.fvarId!, newVars, used)) + (lctx, localInsts, #[], used); +pure (lctx, localInsts, newVars.reverse) + +def withUsedWhen {α} (ref : Syntax) (vars : Array Expr) (xs : Array Expr) (e : Expr) (eType : Expr) (cond : Bool) (k : Array Expr → TermElabM α) : TermElabM α := +if cond then do + (lctx, localInsts, vars) ← removeUnused ref vars xs e eType; + Term.withLCtx lctx localInsts $ k vars +else + k vars + +def withUsedWhen' {α} (ref : Syntax) (vars : Array Expr) (xs : Array Expr) (e : Expr) (cond : Bool) (k : Array Expr → TermElabM α) : TermElabM α := +let dummyExpr := mkSort levelOne; +withUsedWhen ref vars xs e dummyExpr cond k + +def mkDef (view : DefView) (declName : Name) (explictLevelNames : List Name) (vars : Array Expr) (xs : Array Expr) (type : Expr) (val : Expr) + : TermElabM (Option Declaration) := do +let ref := view.ref; +Term.synthesizeSyntheticMVars false; +type ← Term.instantiateMVars ref type; +val ← Term.instantiateMVars view.val val; +valType ← Term.inferType view.val val; +val ← Term.ensureHasType ref type valType val; +if view.kind.isExample then pure none +else withUsedWhen ref vars xs val type view.kind.isDefOrOpaque $ fun vars => do + type ← Term.mkForall ref xs type; + type ← Term.mkForall ref vars type; + val ← Term.mkLambda ref xs val; + val ← Term.mkLambda ref vars val; + let usedParams : CollectLevelParams.State := {}; + let usedParams := collectLevelParams usedParams type; + let usedParams := collectLevelParams usedParams val; + let levelParams := sortDeclLevelParams explictLevelNames usedParams.params; + match view.kind with + | DefKind.theorem => + -- TODO theorem elaboration in parallel + pure $ some $ Declaration.thmDecl { name := declName, lparams := levelParams, type := type, value := Task.pure val } + | DefKind.opaque => + pure $ some $ Declaration.opaqueDecl { name := declName, lparams := levelParams, type := type, value := val, isUnsafe := view.modifiers.isUnsafe } + | DefKind.def => + pure $ some $ Declaration.defnDecl { + name := declName, lparams := levelParams, type := type, value := val, + hints := ReducibilityHints.regular 0, -- TODO + isUnsafe := view.modifiers.isUnsafe } + | _ => unreachable! + +def elabDefVal (defVal : Syntax) (expectedType : Expr) : TermElabM Expr := do +let kind := defVal.getKind; +if kind == `Lean.Parser.Command.declValSimple then + -- parser! " := " >> termParser + Term.elabTerm (defVal.getArg 1) expectedType +else if kind == `Lean.Parser.Command.declValEqns then + Term.throwError defVal "equations have not been implemented yet" +else + Term.throwUnexpectedSyntax defVal "definition body" + def elabDefLike (view : DefView) : CommandElabM Unit := +let ref := view.ref; withDeclId view.declId $ fun name => do - currNamespace ← getCurrNamespace; - runTermElabM $ fun vars => Term.elabBinders view.binders.getArgs $ fun xs => + declName ← mkDeclName view.modifiers name; + applyAttributes ref declName view.modifiers.attrs AttributeApplicationTime.beforeElaboration; + explictLevelNames ← getLevelNames; + decl? ← runTermElabM $ fun vars => Term.elabBinders view.binders.getArgs $ fun xs => match view.type? with | some typeStx => do - type ← Term.elabType typeStx; + type ← Term.elabType typeStx; Term.synthesizeSyntheticMVars false; - type ← Term.instantiateMVars typeStx type; - defType ← Term.mkForall typeStx xs type; - -- TODO: unassigned universe metavariables to new parameters - -- TODO: if theorem, filter unused vars - Term.dbgTrace (">>> " ++ toString type); - pure () - | none => do + type ← Term.instantiateMVars typeStx type; + withUsedWhen' ref vars xs type view.kind.isTheorem $ fun vars => do + val ← elabDefVal view.val type; + mkDef view declName explictLevelNames vars xs type val + | none => do { type ← Term.mkFreshTypeMVar view.binders; - - pure () + val ← elabDefVal view.val type; + mkDef view declName explictLevelNames vars xs type val + }; + match decl? with + | none => pure () + | some decl => do + addDecl ref decl; + applyAttributes ref declName view.modifiers.attrs AttributeApplicationTime.afterTypeChecking; + -- TODO invoke compiler + applyAttributes ref declName view.modifiers.attrs AttributeApplicationTime.afterCompilation end Command end Elab diff --git a/stage0/src/Init/Lean/MetavarContext.lean b/stage0/src/Init/Lean/MetavarContext.lean index 4ef81fa60c..4edcc6ee0d 100644 --- a/stage0/src/Init/Lean/MetavarContext.lean +++ b/stage0/src/Init/Lean/MetavarContext.lean @@ -234,6 +234,12 @@ i₁.fvar == i₂.fvar instance LocalInstance.hasBeq : HasBeq LocalInstance := ⟨LocalInstance.beq⟩ +/-- Remove local instance with the given `fvarId`. Do nothing if `localInsts` does not contain any free variable with id `fvarId`. -/ +def LocalInstances.erase (localInsts : LocalInstances) (fvarId : FVarId) : LocalInstances := +match localInsts.findIdx? (fun inst => inst.fvar.fvarId! == fvarId) with +| some idx => localInsts.eraseIdx idx +| _ => localInsts + inductive MetavarKind | natural | synthetic diff --git a/stage0/src/Init/Lean/Util/CollectFVars.lean b/stage0/src/Init/Lean/Util/CollectFVars.lean new file mode 100644 index 0000000000..4bb2b88e9f --- /dev/null +++ b/stage0/src/Init/Lean/Util/CollectFVars.lean @@ -0,0 +1,41 @@ +/- +Copyright (c) 2020 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura +-/ +prelude +import Init.Lean.Expr + +namespace Lean + +namespace CollectFVars + +structure State := +(visitedExpr : ExprSet := {}) +(fvarSet : NameSet := {}) + +instance State.inhabited : Inhabited State := ⟨{}⟩ + +abbrev Visitor := State → State + +@[inline] def visit (f : Expr → Visitor) (e : Expr) : Visitor := +fun s => + if !e.hasFVar || s.visitedExpr.contains e then s + else f e { visitedExpr := s.visitedExpr.insert e, .. s } + +partial def main : Expr → Visitor +| Expr.proj _ _ e _ => visit main e +| Expr.forallE _ d b _ => visit main b ∘ visit main d +| Expr.lam _ d b _ => visit main b ∘ visit main d +| Expr.letE _ t v b _ => visit main b ∘ visit main v ∘ visit main t +| Expr.app f a _ => visit main a ∘ visit main f +| Expr.mdata _ b _ => visit main b +| Expr.fvar fvarId _ => fun s => { fvarSet := s.fvarSet.insert fvarId, .. s } +| _ => id + +end CollectFVars + +def collectFVars (s : CollectFVars.State) (e : Expr) : CollectFVars.State := +CollectFVars.main e s + +end Lean diff --git a/stage0/src/Init/Lean/Util/CollectLevelParams.lean b/stage0/src/Init/Lean/Util/CollectLevelParams.lean index 53c829e0b2..737d89453a 100644 --- a/stage0/src/Init/Lean/Util/CollectLevelParams.lean +++ b/stage0/src/Init/Lean/Util/CollectLevelParams.lean @@ -15,47 +15,42 @@ structure State := (visitedExpr : ExprSet := {}) (params : Array Name := #[]) -abbrev M := StateM State +instance State.inhabited : Inhabited State := ⟨{}⟩ -@[inline] def visitLevel (f : Level → M Unit) (u : Level) : M Unit := -if !u.hasParam then pure () -else do - s ← get; - if s.visitedLevel.contains u then pure () - else do - modify $ fun s => { visitedLevel := s.visitedLevel.insert u, .. s }; - f u +abbrev Visitor := State → State -partial def collect : Level → M Unit +@[inline] def visitLevel (f : Level → Visitor) (u : Level) : Visitor := +fun s => + if !u.hasParam || s.visitedLevel.contains u then s + else f u { visitedLevel := s.visitedLevel.insert u, .. s } + +partial def collect : Level → Visitor | Level.succ v _ => visitLevel collect v -| Level.max u v _ => do visitLevel collect u; visitLevel collect v -| Level.imax u v _ => do visitLevel collect u; visitLevel collect v -| Level.param n _ => modify $ fun s => { params := s.params.push n, .. s } -| _ => pure () +| Level.max u v _ => visitLevel collect v ∘ visitLevel collect u +| Level.imax u v _ => visitLevel collect v ∘ visitLevel collect u +| Level.param n _ => fun s => { params := s.params.push n, .. s } +| _ => id -@[inline] def visitExpr (f : Expr → M Unit) (e : Expr) : M Unit := -if !e.hasLevelParam then pure () -else do - s ← get; - if s.visitedExpr.contains e then pure () - else do - modify $ fun s => { visitedExpr := s.visitedExpr.insert e, .. s }; - f e +@[inline] def visitExpr (f : Expr → Visitor) (e : Expr) : Visitor := +fun s => + if !e.hasLevelParam then s + else if s.visitedExpr.contains e then s + else f e { visitedExpr := s.visitedExpr.insert e, .. s } -partial def main : Expr → M Unit +partial def main : Expr → Visitor | Expr.proj _ _ s _ => visitExpr main s -| Expr.forallE _ d b _ => do visitExpr main d; visitExpr main b -| Expr.lam _ d b _ => do visitExpr main d; visitExpr main b -| Expr.letE _ t v b _ => do visitExpr main t; visitExpr main v; visitExpr main b -| Expr.app f a _ => do visitExpr main f; visitExpr main a +| Expr.forallE _ d b _ => visitExpr main b ∘ visitExpr main d +| Expr.lam _ d b _ => visitExpr main b ∘ visitExpr main d +| Expr.letE _ t v b _ => visitExpr main b ∘ visitExpr main v ∘ visitExpr main t +| Expr.app f a _ => visitExpr main a ∘ visitExpr main f | Expr.mdata _ b _ => visitExpr main b -| Expr.const _ us _ => us.forM (visitLevel collect) +| Expr.const _ us _ => fun s => us.foldl (fun s u => visitLevel collect u s) s | Expr.sort u _ => visitLevel collect u -| _ => pure () +| _ => id end CollectLevelParams -def collectLevelParams (e : Expr) : Array Name := -(CollectLevelParams.main e {}).2.params +def collectLevelParams (s : CollectLevelParams.State) (e : Expr) : CollectLevelParams.State := +CollectLevelParams.main e s end Lean diff --git a/stage0/stdlib/CMakeLists.txt b/stage0/stdlib/CMakeLists.txt index 5b9cc58370..a397a31786 100644 --- a/stage0/stdlib/CMakeLists.txt +++ b/stage0/stdlib/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT 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/MonadFail.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/AssocList.c Init/./Data/Basic.c Init/./Data/BinomialHeap.c Init/./Data/BinomialHeap/Basic.c Init/./Data/ByteArray.c Init/./Data/ByteArray/Basic.c Init/./Data/Char.c Init/./Data/Char/Basic.c Init/./Data/DList.c Init/./Data/Fin.c Init/./Data/Fin/Basic.c Init/./Data/HashMap.c Init/./Data/HashMap/Basic.c Init/./Data/HashSet.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/PersistentArray.c Init/./Data/PersistentArray/Basic.c Init/./Data/PersistentHashMap.c Init/./Data/PersistentHashMap/Basic.c Init/./Data/PersistentHashSet.c Init/./Data/Queue.c Init/./Data/Queue/Basic.c Init/./Data/RBMap.c Init/./Data/RBMap/Basic.c Init/./Data/RBMap/BasicAux.c Init/./Data/RBTree.c Init/./Data/RBTree/Basic.c Init/./Data/Random.c Init/./Data/Repr.c Init/./Data/Stack.c Init/./Data/Stack/Basic.c Init/./Data/String.c Init/./Data/String/Basic.c Init/./Data/ToString.c Init/./Data/UInt.c Init/./Default.c Init/./Fix.c Init/./Lean.c Init/./Lean/Attributes.c Init/./Lean/AuxRecursor.c Init/./Lean/Class.c Init/./Lean/Compiler.c Init/./Lean/Compiler/ClosedTermCache.c Init/./Lean/Compiler/ConstFolding.c Init/./Lean/Compiler/ExportAttr.c Init/./Lean/Compiler/ExternAttr.c Init/./Lean/Compiler/IR.c Init/./Lean/Compiler/IR/Basic.c Init/./Lean/Compiler/IR/Borrow.c Init/./Lean/Compiler/IR/Boxing.c Init/./Lean/Compiler/IR/Checker.c Init/./Lean/Compiler/IR/CompilerM.c Init/./Lean/Compiler/IR/CtorLayout.c Init/./Lean/Compiler/IR/ElimDeadBranches.c Init/./Lean/Compiler/IR/ElimDeadVars.c Init/./Lean/Compiler/IR/EmitC.c Init/./Lean/Compiler/IR/EmitUtil.c Init/./Lean/Compiler/IR/ExpandResetReuse.c Init/./Lean/Compiler/IR/Format.c Init/./Lean/Compiler/IR/FreeVars.c Init/./Lean/Compiler/IR/LiveVars.c Init/./Lean/Compiler/IR/NormIds.c Init/./Lean/Compiler/IR/PushProj.c Init/./Lean/Compiler/IR/RC.c Init/./Lean/Compiler/IR/ResetReuse.c Init/./Lean/Compiler/IR/SimpCase.c Init/./Lean/Compiler/IR/UnboxResult.c Init/./Lean/Compiler/ImplementedByAttr.c Init/./Lean/Compiler/InitAttr.c Init/./Lean/Compiler/InlineAttrs.c Init/./Lean/Compiler/NameMangling.c Init/./Lean/Compiler/NeverExtractAttr.c Init/./Lean/Compiler/Specialize.c Init/./Lean/Compiler/Util.c Init/./Lean/Data/Format.c Init/./Lean/Data/KVMap.c Init/./Lean/Data/LBool.c Init/./Lean/Data/LOption.c Init/./Lean/Data/Name.c Init/./Lean/Data/NameGenerator.c Init/./Lean/Data/Options.c Init/./Lean/Data/Position.c Init/./Lean/Data/SMap.c Init/./Lean/Data/Trie.c Init/./Lean/Declaration.c Init/./Lean/Elab.c Init/./Lean/Elab/Alias.c Init/./Lean/Elab/BuiltinNotation.c Init/./Lean/Elab/Command.c Init/./Lean/Elab/DeclModifiers.c Init/./Lean/Elab/Declaration.c Init/./Lean/Elab/Definition.c Init/./Lean/Elab/ElabStrategyAttrs.c Init/./Lean/Elab/Exception.c Init/./Lean/Elab/Frontend.c Init/./Lean/Elab/Import.c Init/./Lean/Elab/Level.c Init/./Lean/Elab/Log.c Init/./Lean/Elab/Quotation.c Init/./Lean/Elab/ResolveName.c Init/./Lean/Elab/Term.c Init/./Lean/Elab/TermApp.c Init/./Lean/Elab/TermBinders.c Init/./Lean/Elab/Util.c Init/./Lean/Environment.c Init/./Lean/EqnCompiler.c Init/./Lean/EqnCompiler/MatchPattern.c Init/./Lean/Eval.c Init/./Lean/Expr.c Init/./Lean/Hygiene.c Init/./Lean/Level.c Init/./Lean/Linter.c Init/./Lean/LocalContext.c Init/./Lean/Meta.c Init/./Lean/Meta/AbstractMVars.c Init/./Lean/Meta/AppBuilder.c Init/./Lean/Meta/Basic.c Init/./Lean/Meta/Check.c Init/./Lean/Meta/DiscrTree.c Init/./Lean/Meta/DiscrTreeTypes.c Init/./Lean/Meta/Exception.c Init/./Lean/Meta/ExprDefEq.c Init/./Lean/Meta/FunInfo.c Init/./Lean/Meta/InferType.c Init/./Lean/Meta/Instances.c Init/./Lean/Meta/LevelDefEq.c Init/./Lean/Meta/Message.c Init/./Lean/Meta/Offset.c Init/./Lean/Meta/Reduce.c Init/./Lean/Meta/SynthInstance.c Init/./Lean/Meta/Tactic.c Init/./Lean/Meta/Tactic/Assumption.c Init/./Lean/Meta/Tactic/Intro.c Init/./Lean/Meta/Tactic/Util.c Init/./Lean/Meta/WHNF.c Init/./Lean/MetavarContext.c Init/./Lean/Modifiers.c Init/./Lean/Parser.c Init/./Lean/Parser/Command.c Init/./Lean/Parser/Identifier.c Init/./Lean/Parser/Level.c Init/./Lean/Parser/Module.c Init/./Lean/Parser/Parser.c Init/./Lean/Parser/Term.c Init/./Lean/Parser/Transform.c Init/./Lean/ProjFns.c Init/./Lean/ReducibilityAttrs.c Init/./Lean/Runtime.c Init/./Lean/Scopes.c Init/./Lean/Structure.c Init/./Lean/Syntax.c Init/./Lean/ToExpr.c Init/./Lean/Util/CollectLevelParams.c Init/./Lean/Util/Message.c Init/./Lean/Util/MonadCache.c Init/./Lean/Util/Path.c Init/./Lean/Util/Profile.c Init/./Lean/Util/Sorry.c Init/./Lean/Util/Trace.c Init/./Lean/Util/WHNF.c Init/./LeanExt.c Init/./System.c Init/./System/FilePath.c Init/./System/IO.c Init/./System/Platform.c Init/./Util.c Init/./WF.c) +add_library (stage0 OBJECT 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/MonadFail.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/AssocList.c Init/./Data/Basic.c Init/./Data/BinomialHeap.c Init/./Data/BinomialHeap/Basic.c Init/./Data/ByteArray.c Init/./Data/ByteArray/Basic.c Init/./Data/Char.c Init/./Data/Char/Basic.c Init/./Data/DList.c Init/./Data/Fin.c Init/./Data/Fin/Basic.c Init/./Data/HashMap.c Init/./Data/HashMap/Basic.c Init/./Data/HashSet.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/PersistentArray.c Init/./Data/PersistentArray/Basic.c Init/./Data/PersistentHashMap.c Init/./Data/PersistentHashMap/Basic.c Init/./Data/PersistentHashSet.c Init/./Data/Queue.c Init/./Data/Queue/Basic.c Init/./Data/RBMap.c Init/./Data/RBMap/Basic.c Init/./Data/RBMap/BasicAux.c Init/./Data/RBTree.c Init/./Data/RBTree/Basic.c Init/./Data/Random.c Init/./Data/Repr.c Init/./Data/Stack.c Init/./Data/Stack/Basic.c Init/./Data/String.c Init/./Data/String/Basic.c Init/./Data/ToString.c Init/./Data/UInt.c Init/./Default.c Init/./Fix.c Init/./Lean.c Init/./Lean/Attributes.c Init/./Lean/AuxRecursor.c Init/./Lean/Class.c Init/./Lean/Compiler.c Init/./Lean/Compiler/ClosedTermCache.c Init/./Lean/Compiler/ConstFolding.c Init/./Lean/Compiler/ExportAttr.c Init/./Lean/Compiler/ExternAttr.c Init/./Lean/Compiler/IR.c Init/./Lean/Compiler/IR/Basic.c Init/./Lean/Compiler/IR/Borrow.c Init/./Lean/Compiler/IR/Boxing.c Init/./Lean/Compiler/IR/Checker.c Init/./Lean/Compiler/IR/CompilerM.c Init/./Lean/Compiler/IR/CtorLayout.c Init/./Lean/Compiler/IR/ElimDeadBranches.c Init/./Lean/Compiler/IR/ElimDeadVars.c Init/./Lean/Compiler/IR/EmitC.c Init/./Lean/Compiler/IR/EmitUtil.c Init/./Lean/Compiler/IR/ExpandResetReuse.c Init/./Lean/Compiler/IR/Format.c Init/./Lean/Compiler/IR/FreeVars.c Init/./Lean/Compiler/IR/LiveVars.c Init/./Lean/Compiler/IR/NormIds.c Init/./Lean/Compiler/IR/PushProj.c Init/./Lean/Compiler/IR/RC.c Init/./Lean/Compiler/IR/ResetReuse.c Init/./Lean/Compiler/IR/SimpCase.c Init/./Lean/Compiler/IR/UnboxResult.c Init/./Lean/Compiler/ImplementedByAttr.c Init/./Lean/Compiler/InitAttr.c Init/./Lean/Compiler/InlineAttrs.c Init/./Lean/Compiler/NameMangling.c Init/./Lean/Compiler/NeverExtractAttr.c Init/./Lean/Compiler/Specialize.c Init/./Lean/Compiler/Util.c Init/./Lean/Data/Format.c Init/./Lean/Data/KVMap.c Init/./Lean/Data/LBool.c Init/./Lean/Data/LOption.c Init/./Lean/Data/Name.c Init/./Lean/Data/NameGenerator.c Init/./Lean/Data/Options.c Init/./Lean/Data/Position.c Init/./Lean/Data/SMap.c Init/./Lean/Data/Trie.c Init/./Lean/Declaration.c Init/./Lean/Elab.c Init/./Lean/Elab/Alias.c Init/./Lean/Elab/BuiltinNotation.c Init/./Lean/Elab/Command.c Init/./Lean/Elab/DeclModifiers.c Init/./Lean/Elab/Declaration.c Init/./Lean/Elab/Definition.c Init/./Lean/Elab/ElabStrategyAttrs.c Init/./Lean/Elab/Exception.c Init/./Lean/Elab/Frontend.c Init/./Lean/Elab/Import.c Init/./Lean/Elab/Level.c Init/./Lean/Elab/Log.c Init/./Lean/Elab/Quotation.c Init/./Lean/Elab/ResolveName.c Init/./Lean/Elab/Term.c Init/./Lean/Elab/TermApp.c Init/./Lean/Elab/TermBinders.c Init/./Lean/Elab/Util.c Init/./Lean/Environment.c Init/./Lean/EqnCompiler.c Init/./Lean/EqnCompiler/MatchPattern.c Init/./Lean/Eval.c Init/./Lean/Expr.c Init/./Lean/Hygiene.c Init/./Lean/Level.c Init/./Lean/Linter.c Init/./Lean/LocalContext.c Init/./Lean/Meta.c Init/./Lean/Meta/AbstractMVars.c Init/./Lean/Meta/AppBuilder.c Init/./Lean/Meta/Basic.c Init/./Lean/Meta/Check.c Init/./Lean/Meta/DiscrTree.c Init/./Lean/Meta/DiscrTreeTypes.c Init/./Lean/Meta/Exception.c Init/./Lean/Meta/ExprDefEq.c Init/./Lean/Meta/FunInfo.c Init/./Lean/Meta/InferType.c Init/./Lean/Meta/Instances.c Init/./Lean/Meta/LevelDefEq.c Init/./Lean/Meta/Message.c Init/./Lean/Meta/Offset.c Init/./Lean/Meta/Reduce.c Init/./Lean/Meta/SynthInstance.c Init/./Lean/Meta/Tactic.c Init/./Lean/Meta/Tactic/Assumption.c Init/./Lean/Meta/Tactic/Intro.c Init/./Lean/Meta/Tactic/Util.c Init/./Lean/Meta/WHNF.c Init/./Lean/MetavarContext.c Init/./Lean/Modifiers.c Init/./Lean/Parser.c Init/./Lean/Parser/Command.c Init/./Lean/Parser/Identifier.c Init/./Lean/Parser/Level.c Init/./Lean/Parser/Module.c Init/./Lean/Parser/Parser.c Init/./Lean/Parser/Term.c Init/./Lean/Parser/Transform.c Init/./Lean/ProjFns.c Init/./Lean/ReducibilityAttrs.c Init/./Lean/Runtime.c Init/./Lean/Scopes.c Init/./Lean/Structure.c Init/./Lean/Syntax.c Init/./Lean/ToExpr.c Init/./Lean/Util/CollectFVars.c Init/./Lean/Util/CollectLevelParams.c Init/./Lean/Util/Message.c Init/./Lean/Util/MonadCache.c Init/./Lean/Util/Path.c Init/./Lean/Util/Profile.c Init/./Lean/Util/Sorry.c Init/./Lean/Util/Trace.c Init/./Lean/Util/WHNF.c Init/./LeanExt.c Init/./System.c Init/./System/FilePath.c Init/./System/IO.c Init/./System/Platform.c Init/./Util.c Init/./WF.c) diff --git a/stage0/stdlib/Init/Lean/Elab/Command.c b/stage0/stdlib/Init/Lean/Elab/Command.c index d02b2fd656..f9bd913d97 100644 --- a/stage0/stdlib/Init/Lean/Elab/Command.c +++ b/stage0/stdlib/Init/Lean/Elab/Command.c @@ -18,8 +18,8 @@ uint8_t l_AssocList_contains___main___at_Lean_Elab_Command_addBuiltinCommandElab lean_object* l_Lean_Elab_Command_elabVariable(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__4; +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSection(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace(lean_object*); lean_object* l_PersistentHashMap_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__4___boxed(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -30,17 +30,19 @@ lean_object* l_Lean_Elab_Command_catchExceptions(lean_object*, lean_object*, lea extern lean_object* l_Lean_Meta_check___closed__1; lean_object* l_Lean_Elab_Command_getOptions(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCommand___closed__4; -uint8_t l___private_Init_Lean_Elab_Command_12__checkAnonymousScope(lean_object*); extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__8; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__3; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabInitQuot___closed__3; lean_object* l_Lean_Elab_Command_addDecl(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNotation(lean_object*); lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__2; +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_div(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabReserve(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__2; extern lean_object* l_Lean_nameToExprAux___main___closed__1; +lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__6___boxed(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabOpen___closed__3; lean_object* l_unreachable_x21___rarg(lean_object*); lean_object* l_Lean_Elab_Command_withNamespace(lean_object*); @@ -48,42 +50,39 @@ extern lean_object* l_Lean_Elab_Term_throwUnexpectedSyntax___rarg___closed__8; lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__1; lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__1; lean_object* l_Lean_Environment_registerNamespace___main(lean_object*, lean_object*); +extern lean_object* l_Lean_MessageData_ofList___closed__3; lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__2; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSection(lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable(lean_object*); lean_object* l_Lean_Elab_Term_inferType(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Name_lt___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftIOCore(lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_11__addNamespace___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabOpenSimple(lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__10(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftIO(lean_object*); extern size_t l_PersistentHashMap_insertAux___main___rarg___closed__2; lean_object* l_Lean_SMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__1; -lean_object* l___private_Init_Lean_Elab_Command_8__toCommandResult(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabReserve___closed__1; lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_Elab_Command_elabUniverse(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fswap(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_withNamespace___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCommand___closed__2; lean_object* l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCheck___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_logUnknownDecl(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabSection___closed__1; lean_object* l_Lean_Meta_SynthInstance_SynthM_inhabited___lambda__1___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_stxInh; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_sub(size_t, size_t); +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__3(lean_object*, size_t, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_environment_find(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withFreshMacroScope___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabUniverses(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabReserve___closed__2; @@ -91,29 +90,31 @@ lean_object* l_Lean_Elab_Command_elabOpen___boxed(lean_object*, lean_object*, le lean_object* l_Lean_Elab_Command_runTermElabM(lean_object*); extern lean_object* l_Lean_Parser_Command_section___elambda__1___closed__2; lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_elabCommand___spec__3(lean_object*, lean_object*, lean_object*); lean_object* lean_dbg_trace(lean_object*, lean_object*); lean_object* lean_io_mk_ref(lean_object*, lean_object*); lean_object* l_List_append___rarg(lean_object*, lean_object*); +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__1___boxed(lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__2; lean_object* lean_io_ref_get(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse(lean_object*); lean_object* l_Lean_Elab_Command_getCurrMacroScope___boxed(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls(lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_11__addNamespace(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_reprint___main(lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenSimple___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__5; lean_object* l_Lean_Elab_Command_State_inhabited___closed__4; lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__getVarDecls(lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariables___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCheck(lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* l_List_find_x3f___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_logAt___at_Lean_Elab_Command_logUnknownDecl___spec__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerAttribute(lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr(lean_object*); lean_object* l_Lean_Elab_Command_elabUniverse___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_14__addNamespace(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_init__quot___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabNotation___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_Name_inhabited; @@ -122,31 +123,32 @@ lean_object* l_Lean_addAlias(lean_object*, lean_object*, lean_object*); extern lean_object* l_String_splitAux___main___closed__1; lean_object* l_Lean_SMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__1___closed__2; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabExport(lean_object*); -lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__2; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix___closed__1; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addOpenDecl___spec__1(lean_object*, lean_object*, lean_object*); size_t l_USize_shiftRight(size_t, size_t); -lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__10___boxed(lean_object*, lean_object*); +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5(lean_object*, lean_object*); +lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_throwError___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Scope_inhabited; extern lean_object* l_Lean_Parser_Command_section___elambda__1___closed__1; extern lean_object* l_Lean_Meta_MetaHasEval___rarg___closed__4; extern lean_object* l_Lean_Parser_Command_mixfix___elambda__1___closed__2; lean_object* l_Lean_Name_getNumParts___main(lean_object*); lean_object* l_Lean_Elab_Command_elabOpen(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariables___spec__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_13__checkEndHeader___main___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabUniverses___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariables(lean_object*); lean_object* l_Lean_Elab_Command_elabMixfix___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwUnexpectedSyntax___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__3; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__9; lean_object* l_IO_ofExcept___at_Lean_registerClassAttr___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_addBuiltinCommandElab(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_State_inhabited___closed__3; extern lean_object* l_Lean_AttributeImpl_inhabited___closed__4; @@ -174,17 +176,20 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec lean_object* l_Lean_Elab_Command_CommandElabM_inhabited(lean_object*); lean_object* l_Lean_Elab_Command_mkBuiltinCommandElabTable(lean_object*); lean_object* l_Lean_Elab_Command_addOpenDecl(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_5__mkTermContext___boxed(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_11__toCommandResult(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__1; lean_object* l_Lean_Elab_Command_elabCommand___closed__6; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariables___closed__3; -lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Syntax_getKind___closed__4; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__9; lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMixfix___rarg(lean_object*); +lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_throwError___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariables(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_declareBuiltinTermElab___closed__3; lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object*, lean_object*); lean_object* l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__1(lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_termElabAttribute___closed__4; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_List_Monad; @@ -193,20 +198,24 @@ lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__3; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withDeclId___closed__1; extern lean_object* l_Lean_EnvExtension_Inhabited___rarg___closed__1; +lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_throwError___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__2; extern lean_object* l_Lean_Elab_Term_elabTerm___closed__6; +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNotation___closed__2; lean_object* l_Lean_Elab_Command_elabExport___closed__3; extern lean_object* l_Lean_Parser_mkCommandParserAttribute___closed__4; -lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_dbgTrace(lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_5__getBetterRef(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__8; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__8; lean_object* l___private_Init_Lean_Elab_Command_4__modifyGetState(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__3; lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_9__mkTermState___boxed(lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__5; +lean_object* l_Lean_Elab_Command_throwUnexpectedSyntax___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_mkHashMap___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__2(lean_object*); lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Array_shrink___main___rarg(lean_object*, lean_object*); @@ -214,8 +223,10 @@ lean_object* l_Lean_Elab_Command_withFreshMacroScope(lean_object*); lean_object* l_Lean_Elab_mkMessageCore(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariables___closed__2; lean_object* l_Lean_Elab_Command_elabVariables___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Command_7__addMacroStack___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__5; lean_object* l_Lean_KernelException_toMessageData(lean_object*, lean_object*); +lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_throwError___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNotation___closed__3; lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); @@ -223,70 +234,75 @@ uint8_t l_PersistentHashMap_contains___at_Lean_Elab_Command_addBuiltinCommandEla lean_object* l_Lean_Elab_Command_elabCommand___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__3; lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel(lean_object*); -lean_object* l_Lean_Elab_Command_elabSection___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabUniverses___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariables___closed__1; -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__4; lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__3; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_15__checkAnonymousScope___boxed(lean_object*); uint8_t l_HashMapImp_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__2(lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Meta_ExprDefEq_17__checkTypesAndAssign___closed__7; lean_object* l_Lean_Elab_Command_elabOpenRenaming(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_resolveNamespace(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_addBuiltinCommandElab___closed__1; lean_object* l_Lean_Elab_Command_mkState(lean_object*, lean_object*, lean_object*); +uint8_t l___private_Init_Lean_Elab_Command_15__checkAnonymousScope(lean_object*); +lean_object* l_Lean_Elab_Command_throwUnexpectedSyntax(lean_object*); extern lean_object* l_Lean_Message_Inhabited; lean_object* l_Lean_Elab_Command_dbgTrace___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_addBuiltinCommandElab___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState; +extern lean_object* l_Lean_Elab_Term_throwUnexpectedSyntax___rarg___closed__3; size_t l_Lean_Name_hash(lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_11__toCommandResult___boxed(lean_object*, lean_object*); extern lean_object* l_Char_HasRepr___closed__1; lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1___closed__4; lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__7(lean_object*, size_t, lean_object*); extern lean_object* l_PersistentHashMap_insertAux___main___rarg___closed__3; lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* l_Lean_Elab_Command_adaptExpander(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_6__prettyPrint___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_runTermElabM___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_PersistentArray_empty___closed__3; -lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverses(lean_object*); extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1; extern lean_object* l___regBuiltinParser_Lean_Parser_Command_antiquot___closed__2; lean_object* l_Lean_Elab_Command_elabVariables___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_11__toCommandResult___rarg___closed__1; lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenHiding___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_16__checkEndHeader___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__6; -lean_object* l___private_Init_Lean_Elab_Command_12__checkAnonymousScope___boxed(lean_object*); +lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__13(lean_object*, lean_object*, lean_object*); extern lean_object* l___regBuiltinParser_Lean_Parser_Command_antiquot___closed__1; uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__8(lean_object*, size_t, size_t, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__getVarDecls___boxed(lean_object*); lean_object* l_Lean_Elab_Command_getScopes(lean_object*, lean_object*); +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__3___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Term_3__addMacroStack___spec__1___closed__3; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverses___closed__2; +lean_object* l___private_Init_Lean_Elab_Command_6__prettyPrint(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabExport(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_builtinCommandElabTable; lean_object* l_Lean_Elab_Command_elabCheck___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__7; lean_object* l_Lean_Elab_Command_elabOpenOnly(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*); extern lean_object* l_Lean_Options_empty; extern lean_object* l_Lean_Parser_Command_variable___elambda__1___closed__2; lean_object* l_ReaderT_read___at_Lean_Elab_Command_CommandElabM_monadLog___spec__1(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_addUnivLevel___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabExport___closed__1; lean_object* l_Lean_Elab_logAt___at_Lean_Elab_Command_logUnknownDecl___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_modn(size_t, lean_object*); -lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__9___boxed(lean_object*, lean_object*); -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__7___boxed(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_SMap_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withLogging(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*); @@ -312,36 +328,33 @@ lean_object* l_Lean_Elab_Command_liftIOCore___rarg___boxed(lean_object*, lean_ob lean_object* l_Lean_Elab_Command_liftIO___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__3; lean_object* l_mkHashMapImp___rarg(lean_object*); -lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5___boxed(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_12__addScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabOpen(lean_object*); lean_object* l_Lean_Elab_Command_elabEnd(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_modifyScope___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck(lean_object*); lean_object* l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_13__checkEndHeader___boxed(lean_object*, lean_object*); uint8_t l_PersistentHashMap_containsAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__5(lean_object*, size_t, lean_object*); uint8_t l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__4(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__6; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabEnd(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1(lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__1; extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; +lean_object* l_Lean_Elab_Command_withMacroExpansion(lean_object*); lean_object* l_Lean_Elab_Command_withDeclId___closed__3; lean_object* l_Lean_ConstantInfo_type(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Command_CommandElabM_monadLog___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenOnly___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_sortDeclLevelParams(lean_object*, lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__1___closed__1; lean_object* l_Lean_Elab_Command_elabOpenHiding(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable___closed__3; extern lean_object* l_Lean_Parser_Command_notation___elambda__1___closed__2; size_t l_USize_land(size_t, size_t); -lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__6___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__2; lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__4; +extern lean_object* l_Lean_nullKind___closed__2; lean_object* l_Lean_ParametricAttribute_setParam___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_logUnknownDecl___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); @@ -352,33 +365,31 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix___closed__3; lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__9(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__4; lean_object* l___private_Init_Lean_Elab_Command_2__getState(lean_object*, lean_object*); +uint8_t l___private_Init_Lean_Elab_Command_16__checkEndHeader___main(lean_object*, lean_object*); extern lean_object* l_Lean_AttributeImpl_inhabited___closed__6; extern lean_object* l_Lean_Parser_Command_universe___elambda__1___closed__2; -lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabOpen___closed__2; lean_object* l_List_drop___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addUnivLevel___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabExport___closed__2; lean_object* l_AssocList_contains___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__4(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabReserve(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_end___elambda__1___closed__2; lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_logUnknownDecl___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_8__toCommandResult___boxed(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_8__mkTermContext___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute___closed__1; lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenOnly___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withMacroExpansion___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabOpen___closed__1; -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariables___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabExport___closed__1; extern lean_object* l_Lean_mkInitAttr___lambda__1___closed__1; +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_getScope(lean_object*, lean_object*); lean_object* l_AssocList_replace___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__15(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_9__addScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__6; -lean_object* l_Lean_Elab_Command_elabExport___boxed(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__6; @@ -387,22 +398,20 @@ lean_object* l_Lean_Elab_Command_getCurrMacroScope(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariable___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_nameToExprAux___main(lean_object*); extern lean_object* l_Lean_Parser_Command_reserve___elambda__1___closed__2; +lean_object* l___private_Init_Lean_Elab_Term_1__getBetterRef___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__2; lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* l_Lean_Elab_Command_State_inhabited___closed__2; -lean_object* l_Lean_Elab_Command_withDeclId___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabReserve___closed__3; lean_object* l_Lean_Environment_addAndCompile(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwError(lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__5; -lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState___boxed(lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__1; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__5; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__2; lean_object* l_Lean_registerTagAttribute___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2; -lean_object* l_Lean_Elab_Command_elabEnd___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__3; lean_object* l_Lean_Elab_log___at_Lean_Elab_Term_logTrace___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); @@ -410,9 +419,9 @@ uint8_t l_PersistentHashMap_containsAtAux___main___at_Lean_Parser_isValidSyntaxN lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__2; extern lean_object* l_Lean_EnvExtension_setState___closed__1; lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenSimple___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Term_throwUnexpectedSyntax___rarg___closed__6; lean_object* l_Lean_Elab_throwErrorUsingCmdPos___at_Lean_Elab_Command_resolveNamespace___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getOptionalIdent_x3f(lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls___boxed(lean_object*); lean_object* l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute___closed__2; lean_object* l_Lean_SMap_insert___at_Lean_Elab_Command_addBuiltinCommandElab___spec__6(lean_object*, lean_object*, lean_object*); @@ -426,6 +435,7 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__1; lean_object* l_Lean_Elab_Command_withNamespace___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_ref_reset(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabNotation(lean_object*, lean_object*); +lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1(lean_object*); lean_object* l_Lean_Elab_Command_logUnknownDecl___closed__1; lean_object* lean_nat_mul(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getPos(lean_object*); @@ -453,19 +463,20 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__4; lean_object* l_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute___closed__3; -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_openOnly___elambda__1___closed__2; lean_object* l_Array_toList___rarg(lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__3(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_4__modifyGetState___rarg(lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__7; lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariable___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenHiding___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, 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_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5___boxed(lean_object*, lean_object*); lean_object* l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_setEnv(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_openSimple___elambda__1___closed__2; @@ -473,45 +484,48 @@ lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1___cl lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabInitQuot___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabEnd___closed__3; lean_object* l_Lean_Elab_Command_withDeclId(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_11__toCommandResult___rarg(lean_object*, lean_object*); +lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1___boxed(lean_object*); lean_object* l_Lean_Elab_Command_mkMessageAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_variables___elambda__1___closed__2; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabExport___closed__3; lean_object* l_Lean_Elab_Command_elabReserve___boxed(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftIOCore___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_logUnknownDecl___closed__2; lean_object* l_Lean_Elab_Command_mkCommandElabAttribute(lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__10; -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1; extern lean_object* l_Lean_Message_Inhabited___closed__2; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1___closed__3; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); extern lean_object* l_Lean_MetavarContext_Inhabited___closed__1; lean_object* l_ReaderT_bind___at_Lean_Elab_Command_CommandElabM_monadLog___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_16__checkEndHeader___main___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__4(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariable___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l___private_Init_Lean_Elab_Command_16__checkEndHeader(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_asNode(lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMixfix(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNotation___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_inhabited___closed__1; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariable___spec__1(lean_object*, lean_object*, lean_object*); +uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_Lean_Elab_Command_elabInitQuot(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_elabCommand___spec__3___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_7__addMacroStack(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__2(lean_object*, lean_object*); lean_object* lean_usize_to_nat(size_t); extern lean_object* l_Lean_addClass___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable___closed__1; extern lean_object* l_Lean_AttributeImpl_inhabited___closed__5; lean_object* l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__9(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__1; lean_object* l_Lean_Elab_Command_elabOpenSimple___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__6(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__7; lean_object* l_Lean_Elab_Command_elabEnd___closed__7; lean_object* l_Lean_Elab_Command_elabOpenRenaming___boxed(lean_object*, lean_object*, lean_object*); @@ -519,33 +533,30 @@ lean_object* l_Lean_Elab_Command_elabOpenOnly___boxed(lean_object*, lean_object* lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1___closed__1; lean_object* l_Lean_Elab_Command_elabCommand___closed__3; lean_object* l_IO_ofExcept___at___private_Init_Lean_Elab_Util_6__ElabAttribute_add___spec__1(lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Command_7__addMacroStack___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkMessageAux(lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l_Lean_mkConst(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabNamespace___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__5; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__1; lean_object* l_HashMapImp_insert___at_Lean_Elab_Command_addBuiltinCommandElab___spec__11(lean_object*, lean_object*, lean_object*); +lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__6(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabNamespace___closed__1; extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__4; extern lean_object* l_Lean_initAttr; lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__2; extern lean_object* l_Lean_Parser_Command_openHiding___elambda__1___closed__2; lean_object* l_Lean_Elab_syntaxNodeKindOfAttrParam(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCommand___closed__5; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_9__mkTermState(lean_object*); lean_object* l_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_5__mkTermContext(lean_object*, lean_object*); -uint8_t l___private_Init_Lean_Elab_Command_13__checkEndHeader(lean_object*, lean_object*); -lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1___boxed(lean_object*); -lean_object* l_Lean_Elab_Command_elabInitQuot___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__2; lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation; lean_object* l___private_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg___closed__1; -lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState(lean_object*); lean_object* l_Lean_Elab_resolveNamespace(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_NameGenerator_Inhabited___closed__3; +lean_object* l___private_Init_Lean_Elab_Command_8__mkTermContext(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_addDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); @@ -1565,11 +1576,451 @@ lean_dec(x_1); return x_4; } } +lean_object* l___private_Init_Lean_Elab_Command_5__getBetterRef(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Syntax_getPos(x_1); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Term_1__getBetterRef___lambda__1___boxed), 2, 1); +lean_closure_set(x_5, 0, x_4); +x_6 = lean_ctor_get(x_2, 4); +lean_inc(x_6); +lean_dec(x_2); +x_7 = l_List_find_x3f___main___rarg(x_5, x_6); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_1); +lean_ctor_set(x_8, 1, x_3); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; +lean_dec(x_1); +x_9 = lean_ctor_get(x_7, 0); +lean_inc(x_9); +lean_dec(x_7); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_3); +return x_10; +} +} +else +{ +lean_object* x_11; +lean_dec(x_4); +lean_dec(x_2); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_1); +lean_ctor_set(x_11, 1, x_3); +return x_11; +} +} +} +lean_object* l___private_Init_Lean_Elab_Command_6__prettyPrint(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Syntax_reprint___main(x_1); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_box(0); +x_6 = lean_unsigned_to_nat(0u); +x_7 = l_Lean_Syntax_formatStxAux___main(x_5, x_6, x_1); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_7); +lean_ctor_set(x_8, 1, x_3); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_dec(x_1); +x_9 = lean_ctor_get(x_4, 0); +lean_inc(x_9); +lean_dec(x_4); +x_10 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_10, 0, x_9); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_3); +return x_11; +} +} +} +lean_object* l___private_Init_Lean_Elab_Command_6__prettyPrint___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Init_Lean_Elab_Command_6__prettyPrint(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Command_7__addMacroStack___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_5; +x_5 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_5, 0, x_1); +lean_ctor_set(x_5, 1, x_4); +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_6 = lean_ctor_get(x_2, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_2, 1); +lean_inc(x_7); +lean_dec(x_2); +x_8 = l___private_Init_Lean_Elab_Command_6__prettyPrint(x_6, x_3, x_4); +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); +x_11 = l_Lean_MessageData_ofList___closed__3; +x_12 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_12, 0, x_1); +lean_ctor_set(x_12, 1, x_11); +x_13 = l_List_foldlM___main___at___private_Init_Lean_Elab_Term_3__addMacroStack___spec__1___closed__3; +x_14 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_14, 0, x_12); +lean_ctor_set(x_14, 1, x_13); +x_15 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_15, 0, x_9); +x_16 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_15); +x_17 = lean_unsigned_to_nat(2u); +x_18 = lean_alloc_ctor(6, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +x_19 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_19, 0, x_14); +lean_ctor_set(x_19, 1, x_18); +x_1 = x_19; +x_2 = x_7; +x_4 = x_10; +goto _start; +} +} +} +lean_object* l___private_Init_Lean_Elab_Command_7__addMacroStack(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_ctor_get(x_2, 4); +lean_inc(x_4); +x_5 = l_List_isEmpty___rarg(x_4); +if (x_5 == 0) +{ +lean_object* x_6; +x_6 = l_List_foldlM___main___at___private_Init_Lean_Elab_Command_7__addMacroStack___spec__1(x_1, x_4, x_2, x_3); +lean_dec(x_2); +return x_6; +} +else +{ +lean_object* x_7; +lean_dec(x_4); +lean_dec(x_2); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_1); +lean_ctor_set(x_7, 1, x_3); +return x_7; +} +} +} +lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Command_7__addMacroStack___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_List_foldlM___main___at___private_Init_Lean_Elab_Command_7__addMacroStack___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_throwError___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Syntax_getPos(x_1); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_2, 3); +lean_inc(x_5); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_3); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_4, 0); +lean_inc(x_7); +lean_dec(x_4); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_7); +lean_ctor_set(x_8, 1, x_3); +return x_8; +} +} +} +lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3(lean_object* x_1, uint8_t 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; +x_6 = lean_ctor_get(x_4, 0); +x_7 = lean_ctor_get(x_4, 1); +x_8 = lean_ctor_get(x_4, 3); +x_9 = lean_box(0); +if (lean_obj_tag(x_3) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = l_Lean_FileMap_toPosition(x_7, x_8); +x_11 = l_String_splitAux___main___closed__1; +lean_inc(x_6); +x_12 = lean_alloc_ctor(0, 5, 1); +lean_ctor_set(x_12, 0, x_6); +lean_ctor_set(x_12, 1, x_10); +lean_ctor_set(x_12, 2, x_9); +lean_ctor_set(x_12, 3, x_11); +lean_ctor_set(x_12, 4, x_1); +lean_ctor_set_uint8(x_12, sizeof(void*)*5, x_2); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_5); +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_14 = lean_ctor_get(x_3, 0); +x_15 = l_Lean_FileMap_toPosition(x_7, x_14); +x_16 = l_String_splitAux___main___closed__1; +lean_inc(x_6); +x_17 = lean_alloc_ctor(0, 5, 1); +lean_ctor_set(x_17, 0, x_6); +lean_ctor_set(x_17, 1, x_15); +lean_ctor_set(x_17, 2, x_9); +lean_ctor_set(x_17, 3, x_16); +lean_ctor_set(x_17, 4, x_1); +lean_ctor_set_uint8(x_17, sizeof(void*)*5, x_2); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_5); +return x_18; +} +} +} +lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_throwError___spec__1(lean_object* x_1, uint8_t 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; +x_6 = l_Lean_Elab_getPos___at_Lean_Elab_Command_throwError___spec__2(x_3, x_4, x_5); +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_alloc_ctor(1, 1, 0); +lean_ctor_set(x_9, 0, x_7); +x_10 = l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3(x_1, x_2, x_9, x_4, x_8); +lean_dec(x_9); +return x_10; +} +} +lean_object* l_Lean_Elab_Command_throwError___rarg(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; uint8_t x_11; lean_object* x_12; uint8_t x_13; +lean_inc(x_3); +x_5 = l___private_Init_Lean_Elab_Command_5__getBetterRef(x_1, x_3, x_4); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +lean_inc(x_3); +x_8 = l___private_Init_Lean_Elab_Command_7__addMacroStack(x_2, x_3, x_7); +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); +x_11 = 2; +x_12 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_throwError___spec__1(x_9, x_11, x_6, x_3, x_10); +lean_dec(x_3); +lean_dec(x_6); +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_ctor_set_tag(x_12, 1); +return x_12; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_12, 0); +x_15 = lean_ctor_get(x_12, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_12); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +} +lean_object* l_Lean_Elab_Command_throwError(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_throwError___rarg), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_throwError___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_getPos___at_Lean_Elab_Command_throwError___spec__2(x_1, x_2, x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; lean_object* x_7; +x_6 = lean_unbox(x_2); +lean_dec(x_2); +x_7 = l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3(x_1, x_6, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_7; +} +} +lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_throwError___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; lean_object* x_7; +x_6 = lean_unbox(x_2); +lean_dec(x_2); +x_7 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_throwError___spec__1(x_1, x_6, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_7; +} +} +lean_object* l_Lean_Elab_Command_throwUnexpectedSyntax___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +lean_inc(x_1); +x_5 = l___private_Init_Lean_Elab_Command_6__prettyPrint(x_1, x_3, x_4); +if (lean_obj_tag(x_2) == 0) +{ +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; +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_8, 0, x_6); +x_9 = l_Lean_MessageData_ofList___closed__3; +x_10 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +x_11 = lean_unsigned_to_nat(2u); +x_12 = lean_alloc_ctor(6, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +x_13 = l_Lean_Elab_Term_throwUnexpectedSyntax___rarg___closed__3; +x_14 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_12); +x_15 = l_Lean_Elab_Command_throwError___rarg(x_1, x_14, x_3, x_7); +return x_15; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_16 = lean_ctor_get(x_5, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_5, 1); +lean_inc(x_17); +lean_dec(x_5); +x_18 = lean_ctor_get(x_2, 0); +lean_inc(x_18); +x_19 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_19, 0, x_18); +x_20 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_20, 0, x_19); +x_21 = l_Lean_Elab_Term_throwUnexpectedSyntax___rarg___closed__6; +x_22 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_20); +x_23 = l_Lean_Elab_Term_throwUnexpectedSyntax___rarg___closed__8; +x_24 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); +x_25 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_25, 0, x_16); +x_26 = l_Lean_MessageData_ofList___closed__3; +x_27 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +x_28 = lean_unsigned_to_nat(2u); +x_29 = lean_alloc_ctor(6, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_27); +x_30 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_30, 0, x_24); +lean_ctor_set(x_30, 1, x_29); +x_31 = l_Lean_Elab_Command_throwError___rarg(x_1, x_30, x_3, x_17); +return x_31; +} +} +} +lean_object* l_Lean_Elab_Command_throwUnexpectedSyntax(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_throwUnexpectedSyntax___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_throwUnexpectedSyntax___rarg___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_throwUnexpectedSyntax___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_2); +return x_5; +} +} lean_object* l_Lean_Elab_Command_getCurrMacroScope(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; -x_3 = lean_ctor_get(x_1, 4); +x_3 = lean_ctor_get(x_1, 5); lean_inc(x_3); x_4 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_4, 0, x_3); @@ -1620,170 +2071,177 @@ x_13 = !lean_is_exclusive(x_2); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; -x_14 = lean_ctor_get(x_2, 4); +x_14 = lean_ctor_get(x_2, 5); lean_dec(x_14); -lean_ctor_set(x_2, 4, x_8); +lean_ctor_set(x_2, 5, x_8); x_15 = lean_apply_2(x_1, x_2, x_12); return x_15; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_16 = lean_ctor_get(x_2, 0); x_17 = lean_ctor_get(x_2, 1); x_18 = lean_ctor_get(x_2, 2); x_19 = lean_ctor_get(x_2, 3); +x_20 = lean_ctor_get(x_2, 4); +lean_inc(x_20); lean_inc(x_19); lean_inc(x_18); lean_inc(x_17); lean_inc(x_16); lean_dec(x_2); -x_20 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_20, 0, x_16); -lean_ctor_set(x_20, 1, x_17); -lean_ctor_set(x_20, 2, x_18); -lean_ctor_set(x_20, 3, x_19); -lean_ctor_set(x_20, 4, x_8); -x_21 = lean_apply_2(x_1, x_20, x_12); -return x_21; +x_21 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_21, 0, x_16); +lean_ctor_set(x_21, 1, x_17); +lean_ctor_set(x_21, 2, x_18); +lean_ctor_set(x_21, 3, x_19); +lean_ctor_set(x_21, 4, x_20); +lean_ctor_set(x_21, 5, x_8); +x_22 = lean_apply_2(x_1, x_21, x_12); +return x_22; } } else { -uint8_t x_22; +uint8_t x_23; lean_dec(x_8); lean_dec(x_2); lean_dec(x_1); -x_22 = !lean_is_exclusive(x_11); -if (x_22 == 0) +x_23 = !lean_is_exclusive(x_11); +if (x_23 == 0) { return x_11; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_11, 0); -x_24 = lean_ctor_get(x_11, 1); +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_11, 0); +x_25 = lean_ctor_get(x_11, 1); +lean_inc(x_25); lean_inc(x_24); -lean_inc(x_23); lean_dec(x_11); -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; +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +return x_26; } } } else { -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_26 = lean_ctor_get(x_5, 0); -x_27 = lean_ctor_get(x_5, 1); -x_28 = lean_ctor_get(x_5, 2); -x_29 = lean_ctor_get(x_5, 3); +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_27 = lean_ctor_get(x_5, 0); +x_28 = lean_ctor_get(x_5, 1); +x_29 = lean_ctor_get(x_5, 2); +x_30 = lean_ctor_get(x_5, 3); +lean_inc(x_30); lean_inc(x_29); lean_inc(x_28); lean_inc(x_27); -lean_inc(x_26); lean_dec(x_5); -x_30 = lean_unsigned_to_nat(1u); -x_31 = lean_nat_add(x_29, x_30); -x_32 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_32, 0, x_26); -lean_ctor_set(x_32, 1, x_27); -lean_ctor_set(x_32, 2, x_28); -lean_ctor_set(x_32, 3, x_31); +x_31 = lean_unsigned_to_nat(1u); +x_32 = lean_nat_add(x_30, x_31); +x_33 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_33, 0, x_27); +lean_ctor_set(x_33, 1, x_28); +lean_ctor_set(x_33, 2, x_29); +lean_ctor_set(x_33, 3, x_32); lean_inc(x_2); -x_33 = l___private_Init_Lean_Elab_Command_3__setState(x_32, x_2, x_6); -if (lean_obj_tag(x_33) == 0) +x_34 = l___private_Init_Lean_Elab_Command_3__setState(x_33, x_2, x_6); +if (lean_obj_tag(x_34) == 0) { -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = lean_ctor_get(x_2, 0); +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_35 = lean_ctor_get(x_34, 1); lean_inc(x_35); -x_36 = lean_ctor_get(x_2, 1); +lean_dec(x_34); +x_36 = lean_ctor_get(x_2, 0); lean_inc(x_36); -x_37 = lean_ctor_get(x_2, 2); +x_37 = lean_ctor_get(x_2, 1); lean_inc(x_37); -x_38 = lean_ctor_get(x_2, 3); +x_38 = lean_ctor_get(x_2, 2); lean_inc(x_38); +x_39 = lean_ctor_get(x_2, 3); +lean_inc(x_39); +x_40 = lean_ctor_get(x_2, 4); +lean_inc(x_40); if (lean_is_exclusive(x_2)) { lean_ctor_release(x_2, 0); lean_ctor_release(x_2, 1); lean_ctor_release(x_2, 2); lean_ctor_release(x_2, 3); lean_ctor_release(x_2, 4); - x_39 = x_2; + lean_ctor_release(x_2, 5); + x_41 = x_2; } else { lean_dec_ref(x_2); - x_39 = lean_box(0); + x_41 = lean_box(0); } -if (lean_is_scalar(x_39)) { - x_40 = lean_alloc_ctor(0, 5, 0); +if (lean_is_scalar(x_41)) { + x_42 = lean_alloc_ctor(0, 6, 0); } else { - x_40 = x_39; + x_42 = x_41; } -lean_ctor_set(x_40, 0, x_35); -lean_ctor_set(x_40, 1, x_36); -lean_ctor_set(x_40, 2, x_37); -lean_ctor_set(x_40, 3, x_38); -lean_ctor_set(x_40, 4, x_29); -x_41 = lean_apply_2(x_1, x_40, x_34); -return x_41; +lean_ctor_set(x_42, 0, x_36); +lean_ctor_set(x_42, 1, x_37); +lean_ctor_set(x_42, 2, x_38); +lean_ctor_set(x_42, 3, x_39); +lean_ctor_set(x_42, 4, x_40); +lean_ctor_set(x_42, 5, x_30); +x_43 = lean_apply_2(x_1, x_42, x_35); +return x_43; } else { -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; -lean_dec(x_29); +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +lean_dec(x_30); lean_dec(x_2); lean_dec(x_1); -x_42 = lean_ctor_get(x_33, 0); -lean_inc(x_42); -x_43 = lean_ctor_get(x_33, 1); -lean_inc(x_43); -if (lean_is_exclusive(x_33)) { - lean_ctor_release(x_33, 0); - lean_ctor_release(x_33, 1); - x_44 = x_33; +x_44 = lean_ctor_get(x_34, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_34, 1); +lean_inc(x_45); +if (lean_is_exclusive(x_34)) { + lean_ctor_release(x_34, 0); + lean_ctor_release(x_34, 1); + x_46 = x_34; } else { - lean_dec_ref(x_33); - x_44 = lean_box(0); + lean_dec_ref(x_34); + x_46 = lean_box(0); } -if (lean_is_scalar(x_44)) { - x_45 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_46)) { + x_47 = lean_alloc_ctor(1, 2, 0); } else { - x_45 = x_44; + x_47 = x_46; } -lean_ctor_set(x_45, 0, x_42); -lean_ctor_set(x_45, 1, x_43); -return x_45; +lean_ctor_set(x_47, 0, x_44); +lean_ctor_set(x_47, 1, x_45); +return x_47; } } } else { -uint8_t x_46; +uint8_t x_48; lean_dec(x_2); lean_dec(x_1); -x_46 = !lean_is_exclusive(x_4); -if (x_46 == 0) +x_48 = !lean_is_exclusive(x_4); +if (x_48 == 0) { return x_4; } else { -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_4, 0); -x_48 = lean_ctor_get(x_4, 1); -lean_inc(x_48); -lean_inc(x_47); +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_4, 0); +x_50 = lean_ctor_get(x_4, 1); +lean_inc(x_50); +lean_inc(x_49); lean_dec(x_4); -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; +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; } } } @@ -3883,126 +4341,7 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } -lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_elabCommand___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Syntax_getPos(x_1); -if (lean_obj_tag(x_4) == 0) -{ -lean_object* x_5; lean_object* x_6; -x_5 = lean_ctor_get(x_2, 3); -lean_inc(x_5); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_5); -lean_ctor_set(x_6, 1, x_3); -return x_6; -} -else -{ -lean_object* x_7; lean_object* x_8; -x_7 = lean_ctor_get(x_4, 0); -lean_inc(x_7); -lean_dec(x_4); -x_8 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_8, 0, x_7); -lean_ctor_set(x_8, 1, x_3); -return x_8; -} -} -} -lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4(lean_object* x_1, uint8_t 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; -x_6 = lean_ctor_get(x_4, 0); -x_7 = lean_ctor_get(x_4, 1); -x_8 = lean_ctor_get(x_4, 3); -x_9 = lean_box(0); -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_10 = l_Lean_FileMap_toPosition(x_7, x_8); -x_11 = l_String_splitAux___main___closed__1; -lean_inc(x_6); -x_12 = lean_alloc_ctor(0, 5, 1); -lean_ctor_set(x_12, 0, x_6); -lean_ctor_set(x_12, 1, x_10); -lean_ctor_set(x_12, 2, x_9); -lean_ctor_set(x_12, 3, x_11); -lean_ctor_set(x_12, 4, x_1); -lean_ctor_set_uint8(x_12, sizeof(void*)*5, x_2); -x_13 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_13, 0, x_12); -lean_ctor_set(x_13, 1, x_5); -return x_13; -} -else -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_14 = lean_ctor_get(x_3, 0); -x_15 = l_Lean_FileMap_toPosition(x_7, x_14); -x_16 = l_String_splitAux___main___closed__1; -lean_inc(x_6); -x_17 = lean_alloc_ctor(0, 5, 1); -lean_ctor_set(x_17, 0, x_6); -lean_ctor_set(x_17, 1, x_15); -lean_ctor_set(x_17, 2, x_9); -lean_ctor_set(x_17, 3, x_16); -lean_ctor_set(x_17, 4, x_1); -lean_ctor_set_uint8(x_17, sizeof(void*)*5, x_2); -x_18 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_5); -return x_18; -} -} -} -lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(lean_object* x_1, uint8_t 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; -x_6 = l_Lean_Elab_getPos___at_Lean_Elab_Command_elabCommand___spec__3(x_3, x_4, x_5); -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_alloc_ctor(1, 1, 0); -lean_ctor_set(x_9, 0, x_7); -x_10 = l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4(x_1, x_2, x_9, x_4, x_8); -lean_dec(x_9); -return x_10; -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(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; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -} -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__4(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; @@ -4044,7 +4383,7 @@ return x_15; } } } -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__7(lean_object* x_1, size_t x_2, lean_object* x_3) { +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__3(lean_object* x_1, size_t x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 0) @@ -4115,14 +4454,14 @@ x_21 = lean_ctor_get(x_1, 1); lean_inc(x_21); lean_dec(x_1); x_22 = lean_unsigned_to_nat(0u); -x_23 = l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__8(x_20, x_21, lean_box(0), x_22, x_3); +x_23 = l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__4(x_20, x_21, lean_box(0), x_22, x_3); lean_dec(x_21); lean_dec(x_20); return x_23; } } } -lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; size_t x_4; lean_object* x_5; @@ -4130,11 +4469,11 @@ x_3 = lean_ctor_get(x_1, 0); lean_inc(x_3); lean_dec(x_1); x_4 = l_Lean_Name_hash(x_2); -x_5 = l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__7(x_3, x_4, x_2); +x_5 = l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__3(x_3, x_4, x_2); return x_5; } } -lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__10(lean_object* x_1, lean_object* x_2) { +lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__6(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -4166,7 +4505,7 @@ return x_9; } } } -lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__9(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; lean_object* x_8; @@ -4176,12 +4515,12 @@ x_5 = l_Lean_Name_hash(x_2); x_6 = lean_usize_modn(x_5, x_4); lean_dec(x_4); x_7 = lean_array_uget(x_3, x_6); -x_8 = l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__10(x_2, x_7); +x_8 = l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__6(x_2, x_7); lean_dec(x_7); return x_8; } } -lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__1(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; @@ -4194,11 +4533,11 @@ lean_inc(x_4); x_5 = lean_ctor_get(x_1, 1); lean_inc(x_5); lean_dec(x_1); -x_6 = l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__6(x_5, x_2); +x_6 = l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__2(x_5, x_2); if (lean_obj_tag(x_6) == 0) { lean_object* x_7; -x_7 = l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__9(x_4, x_2); +x_7 = l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5(x_4, x_2); lean_dec(x_4); return x_7; } @@ -4214,7 +4553,7 @@ lean_object* x_8; lean_object* x_9; x_8 = lean_ctor_get(x_1, 0); lean_inc(x_8); lean_dec(x_1); -x_9 = l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__9(x_8, x_2); +x_9 = l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5(x_8, x_2); lean_dec(x_8); return x_9; } @@ -4306,7 +4645,7 @@ lean_dec(x_9); x_12 = lean_ctor_get(x_11, 1); lean_inc(x_12); lean_dec(x_11); -x_13 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5(x_12, x_4); +x_13 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__1(x_12, x_4); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; @@ -4324,9 +4663,7 @@ x_20 = l_Lean_Elab_Term_elabTerm___closed__6; x_21 = lean_alloc_ctor(8, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); -x_22 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_21, x_2, x_7); -lean_dec(x_2); -lean_dec(x_1); +x_22 = l_Lean_Elab_Command_throwError___rarg(x_1, x_21, x_2, x_7); return x_22; } else @@ -4370,160 +4707,246 @@ else { lean_object* x_29; lean_object* x_30; x_29 = l_Lean_Elab_Command_elabCommand___closed__3; -x_30 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_29, x_2, x_3); -lean_dec(x_2); -lean_dec(x_1); +x_30 = l_Lean_Elab_Command_throwError___rarg(x_1, x_29, x_2, x_3); return x_30; } } } -lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_elabCommand___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_getPos___at_Lean_Elab_Command_elabCommand___spec__3(x_1, x_2, x_3); -lean_dec(x_2); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_2); -lean_dec(x_2); -x_7 = l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4(x_1, x_6, x_3, x_4, x_5); -lean_dec(x_4); -lean_dec(x_3); -return x_7; -} -} -lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_2); -lean_dec(x_2); -x_7 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_1, x_6, x_3, x_4, x_5); -lean_dec(x_4); -lean_dec(x_3); -return x_7; -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__4___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_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__8(x_1, x_2, x_3, x_4, x_5); +x_6 = l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__4(x_1, x_2, x_3, x_4, x_5); lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); return x_6; } } -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { size_t x_4; lean_object* x_5; x_4 = lean_unbox_usize(x_2); lean_dec(x_2); -x_5 = l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__7(x_1, x_4, x_3); +x_5 = l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__3(x_1, x_4, x_3); lean_dec(x_3); return x_5; } } -lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__6___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__2___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__6(x_1, x_2); +x_3 = l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__2(x_1, x_2); lean_dec(x_2); return x_3; } } -lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__10___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__6___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__10(x_1, x_2); +x_3 = l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__6(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } -lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__9___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__9(x_1, x_2); +x_3 = l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } -lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__1___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__5(x_1, x_2); +x_3 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_2); lean_dec(x_2); return x_3; } } +lean_object* l_Lean_Elab_Command_withMacroExpansion___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = !lean_is_exclusive(x_3); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_3, 4); +x_7 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_7, 0, x_1); +lean_ctor_set(x_7, 1, x_6); +lean_ctor_set(x_3, 4, x_7); +x_8 = lean_apply_2(x_2, x_3, x_4); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_9 = lean_ctor_get(x_3, 0); +x_10 = lean_ctor_get(x_3, 1); +x_11 = lean_ctor_get(x_3, 2); +x_12 = lean_ctor_get(x_3, 3); +x_13 = lean_ctor_get(x_3, 4); +x_14 = lean_ctor_get(x_3, 5); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_3); +x_15 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_15, 0, x_1); +lean_ctor_set(x_15, 1, x_13); +x_16 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_16, 0, x_9); +lean_ctor_set(x_16, 1, x_10); +lean_ctor_set(x_16, 2, x_11); +lean_ctor_set(x_16, 3, x_12); +lean_ctor_set(x_16, 4, x_15); +lean_ctor_set(x_16, 5, x_14); +x_17 = lean_apply_2(x_2, x_16, x_4); +return x_17; +} +} +} +lean_object* l_Lean_Elab_Command_withMacroExpansion(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_withMacroExpansion___rarg), 4, 0); +return x_2; +} +} lean_object* l_Lean_Elab_Command_adaptExpander(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; -lean_inc(x_3); -x_5 = lean_apply_3(x_1, x_2, x_3, x_4); -if (lean_obj_tag(x_5) == 0) +uint8_t x_5; +x_5 = !lean_is_exclusive(x_3); +if (x_5 == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_6 = lean_ctor_get(x_5, 0); -lean_inc(x_6); -x_7 = lean_ctor_get(x_5, 1); -lean_inc(x_7); -lean_dec(x_5); -x_8 = l_Lean_Elab_Command_elabCommand(x_6, x_3, x_7); +x_6 = lean_ctor_get(x_3, 4); +lean_inc(x_2); +x_7 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_7, 0, x_2); +lean_ctor_set(x_7, 1, x_6); +lean_ctor_set(x_3, 4, x_7); +lean_inc(x_3); +x_8 = lean_apply_3(x_1, x_2, x_3, x_4); +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); +x_11 = l_Lean_Elab_Command_elabCommand(x_9, x_3, x_10); +return x_11; +} +else +{ +uint8_t x_12; +lean_dec(x_3); +x_12 = !lean_is_exclusive(x_8); +if (x_12 == 0) +{ return x_8; } else { -uint8_t x_9; -lean_dec(x_3); -x_9 = !lean_is_exclusive(x_5); -if (x_9 == 0) -{ -return x_5; +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_8, 0); +x_14 = lean_ctor_get(x_8, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_8); +x_15 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_15, 0, x_13); +lean_ctor_set(x_15, 1, x_14); +return x_15; +} +} } else { -lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_10 = lean_ctor_get(x_5, 0); -x_11 = lean_ctor_get(x_5, 1); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_5); -x_12 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_12, 0, x_10); -lean_ctor_set(x_12, 1, x_11); -return x_12; +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_16 = lean_ctor_get(x_3, 0); +x_17 = lean_ctor_get(x_3, 1); +x_18 = lean_ctor_get(x_3, 2); +x_19 = lean_ctor_get(x_3, 3); +x_20 = lean_ctor_get(x_3, 4); +x_21 = lean_ctor_get(x_3, 5); +lean_inc(x_21); +lean_inc(x_20); +lean_inc(x_19); +lean_inc(x_18); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_3); +lean_inc(x_2); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_2); +lean_ctor_set(x_22, 1, x_20); +x_23 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_23, 0, x_16); +lean_ctor_set(x_23, 1, x_17); +lean_ctor_set(x_23, 2, x_18); +lean_ctor_set(x_23, 3, x_19); +lean_ctor_set(x_23, 4, x_22); +lean_ctor_set(x_23, 5, x_21); +lean_inc(x_23); +x_24 = lean_apply_3(x_1, x_2, x_23, x_4); +if (lean_obj_tag(x_24) == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +x_27 = l_Lean_Elab_Command_elabCommand(x_25, x_23, x_26); +return x_27; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +lean_dec(x_23); +x_28 = lean_ctor_get(x_24, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_24, 1); +lean_inc(x_29); +if (lean_is_exclusive(x_24)) { + lean_ctor_release(x_24, 0); + lean_ctor_release(x_24, 1); + x_30 = x_24; +} else { + lean_dec_ref(x_24); + x_30 = lean_box(0); +} +if (lean_is_scalar(x_30)) { + x_31 = lean_alloc_ctor(1, 2, 0); +} else { + x_31 = x_30; +} +lean_ctor_set(x_31, 0, x_28); +lean_ctor_set(x_31, 1, x_29); +return x_31; } } } } -lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(lean_object* x_1) { +lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) @@ -4543,12 +4966,12 @@ return x_5; } } } -lean_object* l___private_Init_Lean_Elab_Command_5__mkTermContext(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Init_Lean_Elab_Command_8__mkTermContext(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; x_3 = lean_ctor_get(x_2, 2); -x_4 = l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(x_3); +x_4 = l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1(x_3); x_5 = lean_ctor_get(x_4, 2); lean_inc(x_5); x_6 = lean_ctor_get(x_4, 3); @@ -4580,7 +5003,8 @@ x_16 = lean_ctor_get(x_1, 0); x_17 = lean_ctor_get(x_1, 1); x_18 = lean_ctor_get(x_1, 3); x_19 = lean_ctor_get(x_1, 4); -x_20 = lean_box(0); +x_20 = lean_ctor_get(x_1, 5); +lean_inc(x_20); lean_inc(x_19); lean_inc(x_18); lean_inc(x_17); @@ -4593,32 +5017,32 @@ lean_ctor_set(x_21, 3, x_18); lean_ctor_set(x_21, 4, x_6); lean_ctor_set(x_21, 5, x_8); lean_ctor_set(x_21, 6, x_7); -lean_ctor_set(x_21, 7, x_20); -lean_ctor_set(x_21, 8, x_19); +lean_ctor_set(x_21, 7, x_19); +lean_ctor_set(x_21, 8, x_20); lean_ctor_set_uint8(x_21, sizeof(void*)*9, x_9); return x_21; } } -lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1___boxed(lean_object* x_1) { +lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(x_1); +x_2 = l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1(x_1); lean_dec(x_1); return x_2; } } -lean_object* l___private_Init_Lean_Elab_Command_5__mkTermContext___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Init_Lean_Elab_Command_8__mkTermContext___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_1, x_2); +x_3 = l___private_Init_Lean_Elab_Command_8__mkTermContext(x_1, x_2); lean_dec(x_2); lean_dec(x_1); return x_3; } } -lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState(lean_object* x_1) { +lean_object* l___private_Init_Lean_Elab_Command_9__mkTermState(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; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; @@ -4652,37 +5076,37 @@ lean_ctor_set(x_13, 5, x_4); return x_13; } } -lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState___boxed(lean_object* x_1) { +lean_object* l___private_Init_Lean_Elab_Command_9__mkTermState___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_1); +x_2 = l___private_Init_Lean_Elab_Command_9__mkTermState(x_1); lean_dec(x_1); return x_2; } } -lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls(lean_object* x_1) { +lean_object* l___private_Init_Lean_Elab_Command_10__getVarDecls(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; x_2 = lean_ctor_get(x_1, 2); -x_3 = l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(x_2); +x_3 = l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1(x_2); x_4 = lean_ctor_get(x_3, 6); lean_inc(x_4); lean_dec(x_3); return x_4; } } -lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls___boxed(lean_object* x_1) { +lean_object* l___private_Init_Lean_Elab_Command_10__getVarDecls___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_1); +x_2 = l___private_Init_Lean_Elab_Command_10__getVarDecls(x_1); lean_dec(x_1); return x_2; } } -lean_object* _init_l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg___closed__1() { +lean_object* _init_l___private_Init_Lean_Elab_Command_11__toCommandResult___rarg___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -4694,7 +5118,7 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Init_Lean_Elab_Command_11__toCommandResult___rarg(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -4908,26 +5332,26 @@ else lean_object* x_51; lean_object* x_52; lean_dec(x_2); lean_dec(x_1); -x_51 = l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg___closed__1; +x_51 = l___private_Init_Lean_Elab_Command_11__toCommandResult___rarg___closed__1; x_52 = l_unreachable_x21___rarg(x_51); return x_52; } } } } -lean_object* l___private_Init_Lean_Elab_Command_8__toCommandResult(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Init_Lean_Elab_Command_11__toCommandResult(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg), 2, 0); +x_3 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Command_11__toCommandResult___rarg), 2, 0); return x_3; } } -lean_object* l___private_Init_Lean_Elab_Command_8__toCommandResult___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Init_Lean_Elab_Command_11__toCommandResult___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l___private_Init_Lean_Elab_Command_8__toCommandResult(x_1, x_2); +x_3 = l___private_Init_Lean_Elab_Command_11__toCommandResult(x_1, x_2); lean_dec(x_2); return x_3; } @@ -4972,9 +5396,9 @@ lean_inc(x_5); x_6 = lean_ctor_get(x_4, 1); lean_inc(x_6); lean_dec(x_4); -x_7 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_5); -x_8 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_5); -x_9 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_5); +x_7 = l___private_Init_Lean_Elab_Command_10__getVarDecls(x_5); +x_8 = l___private_Init_Lean_Elab_Command_8__mkTermContext(x_2, x_5); +x_9 = l___private_Init_Lean_Elab_Command_9__mkTermState(x_5); lean_dec(x_5); x_10 = l_Lean_Elab_Term_elabBinders___rarg(x_7, x_1, x_8, x_9); lean_dec(x_7); @@ -6026,7 +6450,7 @@ x_5 = lean_ctor_get(x_3, 0); x_6 = lean_ctor_get(x_5, 2); lean_inc(x_6); lean_dec(x_5); -x_7 = l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(x_6); +x_7 = l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1(x_6); lean_dec(x_6); lean_ctor_set(x_3, 0, x_7); return x_3; @@ -6042,7 +6466,7 @@ lean_dec(x_3); x_10 = lean_ctor_get(x_8, 2); lean_inc(x_10); lean_dec(x_8); -x_11 = l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(x_10); +x_11 = l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1(x_10); lean_dec(x_10); x_12 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_12, 0, x_11); @@ -6194,7 +6618,7 @@ return x_14; } } } -lean_object* l___private_Init_Lean_Elab_Command_9__addScope(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Init_Lean_Elab_Command_12__addScope(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; @@ -6216,7 +6640,7 @@ x_10 = lean_ctor_get(x_7, 0); x_11 = lean_ctor_get(x_7, 2); lean_inc(x_3); x_12 = l_Lean_Environment_registerNamespace___main(x_10, x_3); -x_13 = l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(x_11); +x_13 = l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1(x_11); x_14 = !lean_is_exclusive(x_13); if (x_14 == 0) { @@ -6374,7 +6798,7 @@ lean_inc(x_45); lean_dec(x_7); lean_inc(x_3); x_49 = l_Lean_Environment_registerNamespace___main(x_45, x_3); -x_50 = l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(x_47); +x_50 = l_List_head_x21___at___private_Init_Lean_Elab_Command_8__mkTermContext___spec__1(x_47); x_51 = lean_ctor_get(x_50, 2); lean_inc(x_51); x_52 = lean_ctor_get(x_50, 4); @@ -6494,7 +6918,7 @@ return x_71; } } } -lean_object* _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1() { +lean_object* _init_l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__1() { _start: { lean_object* x_1; @@ -6502,27 +6926,27 @@ x_1 = lean_mk_string("invalid scope"); return x_1; } } -lean_object* _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2() { +lean_object* _init_l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1; +x_1 = l___private_Init_Lean_Elab_Command_13__addScopes___main___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_Init_Lean_Elab_Command_10__addScopes___main___closed__3() { +lean_object* _init_l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__3() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2; +x_1 = l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__2; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes___main(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { switch (lean_obj_tag(x_4)) { @@ -6531,6 +6955,7 @@ case 0: lean_object* x_7; lean_object* x_8; lean_dec(x_5); lean_dec(x_2); +lean_dec(x_1); x_7 = lean_box(0); x_8 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_8, 0, x_7); @@ -6547,7 +6972,7 @@ lean_inc(x_10); lean_dec(x_4); lean_inc(x_5); lean_inc(x_2); -x_11 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_2, x_3, x_9, x_5, x_6); +x_11 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_1, x_2, x_3, x_9, x_5, x_6); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; @@ -6566,7 +6991,7 @@ lean_inc(x_14); x_15 = lean_ctor_get(x_13, 1); lean_inc(x_15); lean_dec(x_13); -x_16 = l___private_Init_Lean_Elab_Command_9__addScope(x_2, x_10, x_14, x_5, x_15); +x_16 = l___private_Init_Lean_Elab_Command_12__addScope(x_2, x_10, x_14, x_5, x_15); return x_16; } else @@ -6582,7 +7007,7 @@ lean_inc(x_10); x_20 = lean_name_mk_string(x_19, x_10); x_21 = l_Lean_Name_append___main(x_17, x_20); lean_dec(x_17); -x_22 = l___private_Init_Lean_Elab_Command_9__addScope(x_2, x_10, x_21, x_5, x_18); +x_22 = l___private_Init_Lean_Elab_Command_12__addScope(x_2, x_10, x_21, x_5, x_18); return x_22; } } @@ -6643,86 +7068,104 @@ default: lean_object* x_31; lean_object* x_32; lean_dec(x_4); lean_dec(x_2); -x_31 = l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3; -x_32 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_31, x_5, x_6); -lean_dec(x_5); +x_31 = l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__3; +x_32 = l_Lean_Elab_Command_throwError___rarg(x_1, x_31, x_5, x_6); return x_32; } } } } -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___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___private_Init_Lean_Elab_Command_13__addScopes___main___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: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_3); lean_dec(x_3); -x_8 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_2, x_7, x_4, x_5, x_6); -lean_dec(x_1); +x_8 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_1, x_2, x_7, x_4, x_5, x_6); return x_8; } } -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; -x_7 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_2, x_3, x_4, x_5, x_6); +x_7 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___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___private_Init_Lean_Elab_Command_13__addScopes___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: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_3); lean_dec(x_3); -x_8 = l___private_Init_Lean_Elab_Command_10__addScopes(x_1, x_2, x_7, x_4, x_5, x_6); -lean_dec(x_1); +x_8 = l___private_Init_Lean_Elab_Command_13__addScopes(x_1, x_2, x_7, x_4, x_5, x_6); return x_8; } } -lean_object* l___private_Init_Lean_Elab_Command_11__addNamespace(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l___private_Init_Lean_Elab_Command_14__addNamespace(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; lean_object* x_7; x_5 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; x_6 = 1; -x_7 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_5, x_6, x_2, x_3, x_4); +x_7 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_1, x_5, x_6, x_2, x_3, x_4); return x_7; } } -lean_object* l___private_Init_Lean_Elab_Command_11__addNamespace___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* _init_l_Lean_Elab_Command_elabNamespace___closed__1() { _start: { -lean_object* x_5; -x_5 = l___private_Init_Lean_Elab_Command_11__addNamespace(x_1, x_2, x_3, x_4); -lean_dec(x_1); -return x_5; +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; } } lean_object* l_Lean_Elab_Command_elabNamespace(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; uint8_t x_10; lean_object* x_11; -x_4 = lean_ctor_get(x_1, 1); -x_5 = l_Lean_stxInh; -x_6 = lean_unsigned_to_nat(1u); -x_7 = lean_array_get(x_5, x_4, x_6); -x_8 = l_Lean_Syntax_getId(x_7); -lean_dec(x_7); -x_9 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; -x_10 = 1; -x_11 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_9, x_10, x_8, x_2, x_3); -return x_11; -} -} -lean_object* l_Lean_Elab_Command_elabNamespace___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: +lean_object* x_4; uint8_t x_5; +x_4 = l_Lean_Parser_Command_namespace___elambda__1___closed__2; +lean_inc(x_1); +x_5 = l_Lean_Syntax_isOfKind(x_1, x_4); +if (x_5 == 0) { -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabNamespace(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; +lean_object* x_6; lean_object* x_7; +x_6 = l_Lean_Elab_Command_elabNamespace___closed__1; +x_7 = l_Lean_Elab_Command_throwUnexpectedSyntax___rarg(x_1, x_6, x_2, x_3); +return x_7; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = l_Lean_Syntax_getArgs(x_1); +x_9 = lean_array_get_size(x_8); +lean_dec(x_8); +x_10 = lean_unsigned_to_nat(2u); +x_11 = lean_nat_dec_eq(x_9, x_10); +lean_dec(x_9); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; +x_12 = l_Lean_Elab_Command_elabNamespace___closed__1; +x_13 = l_Lean_Elab_Command_throwUnexpectedSyntax___rarg(x_1, x_12, x_2, x_3); +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; +x_14 = lean_unsigned_to_nat(1u); +x_15 = l_Lean_Syntax_getArg(x_1, x_14); +x_16 = l_Lean_Syntax_getId(x_15); +lean_dec(x_15); +x_17 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; +x_18 = 1; +x_19 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_1, x_17, x_18, x_16, x_2, x_3); +return x_19; +} +} } } lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1() { @@ -6747,7 +7190,7 @@ lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___c _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabNamespace___boxed), 3, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabNamespace), 3, 0); return x_1; } } @@ -6762,78 +7205,159 @@ x_5 = l_Lean_Elab_Command_addBuiltinCommandElab(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* _init_l_Lean_Elab_Command_elabSection___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_section___elambda__1___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} lean_object* l_Lean_Elab_Command_elabSection(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 = lean_ctor_get(x_1, 1); -x_5 = l_Lean_stxInh; -x_6 = lean_unsigned_to_nat(1u); -x_7 = lean_array_get(x_5, x_4, x_6); -x_8 = l_Lean_Syntax_getOptionalIdent_x3f(x_7); -lean_dec(x_7); -if (lean_obj_tag(x_8) == 0) +lean_object* x_4; uint8_t x_5; +x_4 = l_Lean_Parser_Command_section___elambda__1___closed__2; +lean_inc(x_1); +x_5 = l_Lean_Syntax_isOfKind(x_1, x_4); +if (x_5 == 0) { -lean_object* x_9; -lean_inc(x_2); -x_9 = l_Lean_Elab_Command_getCurrNamespace(x_2, x_3); -if (lean_obj_tag(x_9) == 0) -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 1); -lean_inc(x_11); -lean_dec(x_9); -x_12 = l_Lean_Parser_Command_section___elambda__1___closed__1; -x_13 = l_String_splitAux___main___closed__1; -x_14 = l___private_Init_Lean_Elab_Command_9__addScope(x_12, x_13, x_10, x_2, x_11); -return x_14; +lean_object* x_6; lean_object* x_7; +x_6 = l_Lean_Elab_Command_elabSection___closed__1; +x_7 = l_Lean_Elab_Command_throwUnexpectedSyntax___rarg(x_1, x_6, x_2, x_3); +return x_7; } else { -uint8_t x_15; -lean_dec(x_2); -x_15 = !lean_is_exclusive(x_9); -if (x_15 == 0) -{ -return x_9; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_9, 0); -x_17 = lean_ctor_get(x_9, 1); -lean_inc(x_17); -lean_inc(x_16); -lean_dec(x_9); -x_18 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_18, 0, x_16); -lean_ctor_set(x_18, 1, x_17); -return x_18; -} -} -} -else -{ -lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; -x_19 = lean_ctor_get(x_8, 0); -lean_inc(x_19); +lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_8 = l_Lean_Syntax_getArgs(x_1); +x_9 = lean_array_get_size(x_8); lean_dec(x_8); -x_20 = l_Lean_Parser_Command_section___elambda__1___closed__1; -x_21 = 0; -x_22 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_20, x_21, x_19, x_2, x_3); -return x_22; -} -} -} -lean_object* l_Lean_Elab_Command_elabSection___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: +x_10 = lean_unsigned_to_nat(2u); +x_11 = lean_nat_dec_eq(x_9, x_10); +lean_dec(x_9); +if (x_11 == 0) { -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabSection(x_1, x_2, x_3); +lean_object* x_12; lean_object* x_13; +x_12 = l_Lean_Elab_Command_elabSection___closed__1; +x_13 = l_Lean_Elab_Command_throwUnexpectedSyntax___rarg(x_1, x_12, x_2, x_3); +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_14 = lean_unsigned_to_nat(1u); +x_15 = l_Lean_Syntax_getArg(x_1, x_14); +x_16 = l_Lean_nullKind___closed__2; +lean_inc(x_15); +x_17 = l_Lean_Syntax_isOfKind(x_15, x_16); +if (x_17 == 0) +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_15); +x_18 = l_Lean_Elab_Command_elabSection___closed__1; +x_19 = l_Lean_Elab_Command_throwUnexpectedSyntax___rarg(x_1, x_18, x_2, x_3); +return x_19; +} +else +{ +lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_20 = l_Lean_Syntax_getArgs(x_15); +x_21 = lean_array_get_size(x_20); +lean_dec(x_20); +x_22 = lean_nat_dec_eq(x_21, x_14); +if (x_22 == 0) +{ +lean_object* x_23; uint8_t x_24; +lean_dec(x_15); +x_23 = lean_unsigned_to_nat(0u); +x_24 = lean_nat_dec_eq(x_21, x_23); +lean_dec(x_21); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = l_Lean_Elab_Command_elabSection___closed__1; +x_26 = l_Lean_Elab_Command_throwUnexpectedSyntax___rarg(x_1, x_25, x_2, x_3); +return x_26; +} +else +{ +lean_object* x_27; lean_dec(x_1); -return x_4; +lean_inc(x_2); +x_27 = l_Lean_Elab_Command_getCurrNamespace(x_2, x_3); +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_28 = lean_ctor_get(x_27, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = l_Lean_Parser_Command_section___elambda__1___closed__1; +x_31 = l_String_splitAux___main___closed__1; +x_32 = l___private_Init_Lean_Elab_Command_12__addScope(x_30, x_31, x_28, x_2, x_29); +return x_32; +} +else +{ +uint8_t x_33; +lean_dec(x_2); +x_33 = !lean_is_exclusive(x_27); +if (x_33 == 0) +{ +return x_27; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_27, 0); +x_35 = lean_ctor_get(x_27, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_27); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +} +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; +lean_dec(x_21); +x_37 = lean_unsigned_to_nat(0u); +x_38 = l_Lean_Syntax_getArg(x_15, x_37); +lean_dec(x_15); +x_39 = l_Lean_Syntax_getKind___closed__4; +lean_inc(x_38); +x_40 = l_Lean_Syntax_isOfKind(x_38, x_39); +if (x_40 == 0) +{ +lean_object* x_41; lean_object* x_42; +lean_dec(x_38); +x_41 = l_Lean_Elab_Command_elabSection___closed__1; +x_42 = l_Lean_Elab_Command_throwUnexpectedSyntax___rarg(x_1, x_41, x_2, x_3); +return x_42; +} +else +{ +lean_object* x_43; lean_object* x_44; uint8_t x_45; lean_object* x_46; +x_43 = l_Lean_Syntax_getId(x_38); +lean_dec(x_38); +x_44 = l_Lean_Parser_Command_section___elambda__1___closed__1; +x_45 = 0; +x_46 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_1, x_44, x_45, x_43, x_2, x_3); +return x_46; +} +} +} +} +} } } lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__1() { @@ -6858,7 +7382,7 @@ lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___clo _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabSection___boxed), 3, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabSection), 3, 0); return x_1; } } @@ -6933,7 +7457,7 @@ return x_14; } } } -uint8_t l___private_Init_Lean_Elab_Command_12__checkAnonymousScope(lean_object* x_1) { +uint8_t l___private_Init_Lean_Elab_Command_15__checkAnonymousScope(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) @@ -6964,17 +7488,17 @@ return x_8; } } } -lean_object* l___private_Init_Lean_Elab_Command_12__checkAnonymousScope___boxed(lean_object* x_1) { +lean_object* l___private_Init_Lean_Elab_Command_15__checkAnonymousScope___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; -x_2 = l___private_Init_Lean_Elab_Command_12__checkAnonymousScope(x_1); +x_2 = l___private_Init_Lean_Elab_Command_15__checkAnonymousScope(x_1); lean_dec(x_1); x_3 = lean_box(x_2); return x_3; } } -uint8_t l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(lean_object* x_1, lean_object* x_2) { +uint8_t l___private_Init_Lean_Elab_Command_16__checkEndHeader___main(lean_object* x_1, lean_object* x_2) { _start: { switch (lean_obj_tag(x_1)) { @@ -7024,63 +7548,36 @@ return x_13; } } } -lean_object* l___private_Init_Lean_Elab_Command_13__checkEndHeader___main___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Init_Lean_Elab_Command_16__checkEndHeader___main___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(x_1, x_2); +x_3 = l___private_Init_Lean_Elab_Command_16__checkEndHeader___main(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } -uint8_t l___private_Init_Lean_Elab_Command_13__checkEndHeader(lean_object* x_1, lean_object* x_2) { +uint8_t l___private_Init_Lean_Elab_Command_16__checkEndHeader(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; -x_3 = l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(x_1, x_2); +x_3 = l___private_Init_Lean_Elab_Command_16__checkEndHeader___main(x_1, x_2); return x_3; } } -lean_object* l___private_Init_Lean_Elab_Command_13__checkEndHeader___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Init_Lean_Elab_Command_16__checkEndHeader___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l___private_Init_Lean_Elab_Command_13__checkEndHeader(x_1, x_2); +x_3 = l___private_Init_Lean_Elab_Command_16__checkEndHeader(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1(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; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -} lean_object* _init_l_Lean_Elab_Command_elabEnd___closed__1() { _start: { @@ -7170,11 +7667,13 @@ _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); lean_inc(x_2); x_5 = l_Lean_Elab_Command_getScopes(x_2, x_3); x_6 = l_Lean_stxInh; x_7 = lean_unsigned_to_nat(1u); x_8 = lean_array_get(x_6, x_4, x_7); +lean_dec(x_4); x_9 = l_Lean_Syntax_getOptionalIdent_x3f(x_8); lean_dec(x_8); if (lean_obj_tag(x_9) == 0) @@ -7196,6 +7695,7 @@ else { uint8_t x_104; lean_dec(x_2); +lean_dec(x_1); x_104 = !lean_is_exclusive(x_5); if (x_104 == 0) { @@ -7240,6 +7740,7 @@ else uint8_t x_112; lean_dec(x_9); lean_dec(x_2); +lean_dec(x_1); x_112 = !lean_is_exclusive(x_5); if (x_112 == 0) { @@ -7303,8 +7804,7 @@ x_38 = lean_ctor_get(x_37, 1); lean_inc(x_38); lean_dec(x_37); x_39 = l_Lean_Elab_Command_elabEnd___closed__9; -x_40 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1(x_1, x_39, x_2, x_38); -lean_dec(x_2); +x_40 = l_Lean_Elab_Command_throwError___rarg(x_1, x_39, x_2, x_38); x_41 = !lean_is_exclusive(x_40); if (x_41 == 0) { @@ -7328,6 +7828,7 @@ else { uint8_t x_45; lean_dec(x_2); +lean_dec(x_1); x_45 = !lean_is_exclusive(x_37); if (x_45 == 0) { @@ -7379,8 +7880,7 @@ x_58 = lean_ctor_get(x_57, 1); lean_inc(x_58); lean_dec(x_57); x_59 = l_Lean_Elab_Command_elabEnd___closed__9; -x_60 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1(x_1, x_59, x_2, x_58); -lean_dec(x_2); +x_60 = l_Lean_Elab_Command_throwError___rarg(x_1, x_59, x_2, x_58); x_61 = lean_ctor_get(x_60, 0); lean_inc(x_61); x_62 = lean_ctor_get(x_60, 1); @@ -7406,6 +7906,7 @@ else { lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_dec(x_2); +lean_dec(x_1); x_65 = lean_ctor_get(x_57, 0); lean_inc(x_65); x_66 = lean_ctor_get(x_57, 1); @@ -7433,6 +7934,7 @@ else { uint8_t x_69; lean_dec(x_2); +lean_dec(x_1); x_69 = !lean_is_exclusive(x_29); if (x_69 == 0) { @@ -7491,6 +7993,7 @@ uint8_t x_81; lean_dec(x_11); lean_dec(x_9); lean_dec(x_2); +lean_dec(x_1); x_81 = !lean_is_exclusive(x_79); if (x_81 == 0) { @@ -7547,6 +8050,7 @@ lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_dec(x_11); lean_dec(x_9); lean_dec(x_2); +lean_dec(x_1); x_93 = lean_ctor_get(x_91, 0); lean_inc(x_93); x_94 = lean_ctor_get(x_91, 1); @@ -7577,6 +8081,7 @@ lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_2); +lean_dec(x_1); x_97 = !lean_is_exclusive(x_73); if (x_97 == 0) { @@ -7602,20 +8107,20 @@ block_25: if (lean_obj_tag(x_9) == 0) { uint8_t x_14; -x_14 = l___private_Init_Lean_Elab_Command_12__checkAnonymousScope(x_11); +x_14 = l___private_Init_Lean_Elab_Command_15__checkAnonymousScope(x_11); lean_dec(x_11); if (x_14 == 0) { lean_object* x_15; lean_object* x_16; x_15 = l_Lean_Elab_Command_elabEnd___closed__3; -x_16 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_15, x_2, x_13); -lean_dec(x_2); +x_16 = l_Lean_Elab_Command_throwError___rarg(x_1, x_15, x_2, x_13); return x_16; } else { lean_object* x_17; lean_object* x_18; lean_dec(x_2); +lean_dec(x_1); x_17 = lean_box(0); x_18 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_18, 0, x_17); @@ -7629,21 +8134,21 @@ lean_object* x_19; uint8_t x_20; x_19 = lean_ctor_get(x_9, 0); lean_inc(x_19); lean_dec(x_9); -x_20 = l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(x_19, x_11); +x_20 = l___private_Init_Lean_Elab_Command_16__checkEndHeader___main(x_19, x_11); lean_dec(x_11); lean_dec(x_19); if (x_20 == 0) { lean_object* x_21; lean_object* x_22; x_21 = l_Lean_Elab_Command_elabEnd___closed__6; -x_22 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_21, x_2, x_13); -lean_dec(x_2); +x_22 = l_Lean_Elab_Command_throwError___rarg(x_1, x_21, x_2, x_13); return x_22; } else { lean_object* x_23; lean_object* x_24; lean_dec(x_2); +lean_dec(x_1); x_23 = lean_box(0); x_24 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_24, 0, x_23); @@ -7655,25 +8160,6 @@ return x_24; } } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_Elab_Command_elabEnd___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabEnd(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabEnd___closed__1() { _start: { @@ -7696,7 +8182,7 @@ lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabEnd___closed_ _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabEnd___boxed), 3, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabEnd), 3, 0); return x_1; } } @@ -7719,7 +8205,7 @@ x_6 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; x_7 = 1; lean_inc(x_4); lean_inc(x_2); -x_8 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_6, x_7, x_2, x_4, x_5); +x_8 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_1, x_6, x_7, x_2, x_4, x_5); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; @@ -7958,19 +8444,10 @@ lean_object* l_Lean_Elab_Command_withNamespace(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_withNamespace___rarg___boxed), 5, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_withNamespace___rarg), 5, 0); return x_2; } } -lean_object* l_Lean_Elab_Command_withNamespace___rarg___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_Lean_Elab_Command_withNamespace___rarg(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_1); -return x_6; -} -} lean_object* _init_l_Lean_Elab_Command_modifyScope___closed__1() { _start: { @@ -8431,41 +8908,6 @@ return x_14; } } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg(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; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg___boxed), 4, 0); -return x_2; -} -} lean_object* _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__1() { _start: { @@ -8540,7 +8982,7 @@ x_11 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__6; x_12 = lean_alloc_ctor(8, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); -x_13 = l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg(x_1, x_12, x_3, x_4); +x_13 = l_Lean_Elab_Command_throwError___rarg(x_1, x_12, x_3, x_4); return x_13; } } @@ -8548,30 +8990,10 @@ lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel(lean_object* _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___boxed), 4, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg), 4, 0); return x_2; } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg___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_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___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_throwAlreadyDeclaredUniverseLevel___rarg(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addUnivLevel___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -9156,6 +9578,7 @@ lean_dec(x_6); if (x_8 == 0) { lean_object* x_9; +lean_dec(x_1); x_9 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addUnivLevel___spec__1(x_4, x_2, x_7); return x_9; } @@ -9163,7 +9586,6 @@ else { lean_object* x_10; x_10 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_1, x_4, x_2, x_7); -lean_dec(x_2); return x_10; } } @@ -9172,6 +9594,7 @@ else uint8_t x_11; lean_dec(x_4); lean_dec(x_2); +lean_dec(x_1); x_11 = !lean_is_exclusive(x_5); if (x_11 == 0) { @@ -9193,15 +9616,6 @@ return x_14; } } } -lean_object* l_Lean_Elab_Command_addUnivLevel___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_Command_addUnivLevel(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} lean_object* l_Lean_Elab_Command_elabUniverse(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -9211,7 +9625,6 @@ x_5 = l_Lean_stxInh; x_6 = lean_unsigned_to_nat(1u); x_7 = lean_array_get(x_5, x_4, x_6); x_8 = l_Lean_Elab_Command_addUnivLevel(x_7, x_2, x_3); -lean_dec(x_7); return x_8; } } @@ -9285,7 +9698,6 @@ lean_dec(x_4); x_10 = lean_array_fget(x_2, x_3); lean_inc(x_5); x_11 = l_Lean_Elab_Command_addUnivLevel(x_10, x_5, x_6); -lean_dec(x_10); if (lean_obj_tag(x_11) == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; @@ -9434,8 +9846,7 @@ x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = l_Lean_KernelException_toMessageData(x_9, x_11); -x_14 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_13, x_2, x_12); -lean_dec(x_2); +x_14 = l_Lean_Elab_Command_throwError___rarg(x_1, x_13, x_2, x_12); return x_14; } else @@ -9443,6 +9854,7 @@ else uint8_t x_15; lean_dec(x_9); lean_dec(x_2); +lean_dec(x_1); x_15 = !lean_is_exclusive(x_10); if (x_15 == 0) { @@ -9466,6 +9878,7 @@ return x_18; else { lean_object* x_19; lean_object* x_20; +lean_dec(x_1); x_19 = lean_ctor_get(x_8, 0); lean_inc(x_19); lean_dec(x_8); @@ -9477,6 +9890,7 @@ else { uint8_t x_21; lean_dec(x_2); +lean_dec(x_1); x_21 = !lean_is_exclusive(x_4); if (x_21 == 0) { @@ -9498,15 +9912,6 @@ return x_24; } } } -lean_object* l_Lean_Elab_Command_elabInitQuot___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabInitQuot(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabInitQuot___closed__1() { _start: { @@ -9529,7 +9934,7 @@ lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabInitQuot___cl _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabInitQuot___boxed), 3, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabInitQuot), 3, 0); return x_1; } } @@ -9610,7 +10015,7 @@ _start: lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_6 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_6, 0, x_1); -x_7 = l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4(x_3, x_2, x_6, x_4, x_5); +x_7 = l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3(x_3, x_2, x_6, x_4, x_5); lean_dec(x_6); x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); @@ -9782,7 +10187,7 @@ lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_logUnknownDecl___spec__1(lea _start: { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_6 = l_Lean_Elab_getPos___at_Lean_Elab_Command_elabCommand___spec__3(x_1, x_4, x_5); +x_6 = l_Lean_Elab_getPos___at_Lean_Elab_Command_throwError___spec__2(x_1, x_4, x_5); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); @@ -9874,7 +10279,7 @@ lean_inc(x_4); x_5 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_5, 0, x_4); x_6 = 2; -x_7 = l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4(x_1, x_6, x_5, x_2, x_3); +x_7 = l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3(x_1, x_6, x_5, x_2, x_3); lean_dec(x_5); x_8 = !lean_is_exclusive(x_7); if (x_8 == 0) @@ -10288,6 +10693,7 @@ _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); x_5 = l_Lean_stxInh; x_6 = lean_unsigned_to_nat(1u); x_7 = lean_array_get(x_5, x_4, x_6); @@ -10316,6 +10722,7 @@ lean_dec(x_12); x_72 = lean_name_eq(x_10, x_13); if (x_72 == 0) { +lean_dec(x_1); x_15 = x_14; goto block_71; } @@ -10324,9 +10731,9 @@ else lean_object* x_73; lean_object* x_74; uint8_t x_75; lean_dec(x_13); lean_dec(x_10); +lean_dec(x_4); x_73 = l_Lean_Elab_Command_elabExport___closed__3; -x_74 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_73, x_2, x_14); -lean_dec(x_2); +x_74 = l_Lean_Elab_Command_throwError___rarg(x_1, x_73, x_2, x_14); x_75 = !lean_is_exclusive(x_74); if (x_75 == 0) { @@ -10370,6 +10777,7 @@ x_24 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__1(x_ lean_dec(x_22); lean_dec(x_13); lean_dec(x_10); +lean_dec(x_4); if (lean_obj_tag(x_24) == 0) { lean_object* x_25; lean_object* x_26; lean_object* x_27; @@ -10567,6 +10975,7 @@ else uint8_t x_67; lean_dec(x_13); lean_dec(x_10); +lean_dec(x_4); lean_dec(x_2); x_67 = !lean_is_exclusive(x_16); if (x_67 == 0) @@ -10593,7 +11002,9 @@ else { uint8_t x_79; lean_dec(x_10); +lean_dec(x_4); lean_dec(x_2); +lean_dec(x_1); x_79 = !lean_is_exclusive(x_12); if (x_79 == 0) { @@ -10617,7 +11028,9 @@ return x_82; else { uint8_t x_83; +lean_dec(x_4); lean_dec(x_2); +lean_dec(x_1); x_83 = !lean_is_exclusive(x_9); if (x_83 == 0) { @@ -10651,15 +11064,6 @@ lean_dec(x_1); return x_10; } } -lean_object* l_Lean_Elab_Command_elabExport___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabExport(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabExport___closed__1() { _start: { @@ -10682,7 +11086,7 @@ lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabExport___clos _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabExport___boxed), 3, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabExport), 3, 0); return x_1; } } @@ -13015,9 +13419,9 @@ x_10 = lean_array_get(x_8, x_4, x_9); lean_inc(x_10); x_11 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabVariable___lambda__1___boxed), 4, 1); lean_closure_set(x_11, 0, x_10); -x_12 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_6); -x_13 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_6); -x_14 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_6); +x_12 = l___private_Init_Lean_Elab_Command_10__getVarDecls(x_6); +x_13 = l___private_Init_Lean_Elab_Command_8__mkTermContext(x_2, x_6); +x_14 = l___private_Init_Lean_Elab_Command_9__mkTermState(x_6); lean_dec(x_6); x_15 = l_Lean_Elab_Term_elabBinders___rarg(x_12, x_11, x_13, x_14); lean_dec(x_12); @@ -14060,9 +14464,9 @@ lean_dec(x_10); lean_inc(x_11); x_12 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabVariables___lambda__1___boxed), 4, 1); lean_closure_set(x_12, 0, x_11); -x_13 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_6); -x_14 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_6); -x_15 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_6); +x_13 = l___private_Init_Lean_Elab_Command_10__getVarDecls(x_6); +x_14 = l___private_Init_Lean_Elab_Command_8__mkTermContext(x_2, x_6); +x_15 = l___private_Init_Lean_Elab_Command_9__mkTermState(x_6); lean_dec(x_6); x_16 = l_Lean_Elab_Term_elabBinders___rarg(x_13, x_12, x_14, x_15); lean_dec(x_13); @@ -14718,9 +15122,9 @@ lean_dec(x_4); x_11 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabCheck___lambda__1___boxed), 5, 2); lean_closure_set(x_11, 0, x_10); lean_closure_set(x_11, 1, x_1); -x_12 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_6); -x_13 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_6); -x_14 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_6); +x_12 = l___private_Init_Lean_Elab_Command_10__getVarDecls(x_6); +x_13 = l___private_Init_Lean_Elab_Command_8__mkTermContext(x_2, x_6); +x_14 = l___private_Init_Lean_Elab_Command_9__mkTermState(x_6); lean_dec(x_6); x_15 = l_Lean_Elab_Term_elabBinders___rarg(x_12, x_11, x_13, x_14); lean_dec(x_12); @@ -17349,6 +17753,7 @@ lean_dec(x_7); if (x_8 == 0) { lean_object* x_9; +lean_dec(x_5); lean_dec(x_3); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_4); @@ -17381,7 +17786,6 @@ lean_object* x_17; uint8_t x_18; lean_dec(x_12); lean_dec(x_4); x_17 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_10, x_13, x_5, x_6); -lean_dec(x_10); x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { @@ -17462,6 +17866,7 @@ x_100 = lean_unsigned_to_nat(2u); x_101 = l_Array_empty___closed__1; x_102 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(x_100, x_99, x_5, x_101); lean_dec(x_99); +lean_inc(x_3); lean_inc(x_10); x_103 = l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5(x_1, x_102, x_5, x_10, x_3, x_11); lean_dec(x_102); @@ -17484,6 +17889,7 @@ lean_dec(x_10); lean_dec(x_6); lean_dec(x_3); lean_dec(x_2); +lean_dec(x_1); x_106 = !lean_is_exclusive(x_103); if (x_106 == 0) { @@ -17526,7 +17932,7 @@ x_16 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; x_17 = 1; lean_inc(x_3); lean_inc(x_14); -x_18 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_16, x_17, x_14, x_3, x_13); +x_18 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_1, x_16, x_17, x_14, x_3, x_13); if (lean_obj_tag(x_18) == 0) { lean_object* x_19; lean_object* x_20; @@ -17915,8 +18321,7 @@ lean_dec(x_10); lean_dec(x_6); lean_dec(x_2); x_94 = l_Lean_Elab_Command_withDeclId___closed__3; -x_95 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_94, x_3, x_13); -lean_dec(x_3); +x_95 = l_Lean_Elab_Command_throwError___rarg(x_1, x_94, x_3, x_13); return x_95; } } @@ -17928,6 +18333,7 @@ lean_dec(x_8); lean_dec(x_6); lean_dec(x_3); lean_dec(x_2); +lean_dec(x_1); x_110 = !lean_is_exclusive(x_9); if (x_110 == 0) { @@ -17954,21 +18360,11 @@ _start: { lean_object* x_7; x_7 = l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); return x_7; } } -lean_object* l_Lean_Elab_Command_withDeclId___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_withDeclId(x_1, x_2, x_3, x_4); -lean_dec(x_1); -return x_5; -} -} lean_object* l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -18370,8 +18766,7 @@ x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); lean_dec(x_10); x_13 = l_Lean_KernelException_toMessageData(x_9, x_11); -x_14 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_13, x_3, x_12); -lean_dec(x_3); +x_14 = l_Lean_Elab_Command_throwError___rarg(x_1, x_13, x_3, x_12); return x_14; } else @@ -18379,6 +18774,7 @@ else uint8_t x_15; lean_dec(x_9); lean_dec(x_3); +lean_dec(x_1); x_15 = !lean_is_exclusive(x_10); if (x_15 == 0) { @@ -18402,6 +18798,7 @@ return x_18; else { lean_object* x_19; lean_object* x_20; +lean_dec(x_1); x_19 = lean_ctor_get(x_8, 0); lean_inc(x_19); lean_dec(x_8); @@ -18567,6 +18964,7 @@ else { uint8_t x_53; lean_dec(x_3); +lean_dec(x_1); x_53 = !lean_is_exclusive(x_5); if (x_53 == 0) { @@ -18594,7 +18992,6 @@ _start: lean_object* x_5; x_5 = l_Lean_Elab_Command_addDecl(x_1, x_2, x_3, x_4); lean_dec(x_2); -lean_dec(x_1); return x_5; } } @@ -18764,18 +19161,20 @@ l_Lean_Elab_Command_elabCommand___closed__5 = _init_l_Lean_Elab_Command_elabComm lean_mark_persistent(l_Lean_Elab_Command_elabCommand___closed__5); l_Lean_Elab_Command_elabCommand___closed__6 = _init_l_Lean_Elab_Command_elabCommand___closed__6(); lean_mark_persistent(l_Lean_Elab_Command_elabCommand___closed__6); -l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg___closed__1 = _init_l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg___closed__1(); -lean_mark_persistent(l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg___closed__1); +l___private_Init_Lean_Elab_Command_11__toCommandResult___rarg___closed__1 = _init_l___private_Init_Lean_Elab_Command_11__toCommandResult___rarg___closed__1(); +lean_mark_persistent(l___private_Init_Lean_Elab_Command_11__toCommandResult___rarg___closed__1); l_Lean_Elab_Command_CommandElabM_inhabited___closed__1 = _init_l_Lean_Elab_Command_CommandElabM_inhabited___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_CommandElabM_inhabited___closed__1); l_Lean_Elab_Command_runTermElabM___rarg___closed__1 = _init_l_Lean_Elab_Command_runTermElabM___rarg___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_runTermElabM___rarg___closed__1); -l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1 = _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1(); -lean_mark_persistent(l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1); -l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2 = _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2(); -lean_mark_persistent(l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2); -l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3 = _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3(); -lean_mark_persistent(l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3); +l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__1 = _init_l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__1(); +lean_mark_persistent(l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__1); +l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__2 = _init_l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__2(); +lean_mark_persistent(l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__2); +l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__3 = _init_l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__3(); +lean_mark_persistent(l___private_Init_Lean_Elab_Command_13__addScopes___main___closed__3); +l_Lean_Elab_Command_elabNamespace___closed__1 = _init_l_Lean_Elab_Command_elabNamespace___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabNamespace___closed__1); l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1(); lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1); l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__2 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__2(); @@ -18785,6 +19184,8 @@ lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace__ res = l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Elab_Command_elabSection___closed__1 = _init_l_Lean_Elab_Command_elabSection___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabSection___closed__1); l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__1 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__1(); lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__1); l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__2 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__2(); diff --git a/stage0/stdlib/Init/Lean/Elab/DeclModifiers.c b/stage0/stdlib/Init/Lean/Elab/DeclModifiers.c index f8eb9c7fcc..4f5c810331 100644 --- a/stage0/stdlib/Init/Lean/Elab/DeclModifiers.c +++ b/stage0/stdlib/Init/Lean/Elab/DeclModifiers.c @@ -19,7 +19,6 @@ extern lean_object* l_Lean_List_format___rarg___closed__4; lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__6; lean_object* l_Lean_Syntax_getOptional_x3f(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); lean_object* l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(lean_object*); lean_object* l_Lean_fmt___at_Lean_Elab_Command_Modifiers_hasFormat___spec__1(lean_object*); @@ -42,33 +41,29 @@ lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_applyAttributes(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* lean_string_utf8_byte_size(lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_hasFormat(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__11; lean_object* l_Lean_Elab_Command_mkDeclName(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_AttributeApplicationTime_beq(uint8_t, uint8_t); lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__4; -lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Visibility_hasToString(uint8_t); lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_hasToString; lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1___boxed(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabModifiers___closed__4; lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__9; extern lean_object* l_Lean_Format_join___closed__1; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__13; lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Visibility_hasToString___boxed(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___regBuiltinParser_Lean_Parser_Command_antiquot___closed__2; lean_object* l_Function_comp___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Options_empty; extern lean_object* l_Lean_Parser_Command_attributes___elambda__1___closed__5; lean_object* l_Lean_Elab_Command_elabModifiers___closed__1; @@ -77,7 +72,6 @@ lean_object* l_Lean_Elab_Command_elabModifiers___closed__2; lean_object* l_Lean_Elab_Command_elabAttr___closed__6; lean_object* l_Lean_Elab_Command_elabAttrs(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAttr___closed__1; -lean_object* l_Lean_Elab_Command_elabAttr___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__5; lean_object* l_Lean_Elab_Command_Modifiers_hasToString___closed__2; lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__12; @@ -121,12 +115,10 @@ lean_object* l_Lean_Elab_Command_Attribute_hasFormat(lean_object*); extern lean_object* l_Lean_Parser_Command_private___elambda__1___closed__2; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_partial___elambda__1___closed__1; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabModifiers___closed__7; lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAttr(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getAttributeImpl(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabModifiers___closed__5; extern lean_object* l_addParenHeuristic___closed__1; @@ -1070,33 +1062,6 @@ lean_dec(x_1); return x_2; } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1(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; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -} lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__1() { _start: { @@ -1156,17 +1121,16 @@ return x_2; lean_object* l_Lean_Elab_Command_elabAttr(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_40; -x_4 = lean_unsigned_to_nat(0u); -x_5 = l_Lean_Syntax_getArg(x_1, x_4); -x_40 = l_Lean_Syntax_isIdOrAtom_x3f(x_5); +lean_object* x_4; lean_object* x_5; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_unsigned_to_nat(0u); +x_39 = l_Lean_Syntax_getArg(x_1, x_38); +x_40 = l_Lean_Syntax_isIdOrAtom_x3f(x_39); if (lean_obj_tag(x_40) == 0) { lean_object* x_41; lean_object* x_42; uint8_t x_43; +lean_dec(x_1); x_41 = l_Lean_Elab_Command_elabAttr___closed__6; -x_42 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1(x_5, x_41, x_2, x_3); -lean_dec(x_2); -lean_dec(x_5); +x_42 = l_Lean_Elab_Command_throwError___rarg(x_39, x_41, x_2, x_3); x_43 = !lean_is_exclusive(x_42); if (x_43 == 0) { @@ -1189,149 +1153,133 @@ return x_46; else { lean_object* x_47; lean_object* x_48; lean_object* x_49; -lean_dec(x_5); +lean_dec(x_39); x_47 = lean_ctor_get(x_40, 0); lean_inc(x_47); lean_dec(x_40); x_48 = lean_box(0); x_49 = lean_name_mk_string(x_48, x_47); -x_6 = x_49; -x_7 = x_3; -goto block_39; +x_4 = x_49; +x_5 = x_3; +goto block_37; } -block_39: +block_37: { -lean_object* x_8; -lean_inc(x_6); -x_8 = lean_is_attribute(x_6, x_7); -if (lean_obj_tag(x_8) == 0) +lean_object* x_6; +lean_inc(x_4); +x_6 = lean_is_attribute(x_4, x_5); +if (lean_obj_tag(x_6) == 0) { -lean_object* x_9; uint8_t x_10; -x_9 = lean_ctor_get(x_8, 0); +lean_object* x_7; uint8_t x_8; +x_7 = lean_ctor_get(x_6, 0); +lean_inc(x_7); +x_8 = lean_unbox(x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_9 = lean_ctor_get(x_6, 1); lean_inc(x_9); -x_10 = lean_unbox(x_9); -lean_dec(x_9); -if (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; lean_object* x_17; uint8_t x_18; -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_12, 0, x_6); -x_13 = l_Lean_Elab_Command_elabAttr___closed__3; -x_14 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_12); -x_15 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; -x_16 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_16, 0, x_14); -lean_ctor_set(x_16, 1, x_15); -x_17 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_16, x_2, x_11); -lean_dec(x_2); -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 -{ -uint8_t x_22; -lean_dec(x_2); -x_22 = !lean_is_exclusive(x_8); -if (x_22 == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_23 = lean_ctor_get(x_8, 0); -lean_dec(x_23); -x_24 = lean_unsigned_to_nat(1u); -x_25 = l_Lean_Syntax_getArg(x_1, x_24); -x_26 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_26, 0, x_6); -lean_ctor_set(x_26, 1, x_25); -lean_ctor_set(x_8, 0, x_26); -return x_8; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_27 = lean_ctor_get(x_8, 1); -lean_inc(x_27); -lean_dec(x_8); -x_28 = lean_unsigned_to_nat(1u); -x_29 = l_Lean_Syntax_getArg(x_1, x_28); -x_30 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_30, 0, x_6); -lean_ctor_set(x_30, 1, x_29); -x_31 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_31, 0, x_30); -lean_ctor_set(x_31, 1, x_27); -return x_31; -} -} -} -else -{ -uint8_t x_32; lean_dec(x_6); -x_32 = !lean_is_exclusive(x_8); -if (x_32 == 0) +x_10 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_10, 0, x_4); +x_11 = l_Lean_Elab_Command_elabAttr___closed__3; +x_12 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +x_13 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; +x_14 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_14, 0, x_12); +lean_ctor_set(x_14, 1, x_13); +x_15 = l_Lean_Elab_Command_throwError___rarg(x_1, x_14, x_2, x_9); +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) { -lean_object* x_33; lean_object* x_34; -x_33 = lean_ctor_get(x_8, 0); -x_34 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_33); -lean_ctor_set(x_8, 0, x_34); -return x_8; +return x_15; } else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_35 = lean_ctor_get(x_8, 0); -x_36 = lean_ctor_get(x_8, 1); -lean_inc(x_36); -lean_inc(x_35); -lean_dec(x_8); -x_37 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_35); -x_38 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_38, 0, x_37); -lean_ctor_set(x_38, 1, x_36); -return x_38; +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_15, 0); +x_18 = lean_ctor_get(x_15, 1); +lean_inc(x_18); +lean_inc(x_17); +lean_dec(x_15); +x_19 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +return x_19; } } -} -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: +else { -lean_object* x_5; -x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_Elab_Command_elabAttr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: +uint8_t x_20; +lean_dec(x_2); +x_20 = !lean_is_exclusive(x_6); +if (x_20 == 0) { -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabAttr(x_1, x_2, x_3); +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_21 = lean_ctor_get(x_6, 0); +lean_dec(x_21); +x_22 = lean_unsigned_to_nat(1u); +x_23 = l_Lean_Syntax_getArg(x_1, x_22); lean_dec(x_1); -return x_4; +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_4); +lean_ctor_set(x_24, 1, x_23); +lean_ctor_set(x_6, 0, x_24); +return x_6; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_25 = lean_ctor_get(x_6, 1); +lean_inc(x_25); +lean_dec(x_6); +x_26 = lean_unsigned_to_nat(1u); +x_27 = l_Lean_Syntax_getArg(x_1, x_26); +lean_dec(x_1); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_4); +lean_ctor_set(x_28, 1, x_27); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_25); +return x_29; +} +} +} +else +{ +uint8_t x_30; +lean_dec(x_4); +x_30 = !lean_is_exclusive(x_6); +if (x_30 == 0) +{ +lean_object* x_31; lean_object* x_32; +x_31 = lean_ctor_get(x_6, 0); +x_32 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_31); +lean_dec(x_1); +lean_ctor_set(x_6, 0, x_32); +return x_6; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_33 = lean_ctor_get(x_6, 0); +x_34 = lean_ctor_get(x_6, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_6); +x_35 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_33); +lean_dec(x_1); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_34); +return x_36; +} +} +} } } lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___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) { @@ -1357,7 +1305,6 @@ lean_object* x_10; lean_object* x_11; x_10 = lean_array_fget(x_2, x_3); lean_inc(x_5); x_11 = l_Lean_Elab_Command_elabAttr(x_10, x_5, x_6); -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; @@ -1437,60 +1384,6 @@ lean_dec(x_1); return x_4; } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(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; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(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; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -} lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__1() { _start: { @@ -1641,9 +1534,7 @@ x_96 = l_Lean_Elab_Command_elabModifiers___closed__7; x_97 = lean_alloc_ctor(8, 2, 0); lean_ctor_set(x_97, 0, x_96); lean_ctor_set(x_97, 1, x_95); -x_98 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(x_87, x_97, x_2, x_3); -lean_dec(x_2); -lean_dec(x_87); +x_98 = l_Lean_Elab_Command_throwError___rarg(x_87, x_97, x_2, x_3); x_99 = !lean_is_exclusive(x_98); if (x_99 == 0) { @@ -1720,9 +1611,7 @@ x_119 = l_Lean_Elab_Command_elabModifiers___closed__7; x_120 = lean_alloc_ctor(8, 2, 0); lean_ctor_set(x_120, 0, x_119); lean_ctor_set(x_120, 1, x_118); -x_121 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(x_110, x_120, x_2, x_3); -lean_dec(x_2); -lean_dec(x_110); +x_121 = l_Lean_Elab_Command_throwError___rarg(x_110, x_120, x_2, x_3); x_122 = lean_ctor_get(x_121, 0); lean_inc(x_122); x_123 = lean_ctor_get(x_121, 1); @@ -1784,9 +1673,7 @@ lean_dec(x_13); lean_dec(x_11); lean_dec(x_7); x_75 = l_Lean_Elab_Command_elabModifiers___closed__4; -x_76 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(x_69, x_75, x_2, x_17); -lean_dec(x_2); -lean_dec(x_69); +x_76 = l_Lean_Elab_Command_throwError___rarg(x_69, x_75, x_2, x_17); x_77 = !lean_is_exclusive(x_76); if (x_77 == 0) { @@ -2054,26 +1941,6 @@ return x_54; } } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__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_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} lean_object* l_Lean_Elab_Command_elabModifiers___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { diff --git a/stage0/stdlib/Init/Lean/Elab/Declaration.c b/stage0/stdlib/Init/Lean/Elab/Declaration.c index 88e6297efa..85103f26a6 100644 --- a/stage0/stdlib/Init/Lean/Elab/Declaration.c +++ b/stage0/stdlib/Init/Lean/Elab/Declaration.c @@ -15,8 +15,8 @@ extern "C" { #endif lean_object* l_Lean_Elab_Command_elabDeclaration(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabConstant___closed__9; +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes___main(lean_object*, lean_object*, uint8_t, 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_Init_Lean_Elab_Command_10__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_abbrev___elambda__1___closed__2; 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*); @@ -26,7 +26,6 @@ lean_object* l_unreachable_x21___rarg(lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration(lean_object*); lean_object* l_Lean_Syntax_getOptional_x3f(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_mkEqTrans___closed__3; lean_object* l_Lean_Elab_Command_elabConstant___closed__2; lean_object* l_Lean_Elab_Command_elabDeclaration___closed__4; @@ -44,14 +43,13 @@ lean_object* l_Lean_Elab_Command_elabExample___closed__2; uint8_t lean_name_eq(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_declaration___elambda__1___closed__2; lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls(lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__getVarDecls(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___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__2; lean_object* lean_string_utf8_byte_size(lean_object*); extern lean_object* l_Lean_Parser_Command_example___elambda__1___closed__2; -lean_object* l_Lean_Elab_Command_elabAxiom___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_getNumParts___main(lean_object*); lean_object* l_Lean_Elab_Command_elabInductive___rarg(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); @@ -60,7 +58,6 @@ extern lean_object* l_Lean_Parser_Command_classInductive___elambda__1___closed__ lean_object* l_Lean_Elab_Command_mkDeclName(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__1; lean_object* l_Lean_Elab_Command_expandOptDeclSig___boxed(lean_object*); -lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); extern lean_object* l_Lean_Name_appendIndexAfter___closed__1; lean_object* l_Lean_Elab_Term_levelMVarToParam(lean_object*, lean_object*, lean_object*); @@ -75,6 +72,7 @@ lean_object* l_Lean_Elab_Command_elabConstant(lean_object*, lean_object*, lean_o 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* l_Lean_Elab_Command_expandOptDeclSig(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__3; +extern lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__1; extern lean_object* l_Lean_Meta_registerInstanceAttr___closed__2; lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* l_Lean_Elab_Command_elabClassInductive(lean_object*, lean_object*, lean_object*); @@ -82,6 +80,7 @@ lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__4(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1; extern lean_object* l___regBuiltinParser_Lean_Parser_Command_antiquot___closed__2; +lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabConstant___closed__7; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__3(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_hole___elambda__1___closed__1; @@ -124,8 +123,6 @@ lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(lean_o lean_object* l_Lean_Elab_Command_elabDefLike(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandDeclSig___boxed(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -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*); extern lean_object* l___private_Init_Lean_Elab_Term_8__expandCDot___closed__5; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); @@ -133,7 +130,6 @@ lean_object* l_Lean_Elab_Command_elabDeclaration___closed__2; 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* l_Lean_Elab_Command_elabConstant___closed__5; lean_object* l_Lean_Elab_Command_elabInductive(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_collectLevelParams(lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__1; lean_object* l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__3; @@ -141,16 +137,16 @@ lean_object* l_Lean_Elab_Command_elabConstant___closed__3; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabAbbrev___closed__1; lean_object* l_Lean_Elab_Command_elabAbbrev___closed__4; +lean_object* l_Lean_CollectLevelParams_main___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__1(lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_numeral(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_constant___elambda__1___closed__2; -lean_object* l___private_Init_Lean_Elab_Command_5__mkTermContext(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_9__mkTermState(lean_object*); lean_object* l_Lean_Elab_Command_elabConstant___closed__8; extern lean_object* l_Lean_Parser_Command_theorem___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabClassInductive___rarg(lean_object*); lean_object* l___private_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_8__mkTermContext(lean_object*, lean_object*); 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_expandOptDeclSig(lean_object* x_1) { @@ -574,33 +570,6 @@ return x_52; } } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1(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; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -} lean_object* _init_l_Lean_Elab_Command_elabInstance___closed__1() { _start: { @@ -639,9 +608,7 @@ lean_dec(x_11); lean_dec(x_9); lean_dec(x_8); x_15 = l___private_Init_Lean_Elab_Term_16__synthesizeSyntheticMVar___closed__3; -x_16 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1(x_2, x_15, x_3, x_4); -lean_dec(x_3); -lean_dec(x_2); +x_16 = l_Lean_Elab_Command_throwError___rarg(x_2, x_15, x_3, x_4); x_17 = !lean_is_exclusive(x_16); if (x_17 == 0) { @@ -709,16 +676,6 @@ return x_34; } } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} lean_object* _init_l_Lean_Elab_Command_elabExample___closed__1() { _start: { @@ -2951,6 +2908,7 @@ lean_dec(x_7); if (x_8 == 0) { lean_object* x_9; +lean_dec(x_5); lean_dec(x_3); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_4); @@ -2983,7 +2941,6 @@ lean_object* x_17; uint8_t x_18; lean_dec(x_12); lean_dec(x_4); x_17 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_10, x_13, x_5, x_6); -lean_dec(x_10); x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { @@ -3066,98 +3023,78 @@ x_26 = l_Lean_Elab_Term_levelMVarToParam(x_25, x_7, x_24); x_27 = !lean_is_exclusive(x_26); if (x_27 == 0) { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_object* x_33; lean_object* x_34; +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; x_28 = lean_ctor_get(x_26, 0); +x_29 = l_Lean_Elab_Command_mkDef___lambda__1___closed__1; lean_inc(x_28); -x_29 = l_Lean_collectLevelParams(x_28); -x_30 = l_Lean_Elab_Command_sortDeclLevelParams(x_3, x_29); -x_31 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_31, 0, x_4); -lean_ctor_set(x_31, 1, x_30); -lean_ctor_set(x_31, 2, x_28); -x_32 = lean_ctor_get_uint8(x_5, sizeof(void*)*2 + 3); -x_33 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set_uint8(x_33, sizeof(void*)*1, x_32); -x_34 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_26, 0, x_34); +x_30 = l_Lean_CollectLevelParams_main___main(x_28, x_29); +x_31 = lean_ctor_get(x_30, 2); +lean_inc(x_31); +lean_dec(x_30); +x_32 = l_Lean_Elab_Command_sortDeclLevelParams(x_3, x_31); +x_33 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_33, 0, x_4); +lean_ctor_set(x_33, 1, x_32); +lean_ctor_set(x_33, 2, x_28); +x_34 = lean_ctor_get_uint8(x_5, sizeof(void*)*2 + 3); +x_35 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set_uint8(x_35, sizeof(void*)*1, x_34); +x_36 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_26, 0, x_36); return x_26; } else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_35 = lean_ctor_get(x_26, 0); -x_36 = lean_ctor_get(x_26, 1); -lean_inc(x_36); -lean_inc(x_35); +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_37 = lean_ctor_get(x_26, 0); +x_38 = lean_ctor_get(x_26, 1); +lean_inc(x_38); +lean_inc(x_37); lean_dec(x_26); -lean_inc(x_35); -x_37 = l_Lean_collectLevelParams(x_35); -x_38 = l_Lean_Elab_Command_sortDeclLevelParams(x_3, x_37); -x_39 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_39, 0, x_4); -lean_ctor_set(x_39, 1, x_38); -lean_ctor_set(x_39, 2, x_35); -x_40 = lean_ctor_get_uint8(x_5, sizeof(void*)*2 + 3); -x_41 = lean_alloc_ctor(0, 1, 1); -lean_ctor_set(x_41, 0, x_39); -lean_ctor_set_uint8(x_41, sizeof(void*)*1, x_40); -x_42 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_42, 0, x_41); -x_43 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_43, 0, x_42); -lean_ctor_set(x_43, 1, x_36); -return x_43; -} -} -else -{ -uint8_t x_44; -lean_dec(x_7); -lean_dec(x_4); -lean_dec(x_3); -x_44 = !lean_is_exclusive(x_22); -if (x_44 == 0) -{ -return x_22; -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_22, 0); -x_46 = lean_ctor_get(x_22, 1); -lean_inc(x_46); -lean_inc(x_45); -lean_dec(x_22); -x_47 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_47, 0, x_45); -lean_ctor_set(x_47, 1, x_46); +x_39 = l_Lean_Elab_Command_mkDef___lambda__1___closed__1; +lean_inc(x_37); +x_40 = l_Lean_CollectLevelParams_main___main(x_37, x_39); +x_41 = lean_ctor_get(x_40, 2); +lean_inc(x_41); +lean_dec(x_40); +x_42 = l_Lean_Elab_Command_sortDeclLevelParams(x_3, x_41); +x_43 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_43, 0, x_4); +lean_ctor_set(x_43, 1, x_42); +lean_ctor_set(x_43, 2, x_37); +x_44 = lean_ctor_get_uint8(x_5, sizeof(void*)*2 + 3); +x_45 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set_uint8(x_45, sizeof(void*)*1, x_44); +x_46 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_46, 0, x_45); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_38); return x_47; } } -} else { uint8_t x_48; lean_dec(x_7); lean_dec(x_4); lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_48 = !lean_is_exclusive(x_19); +x_48 = !lean_is_exclusive(x_22); if (x_48 == 0) { -return x_19; +return x_22; } else { lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_49 = lean_ctor_get(x_19, 0); -x_50 = lean_ctor_get(x_19, 1); +x_49 = lean_ctor_get(x_22, 0); +x_50 = lean_ctor_get(x_22, 1); lean_inc(x_50); lean_inc(x_49); -lean_dec(x_19); +lean_dec(x_22); x_51 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_51, 0, x_49); lean_ctor_set(x_51, 1, x_50); @@ -3168,26 +3105,24 @@ return x_51; else { uint8_t x_52; -lean_dec(x_10); lean_dec(x_7); -lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_52 = !lean_is_exclusive(x_14); +x_52 = !lean_is_exclusive(x_19); if (x_52 == 0) { -return x_14; +return x_19; } else { lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_53 = lean_ctor_get(x_14, 0); -x_54 = lean_ctor_get(x_14, 1); +x_53 = lean_ctor_get(x_19, 0); +x_54 = lean_ctor_get(x_19, 1); lean_inc(x_54); lean_inc(x_53); -lean_dec(x_14); +lean_dec(x_19); x_55 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_55, 0, x_53); lean_ctor_set(x_55, 1, x_54); @@ -3198,29 +3133,59 @@ return x_55; else { uint8_t x_56; +lean_dec(x_10); lean_dec(x_7); lean_dec(x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_56 = !lean_is_exclusive(x_9); +x_56 = !lean_is_exclusive(x_14); if (x_56 == 0) { +return x_14; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_14, 0); +x_58 = lean_ctor_get(x_14, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_14); +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_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_60 = !lean_is_exclusive(x_9); +if (x_60 == 0) +{ return x_9; } else { -lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_57 = lean_ctor_get(x_9, 0); -x_58 = lean_ctor_get(x_9, 1); -lean_inc(x_58); -lean_inc(x_57); +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_9, 0); +x_62 = lean_ctor_get(x_9, 1); +lean_inc(x_62); +lean_inc(x_61); lean_dec(x_9); -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; +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; } } } @@ -3280,6 +3245,7 @@ lean_dec(x_202); x_204 = l_Array_empty___closed__1; x_205 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(x_7, x_203, x_12, x_204); lean_dec(x_203); +lean_inc(x_3); lean_inc(x_16); x_206 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5(x_2, x_205, x_12, x_16, x_3, x_17); lean_dec(x_205); @@ -3304,6 +3270,7 @@ lean_dec(x_11); lean_dec(x_10); lean_dec(x_6); lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); x_209 = !lean_is_exclusive(x_206); if (x_209 == 0) @@ -3347,8 +3314,7 @@ x_22 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; x_23 = 1; lean_inc(x_3); lean_inc(x_20); -x_24 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_6, x_22, x_23, x_20, x_3, x_19); -lean_dec(x_6); +x_24 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_6, x_22, x_23, x_20, x_3, x_19); if (lean_obj_tag(x_24) == 0) { lean_object* x_25; lean_object* x_26; @@ -3414,9 +3380,9 @@ lean_inc(x_120); x_121 = lean_ctor_get(x_119, 1); lean_inc(x_121); lean_dec(x_119); -x_122 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_120); -x_123 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_3, x_120); -x_124 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_120); +x_122 = l___private_Init_Lean_Elab_Command_10__getVarDecls(x_120); +x_123 = l___private_Init_Lean_Elab_Command_8__mkTermContext(x_3, x_120); +x_124 = l___private_Init_Lean_Elab_Command_9__mkTermState(x_120); lean_dec(x_120); x_125 = l_Lean_Elab_Term_elabBinders___rarg(x_122, x_118, x_123, x_124); lean_dec(x_122); @@ -3475,6 +3441,7 @@ lean_dec(x_126); lean_dec(x_45); lean_dec(x_43); lean_dec(x_20); +lean_dec(x_2); x_139 = lean_ctor_get(x_137, 0); lean_inc(x_139); x_140 = lean_ctor_get(x_137, 1); @@ -3517,6 +3484,7 @@ lean_dec(x_126); lean_dec(x_45); lean_dec(x_43); lean_dec(x_20); +lean_dec(x_2); x_146 = lean_ctor_get(x_144, 0); lean_inc(x_146); x_147 = lean_ctor_get(x_144, 1); @@ -3536,6 +3504,7 @@ lean_dec(x_126); lean_dec(x_45); lean_dec(x_43); lean_dec(x_20); +lean_dec(x_2); x_148 = lean_ctor_get(x_128, 0); lean_inc(x_148); x_149 = lean_ctor_get(x_128, 1); @@ -3557,6 +3526,7 @@ lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_dec(x_45); lean_dec(x_43); lean_dec(x_20); +lean_dec(x_2); x_151 = lean_ctor_get(x_125, 1); lean_inc(x_151); lean_dec(x_125); @@ -3698,6 +3668,7 @@ lean_object* x_180; lean_object* x_181; lean_dec(x_45); lean_dec(x_43); lean_dec(x_20); +lean_dec(x_2); x_180 = lean_ctor_get(x_177, 0); lean_inc(x_180); x_181 = lean_ctor_get(x_177, 1); @@ -3717,6 +3688,7 @@ lean_dec(x_118); lean_dec(x_45); lean_dec(x_43); lean_dec(x_20); +lean_dec(x_2); x_182 = lean_ctor_get(x_119, 0); lean_inc(x_182); x_183 = lean_ctor_get(x_119, 1); @@ -3735,6 +3707,7 @@ lean_dec(x_43); lean_dec(x_20); lean_dec(x_11); lean_dec(x_10); +lean_dec(x_2); lean_dec(x_1); x_184 = lean_ctor_get(x_115, 0); lean_inc(x_184); @@ -3754,6 +3727,7 @@ lean_dec(x_43); lean_dec(x_20); lean_dec(x_11); lean_dec(x_10); +lean_dec(x_2); lean_dec(x_1); x_186 = lean_ctor_get(x_113, 0); lean_inc(x_186); @@ -3768,6 +3742,7 @@ block_111: { lean_object* x_48; lean_inc(x_3); +lean_inc(x_2); x_48 = l_Lean_Elab_Command_addDecl(x_2, x_46, x_3, x_47); lean_dec(x_46); if (lean_obj_tag(x_48) == 0) @@ -3790,6 +3765,7 @@ x_53 = 1; lean_inc(x_3); x_54 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_2, x_43, x_53, x_45, x_12, x_3, x_52); lean_dec(x_45); +lean_dec(x_2); if (lean_obj_tag(x_54) == 0) { lean_object* x_55; lean_object* x_56; lean_object* x_57; @@ -4055,6 +4031,7 @@ lean_object* x_107; lean_object* x_108; lean_dec(x_45); lean_dec(x_43); lean_dec(x_20); +lean_dec(x_2); x_107 = lean_ctor_get(x_51, 0); lean_inc(x_107); x_108 = lean_ctor_get(x_51, 1); @@ -4071,6 +4048,7 @@ lean_object* x_109; lean_object* x_110; lean_dec(x_45); lean_dec(x_43); lean_dec(x_20); +lean_dec(x_2); x_109 = lean_ctor_get(x_48, 0); lean_inc(x_109); x_110 = lean_ctor_get(x_48, 1); @@ -4088,6 +4066,7 @@ lean_object* x_188; lean_object* x_189; lean_dec(x_20); lean_dec(x_11); lean_dec(x_10); +lean_dec(x_2); lean_dec(x_1); x_188 = lean_ctor_get(x_42, 0); lean_inc(x_188); @@ -4161,6 +4140,7 @@ lean_dec(x_16); lean_dec(x_11); lean_dec(x_10); lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); x_190 = !lean_is_exclusive(x_26); if (x_190 == 0) @@ -4192,6 +4172,7 @@ lean_dec(x_16); lean_dec(x_11); lean_dec(x_10); lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); x_194 = !lean_is_exclusive(x_24); if (x_194 == 0) @@ -4221,11 +4202,10 @@ lean_dec(x_16); lean_dec(x_13); lean_dec(x_11); lean_dec(x_10); +lean_dec(x_2); lean_dec(x_1); x_198 = l_Lean_Elab_Command_withDeclId___closed__3; -x_199 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_6, x_198, x_3, x_19); -lean_dec(x_3); -lean_dec(x_6); +x_199 = l_Lean_Elab_Command_throwError___rarg(x_6, x_198, x_3, x_19); return x_199; } } @@ -4239,6 +4219,7 @@ lean_dec(x_11); lean_dec(x_10); lean_dec(x_6); lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); x_213 = !lean_is_exclusive(x_15); if (x_213 == 0) @@ -4266,7 +4247,6 @@ _start: { lean_object* x_7; x_7 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); return x_7; @@ -4290,15 +4270,6 @@ lean_dec(x_1); return x_9; } } -lean_object* l_Lean_Elab_Command_elabAxiom___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_elabAxiom(x_1, x_2, x_3, x_4); -lean_dec(x_2); -return x_5; -} -} lean_object* l_Lean_Elab_Command_elabInductive___rarg(lean_object* x_1) { _start: { @@ -4432,6 +4403,7 @@ _start: { lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); x_5 = l_Lean_stxInh; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_array_get(x_5, x_4, x_6); @@ -4449,6 +4421,7 @@ x_10 = lean_ctor_get(x_8, 0); x_11 = lean_ctor_get(x_8, 1); x_12 = lean_unsigned_to_nat(1u); x_13 = lean_array_get(x_5, x_4, x_12); +lean_dec(x_4); lean_inc(x_13); x_14 = l_Lean_Syntax_getKind(x_13); x_15 = l_Lean_Parser_Command_abbrev___elambda__1___closed__2; @@ -4506,14 +4479,14 @@ if (x_34 == 0) lean_object* x_35; lean_object* x_36; lean_free_object(x_8); x_35 = l_Lean_Elab_Command_elabDeclaration___closed__4; -x_36 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_35, x_2, x_11); -lean_dec(x_2); +x_36 = l_Lean_Elab_Command_throwError___rarg(x_1, x_35, x_2, x_11); return x_36; } else { lean_object* x_37; lean_dec(x_2); +lean_dec(x_1); x_37 = lean_box(0); lean_ctor_set(x_8, 0, x_37); return x_8; @@ -4524,6 +4497,7 @@ else lean_object* x_38; lean_dec(x_14); lean_dec(x_2); +lean_dec(x_1); x_38 = lean_box(0); lean_ctor_set(x_8, 0, x_38); return x_8; @@ -4534,6 +4508,7 @@ else lean_object* x_39; lean_dec(x_14); lean_dec(x_2); +lean_dec(x_1); x_39 = lean_box(0); lean_ctor_set(x_8, 0, x_39); return x_8; @@ -4544,6 +4519,7 @@ else lean_object* x_40; lean_dec(x_14); lean_free_object(x_8); +lean_dec(x_1); x_40 = l_Lean_Elab_Command_elabExample(x_10, x_13, x_2, x_11); return x_40; } @@ -4553,8 +4529,8 @@ else lean_object* x_41; lean_dec(x_14); lean_free_object(x_8); +lean_dec(x_1); x_41 = l_Lean_Elab_Command_elabAxiom(x_10, x_13, x_2, x_11); -lean_dec(x_13); return x_41; } } @@ -4563,6 +4539,7 @@ else lean_object* x_42; lean_dec(x_14); lean_free_object(x_8); +lean_dec(x_1); x_42 = l_Lean_Elab_Command_elabInstance(x_10, x_13, x_2, x_11); return x_42; } @@ -4572,6 +4549,7 @@ else lean_object* x_43; lean_dec(x_14); lean_free_object(x_8); +lean_dec(x_1); x_43 = l_Lean_Elab_Command_elabConstant(x_10, x_13, x_2, x_11); return x_43; } @@ -4581,6 +4559,7 @@ else lean_object* x_44; lean_dec(x_14); lean_free_object(x_8); +lean_dec(x_1); x_44 = l_Lean_Elab_Command_elabTheorem(x_10, x_13, x_2, x_11); return x_44; } @@ -4590,6 +4569,7 @@ else lean_object* x_45; lean_dec(x_14); lean_free_object(x_8); +lean_dec(x_1); x_45 = l_Lean_Elab_Command_elabDef(x_10, x_13, x_2, x_11); return x_45; } @@ -4599,6 +4579,7 @@ else lean_object* x_46; lean_dec(x_14); lean_free_object(x_8); +lean_dec(x_1); x_46 = l_Lean_Elab_Command_elabAbbrev(x_10, x_13, x_2, x_11); return x_46; } @@ -4613,6 +4594,7 @@ lean_inc(x_47); lean_dec(x_8); x_49 = lean_unsigned_to_nat(1u); x_50 = lean_array_get(x_5, x_4, x_49); +lean_dec(x_4); lean_inc(x_50); x_51 = l_Lean_Syntax_getKind(x_50); x_52 = l_Lean_Parser_Command_abbrev___elambda__1___closed__2; @@ -4669,14 +4651,14 @@ if (x_71 == 0) { lean_object* x_72; lean_object* x_73; x_72 = l_Lean_Elab_Command_elabDeclaration___closed__4; -x_73 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_72, x_2, x_48); -lean_dec(x_2); +x_73 = l_Lean_Elab_Command_throwError___rarg(x_1, x_72, x_2, x_48); return x_73; } else { lean_object* x_74; lean_object* x_75; lean_dec(x_2); +lean_dec(x_1); x_74 = lean_box(0); x_75 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_75, 0, x_74); @@ -4689,6 +4671,7 @@ else lean_object* x_76; lean_object* x_77; lean_dec(x_51); lean_dec(x_2); +lean_dec(x_1); x_76 = lean_box(0); x_77 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_77, 0, x_76); @@ -4701,6 +4684,7 @@ else lean_object* x_78; lean_object* x_79; lean_dec(x_51); lean_dec(x_2); +lean_dec(x_1); x_78 = lean_box(0); x_79 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_79, 0, x_78); @@ -4712,6 +4696,7 @@ else { lean_object* x_80; lean_dec(x_51); +lean_dec(x_1); x_80 = l_Lean_Elab_Command_elabExample(x_47, x_50, x_2, x_48); return x_80; } @@ -4720,8 +4705,8 @@ else { lean_object* x_81; lean_dec(x_51); +lean_dec(x_1); x_81 = l_Lean_Elab_Command_elabAxiom(x_47, x_50, x_2, x_48); -lean_dec(x_50); return x_81; } } @@ -4729,6 +4714,7 @@ else { lean_object* x_82; lean_dec(x_51); +lean_dec(x_1); x_82 = l_Lean_Elab_Command_elabInstance(x_47, x_50, x_2, x_48); return x_82; } @@ -4737,6 +4723,7 @@ else { lean_object* x_83; lean_dec(x_51); +lean_dec(x_1); x_83 = l_Lean_Elab_Command_elabConstant(x_47, x_50, x_2, x_48); return x_83; } @@ -4745,6 +4732,7 @@ else { lean_object* x_84; lean_dec(x_51); +lean_dec(x_1); x_84 = l_Lean_Elab_Command_elabTheorem(x_47, x_50, x_2, x_48); return x_84; } @@ -4753,6 +4741,7 @@ else { lean_object* x_85; lean_dec(x_51); +lean_dec(x_1); x_85 = l_Lean_Elab_Command_elabDef(x_47, x_50, x_2, x_48); return x_85; } @@ -4761,6 +4750,7 @@ else { lean_object* x_86; lean_dec(x_51); +lean_dec(x_1); x_86 = l_Lean_Elab_Command_elabAbbrev(x_47, x_50, x_2, x_48); return x_86; } @@ -4769,7 +4759,9 @@ return x_86; else { uint8_t x_87; +lean_dec(x_4); lean_dec(x_2); +lean_dec(x_1); x_87 = !lean_is_exclusive(x_8); if (x_87 == 0) { @@ -4791,15 +4783,6 @@ return x_90; } } } -lean_object* l_Lean_Elab_Command_elabDeclaration___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabDeclaration(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__1() { _start: { @@ -4822,7 +4805,7 @@ lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration__ _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDeclaration___boxed), 3, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDeclaration), 3, 0); return x_1; } } diff --git a/stage0/stdlib/Init/Lean/Elab/Definition.c b/stage0/stdlib/Init/Lean/Elab/Definition.c index 9f6513dafa..236d1dc631 100644 --- a/stage0/stdlib/Init/Lean/Elab/Definition.c +++ b/stage0/stdlib/Init/Lean/Elab/Definition.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean.Elab.Definition -// Imports: Init.Lean.Elab.DeclModifiers +// Imports: Init.Lean.Util.CollectLevelParams Init.Lean.Util.CollectFVars Init.Lean.Elab.DeclModifiers Init.Lean.Elab.TermBinders #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -13,59 +13,2026 @@ #ifdef __cplusplus extern "C" { #endif +lean_object* l___private_Init_Lean_Elab_Command_13__addScopes___main(lean_object*, lean_object*, uint8_t, 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_Init_Lean_Elab_Command_10__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +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_unreachable_x21___rarg(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withUsedWhen_x27___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_inferType(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_collectUsedFVarsAtFVars___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabDefLike___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_dbgTrace___at_Lean_Elab_Command_elabDefLike___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); +lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Elab_Command_removeUnused___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +lean_object* lean_local_ctx_erase(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; -lean_object* lean_dbg_trace(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls(lean_object*); +lean_object* l_Lean_Elab_Command_elabDefVal___closed__2; +uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* l_Array_reverseAux___main___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_mkLambda(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__getVarDecls(lean_object*); lean_object* lean_array_get_size(lean_object*); -lean_object* lean_string_append(lean_object*, lean_object*); +extern lean_object* l___private_Init_Lean_Elab_Term_14__synthesizePendingInstMVar___lambda__1___closed__1; +extern lean_object* l_Lean_Parser_Command_declValEqns___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_elabDefVal___closed__1; +lean_object* l_Lean_Elab_Command_elabDefVal___closed__4; +lean_object* l_Lean_Elab_Command_elabDefVal(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_collectUsedFVarsAtFVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Elab_Command_DefKind_isExample(uint8_t); lean_object* l_Lean_Name_getNumParts___main(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_ensureHasType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkFreshTypeMVar(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Meta_dbgTrace___rarg___closed__1; -lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Elab_Command_removeUnused___spec__1___boxed(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* l_Lean_Elab_Command_collectUsedFVarsAtFVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2(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_Lean_Elab_Command_getCurrNamespace(lean_object*, lean_object*); -lean_object* l_Lean_Meta_dbgTrace___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_collectUsedFVarsAtFVars___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withUsedWhen_x27___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_throwUnexpectedSyntax___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_sub(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_DefKind_isTheorem___boxed(lean_object*); +lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; +lean_object* l_Lean_Expr_fvarId_x21(lean_object*); +lean_object* l_Lean_Elab_Command_elabDefVal___closed__5; +lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__2; +lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__1; lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__4(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1; -lean_object* l_Lean_Elab_Command_elabDefLike___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_mkDef___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_name_mk_string(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withUsedWhen(lean_object*); +lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Term_elabTypeStx___rarg___closed__1; +lean_object* l_Lean_Elab_Command_collectUsedFVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withUsedWhen___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1; -lean_object* lean_expr_dbg_to_string(lean_object*); +lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_LocalInstances_erase(lean_object*, lean_object*); +lean_object* l_Lean_CollectFVars_main___main(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withUsedWhen_x27(lean_object*); +lean_object* l_Lean_Elab_Command_DefKind_isDefOrOpaque___boxed(lean_object*); +lean_object* l_Lean_Elab_Term_getLocalInsts(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_modifyScope___closed__1; -lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Elab_Command_DefKind_isTheorem(uint8_t); uint8_t l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__4(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_withDeclId___closed__3; +lean_object* l_Lean_Elab_Command_sortDeclLevelParams(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDefVal___closed__3; lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__3(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_2__getState(lean_object*, lean_object*); lean_object* l_List_drop___main___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withUsedWhen___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_getLCtx(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_removeUnused___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArgs(lean_object*); +lean_object* l_Lean_Syntax_getKind(lean_object*); lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); +lean_object* l_Lean_Elab_Command_mkDef(lean_object*, lean_object*, lean_object*, lean_object*, 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*); +lean_object* l_Lean_Elab_Command_collectUsedFVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_removeUnused(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDefLike(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, 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_Lean_Elab_Command_removeUnused___closed__1; +uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +extern lean_object* l_HashMap_Inhabited___closed__1; lean_object* l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_5__mkTermContext(lean_object*, lean_object*); +uint8_t l_Lean_Elab_Command_DefKind_isDefOrOpaque(uint8_t); +lean_object* lean_task_pure(lean_object*); +lean_object* l_Lean_CollectLevelParams_main___main(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_DefKind_isExample___boxed(lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_9__mkTermState(lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_mkDef___lambda__1(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_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState(lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_8__mkTermContext(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +uint8_t l_Lean_Elab_Command_DefKind_isTheorem(uint8_t x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(x_1); +if (lean_obj_tag(x_2) == 1) +{ +uint8_t x_3; +x_3 = 1; +return x_3; +} +else +{ +uint8_t x_4; +lean_dec(x_2); +x_4 = 0; +return x_4; +} +} +} +lean_object* l_Lean_Elab_Command_DefKind_isTheorem___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; uint8_t x_3; lean_object* x_4; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_Elab_Command_DefKind_isTheorem(x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +uint8_t l_Lean_Elab_Command_DefKind_isDefOrOpaque(uint8_t x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(x_1); +switch (lean_obj_tag(x_2)) { +case 1: +{ +uint8_t x_3; +x_3 = 0; +return x_3; +} +case 2: +{ +uint8_t x_4; +x_4 = 0; +return x_4; +} +default: +{ +uint8_t x_5; +lean_dec(x_2); +x_5 = 1; +return x_5; +} +} +} +} +lean_object* l_Lean_Elab_Command_DefKind_isDefOrOpaque___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; uint8_t x_3; lean_object* x_4; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_Elab_Command_DefKind_isDefOrOpaque(x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +uint8_t l_Lean_Elab_Command_DefKind_isExample(uint8_t x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(x_1); +if (lean_obj_tag(x_2) == 2) +{ +uint8_t x_3; +x_3 = 1; +return x_3; +} +else +{ +uint8_t x_4; +lean_dec(x_2); +x_4 = 0; +return x_4; +} +} +} +lean_object* l_Lean_Elab_Command_DefKind_isExample___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; uint8_t x_3; lean_object* x_4; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_Elab_Command_DefKind_isExample(x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Lean_Elab_Command_collectUsedFVars(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; +x_6 = l_Lean_Elab_Term_instantiateMVars(x_1, x_3, x_4, x_5); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; +x_8 = lean_ctor_get(x_6, 0); +x_9 = l_Lean_CollectFVars_main___main(x_8, x_2); +lean_ctor_set(x_6, 0, x_9); +return x_6; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_6, 0); +x_11 = lean_ctor_get(x_6, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_6); +x_12 = l_Lean_CollectFVars_main___main(x_10, x_2); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_11); +return x_13; +} +} +} +lean_object* l_Lean_Elab_Command_collectUsedFVars___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_Lean_Elab_Command_collectUsedFVars(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_1); +return x_6; +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_collectUsedFVarsAtFVars___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* 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; lean_object* x_14; +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_6); +x_14 = l_Lean_Elab_Term_inferType(x_1, x_11, x_6, x_7); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +lean_inc(x_6); +x_17 = l_Lean_Elab_Command_collectUsedFVars(x_1, x_5, x_15, x_6, x_16); +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +x_4 = x_13; +x_5 = x_18; +x_7 = x_19; +goto _start; +} +else +{ +uint8_t x_21; +lean_dec(x_13); +lean_dec(x_6); +lean_dec(x_5); +x_21 = !lean_is_exclusive(x_14); +if (x_21 == 0) +{ +return x_14; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_14, 0); +x_23 = lean_ctor_get(x_14, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_14); +x_24 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); +return x_24; +} +} +} +} +} +lean_object* l_Lean_Elab_Command_collectUsedFVarsAtFVars(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; +x_6 = lean_unsigned_to_nat(0u); +x_7 = l_Array_iterateMAux___main___at_Lean_Elab_Command_collectUsedFVarsAtFVars___spec__1(x_1, x_3, x_3, x_6, x_2, x_4, x_5); +return x_7; +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_collectUsedFVarsAtFVars___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) { +_start: +{ +lean_object* x_8; +x_8 = l_Array_iterateMAux___main___at_Lean_Elab_Command_collectUsedFVarsAtFVars___spec__1(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_Lean_Elab_Command_collectUsedFVarsAtFVars___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_Lean_Elab_Command_collectUsedFVarsAtFVars(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_1); +return x_6; +} +} +lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Elab_Command_removeUnused___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* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_unsigned_to_nat(0u); +x_10 = lean_nat_dec_eq(x_4, x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_sub(x_4, x_11); +lean_dec(x_4); +x_13 = lean_array_fget(x_3, x_12); +x_14 = lean_ctor_get(x_6, 1); +lean_inc(x_14); +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +x_16 = !lean_is_exclusive(x_6); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_17 = lean_ctor_get(x_6, 0); +x_18 = lean_ctor_get(x_6, 1); +lean_dec(x_18); +x_19 = !lean_is_exclusive(x_14); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; +x_20 = lean_ctor_get(x_14, 0); +x_21 = lean_ctor_get(x_14, 1); +lean_dec(x_21); +x_22 = lean_ctor_get(x_15, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_15, 1); +lean_inc(x_23); +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +x_25 = l_Lean_Expr_fvarId_x21(x_13); +x_26 = l_Lean_NameSet_contains(x_24, x_25); +lean_dec(x_24); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +lean_dec(x_23); +lean_dec(x_22); +lean_dec(x_13); +lean_inc(x_25); +x_27 = lean_local_ctx_erase(x_17, x_25); +x_28 = l_Lean_LocalInstances_erase(x_20, x_25); +lean_dec(x_25); +lean_ctor_set(x_14, 0, x_28); +lean_ctor_set(x_6, 0, x_27); +x_4 = x_12; +x_5 = lean_box(0); +goto _start; +} +else +{ +uint8_t x_30; +lean_dec(x_25); +x_30 = !lean_is_exclusive(x_15); +if (x_30 == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_15, 1); +lean_dec(x_31); +x_32 = lean_ctor_get(x_15, 0); +lean_dec(x_32); +lean_inc(x_7); +lean_inc(x_13); +x_33 = l_Lean_Elab_Term_inferType(x_1, x_13, x_7, x_8); +if (lean_obj_tag(x_33) == 0) +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_33, 1); +lean_inc(x_35); +lean_dec(x_33); +lean_inc(x_7); +x_36 = l_Lean_Elab_Command_collectUsedFVars(x_1, x_23, x_34, x_7, x_35); +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_36, 1); +lean_inc(x_38); +lean_dec(x_36); +x_39 = lean_array_push(x_22, x_13); +lean_ctor_set(x_15, 1, x_37); +lean_ctor_set(x_15, 0, x_39); +x_4 = x_12; +x_5 = lean_box(0); +x_8 = x_38; +goto _start; +} +else +{ +uint8_t x_41; +lean_free_object(x_15); +lean_dec(x_23); +lean_dec(x_22); +lean_free_object(x_14); +lean_dec(x_20); +lean_free_object(x_6); +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_7); +x_41 = !lean_is_exclusive(x_33); +if (x_41 == 0) +{ +return x_33; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_33, 0); +x_43 = lean_ctor_get(x_33, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_33); +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_dec(x_15); +lean_inc(x_7); +lean_inc(x_13); +x_45 = l_Lean_Elab_Term_inferType(x_1, x_13, x_7, x_8); +if (lean_obj_tag(x_45) == 0) +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_46 = lean_ctor_get(x_45, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_45, 1); +lean_inc(x_47); +lean_dec(x_45); +lean_inc(x_7); +x_48 = l_Lean_Elab_Command_collectUsedFVars(x_1, x_23, x_46, x_7, x_47); +x_49 = lean_ctor_get(x_48, 0); +lean_inc(x_49); +x_50 = lean_ctor_get(x_48, 1); +lean_inc(x_50); +lean_dec(x_48); +x_51 = lean_array_push(x_22, x_13); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_49); +lean_ctor_set(x_14, 1, x_52); +x_4 = x_12; +x_5 = lean_box(0); +x_8 = x_50; +goto _start; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +lean_dec(x_23); +lean_dec(x_22); +lean_free_object(x_14); +lean_dec(x_20); +lean_free_object(x_6); +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_7); +x_54 = lean_ctor_get(x_45, 0); +lean_inc(x_54); +x_55 = lean_ctor_get(x_45, 1); +lean_inc(x_55); +if (lean_is_exclusive(x_45)) { + lean_ctor_release(x_45, 0); + lean_ctor_release(x_45, 1); + x_56 = x_45; +} else { + lean_dec_ref(x_45); + x_56 = lean_box(0); +} +if (lean_is_scalar(x_56)) { + x_57 = lean_alloc_ctor(1, 2, 0); +} else { + x_57 = x_56; +} +lean_ctor_set(x_57, 0, x_54); +lean_ctor_set(x_57, 1, x_55); +return x_57; +} +} +} +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; +x_58 = lean_ctor_get(x_14, 0); +lean_inc(x_58); +lean_dec(x_14); +x_59 = lean_ctor_get(x_15, 0); +lean_inc(x_59); +x_60 = lean_ctor_get(x_15, 1); +lean_inc(x_60); +x_61 = lean_ctor_get(x_60, 1); +lean_inc(x_61); +x_62 = l_Lean_Expr_fvarId_x21(x_13); +x_63 = l_Lean_NameSet_contains(x_61, x_62); +lean_dec(x_61); +if (x_63 == 0) +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; +lean_dec(x_60); +lean_dec(x_59); +lean_dec(x_13); +lean_inc(x_62); +x_64 = lean_local_ctx_erase(x_17, x_62); +x_65 = l_Lean_LocalInstances_erase(x_58, x_62); +lean_dec(x_62); +x_66 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_66, 0, x_65); +lean_ctor_set(x_66, 1, x_15); +lean_ctor_set(x_6, 1, x_66); +lean_ctor_set(x_6, 0, x_64); +x_4 = x_12; +x_5 = lean_box(0); +goto _start; +} +else +{ +lean_object* x_68; lean_object* x_69; +lean_dec(x_62); +if (lean_is_exclusive(x_15)) { + lean_ctor_release(x_15, 0); + lean_ctor_release(x_15, 1); + x_68 = x_15; +} else { + lean_dec_ref(x_15); + x_68 = lean_box(0); +} +lean_inc(x_7); +lean_inc(x_13); +x_69 = l_Lean_Elab_Term_inferType(x_1, x_13, x_7, x_8); +if (lean_obj_tag(x_69) == 0) +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_70 = lean_ctor_get(x_69, 0); +lean_inc(x_70); +x_71 = lean_ctor_get(x_69, 1); +lean_inc(x_71); +lean_dec(x_69); +lean_inc(x_7); +x_72 = l_Lean_Elab_Command_collectUsedFVars(x_1, x_60, x_70, x_7, x_71); +x_73 = lean_ctor_get(x_72, 0); +lean_inc(x_73); +x_74 = lean_ctor_get(x_72, 1); +lean_inc(x_74); +lean_dec(x_72); +x_75 = lean_array_push(x_59, x_13); +if (lean_is_scalar(x_68)) { + x_76 = lean_alloc_ctor(0, 2, 0); +} else { + x_76 = x_68; +} +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_73); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_58); +lean_ctor_set(x_77, 1, x_76); +lean_ctor_set(x_6, 1, x_77); +x_4 = x_12; +x_5 = lean_box(0); +x_8 = x_74; +goto _start; +} +else +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +lean_dec(x_68); +lean_dec(x_60); +lean_dec(x_59); +lean_dec(x_58); +lean_free_object(x_6); +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_7); +x_79 = lean_ctor_get(x_69, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_69, 1); +lean_inc(x_80); +if (lean_is_exclusive(x_69)) { + lean_ctor_release(x_69, 0); + lean_ctor_release(x_69, 1); + x_81 = x_69; +} else { + lean_dec_ref(x_69); + x_81 = lean_box(0); +} +if (lean_is_scalar(x_81)) { + x_82 = lean_alloc_ctor(1, 2, 0); +} else { + x_82 = x_81; +} +lean_ctor_set(x_82, 0, x_79); +lean_ctor_set(x_82, 1, x_80); +return x_82; +} +} +} +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_90; +x_83 = lean_ctor_get(x_6, 0); +lean_inc(x_83); +lean_dec(x_6); +x_84 = lean_ctor_get(x_14, 0); +lean_inc(x_84); +if (lean_is_exclusive(x_14)) { + lean_ctor_release(x_14, 0); + lean_ctor_release(x_14, 1); + x_85 = x_14; +} else { + lean_dec_ref(x_14); + x_85 = lean_box(0); +} +x_86 = lean_ctor_get(x_15, 0); +lean_inc(x_86); +x_87 = lean_ctor_get(x_15, 1); +lean_inc(x_87); +x_88 = lean_ctor_get(x_87, 1); +lean_inc(x_88); +x_89 = l_Lean_Expr_fvarId_x21(x_13); +x_90 = l_Lean_NameSet_contains(x_88, x_89); +lean_dec(x_88); +if (x_90 == 0) +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; +lean_dec(x_87); +lean_dec(x_86); +lean_dec(x_13); +lean_inc(x_89); +x_91 = lean_local_ctx_erase(x_83, x_89); +x_92 = l_Lean_LocalInstances_erase(x_84, x_89); +lean_dec(x_89); +if (lean_is_scalar(x_85)) { + x_93 = lean_alloc_ctor(0, 2, 0); +} else { + x_93 = x_85; +} +lean_ctor_set(x_93, 0, x_92); +lean_ctor_set(x_93, 1, x_15); +x_94 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_94, 0, x_91); +lean_ctor_set(x_94, 1, x_93); +x_4 = x_12; +x_5 = lean_box(0); +x_6 = x_94; +goto _start; +} +else +{ +lean_object* x_96; lean_object* x_97; +lean_dec(x_89); +if (lean_is_exclusive(x_15)) { + lean_ctor_release(x_15, 0); + lean_ctor_release(x_15, 1); + x_96 = x_15; +} else { + lean_dec_ref(x_15); + x_96 = lean_box(0); +} +lean_inc(x_7); +lean_inc(x_13); +x_97 = l_Lean_Elab_Term_inferType(x_1, x_13, x_7, x_8); +if (lean_obj_tag(x_97) == 0) +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; +x_98 = lean_ctor_get(x_97, 0); +lean_inc(x_98); +x_99 = lean_ctor_get(x_97, 1); +lean_inc(x_99); +lean_dec(x_97); +lean_inc(x_7); +x_100 = l_Lean_Elab_Command_collectUsedFVars(x_1, x_87, x_98, x_7, x_99); +x_101 = lean_ctor_get(x_100, 0); +lean_inc(x_101); +x_102 = lean_ctor_get(x_100, 1); +lean_inc(x_102); +lean_dec(x_100); +x_103 = lean_array_push(x_86, x_13); +if (lean_is_scalar(x_96)) { + x_104 = lean_alloc_ctor(0, 2, 0); +} else { + x_104 = x_96; +} +lean_ctor_set(x_104, 0, x_103); +lean_ctor_set(x_104, 1, x_101); +if (lean_is_scalar(x_85)) { + x_105 = lean_alloc_ctor(0, 2, 0); +} else { + x_105 = x_85; +} +lean_ctor_set(x_105, 0, x_84); +lean_ctor_set(x_105, 1, x_104); +x_106 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_106, 0, x_83); +lean_ctor_set(x_106, 1, x_105); +x_4 = x_12; +x_5 = lean_box(0); +x_6 = x_106; +x_8 = x_102; +goto _start; +} +else +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +lean_dec(x_96); +lean_dec(x_87); +lean_dec(x_86); +lean_dec(x_85); +lean_dec(x_84); +lean_dec(x_83); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_7); +x_108 = lean_ctor_get(x_97, 0); +lean_inc(x_108); +x_109 = lean_ctor_get(x_97, 1); +lean_inc(x_109); +if (lean_is_exclusive(x_97)) { + lean_ctor_release(x_97, 0); + lean_ctor_release(x_97, 1); + x_110 = x_97; +} else { + lean_dec_ref(x_97); + x_110 = lean_box(0); +} +if (lean_is_scalar(x_110)) { + x_111 = lean_alloc_ctor(1, 2, 0); +} else { + x_111 = x_110; +} +lean_ctor_set(x_111, 0, x_108); +lean_ctor_set(x_111, 1, x_109); +return x_111; +} +} +} +} +else +{ +lean_object* x_112; +lean_dec(x_7); +lean_dec(x_4); +x_112 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_112, 0, x_6); +lean_ctor_set(x_112, 1, x_8); +return x_112; +} +} +} +lean_object* _init_l_Lean_Elab_Command_removeUnused___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_HashMap_Inhabited___closed__1; +x_3 = lean_alloc_ctor(0, 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_removeUnused(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_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_8 = l_Lean_Elab_Command_removeUnused___closed__1; +lean_inc(x_6); +x_9 = l_Lean_Elab_Command_collectUsedFVars(x_1, x_8, x_5, x_6, x_7); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +lean_inc(x_6); +x_12 = l_Lean_Elab_Command_collectUsedFVars(x_1, x_10, x_4, x_6, x_11); +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_12, 1); +lean_inc(x_14); +lean_dec(x_12); +x_15 = lean_unsigned_to_nat(0u); +lean_inc(x_6); +x_16 = l_Array_iterateMAux___main___at_Lean_Elab_Command_collectUsedFVarsAtFVars___spec__1(x_1, x_3, x_3, x_15, x_13, x_6, x_14); +if (lean_obj_tag(x_16) == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); +lean_inc(x_18); +lean_dec(x_16); +x_19 = l_Lean_Elab_Term_getLocalInsts(x_6, x_18); +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = l_Lean_Elab_Term_getLCtx(x_6, x_21); +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = l_Array_empty___closed__1; +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_17); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_20); +lean_ctor_set(x_27, 1, x_26); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_27); +x_29 = lean_array_get_size(x_2); +x_30 = l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Elab_Command_removeUnused___spec__1(x_1, x_2, x_2, x_29, lean_box(0), x_28, x_6, x_24); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +x_33 = lean_ctor_get(x_32, 1); +lean_inc(x_33); +x_34 = !lean_is_exclusive(x_30); +if (x_34 == 0) +{ +lean_object* x_35; lean_object* x_36; uint8_t x_37; +x_35 = lean_ctor_get(x_30, 0); +lean_dec(x_35); +x_36 = lean_ctor_get(x_31, 0); +lean_inc(x_36); +lean_dec(x_31); +x_37 = !lean_is_exclusive(x_32); +if (x_37 == 0) +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_32, 0); +x_39 = lean_ctor_get(x_32, 1); +lean_dec(x_39); +x_40 = !lean_is_exclusive(x_33); +if (x_40 == 0) +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_33, 0); +x_42 = lean_ctor_get(x_33, 1); +lean_dec(x_42); +x_43 = l_Array_reverseAux___main___rarg(x_41, x_15); +lean_ctor_set(x_33, 1, x_43); +lean_ctor_set(x_33, 0, x_38); +lean_ctor_set(x_32, 0, x_36); +lean_ctor_set(x_30, 0, x_32); +return x_30; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_33, 0); +lean_inc(x_44); +lean_dec(x_33); +x_45 = l_Array_reverseAux___main___rarg(x_44, x_15); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_38); +lean_ctor_set(x_46, 1, x_45); +lean_ctor_set(x_32, 1, x_46); +lean_ctor_set(x_32, 0, x_36); +lean_ctor_set(x_30, 0, x_32); +return x_30; +} +} +else +{ +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_32, 0); +lean_inc(x_47); +lean_dec(x_32); +x_48 = lean_ctor_get(x_33, 0); +lean_inc(x_48); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + x_49 = x_33; +} else { + lean_dec_ref(x_33); + x_49 = lean_box(0); +} +x_50 = l_Array_reverseAux___main___rarg(x_48, x_15); +if (lean_is_scalar(x_49)) { + x_51 = lean_alloc_ctor(0, 2, 0); +} else { + x_51 = x_49; +} +lean_ctor_set(x_51, 0, x_47); +lean_ctor_set(x_51, 1, x_50); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_36); +lean_ctor_set(x_52, 1, x_51); +lean_ctor_set(x_30, 0, x_52); +return x_30; +} +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_53 = lean_ctor_get(x_30, 1); +lean_inc(x_53); +lean_dec(x_30); +x_54 = lean_ctor_get(x_31, 0); +lean_inc(x_54); +lean_dec(x_31); +x_55 = lean_ctor_get(x_32, 0); +lean_inc(x_55); +if (lean_is_exclusive(x_32)) { + lean_ctor_release(x_32, 0); + lean_ctor_release(x_32, 1); + x_56 = x_32; +} else { + lean_dec_ref(x_32); + x_56 = lean_box(0); +} +x_57 = lean_ctor_get(x_33, 0); +lean_inc(x_57); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + x_58 = x_33; +} else { + lean_dec_ref(x_33); + x_58 = lean_box(0); +} +x_59 = l_Array_reverseAux___main___rarg(x_57, x_15); +if (lean_is_scalar(x_58)) { + x_60 = lean_alloc_ctor(0, 2, 0); +} else { + x_60 = x_58; +} +lean_ctor_set(x_60, 0, x_55); +lean_ctor_set(x_60, 1, x_59); +if (lean_is_scalar(x_56)) { + x_61 = lean_alloc_ctor(0, 2, 0); +} else { + x_61 = x_56; +} +lean_ctor_set(x_61, 0, x_54); +lean_ctor_set(x_61, 1, x_60); +x_62 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_53); +return x_62; +} +} +else +{ +uint8_t x_63; +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 +{ +uint8_t x_67; +lean_dec(x_6); +x_67 = !lean_is_exclusive(x_16); +if (x_67 == 0) +{ +return x_16; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_16, 0); +x_69 = lean_ctor_get(x_16, 1); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_16); +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_69); +return x_70; +} +} +} +} +lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Elab_Command_removeUnused___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) { +_start: +{ +lean_object* x_9; +x_9 = l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Elab_Command_removeUnused___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_9; +} +} +lean_object* l_Lean_Elab_Command_removeUnused___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_removeUnused(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_Lean_Elab_Command_withUsedWhen___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, uint8_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +if (x_6 == 0) +{ +lean_object* x_10; +lean_dec(x_5); +lean_dec(x_4); +x_10 = lean_apply_3(x_7, x_2, x_8, x_9); +return x_10; +} +else +{ +lean_object* x_11; +lean_inc(x_8); +x_11 = l_Lean_Elab_Command_removeUnused(x_1, x_2, x_3, x_4, x_5, x_8, x_9); +lean_dec(x_2); +if (lean_obj_tag(x_11) == 0) +{ +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; uint8_t x_19; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_12, 1); +lean_inc(x_13); +x_14 = lean_ctor_get(x_8, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_11, 1); +lean_inc(x_15); +lean_dec(x_11); +x_16 = lean_ctor_get(x_12, 0); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_ctor_get(x_13, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_13, 1); +lean_inc(x_18); +lean_dec(x_13); +x_19 = !lean_is_exclusive(x_8); +if (x_19 == 0) +{ +lean_object* x_20; uint8_t x_21; +x_20 = lean_ctor_get(x_8, 0); +lean_dec(x_20); +x_21 = !lean_is_exclusive(x_14); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_14, 2); +lean_dec(x_22); +x_23 = lean_ctor_get(x_14, 1); +lean_dec(x_23); +lean_ctor_set(x_14, 2, x_17); +lean_ctor_set(x_14, 1, x_16); +x_24 = lean_apply_3(x_7, x_18, x_8, x_15); +return x_24; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_14, 0); +lean_inc(x_25); +lean_dec(x_14); +x_26 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_16); +lean_ctor_set(x_26, 2, x_17); +lean_ctor_set(x_8, 0, x_26); +x_27 = lean_apply_3(x_7, x_18, x_8, x_15); +return x_27; +} +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_28 = lean_ctor_get(x_8, 1); +x_29 = lean_ctor_get(x_8, 2); +x_30 = lean_ctor_get(x_8, 3); +x_31 = lean_ctor_get(x_8, 4); +x_32 = lean_ctor_get(x_8, 5); +x_33 = lean_ctor_get(x_8, 6); +x_34 = lean_ctor_get(x_8, 7); +x_35 = lean_ctor_get(x_8, 8); +x_36 = lean_ctor_get_uint8(x_8, sizeof(void*)*9); +lean_inc(x_35); +lean_inc(x_34); +lean_inc(x_33); +lean_inc(x_32); +lean_inc(x_31); +lean_inc(x_30); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_8); +x_37 = lean_ctor_get(x_14, 0); +lean_inc(x_37); +if (lean_is_exclusive(x_14)) { + lean_ctor_release(x_14, 0); + lean_ctor_release(x_14, 1); + lean_ctor_release(x_14, 2); + x_38 = x_14; +} else { + lean_dec_ref(x_14); + x_38 = lean_box(0); +} +if (lean_is_scalar(x_38)) { + x_39 = lean_alloc_ctor(0, 3, 0); +} else { + x_39 = x_38; +} +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_16); +lean_ctor_set(x_39, 2, x_17); +x_40 = lean_alloc_ctor(0, 9, 1); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_28); +lean_ctor_set(x_40, 2, x_29); +lean_ctor_set(x_40, 3, x_30); +lean_ctor_set(x_40, 4, x_31); +lean_ctor_set(x_40, 5, x_32); +lean_ctor_set(x_40, 6, x_33); +lean_ctor_set(x_40, 7, x_34); +lean_ctor_set(x_40, 8, x_35); +lean_ctor_set_uint8(x_40, sizeof(void*)*9, x_36); +x_41 = lean_apply_3(x_7, x_18, x_40, x_15); +return x_41; +} +} +else +{ +uint8_t x_42; +lean_dec(x_8); +lean_dec(x_7); +x_42 = !lean_is_exclusive(x_11); +if (x_42 == 0) +{ +return x_11; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_11, 0); +x_44 = lean_ctor_get(x_11, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_11); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +} +} +lean_object* l_Lean_Elab_Command_withUsedWhen(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_withUsedWhen___rarg___boxed), 9, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_withUsedWhen___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +uint8_t x_10; lean_object* x_11; +x_10 = lean_unbox(x_6); +lean_dec(x_6); +x_11 = l_Lean_Elab_Command_withUsedWhen___rarg(x_1, x_2, x_3, x_4, x_5, x_10, x_7, x_8, x_9); +lean_dec(x_3); +lean_dec(x_1); +return x_11; +} +} +lean_object* l_Lean_Elab_Command_withUsedWhen_x27___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; +x_9 = l_Lean_Elab_Term_elabTypeStx___rarg___closed__1; +x_10 = l_Lean_Elab_Command_withUsedWhen___rarg(x_1, x_2, x_3, x_4, x_9, x_5, x_6, x_7, x_8); +return x_10; +} +} +lean_object* l_Lean_Elab_Command_withUsedWhen_x27(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_withUsedWhen_x27___rarg___boxed), 8, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_withUsedWhen_x27___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +uint8_t x_9; lean_object* x_10; +x_9 = lean_unbox(x_5); +lean_dec(x_5); +x_10 = l_Lean_Elab_Command_withUsedWhen_x27___rarg(x_1, x_2, x_3, x_4, x_9, x_6, x_7, x_8); +lean_dec(x_3); +lean_dec(x_1); +return x_10; +} +} +lean_object* _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_HashMap_Inhabited___closed__1; +x_2 = l_Array_empty___closed__1; +x_3 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_1); +lean_ctor_set(x_3, 2, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__2() { +_start: +{ +uint32_t x_1; lean_object* x_2; +x_1 = 0; +x_2 = lean_alloc_ctor(2, 0, 4); +lean_ctor_set_uint32(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_mkDef___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, uint8_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +lean_object* x_12; +lean_inc(x_10); +lean_inc(x_2); +x_12 = l_Lean_Elab_Term_mkForall(x_1, x_2, x_3, x_10, x_11); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_12, 1); +lean_inc(x_14); +lean_dec(x_12); +lean_inc(x_10); +lean_inc(x_9); +x_15 = l_Lean_Elab_Term_mkForall(x_1, x_9, x_13, x_10, x_14); +if (lean_obj_tag(x_15) == 0) +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +lean_inc(x_10); +x_18 = l_Lean_Elab_Term_mkLambda(x_1, x_2, x_4, x_10, x_17); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +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); +lean_inc(x_10); +x_21 = l_Lean_Elab_Term_mkLambda(x_1, x_9, x_19, x_10, x_20); +if (lean_obj_tag(x_21) == 0) +{ +uint8_t x_22; +x_22 = !lean_is_exclusive(x_21); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_21, 0); +x_24 = lean_ctor_get(x_21, 1); +x_25 = l_Lean_Elab_Command_mkDef___lambda__1___closed__1; +lean_inc(x_16); +x_26 = l_Lean_CollectLevelParams_main___main(x_16, x_25); +lean_inc(x_23); +x_27 = l_Lean_CollectLevelParams_main___main(x_23, x_26); +x_28 = lean_ctor_get(x_27, 2); +lean_inc(x_28); +lean_dec(x_27); +x_29 = l_Lean_Elab_Command_sortDeclLevelParams(x_5, x_28); +switch (x_6) { +case 0: +{ +lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_dec(x_10); +x_30 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_30, 0, x_7); +lean_ctor_set(x_30, 1, x_29); +lean_ctor_set(x_30, 2, x_16); +x_31 = lean_ctor_get(x_8, 1); +x_32 = lean_ctor_get_uint8(x_31, sizeof(void*)*2 + 3); +x_33 = l_Lean_Elab_Command_mkDef___lambda__1___closed__2; +x_34 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_34, 0, x_30); +lean_ctor_set(x_34, 1, x_23); +lean_ctor_set(x_34, 2, x_33); +lean_ctor_set_uint8(x_34, sizeof(void*)*3, x_32); +x_35 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_35, 0, x_34); +x_36 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_21, 0, x_36); +return x_21; +} +case 1: +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +lean_dec(x_10); +x_37 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_37, 0, x_7); +lean_ctor_set(x_37, 1, x_29); +lean_ctor_set(x_37, 2, x_16); +x_38 = lean_task_pure(x_23); +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +x_40 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_40, 0, x_39); +x_41 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_21, 0, x_41); +return x_21; +} +case 2: +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +lean_dec(x_29); +lean_free_object(x_21); +lean_dec(x_23); +lean_dec(x_16); +lean_dec(x_7); +x_42 = l___private_Init_Lean_Elab_Term_14__synthesizePendingInstMVar___lambda__1___closed__1; +x_43 = l_unreachable_x21___rarg(x_42); +x_44 = lean_apply_2(x_43, x_10, x_24); +return x_44; +} +default: +{ +lean_object* x_45; lean_object* x_46; uint8_t x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +lean_dec(x_10); +x_45 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_45, 0, x_7); +lean_ctor_set(x_45, 1, x_29); +lean_ctor_set(x_45, 2, x_16); +x_46 = lean_ctor_get(x_8, 1); +x_47 = lean_ctor_get_uint8(x_46, sizeof(void*)*2 + 3); +x_48 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_48, 0, x_45); +lean_ctor_set(x_48, 1, x_23); +lean_ctor_set_uint8(x_48, sizeof(void*)*2, x_47); +x_49 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_49, 0, x_48); +x_50 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_21, 0, x_50); +return x_21; +} +} +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_51 = lean_ctor_get(x_21, 0); +x_52 = lean_ctor_get(x_21, 1); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_21); +x_53 = l_Lean_Elab_Command_mkDef___lambda__1___closed__1; +lean_inc(x_16); +x_54 = l_Lean_CollectLevelParams_main___main(x_16, x_53); +lean_inc(x_51); +x_55 = l_Lean_CollectLevelParams_main___main(x_51, x_54); +x_56 = lean_ctor_get(x_55, 2); +lean_inc(x_56); +lean_dec(x_55); +x_57 = l_Lean_Elab_Command_sortDeclLevelParams(x_5, x_56); +switch (x_6) { +case 0: +{ +lean_object* x_58; lean_object* x_59; uint8_t x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +lean_dec(x_10); +x_58 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_58, 0, x_7); +lean_ctor_set(x_58, 1, x_57); +lean_ctor_set(x_58, 2, x_16); +x_59 = lean_ctor_get(x_8, 1); +x_60 = lean_ctor_get_uint8(x_59, sizeof(void*)*2 + 3); +x_61 = l_Lean_Elab_Command_mkDef___lambda__1___closed__2; +x_62 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_62, 0, x_58); +lean_ctor_set(x_62, 1, x_51); +lean_ctor_set(x_62, 2, x_61); +lean_ctor_set_uint8(x_62, sizeof(void*)*3, x_60); +x_63 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_63, 0, x_62); +x_64 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_64, 0, x_63); +x_65 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_65, 0, x_64); +lean_ctor_set(x_65, 1, x_52); +return x_65; +} +case 1: +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +lean_dec(x_10); +x_66 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_66, 0, x_7); +lean_ctor_set(x_66, 1, x_57); +lean_ctor_set(x_66, 2, x_16); +x_67 = lean_task_pure(x_51); +x_68 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_68, 0, x_66); +lean_ctor_set(x_68, 1, x_67); +x_69 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_69, 0, x_68); +x_70 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_70, 0, x_69); +x_71 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_71, 0, x_70); +lean_ctor_set(x_71, 1, x_52); +return x_71; +} +case 2: +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +lean_dec(x_57); +lean_dec(x_51); +lean_dec(x_16); +lean_dec(x_7); +x_72 = l___private_Init_Lean_Elab_Term_14__synthesizePendingInstMVar___lambda__1___closed__1; +x_73 = l_unreachable_x21___rarg(x_72); +x_74 = lean_apply_2(x_73, x_10, x_52); +return x_74; +} +default: +{ +lean_object* x_75; lean_object* x_76; uint8_t x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; +lean_dec(x_10); +x_75 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_75, 0, x_7); +lean_ctor_set(x_75, 1, x_57); +lean_ctor_set(x_75, 2, x_16); +x_76 = lean_ctor_get(x_8, 1); +x_77 = lean_ctor_get_uint8(x_76, sizeof(void*)*2 + 3); +x_78 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_78, 0, x_75); +lean_ctor_set(x_78, 1, x_51); +lean_ctor_set_uint8(x_78, sizeof(void*)*2, x_77); +x_79 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_79, 0, x_78); +x_80 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_80, 0, x_79); +x_81 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_81, 0, x_80); +lean_ctor_set(x_81, 1, x_52); +return x_81; +} +} +} +} +else +{ +uint8_t x_82; +lean_dec(x_16); +lean_dec(x_10); +lean_dec(x_7); +lean_dec(x_5); +x_82 = !lean_is_exclusive(x_21); +if (x_82 == 0) +{ +return x_21; +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_21, 0); +x_84 = lean_ctor_get(x_21, 1); +lean_inc(x_84); +lean_inc(x_83); +lean_dec(x_21); +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; +} +} +} +else +{ +uint8_t x_86; +lean_dec(x_16); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_5); +x_86 = !lean_is_exclusive(x_18); +if (x_86 == 0) +{ +return x_18; +} +else +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_87 = lean_ctor_get(x_18, 0); +x_88 = lean_ctor_get(x_18, 1); +lean_inc(x_88); +lean_inc(x_87); +lean_dec(x_18); +x_89 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_88); +return x_89; +} +} +} +else +{ +uint8_t x_90; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_90 = !lean_is_exclusive(x_15); +if (x_90 == 0) +{ +return x_15; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_15, 0); +x_92 = lean_ctor_get(x_15, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_15); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; +} +} +} +else +{ +uint8_t x_94; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_94 = !lean_is_exclusive(x_12); +if (x_94 == 0) +{ +return x_12; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_95 = lean_ctor_get(x_12, 0); +x_96 = lean_ctor_get(x_12, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_12); +x_97 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_97, 0, x_95); +lean_ctor_set(x_97, 1, x_96); +return x_97; +} +} +} +} +lean_object* l_Lean_Elab_Command_mkDef(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_1, 0); +lean_inc(x_10); +x_11 = 0; +x_12 = lean_box(0); +lean_inc(x_8); +x_13 = l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(x_11, x_12, x_8, x_9); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_14 = lean_ctor_get(x_13, 1); +lean_inc(x_14); +lean_dec(x_13); +lean_inc(x_8); +x_15 = l_Lean_Elab_Term_instantiateMVars(x_10, x_6, x_8, x_14); +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = lean_ctor_get(x_1, 5); +lean_inc(x_18); +lean_inc(x_8); +x_19 = l_Lean_Elab_Term_instantiateMVars(x_18, x_7, x_8, x_17); +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); +lean_inc(x_8); +lean_inc(x_20); +x_22 = l_Lean_Elab_Term_inferType(x_18, x_20, x_8, x_21); +lean_dec(x_18); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +lean_inc(x_16); +x_25 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_25, 0, x_16); +lean_inc(x_8); +lean_inc(x_10); +x_26 = l_Lean_Elab_Term_ensureHasType(x_10, x_25, x_23, x_20, x_8, x_24); +if (lean_obj_tag(x_26) == 0) +{ +uint8_t x_27; +x_27 = !lean_is_exclusive(x_26); +if (x_27 == 0) +{ +lean_object* x_28; lean_object* x_29; uint8_t x_30; uint8_t x_31; +x_28 = lean_ctor_get(x_26, 0); +x_29 = lean_ctor_get(x_26, 1); +x_30 = lean_ctor_get_uint8(x_1, sizeof(void*)*6); +x_31 = l_Lean_Elab_Command_DefKind_isExample(x_30); +if (x_31 == 0) +{ +uint8_t x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_free_object(x_26); +x_32 = l_Lean_Elab_Command_DefKind_isDefOrOpaque(x_30); +x_33 = lean_box(x_30); +lean_inc(x_28); +lean_inc(x_16); +lean_inc(x_5); +lean_inc(x_10); +x_34 = lean_alloc_closure((void*)(l_Lean_Elab_Command_mkDef___lambda__1___boxed), 11, 8); +lean_closure_set(x_34, 0, x_10); +lean_closure_set(x_34, 1, x_5); +lean_closure_set(x_34, 2, x_16); +lean_closure_set(x_34, 3, x_28); +lean_closure_set(x_34, 4, x_3); +lean_closure_set(x_34, 5, x_33); +lean_closure_set(x_34, 6, x_2); +lean_closure_set(x_34, 7, x_1); +x_35 = l_Lean_Elab_Command_withUsedWhen___rarg(x_10, x_4, x_5, x_28, x_16, x_32, x_34, x_8, x_29); +lean_dec(x_5); +lean_dec(x_10); +return x_35; +} +else +{ +lean_object* x_36; +lean_dec(x_28); +lean_dec(x_16); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_36 = lean_box(0); +lean_ctor_set(x_26, 0, x_36); +return x_26; +} +} +else +{ +lean_object* x_37; lean_object* x_38; uint8_t x_39; uint8_t x_40; +x_37 = lean_ctor_get(x_26, 0); +x_38 = lean_ctor_get(x_26, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_26); +x_39 = lean_ctor_get_uint8(x_1, sizeof(void*)*6); +x_40 = l_Lean_Elab_Command_DefKind_isExample(x_39); +if (x_40 == 0) +{ +uint8_t x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_41 = l_Lean_Elab_Command_DefKind_isDefOrOpaque(x_39); +x_42 = lean_box(x_39); +lean_inc(x_37); +lean_inc(x_16); +lean_inc(x_5); +lean_inc(x_10); +x_43 = lean_alloc_closure((void*)(l_Lean_Elab_Command_mkDef___lambda__1___boxed), 11, 8); +lean_closure_set(x_43, 0, x_10); +lean_closure_set(x_43, 1, x_5); +lean_closure_set(x_43, 2, x_16); +lean_closure_set(x_43, 3, x_37); +lean_closure_set(x_43, 4, x_3); +lean_closure_set(x_43, 5, x_42); +lean_closure_set(x_43, 6, x_2); +lean_closure_set(x_43, 7, x_1); +x_44 = l_Lean_Elab_Command_withUsedWhen___rarg(x_10, x_4, x_5, x_37, x_16, x_41, x_43, x_8, x_38); +lean_dec(x_5); +lean_dec(x_10); +return x_44; +} +else +{ +lean_object* x_45; lean_object* x_46; +lean_dec(x_37); +lean_dec(x_16); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_45 = lean_box(0); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_38); +return x_46; +} +} +} +else +{ +uint8_t x_47; +lean_dec(x_16); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_47 = !lean_is_exclusive(x_26); +if (x_47 == 0) +{ +return x_26; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_26, 0); +x_49 = lean_ctor_get(x_26, 1); +lean_inc(x_49); +lean_inc(x_48); +lean_dec(x_26); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_48); +lean_ctor_set(x_50, 1, x_49); +return x_50; +} +} +} +else +{ +uint8_t x_51; +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_51 = !lean_is_exclusive(x_22); +if (x_51 == 0) +{ +return x_22; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_22, 0); +x_53 = lean_ctor_get(x_22, 1); +lean_inc(x_53); +lean_inc(x_52); +lean_dec(x_22); +x_54 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +return x_54; +} +} +} +else +{ +uint8_t x_55; +lean_dec(x_10); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_55 = !lean_is_exclusive(x_13); +if (x_55 == 0) +{ +return x_13; +} +else +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_13, 0); +x_57 = lean_ctor_get(x_13, 1); +lean_inc(x_57); +lean_inc(x_56); +lean_dec(x_13); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_mkDef___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +_start: +{ +uint8_t x_12; lean_object* x_13; +x_12 = lean_unbox(x_6); +lean_dec(x_6); +x_13 = l_Lean_Elab_Command_mkDef___lambda__1(x_1, x_2, x_3, x_4, x_5, x_12, x_7, x_8, x_9, x_10, x_11); +lean_dec(x_8); +lean_dec(x_1); +return x_13; +} +} +lean_object* _init_l_Lean_Elab_Command_elabDefVal___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("definition body"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabDefVal___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabDefVal___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabDefVal___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("equations have not been implemented yet"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabDefVal___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabDefVal___closed__3; +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_elabDefVal___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabDefVal___closed__4; +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_elabDefVal(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; +lean_inc(x_1); +x_5 = l_Lean_Syntax_getKind(x_1); +x_6 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; +x_7 = lean_name_eq(x_5, x_6); +if (x_7 == 0) +{ +lean_object* x_8; uint8_t x_9; +lean_dec(x_2); +x_8 = l_Lean_Parser_Command_declValEqns___elambda__1___closed__2; +x_9 = lean_name_eq(x_5, x_8); +lean_dec(x_5); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +x_10 = l_Lean_Elab_Command_elabDefVal___closed__2; +x_11 = l_Lean_Elab_Term_throwUnexpectedSyntax___rarg(x_1, x_10, x_3, x_4); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; +x_12 = l_Lean_Elab_Command_elabDefVal___closed__5; +x_13 = l_Lean_Elab_Term_throwError___rarg(x_1, x_12, x_3, x_4); +return x_13; +} +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; +lean_dec(x_5); +x_14 = lean_unsigned_to_nat(1u); +x_15 = l_Lean_Syntax_getArg(x_1, x_14); +lean_dec(x_1); +x_16 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_16, 0, x_2); +x_17 = 1; +x_18 = l_Lean_Elab_Term_elabTerm(x_15, x_16, x_17, x_17, x_3, x_4); +return x_18; +} +} +} lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -2230,17 +4197,7 @@ return x_119; } } } -lean_object* l_Lean_Elab_Term_dbgTrace___at_Lean_Elab_Command_elabDefLike___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = l_Lean_Meta_dbgTrace___rarg___closed__1; -x_5 = lean_dbg_trace(x_1, x_4); -x_6 = lean_apply_2(x_5, x_2, x_3); -return x_6; -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__5(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; @@ -2250,6 +4207,7 @@ lean_dec(x_7); if (x_8 == 0) { lean_object* x_9; +lean_dec(x_5); lean_dec(x_3); x_9 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_9, 0, x_4); @@ -2282,7 +4240,6 @@ lean_object* x_17; uint8_t x_18; lean_dec(x_12); lean_dec(x_4); x_17 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_10, x_13, x_5, x_6); -lean_dec(x_10); x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { @@ -2305,1124 +4262,1352 @@ return x_21; } } } -lean_object* _init_l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1() { +lean_object* l_Lean_Elab_Command_elabDefLike___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) { _start: { -lean_object* x_1; -x_1 = lean_mk_string(">>> "); -return x_1; -} -} -lean_object* l_Lean_Elab_Command_elabDefLike___lambda__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_9; lean_object* x_10; +x_9 = lean_ctor_get(x_1, 5); +lean_inc(x_9); +lean_inc(x_7); +lean_inc(x_2); +x_10 = l_Lean_Elab_Command_elabDefVal(x_9, x_2, x_7, x_8); +if (lean_obj_tag(x_10) == 0) { -lean_object* x_6; -x_6 = lean_ctor_get(x_1, 4); -lean_inc(x_6); -lean_dec(x_1); -if (lean_obj_tag(x_6) == 0) -{ -uint8_t x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; -lean_dec(x_3); -x_7 = 0; -x_8 = lean_box(0); -x_9 = l_Lean_Elab_Term_mkFreshTypeMVar(x_2, x_7, x_8, x_4, x_5); -x_10 = !lean_is_exclusive(x_9); -if (x_10 == 0) -{ -lean_object* x_11; lean_object* x_12; -x_11 = lean_ctor_get(x_9, 0); -lean_dec(x_11); -x_12 = lean_box(0); -lean_ctor_set(x_9, 0, x_12); -return x_9; +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_Elab_Command_mkDef(x_1, x_3, x_4, x_6, x_5, x_2, x_11, x_7, x_12); +return x_13; } else { -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_ctor_get(x_9, 1); -lean_inc(x_13); -lean_dec(x_9); -x_14 = lean_box(0); -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_13); -return x_15; -} -} -else -{ -lean_object* x_16; lean_object* x_17; -x_16 = lean_ctor_get(x_6, 0); -lean_inc(x_16); +uint8_t x_14; +lean_dec(x_7); lean_dec(x_6); -lean_inc(x_4); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_14 = !lean_is_exclusive(x_10); +if (x_14 == 0) +{ +return x_10; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_10, 0); +x_16 = lean_ctor_get(x_10, 1); lean_inc(x_16); -x_17 = l_Lean_Elab_Term_elabType(x_16, x_4, x_5); +lean_inc(x_15); +lean_dec(x_10); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +return x_17; +} +} +} +} +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; +x_10 = lean_ctor_get(x_1, 4); +lean_inc(x_10); +if (lean_obj_tag(x_10) == 0) +{ +uint8_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_11 = 0; +x_12 = lean_box(0); +lean_inc(x_8); +x_13 = l_Lean_Elab_Term_mkFreshTypeMVar(x_2, x_11, x_12, x_8, x_9); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_ctor_get(x_1, 5); +lean_inc(x_16); +lean_inc(x_8); +lean_inc(x_14); +x_17 = l_Lean_Elab_Command_elabDefVal(x_16, x_14, x_8, x_15); if (lean_obj_tag(x_17) == 0) { -lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; +lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = lean_ctor_get(x_17, 0); lean_inc(x_18); x_19 = lean_ctor_get(x_17, 1); lean_inc(x_19); lean_dec(x_17); -x_20 = 0; -x_21 = lean_box(0); -lean_inc(x_4); -x_22 = l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(x_20, x_21, x_4, x_19); -if (lean_obj_tag(x_22) == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_23 = lean_ctor_get(x_22, 1); -lean_inc(x_23); -lean_dec(x_22); -lean_inc(x_4); -x_24 = l_Lean_Elab_Term_instantiateMVars(x_16, x_18, x_4, x_23); -x_25 = lean_ctor_get(x_24, 0); -lean_inc(x_25); -x_26 = lean_ctor_get(x_24, 1); -lean_inc(x_26); -lean_dec(x_24); -lean_inc(x_4); -lean_inc(x_25); -x_27 = l_Lean_Elab_Term_mkForall(x_16, x_3, x_25, x_4, x_26); -lean_dec(x_16); -if (lean_obj_tag(x_27) == 0) -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_28 = lean_ctor_get(x_27, 1); -lean_inc(x_28); -lean_dec(x_27); -x_29 = lean_expr_dbg_to_string(x_25); -lean_dec(x_25); -x_30 = l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1; -x_31 = lean_string_append(x_30, x_29); -lean_dec(x_29); -x_32 = lean_alloc_closure((void*)(l_Lean_Meta_dbgTrace___rarg___lambda__1___boxed), 3, 0); -x_33 = lean_dbg_trace(x_31, x_32); -x_34 = lean_apply_2(x_33, x_4, x_28); -if (lean_obj_tag(x_34) == 0) -{ -uint8_t x_35; -x_35 = !lean_is_exclusive(x_34); -if (x_35 == 0) -{ -lean_object* x_36; -x_36 = lean_ctor_get(x_34, 0); -lean_dec(x_36); -lean_ctor_set(x_34, 0, x_21); -return x_34; +x_20 = l_Lean_Elab_Command_mkDef(x_1, x_3, x_4, x_5, x_7, x_14, x_18, x_8, x_19); +return x_20; } else { -lean_object* x_37; lean_object* x_38; -x_37 = lean_ctor_get(x_34, 1); -lean_inc(x_37); -lean_dec(x_34); -x_38 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_38, 0, x_21); -lean_ctor_set(x_38, 1, x_37); -return x_38; -} -} -else -{ -uint8_t x_39; -x_39 = !lean_is_exclusive(x_34); -if (x_39 == 0) -{ -return x_34; -} -else -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_34, 0); -x_41 = lean_ctor_get(x_34, 1); -lean_inc(x_41); -lean_inc(x_40); -lean_dec(x_34); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_40); -lean_ctor_set(x_42, 1, x_41); -return x_42; -} -} -} -else -{ -uint8_t x_43; -lean_dec(x_25); -lean_dec(x_4); -x_43 = !lean_is_exclusive(x_27); -if (x_43 == 0) -{ -return x_27; -} -else -{ -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_27, 0); -x_45 = lean_ctor_get(x_27, 1); -lean_inc(x_45); -lean_inc(x_44); -lean_dec(x_27); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_44); -lean_ctor_set(x_46, 1, x_45); -return x_46; -} -} -} -else -{ -uint8_t x_47; -lean_dec(x_18); -lean_dec(x_16); +uint8_t x_21; +lean_dec(x_14); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -x_47 = !lean_is_exclusive(x_22); -if (x_47 == 0) -{ -return x_22; -} -else -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_48 = lean_ctor_get(x_22, 0); -x_49 = lean_ctor_get(x_22, 1); -lean_inc(x_49); -lean_inc(x_48); -lean_dec(x_22); -x_50 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_50, 0, x_48); -lean_ctor_set(x_50, 1, x_49); -return x_50; -} -} -} -else -{ -uint8_t x_51; -lean_dec(x_16); -lean_dec(x_4); -lean_dec(x_3); -x_51 = !lean_is_exclusive(x_17); -if (x_51 == 0) +lean_dec(x_1); +x_21 = !lean_is_exclusive(x_17); +if (x_21 == 0) { return x_17; } else { -lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_52 = lean_ctor_get(x_17, 0); -x_53 = lean_ctor_get(x_17, 1); -lean_inc(x_53); -lean_inc(x_52); +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_17, 0); +x_23 = lean_ctor_get(x_17, 1); +lean_inc(x_23); +lean_inc(x_22); lean_dec(x_17); -x_54 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_54, 0, x_52); -lean_ctor_set(x_54, 1, x_53); -return x_54; +x_24 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); +return x_24; +} +} +} +else +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_10, 0); +lean_inc(x_25); +lean_dec(x_10); +lean_inc(x_8); +lean_inc(x_25); +x_26 = l_Lean_Elab_Term_elabType(x_25, x_8, x_9); +if (lean_obj_tag(x_26) == 0) +{ +lean_object* x_27; lean_object* x_28; uint8_t x_29; lean_object* x_30; lean_object* x_31; +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +x_28 = lean_ctor_get(x_26, 1); +lean_inc(x_28); +lean_dec(x_26); +x_29 = 0; +x_30 = lean_box(0); +lean_inc(x_8); +x_31 = l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(x_29, x_30, x_8, x_28); +if (lean_obj_tag(x_31) == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +lean_inc(x_8); +x_33 = l_Lean_Elab_Term_instantiateMVars(x_25, x_27, x_8, x_32); +lean_dec(x_25); +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_33, 1); +lean_inc(x_35); +lean_dec(x_33); +x_36 = lean_ctor_get_uint8(x_1, sizeof(void*)*6); +x_37 = l_Lean_Elab_Command_DefKind_isTheorem(x_36); +lean_inc(x_7); +lean_inc(x_34); +x_38 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDefLike___lambda__1), 8, 5); +lean_closure_set(x_38, 0, x_1); +lean_closure_set(x_38, 1, x_34); +lean_closure_set(x_38, 2, x_3); +lean_closure_set(x_38, 3, x_4); +lean_closure_set(x_38, 4, x_7); +x_39 = l_Lean_Elab_Command_withUsedWhen_x27___rarg(x_6, x_5, x_7, x_34, x_37, x_38, x_8, x_35); +lean_dec(x_7); +return x_39; +} +else +{ +uint8_t x_40; +lean_dec(x_27); +lean_dec(x_25); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_40 = !lean_is_exclusive(x_31); +if (x_40 == 0) +{ +return x_31; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_31, 0); +x_42 = lean_ctor_get(x_31, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_31); +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_25); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_44 = !lean_is_exclusive(x_26); +if (x_44 == 0) +{ +return x_26; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_26, 0); +x_46 = lean_ctor_get(x_26, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_26); +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; } } } } } -lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_Elab_Command_elabDefLike___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_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_5 = lean_ctor_get(x_1, 3); -lean_inc(x_5); -x_6 = l_Lean_Syntax_getArgs(x_5); -x_7 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDefLike___lambda__1___boxed), 5, 2); -lean_closure_set(x_7, 0, x_1); -lean_closure_set(x_7, 1, x_5); -x_8 = l_Lean_Elab_Term_elabBinders___rarg(x_6, x_7, x_3, x_4); -lean_dec(x_6); -return x_8; +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_ctor_get(x_1, 3); +lean_inc(x_8); +x_9 = l_Lean_Syntax_getArgs(x_8); +x_10 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDefLike___lambda__2___boxed), 9, 6); +lean_closure_set(x_10, 0, x_1); +lean_closure_set(x_10, 1, x_8); +lean_closure_set(x_10, 2, x_2); +lean_closure_set(x_10, 3, x_3); +lean_closure_set(x_10, 4, x_5); +lean_closure_set(x_10, 5, x_4); +x_11 = l_Lean_Elab_Term_elabBinders___rarg(x_9, x_10, x_6, x_7); +lean_dec(x_9); +return x_11; } } lean_object* l_Lean_Elab_Command_elabDefLike(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_4 = lean_ctor_get(x_1, 2); +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_4 = lean_ctor_get(x_1, 0); lean_inc(x_4); -x_5 = lean_unsigned_to_nat(0u); -x_6 = l_Lean_Syntax_getIdAt(x_4, x_5); -x_7 = lean_unsigned_to_nat(1u); -x_8 = l_Lean_Syntax_getArg(x_4, x_7); +x_5 = lean_ctor_get(x_1, 2); +lean_inc(x_5); +x_6 = lean_unsigned_to_nat(0u); +x_7 = l_Lean_Syntax_getIdAt(x_5, x_6); +x_8 = lean_unsigned_to_nat(1u); +x_9 = l_Lean_Syntax_getArg(x_5, x_8); lean_inc(x_2); -x_9 = l_Lean_Elab_Command_getLevelNames(x_2, x_3); -if (lean_obj_tag(x_9) == 0) +x_10 = l_Lean_Elab_Command_getLevelNames(x_2, x_3); +if (lean_obj_tag(x_10) == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_165; -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 1); +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_202; +x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_202 = l_Lean_Syntax_isNone(x_9); +if (x_202 == 0) +{ +lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; +x_203 = l_Lean_Syntax_getArg(x_9, x_8); lean_dec(x_9); -x_165 = l_Lean_Syntax_isNone(x_8); -if (x_165 == 0) +x_204 = l_Lean_Syntax_getArgs(x_203); +lean_dec(x_203); +x_205 = lean_unsigned_to_nat(2u); +x_206 = l_Array_empty___closed__1; +x_207 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(x_205, x_204, x_6, x_206); +lean_dec(x_204); +lean_inc(x_2); +lean_inc(x_11); +x_208 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__5(x_1, x_207, x_6, x_11, x_2, x_12); +lean_dec(x_207); +if (lean_obj_tag(x_208) == 0) { -lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; -x_166 = l_Lean_Syntax_getArg(x_8, x_7); -lean_dec(x_8); -x_167 = l_Lean_Syntax_getArgs(x_166); -lean_dec(x_166); -x_168 = lean_unsigned_to_nat(2u); -x_169 = l_Array_empty___closed__1; -x_170 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(x_168, x_167, x_5, x_169); -lean_dec(x_167); -lean_inc(x_10); -x_171 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6(x_1, x_170, x_5, x_10, x_2, x_11); -lean_dec(x_170); -if (lean_obj_tag(x_171) == 0) -{ -lean_object* x_172; lean_object* x_173; -x_172 = lean_ctor_get(x_171, 0); -lean_inc(x_172); -x_173 = lean_ctor_get(x_171, 1); -lean_inc(x_173); -lean_dec(x_171); -x_12 = x_172; -x_13 = x_173; -goto block_164; +lean_object* x_209; lean_object* x_210; +x_209 = lean_ctor_get(x_208, 0); +lean_inc(x_209); +x_210 = lean_ctor_get(x_208, 1); +lean_inc(x_210); +lean_dec(x_208); +x_13 = x_209; +x_14 = x_210; +goto block_201; } else { -uint8_t x_174; -lean_dec(x_10); -lean_dec(x_6); +uint8_t x_211; +lean_dec(x_11); +lean_dec(x_7); +lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_174 = !lean_is_exclusive(x_171); -if (x_174 == 0) +x_211 = !lean_is_exclusive(x_208); +if (x_211 == 0) { -return x_171; +return x_208; } else { -lean_object* x_175; lean_object* x_176; lean_object* x_177; -x_175 = lean_ctor_get(x_171, 0); -x_176 = lean_ctor_get(x_171, 1); -lean_inc(x_176); -lean_inc(x_175); -lean_dec(x_171); -x_177 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_177, 0, x_175); -lean_ctor_set(x_177, 1, x_176); -return x_177; +lean_object* x_212; lean_object* x_213; lean_object* x_214; +x_212 = lean_ctor_get(x_208, 0); +x_213 = lean_ctor_get(x_208, 1); +lean_inc(x_213); +lean_inc(x_212); +lean_dec(x_208); +x_214 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_214, 0, x_212); +lean_ctor_set(x_214, 1, x_213); +return x_214; } } } else { -lean_dec(x_8); -lean_inc(x_10); -x_12 = x_10; +lean_dec(x_9); +lean_inc(x_11); x_13 = x_11; -goto block_164; +x_14 = x_12; +goto block_201; } -block_164: +block_201: { -if (lean_obj_tag(x_6) == 1) +if (lean_obj_tag(x_7) == 1) { -lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; -x_14 = lean_ctor_get(x_6, 0); -lean_inc(x_14); -lean_dec(x_6); -x_15 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; -x_16 = 1; +lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; +x_15 = lean_ctor_get(x_7, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_7, 1); +lean_inc(x_16); +lean_dec(x_7); +x_17 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; +x_18 = 1; lean_inc(x_2); -lean_inc(x_14); -x_17 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_4, x_15, x_16, x_14, x_2, x_13); -lean_dec(x_4); -if (lean_obj_tag(x_17) == 0) -{ -lean_object* x_18; lean_object* x_19; -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); -lean_inc(x_2); -x_19 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__1(x_12, x_2, x_18); +lean_inc(x_15); +x_19 = l___private_Init_Lean_Elab_Command_13__addScopes___main(x_5, x_17, x_18, x_15, x_2, x_14); if (lean_obj_tag(x_19) == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_72; lean_object* x_73; lean_object* x_84; +lean_object* x_20; lean_object* x_21; x_20 = lean_ctor_get(x_19, 1); lean_inc(x_20); lean_dec(x_19); lean_inc(x_2); -x_84 = l_Lean_Elab_Command_getCurrNamespace(x_2, x_20); -if (lean_obj_tag(x_84) == 0) +x_21 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__1(x_13, x_2, x_20); +if (lean_obj_tag(x_21) == 0) { -lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_85 = lean_ctor_get(x_84, 1); -lean_inc(x_85); -lean_dec(x_84); -x_86 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDefLike___lambda__2___boxed), 4, 1); -lean_closure_set(x_86, 0, x_1); -lean_inc(x_2); -x_87 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_85); -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; lean_object* x_93; -x_88 = lean_ctor_get(x_87, 0); +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_76; lean_object* x_77; lean_object* x_88; lean_object* x_89; +x_22 = lean_ctor_get(x_21, 1); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_box(0); +x_24 = lean_name_mk_string(x_23, x_16); +x_88 = lean_ctor_get(x_1, 1); lean_inc(x_88); -x_89 = lean_ctor_get(x_87, 1); -lean_inc(x_89); -lean_dec(x_87); -x_90 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_88); -x_91 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_88); -x_92 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_88); +lean_inc(x_2); +x_89 = l_Lean_Elab_Command_mkDeclName(x_88, x_24, x_2, x_22); +if (lean_obj_tag(x_89) == 0) +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; uint8_t x_113; lean_object* x_114; +x_90 = lean_ctor_get(x_89, 0); +lean_inc(x_90); +x_91 = lean_ctor_get(x_89, 1); +lean_inc(x_91); +lean_dec(x_89); +x_92 = lean_ctor_get(x_88, 1); +lean_inc(x_92); lean_dec(x_88); -x_93 = l_Lean_Elab_Term_elabBinders___rarg(x_90, x_86, x_91, x_92); -lean_dec(x_90); -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_93, 0); -lean_inc(x_94); -x_95 = lean_ctor_get(x_93, 1); -lean_inc(x_95); -lean_dec(x_93); +x_113 = 2; lean_inc(x_2); -x_96 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_89); -if (lean_obj_tag(x_96) == 0) +lean_inc(x_90); +x_114 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_4, x_90, x_113, x_92, x_6, x_2, x_91); +if (lean_obj_tag(x_114) == 0) { -lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; uint8_t x_102; -x_97 = lean_ctor_get(x_95, 0); -lean_inc(x_97); -x_98 = lean_ctor_get(x_96, 0); -lean_inc(x_98); -x_99 = lean_ctor_get(x_96, 1); -lean_inc(x_99); -lean_dec(x_96); -x_100 = lean_ctor_get(x_97, 0); -lean_inc(x_100); -lean_dec(x_97); -x_101 = lean_ctor_get(x_95, 2); -lean_inc(x_101); -lean_dec(x_95); -x_102 = !lean_is_exclusive(x_98); -if (x_102 == 0) -{ -lean_object* x_103; lean_object* x_104; lean_object* x_105; -x_103 = lean_ctor_get(x_98, 1); -lean_dec(x_103); -x_104 = lean_ctor_get(x_98, 0); -lean_dec(x_104); -lean_ctor_set(x_98, 1, x_101); -lean_ctor_set(x_98, 0, x_100); -lean_inc(x_2); -x_105 = l___private_Init_Lean_Elab_Command_3__setState(x_98, x_2, x_99); -if (lean_obj_tag(x_105) == 0) -{ -lean_object* x_106; -x_106 = lean_ctor_get(x_105, 1); -lean_inc(x_106); -lean_dec(x_105); -x_21 = x_94; -x_22 = x_106; -goto block_71; -} -else -{ -lean_object* x_107; lean_object* x_108; -lean_dec(x_94); -lean_dec(x_14); -x_107 = lean_ctor_get(x_105, 0); -lean_inc(x_107); -x_108 = lean_ctor_get(x_105, 1); -lean_inc(x_108); -lean_dec(x_105); -x_72 = x_107; -x_73 = x_108; -goto block_83; -} -} -else -{ -lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; -x_109 = lean_ctor_get(x_98, 2); -x_110 = lean_ctor_get(x_98, 3); -lean_inc(x_110); -lean_inc(x_109); -lean_dec(x_98); -x_111 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_111, 0, x_100); -lean_ctor_set(x_111, 1, x_101); -lean_ctor_set(x_111, 2, x_109); -lean_ctor_set(x_111, 3, x_110); -lean_inc(x_2); -x_112 = l___private_Init_Lean_Elab_Command_3__setState(x_111, x_2, x_99); -if (lean_obj_tag(x_112) == 0) -{ -lean_object* x_113; -x_113 = lean_ctor_get(x_112, 1); -lean_inc(x_113); -lean_dec(x_112); -x_21 = x_94; -x_22 = x_113; -goto block_71; -} -else -{ -lean_object* x_114; lean_object* x_115; -lean_dec(x_94); -lean_dec(x_14); -x_114 = lean_ctor_get(x_112, 0); -lean_inc(x_114); -x_115 = lean_ctor_get(x_112, 1); +lean_object* x_115; lean_object* x_116; +x_115 = lean_ctor_get(x_114, 1); lean_inc(x_115); -lean_dec(x_112); -x_72 = x_114; -x_73 = x_115; -goto block_83; -} -} -} -else +lean_dec(x_114); +lean_inc(x_2); +x_116 = l_Lean_Elab_Command_getLevelNames(x_2, x_115); +if (lean_obj_tag(x_116) == 0) { -lean_object* x_116; lean_object* x_117; -lean_dec(x_95); -lean_dec(x_94); -lean_dec(x_14); -x_116 = lean_ctor_get(x_96, 0); -lean_inc(x_116); -x_117 = lean_ctor_get(x_96, 1); +lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_117 = lean_ctor_get(x_116, 0); lean_inc(x_117); -lean_dec(x_96); -x_72 = x_116; -x_73 = x_117; -goto block_83; -} -} -else -{ -lean_object* x_118; -x_118 = lean_ctor_get(x_93, 0); +x_118 = lean_ctor_get(x_116, 1); lean_inc(x_118); -if (lean_obj_tag(x_118) == 0) -{ -lean_object* x_119; lean_object* x_120; lean_object* x_121; -lean_dec(x_14); -x_119 = lean_ctor_get(x_93, 1); -lean_inc(x_119); -lean_dec(x_93); -x_120 = lean_ctor_get(x_118, 0); -lean_inc(x_120); -lean_dec(x_118); +lean_dec(x_116); +lean_inc(x_4); +lean_inc(x_90); +x_119 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDefLike___lambda__3), 7, 4); +lean_closure_set(x_119, 0, x_1); +lean_closure_set(x_119, 1, x_90); +lean_closure_set(x_119, 2, x_117); +lean_closure_set(x_119, 3, x_4); lean_inc(x_2); -x_121 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_89); -if (lean_obj_tag(x_121) == 0) +x_120 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_118); +if (lean_obj_tag(x_120) == 0) { -lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; uint8_t x_127; -x_122 = lean_ctor_get(x_119, 0); +lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; +x_121 = lean_ctor_get(x_120, 0); +lean_inc(x_121); +x_122 = lean_ctor_get(x_120, 1); lean_inc(x_122); -x_123 = lean_ctor_get(x_121, 0); -lean_inc(x_123); -x_124 = lean_ctor_get(x_121, 1); -lean_inc(x_124); -lean_dec(x_121); -x_125 = lean_ctor_get(x_122, 0); -lean_inc(x_125); -lean_dec(x_122); -x_126 = lean_ctor_get(x_119, 2); -lean_inc(x_126); -lean_dec(x_119); -x_127 = !lean_is_exclusive(x_123); -if (x_127 == 0) -{ -lean_object* x_128; lean_object* x_129; lean_object* x_130; -x_128 = lean_ctor_get(x_123, 1); -lean_dec(x_128); -x_129 = lean_ctor_get(x_123, 0); -lean_dec(x_129); -lean_ctor_set(x_123, 1, x_126); -lean_ctor_set(x_123, 0, x_125); -lean_inc(x_2); -x_130 = l___private_Init_Lean_Elab_Command_3__setState(x_123, x_2, x_124); -if (lean_obj_tag(x_130) == 0) -{ -lean_object* x_131; -x_131 = lean_ctor_get(x_130, 1); -lean_inc(x_131); -lean_dec(x_130); -x_72 = x_120; -x_73 = x_131; -goto block_83; -} -else -{ -lean_object* x_132; lean_object* x_133; lean_dec(x_120); -x_132 = lean_ctor_get(x_130, 0); +x_123 = l___private_Init_Lean_Elab_Command_10__getVarDecls(x_121); +x_124 = l___private_Init_Lean_Elab_Command_8__mkTermContext(x_2, x_121); +x_125 = l___private_Init_Lean_Elab_Command_9__mkTermState(x_121); +lean_dec(x_121); +x_126 = l_Lean_Elab_Term_elabBinders___rarg(x_123, x_119, x_124, x_125); +lean_dec(x_123); +if (lean_obj_tag(x_126) == 0) +{ +lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_127 = lean_ctor_get(x_126, 0); +lean_inc(x_127); +x_128 = lean_ctor_get(x_126, 1); +lean_inc(x_128); +lean_dec(x_126); +lean_inc(x_2); +x_129 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_122); +if (lean_obj_tag(x_129) == 0) +{ +lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; uint8_t x_135; +x_130 = lean_ctor_get(x_128, 0); +lean_inc(x_130); +x_131 = lean_ctor_get(x_129, 0); +lean_inc(x_131); +x_132 = lean_ctor_get(x_129, 1); lean_inc(x_132); -x_133 = lean_ctor_get(x_130, 1); +lean_dec(x_129); +x_133 = lean_ctor_get(x_130, 0); lean_inc(x_133); lean_dec(x_130); -x_72 = x_132; -x_73 = x_133; -goto block_83; -} -} -else -{ -lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; -x_134 = lean_ctor_get(x_123, 2); -x_135 = lean_ctor_get(x_123, 3); -lean_inc(x_135); +x_134 = lean_ctor_get(x_128, 2); lean_inc(x_134); -lean_dec(x_123); -x_136 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_136, 0, x_125); -lean_ctor_set(x_136, 1, x_126); -lean_ctor_set(x_136, 2, x_134); -lean_ctor_set(x_136, 3, x_135); -lean_inc(x_2); -x_137 = l___private_Init_Lean_Elab_Command_3__setState(x_136, x_2, x_124); -if (lean_obj_tag(x_137) == 0) +lean_dec(x_128); +x_135 = !lean_is_exclusive(x_131); +if (x_135 == 0) { -lean_object* x_138; -x_138 = lean_ctor_get(x_137, 1); -lean_inc(x_138); +lean_object* x_136; lean_object* x_137; lean_object* x_138; +x_136 = lean_ctor_get(x_131, 1); +lean_dec(x_136); +x_137 = lean_ctor_get(x_131, 0); lean_dec(x_137); -x_72 = x_120; -x_73 = x_138; -goto block_83; -} -else +lean_ctor_set(x_131, 1, x_134); +lean_ctor_set(x_131, 0, x_133); +lean_inc(x_2); +x_138 = l___private_Init_Lean_Elab_Command_3__setState(x_131, x_2, x_132); +if (lean_obj_tag(x_138) == 0) { -lean_object* x_139; lean_object* x_140; -lean_dec(x_120); -x_139 = lean_ctor_get(x_137, 0); +lean_object* x_139; +x_139 = lean_ctor_get(x_138, 1); lean_inc(x_139); -x_140 = lean_ctor_get(x_137, 1); +lean_dec(x_138); +x_93 = x_127; +x_94 = x_139; +goto block_112; +} +else +{ +lean_object* x_140; lean_object* x_141; +lean_dec(x_127); +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +x_140 = lean_ctor_get(x_138, 0); lean_inc(x_140); -lean_dec(x_137); -x_72 = x_139; -x_73 = x_140; -goto block_83; -} -} -} -else -{ -lean_object* x_141; lean_object* x_142; -lean_dec(x_120); -lean_dec(x_119); -x_141 = lean_ctor_get(x_121, 0); +x_141 = lean_ctor_get(x_138, 1); lean_inc(x_141); -x_142 = lean_ctor_get(x_121, 1); -lean_inc(x_142); -lean_dec(x_121); -x_72 = x_141; -x_73 = x_142; -goto block_83; +lean_dec(x_138); +x_76 = x_140; +x_77 = x_141; +goto block_87; } } else { -lean_object* x_143; lean_object* x_144; lean_object* x_145; -lean_dec(x_93); -x_143 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; -x_144 = l_unreachable_x21___rarg(x_143); +lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; +x_142 = lean_ctor_get(x_131, 2); +x_143 = lean_ctor_get(x_131, 3); +lean_inc(x_143); +lean_inc(x_142); +lean_dec(x_131); +x_144 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_144, 0, x_133); +lean_ctor_set(x_144, 1, x_134); +lean_ctor_set(x_144, 2, x_142); +lean_ctor_set(x_144, 3, x_143); lean_inc(x_2); -x_145 = lean_apply_2(x_144, x_2, x_89); +x_145 = l___private_Init_Lean_Elab_Command_3__setState(x_144, x_2, x_132); if (lean_obj_tag(x_145) == 0) { -lean_object* x_146; lean_object* x_147; -x_146 = lean_ctor_get(x_145, 0); +lean_object* x_146; +x_146 = lean_ctor_get(x_145, 1); lean_inc(x_146); -x_147 = lean_ctor_get(x_145, 1); +lean_dec(x_145); +x_93 = x_127; +x_94 = x_146; +goto block_112; +} +else +{ +lean_object* x_147; lean_object* x_148; +lean_dec(x_127); +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +x_147 = lean_ctor_get(x_145, 0); lean_inc(x_147); -lean_dec(x_145); -x_21 = x_146; -x_22 = x_147; -goto block_71; -} -else -{ -lean_object* x_148; lean_object* x_149; -lean_dec(x_14); -x_148 = lean_ctor_get(x_145, 0); +x_148 = lean_ctor_get(x_145, 1); lean_inc(x_148); -x_149 = lean_ctor_get(x_145, 1); -lean_inc(x_149); lean_dec(x_145); -x_72 = x_148; -x_73 = x_149; -goto block_83; -} +x_76 = x_147; +x_77 = x_148; +goto block_87; } } } else { -lean_object* x_150; lean_object* x_151; -lean_dec(x_86); -lean_dec(x_14); -x_150 = lean_ctor_get(x_87, 0); +lean_object* x_149; lean_object* x_150; +lean_dec(x_128); +lean_dec(x_127); +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +x_149 = lean_ctor_get(x_129, 0); +lean_inc(x_149); +x_150 = lean_ctor_get(x_129, 1); lean_inc(x_150); -x_151 = lean_ctor_get(x_87, 1); +lean_dec(x_129); +x_76 = x_149; +x_77 = x_150; +goto block_87; +} +} +else +{ +lean_object* x_151; +x_151 = lean_ctor_get(x_126, 0); lean_inc(x_151); -lean_dec(x_87); -x_72 = x_150; -x_73 = x_151; -goto block_83; -} -} -else +if (lean_obj_tag(x_151) == 0) { -lean_object* x_152; lean_object* x_153; -lean_dec(x_14); -lean_dec(x_1); -x_152 = lean_ctor_get(x_84, 0); +lean_object* x_152; lean_object* x_153; lean_object* x_154; +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +x_152 = lean_ctor_get(x_126, 1); lean_inc(x_152); -x_153 = lean_ctor_get(x_84, 1); +lean_dec(x_126); +x_153 = lean_ctor_get(x_151, 0); lean_inc(x_153); -lean_dec(x_84); -x_72 = x_152; -x_73 = x_153; -goto block_83; +lean_dec(x_151); +lean_inc(x_2); +x_154 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_122); +if (lean_obj_tag(x_154) == 0) +{ +lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; uint8_t x_160; +x_155 = lean_ctor_get(x_152, 0); +lean_inc(x_155); +x_156 = lean_ctor_get(x_154, 0); +lean_inc(x_156); +x_157 = lean_ctor_get(x_154, 1); +lean_inc(x_157); +lean_dec(x_154); +x_158 = lean_ctor_get(x_155, 0); +lean_inc(x_158); +lean_dec(x_155); +x_159 = lean_ctor_get(x_152, 2); +lean_inc(x_159); +lean_dec(x_152); +x_160 = !lean_is_exclusive(x_156); +if (x_160 == 0) +{ +lean_object* x_161; lean_object* x_162; lean_object* x_163; +x_161 = lean_ctor_get(x_156, 1); +lean_dec(x_161); +x_162 = lean_ctor_get(x_156, 0); +lean_dec(x_162); +lean_ctor_set(x_156, 1, x_159); +lean_ctor_set(x_156, 0, x_158); +lean_inc(x_2); +x_163 = l___private_Init_Lean_Elab_Command_3__setState(x_156, x_2, x_157); +if (lean_obj_tag(x_163) == 0) +{ +lean_object* x_164; +x_164 = lean_ctor_get(x_163, 1); +lean_inc(x_164); +lean_dec(x_163); +x_76 = x_153; +x_77 = x_164; +goto block_87; } -block_71: +else { -lean_object* x_23; +lean_object* x_165; lean_object* x_166; +lean_dec(x_153); +x_165 = lean_ctor_get(x_163, 0); +lean_inc(x_165); +x_166 = lean_ctor_get(x_163, 1); +lean_inc(x_166); +lean_dec(x_163); +x_76 = x_165; +x_77 = x_166; +goto block_87; +} +} +else +{ +lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; +x_167 = lean_ctor_get(x_156, 2); +x_168 = lean_ctor_get(x_156, 3); +lean_inc(x_168); +lean_inc(x_167); +lean_dec(x_156); +x_169 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_169, 0, x_158); +lean_ctor_set(x_169, 1, x_159); +lean_ctor_set(x_169, 2, x_167); +lean_ctor_set(x_169, 3, x_168); lean_inc(x_2); -lean_inc(x_10); -x_23 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__2(x_10, x_2, x_22); -if (lean_obj_tag(x_23) == 0) +x_170 = l___private_Init_Lean_Elab_Command_3__setState(x_169, x_2, x_157); +if (lean_obj_tag(x_170) == 0) { -lean_object* x_24; lean_object* x_25; -lean_dec(x_10); -x_24 = lean_ctor_get(x_23, 1); -lean_inc(x_24); -lean_dec(x_23); +lean_object* x_171; +x_171 = lean_ctor_get(x_170, 1); +lean_inc(x_171); +lean_dec(x_170); +x_76 = x_153; +x_77 = x_171; +goto block_87; +} +else +{ +lean_object* x_172; lean_object* x_173; +lean_dec(x_153); +x_172 = lean_ctor_get(x_170, 0); +lean_inc(x_172); +x_173 = lean_ctor_get(x_170, 1); +lean_inc(x_173); +lean_dec(x_170); +x_76 = x_172; +x_77 = x_173; +goto block_87; +} +} +} +else +{ +lean_object* x_174; lean_object* x_175; +lean_dec(x_153); +lean_dec(x_152); +x_174 = lean_ctor_get(x_154, 0); +lean_inc(x_174); +x_175 = lean_ctor_get(x_154, 1); +lean_inc(x_175); +lean_dec(x_154); +x_76 = x_174; +x_77 = x_175; +goto block_87; +} +} +else +{ +lean_object* x_176; lean_object* x_177; lean_object* x_178; +lean_dec(x_126); +x_176 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +x_177 = l_unreachable_x21___rarg(x_176); lean_inc(x_2); -x_25 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_24); -if (lean_obj_tag(x_25) == 0) +x_178 = lean_apply_2(x_177, x_2, x_122); +if (lean_obj_tag(x_178) == 0) { -lean_object* x_26; lean_object* x_27; uint8_t x_28; -x_26 = lean_ctor_get(x_25, 0); -lean_inc(x_26); -x_27 = lean_ctor_get(x_25, 1); -lean_inc(x_27); -lean_dec(x_25); -x_28 = !lean_is_exclusive(x_26); -if (x_28 == 0) +lean_object* x_179; lean_object* x_180; +x_179 = lean_ctor_get(x_178, 0); +lean_inc(x_179); +x_180 = lean_ctor_get(x_178, 1); +lean_inc(x_180); +lean_dec(x_178); +x_93 = x_179; +x_94 = x_180; +goto block_112; +} +else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_26, 2); -x_30 = l_Lean_Name_getNumParts___main(x_14); -lean_dec(x_14); -x_31 = l_List_drop___main___rarg(x_30, x_29); +lean_object* x_181; lean_object* x_182; +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +x_181 = lean_ctor_get(x_178, 0); +lean_inc(x_181); +x_182 = lean_ctor_get(x_178, 1); +lean_inc(x_182); +lean_dec(x_178); +x_76 = x_181; +x_77 = x_182; +goto block_87; +} +} +} +} +else +{ +lean_object* x_183; lean_object* x_184; +lean_dec(x_119); +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +x_183 = lean_ctor_get(x_120, 0); +lean_inc(x_183); +x_184 = lean_ctor_get(x_120, 1); +lean_inc(x_184); +lean_dec(x_120); +x_76 = x_183; +x_77 = x_184; +goto block_87; +} +} +else +{ +lean_object* x_185; lean_object* x_186; +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +lean_dec(x_1); +x_185 = lean_ctor_get(x_116, 0); +lean_inc(x_185); +x_186 = lean_ctor_get(x_116, 1); +lean_inc(x_186); +lean_dec(x_116); +x_76 = x_185; +x_77 = x_186; +goto block_87; +} +} +else +{ +lean_object* x_187; lean_object* x_188; +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +lean_dec(x_1); +x_187 = lean_ctor_get(x_114, 0); +lean_inc(x_187); +x_188 = lean_ctor_get(x_114, 1); +lean_inc(x_188); +lean_dec(x_114); +x_76 = x_187; +x_77 = x_188; +goto block_87; +} +block_112: +{ +if (lean_obj_tag(x_93) == 0) +{ +lean_object* x_95; +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_4); +x_95 = lean_box(0); +x_25 = x_95; +x_26 = x_94; +goto block_75; +} +else +{ +lean_object* x_96; lean_object* x_97; +x_96 = lean_ctor_get(x_93, 0); +lean_inc(x_96); +lean_dec(x_93); +lean_inc(x_2); +lean_inc(x_4); +x_97 = l_Lean_Elab_Command_addDecl(x_4, x_96, x_2, x_94); +lean_dec(x_96); +if (lean_obj_tag(x_97) == 0) +{ +lean_object* x_98; uint8_t x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_97, 1); +lean_inc(x_98); +lean_dec(x_97); +x_99 = 0; +lean_inc(x_2); +lean_inc(x_90); +x_100 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_4, x_90, x_99, x_92, x_6, x_2, x_98); +if (lean_obj_tag(x_100) == 0) +{ +lean_object* x_101; uint8_t x_102; lean_object* x_103; +x_101 = lean_ctor_get(x_100, 1); +lean_inc(x_101); +lean_dec(x_100); +x_102 = 1; +lean_inc(x_2); +x_103 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_4, x_90, x_102, x_92, x_6, x_2, x_101); +lean_dec(x_92); +lean_dec(x_4); +if (lean_obj_tag(x_103) == 0) +{ +lean_object* x_104; lean_object* x_105; +x_104 = lean_ctor_get(x_103, 0); +lean_inc(x_104); +x_105 = lean_ctor_get(x_103, 1); +lean_inc(x_105); +lean_dec(x_103); +x_25 = x_104; +x_26 = x_105; +goto block_75; +} +else +{ +lean_object* x_106; lean_object* x_107; +lean_dec(x_15); +x_106 = lean_ctor_get(x_103, 0); +lean_inc(x_106); +x_107 = lean_ctor_get(x_103, 1); +lean_inc(x_107); +lean_dec(x_103); +x_76 = x_106; +x_77 = x_107; +goto block_87; +} +} +else +{ +lean_object* x_108; lean_object* x_109; +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +x_108 = lean_ctor_get(x_100, 0); +lean_inc(x_108); +x_109 = lean_ctor_get(x_100, 1); +lean_inc(x_109); +lean_dec(x_100); +x_76 = x_108; +x_77 = x_109; +goto block_87; +} +} +else +{ +lean_object* x_110; lean_object* x_111; +lean_dec(x_92); +lean_dec(x_90); +lean_dec(x_15); +lean_dec(x_4); +x_110 = lean_ctor_get(x_97, 0); +lean_inc(x_110); +x_111 = lean_ctor_get(x_97, 1); +lean_inc(x_111); +lean_dec(x_97); +x_76 = x_110; +x_77 = x_111; +goto block_87; +} +} +} +} +else +{ +lean_object* x_189; lean_object* x_190; +lean_dec(x_88); +lean_dec(x_15); +lean_dec(x_4); +lean_dec(x_1); +x_189 = lean_ctor_get(x_89, 0); +lean_inc(x_189); +x_190 = lean_ctor_get(x_89, 1); +lean_inc(x_190); +lean_dec(x_89); +x_76 = x_189; +x_77 = x_190; +goto block_87; +} +block_75: +{ +lean_object* x_27; +lean_inc(x_2); +lean_inc(x_11); +x_27 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__2(x_11, x_2, x_26); +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_28; lean_object* x_29; +lean_dec(x_11); +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +lean_inc(x_2); +x_29 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_28); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; uint8_t x_32; +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); lean_dec(x_29); -lean_ctor_set(x_26, 2, x_31); -x_32 = l___private_Init_Lean_Elab_Command_3__setState(x_26, x_2, x_27); -if (lean_obj_tag(x_32) == 0) +x_32 = !lean_is_exclusive(x_30); +if (x_32 == 0) { -uint8_t x_33; -x_33 = !lean_is_exclusive(x_32); -if (x_33 == 0) -{ -lean_object* x_34; -x_34 = lean_ctor_get(x_32, 0); -lean_dec(x_34); -lean_ctor_set(x_32, 0, x_21); -return x_32; -} -else -{ -lean_object* x_35; lean_object* x_36; -x_35 = lean_ctor_get(x_32, 1); -lean_inc(x_35); -lean_dec(x_32); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_21); -lean_ctor_set(x_36, 1, x_35); -return x_36; -} -} -else +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_33 = lean_ctor_get(x_30, 2); +x_34 = l_Lean_Name_getNumParts___main(x_15); +lean_dec(x_15); +x_35 = l_List_drop___main___rarg(x_34, x_33); +lean_dec(x_33); +lean_ctor_set(x_30, 2, x_35); +x_36 = l___private_Init_Lean_Elab_Command_3__setState(x_30, x_2, x_31); +if (lean_obj_tag(x_36) == 0) { uint8_t x_37; -lean_dec(x_21); -x_37 = !lean_is_exclusive(x_32); +x_37 = !lean_is_exclusive(x_36); if (x_37 == 0) { -return x_32; +lean_object* x_38; +x_38 = lean_ctor_get(x_36, 0); +lean_dec(x_38); +lean_ctor_set(x_36, 0, x_25); +return x_36; } else { -lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_38 = lean_ctor_get(x_32, 0); -x_39 = lean_ctor_get(x_32, 1); +lean_object* x_39; lean_object* x_40; +x_39 = lean_ctor_get(x_36, 1); lean_inc(x_39); -lean_inc(x_38); -lean_dec(x_32); -x_40 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_40, 0, x_38); +lean_dec(x_36); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_25); lean_ctor_set(x_40, 1, x_39); return x_40; } } +else +{ +uint8_t x_41; +lean_dec(x_25); +x_41 = !lean_is_exclusive(x_36); +if (x_41 == 0) +{ +return x_36; } else { -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_41 = lean_ctor_get(x_26, 0); -x_42 = lean_ctor_get(x_26, 1); -x_43 = lean_ctor_get(x_26, 2); -x_44 = lean_ctor_get(x_26, 3); -lean_inc(x_44); +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_36, 0); +x_43 = lean_ctor_get(x_36, 1); lean_inc(x_43); lean_inc(x_42); -lean_inc(x_41); -lean_dec(x_26); -x_45 = l_Lean_Name_getNumParts___main(x_14); -lean_dec(x_14); -x_46 = l_List_drop___main___rarg(x_45, x_43); -lean_dec(x_43); -x_47 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_47, 0, x_41); -lean_ctor_set(x_47, 1, x_42); -lean_ctor_set(x_47, 2, x_46); -lean_ctor_set(x_47, 3, x_44); -x_48 = l___private_Init_Lean_Elab_Command_3__setState(x_47, x_2, x_27); -if (lean_obj_tag(x_48) == 0) -{ -lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_49 = lean_ctor_get(x_48, 1); -lean_inc(x_49); -if (lean_is_exclusive(x_48)) { - lean_ctor_release(x_48, 0); - lean_ctor_release(x_48, 1); - x_50 = x_48; -} else { - lean_dec_ref(x_48); - x_50 = lean_box(0); +lean_dec(x_36); +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; } -if (lean_is_scalar(x_50)) { - x_51 = lean_alloc_ctor(0, 2, 0); -} else { - x_51 = x_50; } -lean_ctor_set(x_51, 0, x_21); -lean_ctor_set(x_51, 1, x_49); -return x_51; } else { -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -lean_dec(x_21); -x_52 = lean_ctor_get(x_48, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_48, 1); +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_45 = lean_ctor_get(x_30, 0); +x_46 = lean_ctor_get(x_30, 1); +x_47 = lean_ctor_get(x_30, 2); +x_48 = lean_ctor_get(x_30, 3); +lean_inc(x_48); +lean_inc(x_47); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_30); +x_49 = l_Lean_Name_getNumParts___main(x_15); +lean_dec(x_15); +x_50 = l_List_drop___main___rarg(x_49, x_47); +lean_dec(x_47); +x_51 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_51, 0, x_45); +lean_ctor_set(x_51, 1, x_46); +lean_ctor_set(x_51, 2, x_50); +lean_ctor_set(x_51, 3, x_48); +x_52 = l___private_Init_Lean_Elab_Command_3__setState(x_51, x_2, x_31); +if (lean_obj_tag(x_52) == 0) +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_52, 1); lean_inc(x_53); -if (lean_is_exclusive(x_48)) { - lean_ctor_release(x_48, 0); - lean_ctor_release(x_48, 1); - x_54 = x_48; +if (lean_is_exclusive(x_52)) { + lean_ctor_release(x_52, 0); + lean_ctor_release(x_52, 1); + x_54 = x_52; } else { - lean_dec_ref(x_48); + lean_dec_ref(x_52); x_54 = lean_box(0); } if (lean_is_scalar(x_54)) { - x_55 = lean_alloc_ctor(1, 2, 0); + x_55 = lean_alloc_ctor(0, 2, 0); } else { x_55 = x_54; } -lean_ctor_set(x_55, 0, x_52); +lean_ctor_set(x_55, 0, x_25); lean_ctor_set(x_55, 1, x_53); return x_55; } -} -} else { -uint8_t x_56; -lean_dec(x_21); -lean_dec(x_14); -lean_dec(x_2); -x_56 = !lean_is_exclusive(x_25); -if (x_56 == 0) -{ -return x_25; -} -else -{ -lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_57 = lean_ctor_get(x_25, 0); -x_58 = lean_ctor_get(x_25, 1); -lean_inc(x_58); -lean_inc(x_57); +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_dec(x_25); -x_59 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_59, 0, x_57); -lean_ctor_set(x_59, 1, x_58); +x_56 = lean_ctor_get(x_52, 0); +lean_inc(x_56); +x_57 = lean_ctor_get(x_52, 1); +lean_inc(x_57); +if (lean_is_exclusive(x_52)) { + lean_ctor_release(x_52, 0); + lean_ctor_release(x_52, 1); + x_58 = x_52; +} else { + lean_dec_ref(x_52); + x_58 = lean_box(0); +} +if (lean_is_scalar(x_58)) { + x_59 = lean_alloc_ctor(1, 2, 0); +} else { + x_59 = x_58; +} +lean_ctor_set(x_59, 0, x_56); +lean_ctor_set(x_59, 1, x_57); return x_59; } } } else { -lean_object* x_60; lean_object* x_61; lean_object* x_62; -lean_dec(x_21); -lean_dec(x_14); -x_60 = lean_ctor_get(x_23, 0); -lean_inc(x_60); -x_61 = lean_ctor_get(x_23, 1); +uint8_t x_60; +lean_dec(x_25); +lean_dec(x_15); +lean_dec(x_2); +x_60 = !lean_is_exclusive(x_29); +if (x_60 == 0) +{ +return x_29; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_29, 0); +x_62 = lean_ctor_get(x_29, 1); +lean_inc(x_62); lean_inc(x_61); -lean_dec(x_23); -x_62 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__3(x_10, x_2, x_61); -if (lean_obj_tag(x_62) == 0) -{ -uint8_t x_63; -x_63 = !lean_is_exclusive(x_62); -if (x_63 == 0) -{ -lean_object* x_64; -x_64 = lean_ctor_get(x_62, 0); -lean_dec(x_64); -lean_ctor_set_tag(x_62, 1); -lean_ctor_set(x_62, 0, x_60); -return x_62; +lean_dec(x_29); +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_65; lean_object* x_66; -x_65 = lean_ctor_get(x_62, 1); +lean_object* x_64; lean_object* x_65; lean_object* x_66; +lean_dec(x_25); +lean_dec(x_15); +x_64 = lean_ctor_get(x_27, 0); +lean_inc(x_64); +x_65 = lean_ctor_get(x_27, 1); lean_inc(x_65); -lean_dec(x_62); -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_60); -lean_ctor_set(x_66, 1, x_65); -return x_66; -} -} -else +lean_dec(x_27); +x_66 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__3(x_11, x_2, x_65); +if (lean_obj_tag(x_66) == 0) { uint8_t x_67; -lean_dec(x_60); -x_67 = !lean_is_exclusive(x_62); +x_67 = !lean_is_exclusive(x_66); if (x_67 == 0) { -return x_62; +lean_object* x_68; +x_68 = lean_ctor_get(x_66, 0); +lean_dec(x_68); +lean_ctor_set_tag(x_66, 1); +lean_ctor_set(x_66, 0, x_64); +return x_66; } else { -lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_68 = lean_ctor_get(x_62, 0); -x_69 = lean_ctor_get(x_62, 1); +lean_object* x_69; lean_object* x_70; +x_69 = lean_ctor_get(x_66, 1); lean_inc(x_69); -lean_inc(x_68); -lean_dec(x_62); +lean_dec(x_66); x_70 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 0, x_64); lean_ctor_set(x_70, 1, x_69); return x_70; } } +else +{ +uint8_t x_71; +lean_dec(x_64); +x_71 = !lean_is_exclusive(x_66); +if (x_71 == 0) +{ +return x_66; } -} -block_83: +else { -lean_object* x_74; -x_74 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__4(x_10, x_2, x_73); -if (lean_obj_tag(x_74) == 0) -{ -uint8_t x_75; -x_75 = !lean_is_exclusive(x_74); -if (x_75 == 0) -{ -lean_object* x_76; -x_76 = lean_ctor_get(x_74, 0); -lean_dec(x_76); -lean_ctor_set_tag(x_74, 1); +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_66, 0); +x_73 = lean_ctor_get(x_66, 1); +lean_inc(x_73); +lean_inc(x_72); +lean_dec(x_66); +x_74 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_73); return x_74; } -else +} +} +} +block_87: { -lean_object* x_77; lean_object* x_78; -x_77 = lean_ctor_get(x_74, 1); -lean_inc(x_77); -lean_dec(x_74); -x_78 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_78, 0, x_72); -lean_ctor_set(x_78, 1, x_77); -return x_78; -} -} -else +lean_object* x_78; +x_78 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__4(x_11, x_2, x_77); +if (lean_obj_tag(x_78) == 0) { uint8_t x_79; -lean_dec(x_72); -x_79 = !lean_is_exclusive(x_74); +x_79 = !lean_is_exclusive(x_78); if (x_79 == 0) { -return x_74; +lean_object* x_80; +x_80 = lean_ctor_get(x_78, 0); +lean_dec(x_80); +lean_ctor_set_tag(x_78, 1); +lean_ctor_set(x_78, 0, x_76); +return x_78; } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_80 = lean_ctor_get(x_74, 0); -x_81 = lean_ctor_get(x_74, 1); +lean_object* x_81; lean_object* x_82; +x_81 = lean_ctor_get(x_78, 1); lean_inc(x_81); -lean_inc(x_80); -lean_dec(x_74); +lean_dec(x_78); x_82 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_82, 0, x_80); +lean_ctor_set(x_82, 0, x_76); lean_ctor_set(x_82, 1, x_81); return x_82; } } +else +{ +uint8_t x_83; +lean_dec(x_76); +x_83 = !lean_is_exclusive(x_78); +if (x_83 == 0) +{ +return x_78; +} +else +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; +x_84 = lean_ctor_get(x_78, 0); +x_85 = lean_ctor_get(x_78, 1); +lean_inc(x_85); +lean_inc(x_84); +lean_dec(x_78); +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; +} +} } } else { -uint8_t x_154; -lean_dec(x_14); -lean_dec(x_10); +uint8_t x_191; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_11); +lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_154 = !lean_is_exclusive(x_19); -if (x_154 == 0) +x_191 = !lean_is_exclusive(x_21); +if (x_191 == 0) +{ +return x_21; +} +else +{ +lean_object* x_192; lean_object* x_193; lean_object* x_194; +x_192 = lean_ctor_get(x_21, 0); +x_193 = lean_ctor_get(x_21, 1); +lean_inc(x_193); +lean_inc(x_192); +lean_dec(x_21); +x_194 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_194, 0, x_192); +lean_ctor_set(x_194, 1, x_193); +return x_194; +} +} +} +else +{ +uint8_t x_195; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_195 = !lean_is_exclusive(x_19); +if (x_195 == 0) { return x_19; } else { -lean_object* x_155; lean_object* x_156; lean_object* x_157; -x_155 = lean_ctor_get(x_19, 0); -x_156 = lean_ctor_get(x_19, 1); -lean_inc(x_156); -lean_inc(x_155); +lean_object* x_196; lean_object* x_197; lean_object* x_198; +x_196 = lean_ctor_get(x_19, 0); +x_197 = lean_ctor_get(x_19, 1); +lean_inc(x_197); +lean_inc(x_196); lean_dec(x_19); -x_157 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_157, 0, x_155); -lean_ctor_set(x_157, 1, x_156); -return x_157; +x_198 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_198, 0, x_196); +lean_ctor_set(x_198, 1, x_197); +return x_198; } } } else { -uint8_t x_158; -lean_dec(x_14); -lean_dec(x_12); -lean_dec(x_10); -lean_dec(x_2); -lean_dec(x_1); -x_158 = !lean_is_exclusive(x_17); -if (x_158 == 0) -{ -return x_17; -} -else -{ -lean_object* x_159; lean_object* x_160; lean_object* x_161; -x_159 = lean_ctor_get(x_17, 0); -x_160 = lean_ctor_get(x_17, 1); -lean_inc(x_160); -lean_inc(x_159); -lean_dec(x_17); -x_161 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_161, 0, x_159); -lean_ctor_set(x_161, 1, x_160); -return x_161; -} -} -} -else -{ -lean_object* x_162; lean_object* x_163; -lean_dec(x_12); -lean_dec(x_10); -lean_dec(x_6); -lean_dec(x_1); -x_162 = l_Lean_Elab_Command_withDeclId___closed__3; -x_163 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_4, x_162, x_2, x_13); -lean_dec(x_2); +lean_object* x_199; lean_object* x_200; +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_7); lean_dec(x_4); -return x_163; -} -} -} -else -{ -uint8_t x_178; -lean_dec(x_8); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); lean_dec(x_1); -x_178 = !lean_is_exclusive(x_9); -if (x_178 == 0) -{ -return x_9; +x_199 = l_Lean_Elab_Command_withDeclId___closed__3; +x_200 = l_Lean_Elab_Command_throwError___rarg(x_5, x_199, x_2, x_14); +return x_200; +} +} } else { -lean_object* x_179; lean_object* x_180; lean_object* x_181; -x_179 = lean_ctor_get(x_9, 0); -x_180 = lean_ctor_get(x_9, 1); -lean_inc(x_180); -lean_inc(x_179); +uint8_t x_215; lean_dec(x_9); -x_181 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_181, 0, x_179); -lean_ctor_set(x_181, 1, x_180); -return x_181; +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_215 = !lean_is_exclusive(x_10); +if (x_215 == 0) +{ +return x_10; +} +else +{ +lean_object* x_216; lean_object* x_217; lean_object* x_218; +x_216 = lean_ctor_get(x_10, 0); +x_217 = lean_ctor_get(x_10, 1); +lean_inc(x_217); +lean_inc(x_216); +lean_dec(x_10); +x_218 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_218, 0, x_216); +lean_ctor_set(x_218, 1, x_217); +return x_218; } } } } -lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6___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_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__5___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_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_5); +x_7 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__5(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_Lean_Elab_Command_elabDefLike___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* l_Lean_Elab_Command_elabDefLike___lambda__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) { _start: { -lean_object* x_6; -x_6 = l_Lean_Elab_Command_elabDefLike___lambda__1(x_1, x_2, x_3, x_4, x_5); +lean_object* x_10; +x_10 = l_Lean_Elab_Command_elabDefLike___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_6); lean_dec(x_2); -return x_6; -} -} -lean_object* l_Lean_Elab_Command_elabDefLike___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_elabDefLike___lambda__2(x_1, x_2, x_3, x_4); -lean_dec(x_2); -return x_5; +return x_10; } } +lean_object* initialize_Init_Lean_Util_CollectLevelParams(lean_object*); +lean_object* initialize_Init_Lean_Util_CollectFVars(lean_object*); lean_object* initialize_Init_Lean_Elab_DeclModifiers(lean_object*); +lean_object* initialize_Init_Lean_Elab_TermBinders(lean_object*); static bool _G_initialized = false; lean_object* initialize_Init_Lean_Elab_Definition(lean_object* w) { lean_object * res; if (_G_initialized) return lean_mk_io_result(lean_box(0)); _G_initialized = true; +res = initialize_Init_Lean_Util_CollectLevelParams(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Init_Lean_Util_CollectFVars(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Init_Lean_Elab_DeclModifiers(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1 = _init_l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1); +res = initialize_Init_Lean_Elab_TermBinders(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_Elab_Command_removeUnused___closed__1 = _init_l_Lean_Elab_Command_removeUnused___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_removeUnused___closed__1); +l_Lean_Elab_Command_mkDef___lambda__1___closed__1 = _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_mkDef___lambda__1___closed__1); +l_Lean_Elab_Command_mkDef___lambda__1___closed__2 = _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_mkDef___lambda__1___closed__2); +l_Lean_Elab_Command_elabDefVal___closed__1 = _init_l_Lean_Elab_Command_elabDefVal___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabDefVal___closed__1); +l_Lean_Elab_Command_elabDefVal___closed__2 = _init_l_Lean_Elab_Command_elabDefVal___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabDefVal___closed__2); +l_Lean_Elab_Command_elabDefVal___closed__3 = _init_l_Lean_Elab_Command_elabDefVal___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabDefVal___closed__3); +l_Lean_Elab_Command_elabDefVal___closed__4 = _init_l_Lean_Elab_Command_elabDefVal___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabDefVal___closed__4); +l_Lean_Elab_Command_elabDefVal___closed__5 = _init_l_Lean_Elab_Command_elabDefVal___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_elabDefVal___closed__5); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Lean/Elab/Frontend.c b/stage0/stdlib/Init/Lean/Elab/Frontend.c index 121a143396..a044c6d849 100644 --- a/stage0/stdlib/Init/Lean/Elab/Frontend.c +++ b/stage0/stdlib/Init/Lean/Elab/Frontend.c @@ -138,7 +138,7 @@ x_4 = lean_ctor_get(x_2, 2); x_5 = lean_io_ref_get(x_4, x_3); if (lean_obj_tag(x_5) == 0) { -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_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; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); @@ -148,170 +148,174 @@ x_8 = lean_ctor_get(x_2, 3); x_9 = lean_ctor_get(x_8, 1); x_10 = lean_ctor_get(x_8, 2); x_11 = lean_ctor_get(x_2, 0); -x_12 = lean_unsigned_to_nat(0u); +x_12 = lean_box(0); +x_13 = lean_unsigned_to_nat(0u); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); -x_13 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_13, 0, x_9); -lean_ctor_set(x_13, 1, x_10); -lean_ctor_set(x_13, 2, x_11); -lean_ctor_set(x_13, 3, x_6); -lean_ctor_set(x_13, 4, x_12); -x_14 = lean_apply_2(x_1, x_13, x_7); -if (lean_obj_tag(x_14) == 0) +x_14 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_14, 0, x_9); +lean_ctor_set(x_14, 1, x_10); +lean_ctor_set(x_14, 2, x_11); +lean_ctor_set(x_14, 3, x_6); +lean_ctor_set(x_14, 4, x_12); +lean_ctor_set(x_14, 5, x_13); +x_15 = lean_apply_2(x_1, x_14, x_7); +if (lean_obj_tag(x_15) == 0) { -uint8_t x_15; -x_15 = !lean_is_exclusive(x_14); -if (x_15 == 0) +uint8_t x_16; +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) { -return x_14; +return x_15; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_14, 0); -x_17 = lean_ctor_get(x_14, 1); +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_15, 0); +x_18 = lean_ctor_get(x_15, 1); +lean_inc(x_18); lean_inc(x_17); -lean_inc(x_16); -lean_dec(x_14); -x_18 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_18, 0, x_16); -lean_ctor_set(x_18, 1, x_17); -return x_18; +lean_dec(x_15); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +return x_19; } } else { -uint8_t x_19; -x_19 = !lean_is_exclusive(x_14); -if (x_19 == 0) +uint8_t x_20; +x_20 = !lean_is_exclusive(x_15); +if (x_20 == 0) { -lean_object* x_20; lean_object* x_21; -x_20 = lean_ctor_get(x_14, 0); -lean_dec(x_20); -x_21 = lean_box(0); -lean_ctor_set_tag(x_14, 0); -lean_ctor_set(x_14, 0, x_21); -return x_14; +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_15, 0); +lean_dec(x_21); +x_22 = lean_box(0); +lean_ctor_set_tag(x_15, 0); +lean_ctor_set(x_15, 0, x_22); +return x_15; } else { -lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = lean_ctor_get(x_14, 1); -lean_inc(x_22); -lean_dec(x_14); -x_23 = lean_box(0); -x_24 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_24, 0, x_23); -lean_ctor_set(x_24, 1, x_22); -return x_24; +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_15, 1); +lean_inc(x_23); +lean_dec(x_15); +x_24 = lean_box(0); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_23); +return x_25; } } } else { -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_25 = lean_ctor_get(x_5, 1); -lean_inc(x_25); +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_26 = lean_ctor_get(x_5, 1); +lean_inc(x_26); lean_dec(x_5); -x_26 = l_Lean_Elab_Frontend_runCommandElabM___closed__1; -x_27 = l_unreachable_x21___rarg(x_26); -x_28 = lean_apply_1(x_27, x_25); -if (lean_obj_tag(x_28) == 0) +x_27 = l_Lean_Elab_Frontend_runCommandElabM___closed__1; +x_28 = l_unreachable_x21___rarg(x_27); +x_29 = lean_apply_1(x_28, x_26); +if (lean_obj_tag(x_29) == 0) { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_29 = lean_ctor_get(x_28, 0); -lean_inc(x_29); -x_30 = lean_ctor_get(x_28, 1); +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_30 = lean_ctor_get(x_29, 0); lean_inc(x_30); -lean_dec(x_28); -x_31 = lean_ctor_get(x_2, 3); -x_32 = lean_ctor_get(x_31, 1); -x_33 = lean_ctor_get(x_31, 2); -x_34 = lean_ctor_get(x_2, 0); -x_35 = lean_unsigned_to_nat(0u); +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +lean_dec(x_29); +x_32 = lean_ctor_get(x_2, 3); +x_33 = lean_ctor_get(x_32, 1); +x_34 = lean_ctor_get(x_32, 2); +x_35 = lean_ctor_get(x_2, 0); +x_36 = lean_box(0); +x_37 = lean_unsigned_to_nat(0u); +lean_inc(x_35); lean_inc(x_34); lean_inc(x_33); -lean_inc(x_32); -x_36 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_36, 0, x_32); -lean_ctor_set(x_36, 1, x_33); -lean_ctor_set(x_36, 2, x_34); -lean_ctor_set(x_36, 3, x_29); -lean_ctor_set(x_36, 4, x_35); -x_37 = lean_apply_2(x_1, x_36, x_30); -if (lean_obj_tag(x_37) == 0) +x_38 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_38, 0, x_33); +lean_ctor_set(x_38, 1, x_34); +lean_ctor_set(x_38, 2, x_35); +lean_ctor_set(x_38, 3, x_30); +lean_ctor_set(x_38, 4, x_36); +lean_ctor_set(x_38, 5, x_37); +x_39 = lean_apply_2(x_1, x_38, x_31); +if (lean_obj_tag(x_39) == 0) { -uint8_t x_38; -x_38 = !lean_is_exclusive(x_37); -if (x_38 == 0) +uint8_t x_40; +x_40 = !lean_is_exclusive(x_39); +if (x_40 == 0) { -return x_37; +return x_39; } else { -lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_39 = lean_ctor_get(x_37, 0); -x_40 = lean_ctor_get(x_37, 1); -lean_inc(x_40); -lean_inc(x_39); -lean_dec(x_37); -x_41 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_41, 0, x_39); -lean_ctor_set(x_41, 1, x_40); -return x_41; +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_39, 0); +x_42 = lean_ctor_get(x_39, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_39); +x_43 = lean_alloc_ctor(0, 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_42; -x_42 = !lean_is_exclusive(x_37); -if (x_42 == 0) +uint8_t x_44; +x_44 = !lean_is_exclusive(x_39); +if (x_44 == 0) { -lean_object* x_43; lean_object* x_44; -x_43 = lean_ctor_get(x_37, 0); -lean_dec(x_43); -x_44 = lean_box(0); -lean_ctor_set_tag(x_37, 0); -lean_ctor_set(x_37, 0, x_44); -return x_37; -} -else -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_37, 1); -lean_inc(x_45); -lean_dec(x_37); +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_39, 0); +lean_dec(x_45); x_46 = lean_box(0); -x_47 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_47, 0, x_46); -lean_ctor_set(x_47, 1, x_45); -return x_47; +lean_ctor_set_tag(x_39, 0); +lean_ctor_set(x_39, 0, x_46); +return x_39; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_39, 1); +lean_inc(x_47); +lean_dec(x_39); +x_48 = lean_box(0); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_47); +return x_49; } } } else { -uint8_t x_48; +uint8_t x_50; lean_dec(x_1); -x_48 = !lean_is_exclusive(x_28); -if (x_48 == 0) +x_50 = !lean_is_exclusive(x_29); +if (x_50 == 0) { -return x_28; +return x_29; } else { -lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_49 = lean_ctor_get(x_28, 0); -x_50 = lean_ctor_get(x_28, 1); -lean_inc(x_50); -lean_inc(x_49); -lean_dec(x_28); -x_51 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_51, 0, x_49); -lean_ctor_set(x_51, 1, x_50); -return x_51; +lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_51 = lean_ctor_get(x_29, 0); +x_52 = lean_ctor_get(x_29, 1); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_29); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_51); +lean_ctor_set(x_53, 1, x_52); +return x_53; } } } @@ -334,7 +338,7 @@ x_4 = lean_ctor_get(x_2, 2); x_5 = lean_io_ref_get(x_4, x_3); if (lean_obj_tag(x_5) == 0) { -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_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; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); @@ -344,476 +348,480 @@ x_8 = lean_ctor_get(x_2, 3); x_9 = lean_ctor_get(x_8, 1); x_10 = lean_ctor_get(x_8, 2); x_11 = lean_ctor_get(x_2, 0); -x_12 = lean_unsigned_to_nat(0u); +x_12 = lean_box(0); +x_13 = lean_unsigned_to_nat(0u); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); -x_13 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_13, 0, x_9); -lean_ctor_set(x_13, 1, x_10); -lean_ctor_set(x_13, 2, x_11); -lean_ctor_set(x_13, 3, x_6); -lean_ctor_set(x_13, 4, x_12); -lean_inc(x_13); -x_14 = l_Lean_Elab_Command_elabCommand(x_1, x_13, x_7); -if (lean_obj_tag(x_14) == 0) +x_14 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_14, 0, x_9); +lean_ctor_set(x_14, 1, x_10); +lean_ctor_set(x_14, 2, x_11); +lean_ctor_set(x_14, 3, x_6); +lean_ctor_set(x_14, 4, x_12); +lean_ctor_set(x_14, 5, x_13); +lean_inc(x_14); +x_15 = l_Lean_Elab_Command_elabCommand(x_1, x_14, x_7); +if (lean_obj_tag(x_15) == 0) { -uint8_t x_15; -lean_dec(x_13); -x_15 = !lean_is_exclusive(x_14); -if (x_15 == 0) +uint8_t x_16; +lean_dec(x_14); +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) { -return x_14; +return x_15; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_14, 0); -x_17 = lean_ctor_get(x_14, 1); +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_15, 0); +x_18 = lean_ctor_get(x_15, 1); +lean_inc(x_18); lean_inc(x_17); -lean_inc(x_16); -lean_dec(x_14); -x_18 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_18, 0, x_16); -lean_ctor_set(x_18, 1, x_17); -return x_18; +lean_dec(x_15); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +return x_19; } } else { -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_14, 0); -lean_inc(x_19); -x_20 = lean_ctor_get(x_14, 1); +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_15, 0); lean_inc(x_20); -lean_dec(x_14); -lean_inc(x_13); -x_21 = l___private_Init_Lean_Elab_Command_2__getState(x_13, x_20); -if (lean_obj_tag(x_21) == 0) +x_21 = lean_ctor_get(x_15, 1); +lean_inc(x_21); +lean_dec(x_15); +lean_inc(x_14); +x_22 = l___private_Init_Lean_Elab_Command_2__getState(x_14, x_21); +if (lean_obj_tag(x_22) == 0) { -lean_object* x_22; lean_object* x_23; uint8_t x_24; -x_22 = lean_ctor_get(x_21, 0); -lean_inc(x_22); -x_23 = lean_ctor_get(x_21, 1); +lean_object* x_23; lean_object* x_24; uint8_t x_25; +x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); -lean_dec(x_21); -x_24 = !lean_is_exclusive(x_22); -if (x_24 == 0) +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = !lean_is_exclusive(x_23); +if (x_25 == 0) { -lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_25 = lean_ctor_get(x_22, 1); -x_26 = l_PersistentArray_push___rarg(x_25, x_19); -lean_ctor_set(x_22, 1, x_26); -x_27 = l___private_Init_Lean_Elab_Command_3__setState(x_22, x_13, x_23); -if (lean_obj_tag(x_27) == 0) +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_23, 1); +x_27 = l_PersistentArray_push___rarg(x_26, x_20); +lean_ctor_set(x_23, 1, x_27); +x_28 = l___private_Init_Lean_Elab_Command_3__setState(x_23, x_14, x_24); +if (lean_obj_tag(x_28) == 0) { -uint8_t x_28; -x_28 = !lean_is_exclusive(x_27); -if (x_28 == 0) +uint8_t x_29; +x_29 = !lean_is_exclusive(x_28); +if (x_29 == 0) { -lean_object* x_29; lean_object* x_30; -x_29 = lean_ctor_get(x_27, 0); -lean_dec(x_29); -x_30 = lean_box(0); -lean_ctor_set(x_27, 0, x_30); -return x_27; +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_28, 0); +lean_dec(x_30); +x_31 = lean_box(0); +lean_ctor_set(x_28, 0, x_31); +return x_28; } else { -lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_27, 1); -lean_inc(x_31); -lean_dec(x_27); -x_32 = lean_box(0); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_31); -return x_33; +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_28, 1); +lean_inc(x_32); +lean_dec(x_28); +x_33 = lean_box(0); +x_34 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_34, 1, x_32); +return x_34; } } else { -uint8_t x_34; -x_34 = !lean_is_exclusive(x_27); -if (x_34 == 0) +uint8_t x_35; +x_35 = !lean_is_exclusive(x_28); +if (x_35 == 0) { -lean_object* x_35; lean_object* x_36; -x_35 = lean_ctor_get(x_27, 0); -lean_dec(x_35); -x_36 = lean_box(0); -lean_ctor_set_tag(x_27, 0); -lean_ctor_set(x_27, 0, x_36); -return x_27; +lean_object* x_36; lean_object* x_37; +x_36 = lean_ctor_get(x_28, 0); +lean_dec(x_36); +x_37 = lean_box(0); +lean_ctor_set_tag(x_28, 0); +lean_ctor_set(x_28, 0, x_37); +return x_28; } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_27, 1); -lean_inc(x_37); -lean_dec(x_27); -x_38 = lean_box(0); -x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_37); -return x_39; +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_28, 1); +lean_inc(x_38); +lean_dec(x_28); +x_39 = lean_box(0); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); +return x_40; } } } else { -lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_40 = lean_ctor_get(x_22, 0); -x_41 = lean_ctor_get(x_22, 1); -x_42 = lean_ctor_get(x_22, 2); -x_43 = lean_ctor_get(x_22, 3); +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_41 = lean_ctor_get(x_23, 0); +x_42 = lean_ctor_get(x_23, 1); +x_43 = lean_ctor_get(x_23, 2); +x_44 = lean_ctor_get(x_23, 3); +lean_inc(x_44); lean_inc(x_43); lean_inc(x_42); lean_inc(x_41); -lean_inc(x_40); +lean_dec(x_23); +x_45 = l_PersistentArray_push___rarg(x_42, x_20); +x_46 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_46, 0, x_41); +lean_ctor_set(x_46, 1, x_45); +lean_ctor_set(x_46, 2, x_43); +lean_ctor_set(x_46, 3, x_44); +x_47 = l___private_Init_Lean_Elab_Command_3__setState(x_46, x_14, x_24); +if (lean_obj_tag(x_47) == 0) +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_48 = lean_ctor_get(x_47, 1); +lean_inc(x_48); +if (lean_is_exclusive(x_47)) { + lean_ctor_release(x_47, 0); + lean_ctor_release(x_47, 1); + x_49 = x_47; +} else { + lean_dec_ref(x_47); + x_49 = lean_box(0); +} +x_50 = lean_box(0); +if (lean_is_scalar(x_49)) { + x_51 = lean_alloc_ctor(0, 2, 0); +} else { + x_51 = x_49; +} +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_48); +return x_51; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_52 = lean_ctor_get(x_47, 1); +lean_inc(x_52); +if (lean_is_exclusive(x_47)) { + lean_ctor_release(x_47, 0); + lean_ctor_release(x_47, 1); + x_53 = x_47; +} else { + lean_dec_ref(x_47); + x_53 = lean_box(0); +} +x_54 = lean_box(0); +if (lean_is_scalar(x_53)) { + x_55 = lean_alloc_ctor(0, 2, 0); +} else { + x_55 = x_53; + lean_ctor_set_tag(x_55, 0); +} +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_55, 1, x_52); +return x_55; +} +} +} +else +{ +uint8_t x_56; +lean_dec(x_20); +lean_dec(x_14); +x_56 = !lean_is_exclusive(x_22); +if (x_56 == 0) +{ +lean_object* x_57; lean_object* x_58; +x_57 = lean_ctor_get(x_22, 0); +lean_dec(x_57); +x_58 = lean_box(0); +lean_ctor_set_tag(x_22, 0); +lean_ctor_set(x_22, 0, x_58); +return x_22; +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; +x_59 = lean_ctor_get(x_22, 1); +lean_inc(x_59); lean_dec(x_22); -x_44 = l_PersistentArray_push___rarg(x_41, x_19); -x_45 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_45, 0, x_40); -lean_ctor_set(x_45, 1, x_44); -lean_ctor_set(x_45, 2, x_42); -lean_ctor_set(x_45, 3, x_43); -x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_45, x_13, x_23); -if (lean_obj_tag(x_46) == 0) -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_47 = lean_ctor_get(x_46, 1); -lean_inc(x_47); -if (lean_is_exclusive(x_46)) { - lean_ctor_release(x_46, 0); - lean_ctor_release(x_46, 1); - x_48 = x_46; -} else { - lean_dec_ref(x_46); - x_48 = lean_box(0); -} -x_49 = lean_box(0); -if (lean_is_scalar(x_48)) { - x_50 = lean_alloc_ctor(0, 2, 0); -} else { - x_50 = x_48; -} -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_50, 1, x_47); -return x_50; -} -else -{ -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_51 = lean_ctor_get(x_46, 1); -lean_inc(x_51); -if (lean_is_exclusive(x_46)) { - lean_ctor_release(x_46, 0); - lean_ctor_release(x_46, 1); - x_52 = x_46; -} else { - lean_dec_ref(x_46); - x_52 = lean_box(0); -} -x_53 = lean_box(0); -if (lean_is_scalar(x_52)) { - x_54 = lean_alloc_ctor(0, 2, 0); -} else { - x_54 = x_52; - lean_ctor_set_tag(x_54, 0); -} -lean_ctor_set(x_54, 0, x_53); -lean_ctor_set(x_54, 1, x_51); -return x_54; -} -} -} -else -{ -uint8_t x_55; -lean_dec(x_19); -lean_dec(x_13); -x_55 = !lean_is_exclusive(x_21); -if (x_55 == 0) -{ -lean_object* x_56; lean_object* x_57; -x_56 = lean_ctor_get(x_21, 0); -lean_dec(x_56); -x_57 = lean_box(0); -lean_ctor_set_tag(x_21, 0); -lean_ctor_set(x_21, 0, x_57); -return x_21; -} -else -{ -lean_object* x_58; lean_object* x_59; lean_object* x_60; -x_58 = lean_ctor_get(x_21, 1); -lean_inc(x_58); -lean_dec(x_21); -x_59 = lean_box(0); -x_60 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_60, 0, x_59); -lean_ctor_set(x_60, 1, x_58); -return x_60; +x_60 = lean_box(0); +x_61 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_61, 0, x_60); +lean_ctor_set(x_61, 1, x_59); +return x_61; } } } } else { -lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; -x_61 = lean_ctor_get(x_5, 1); -lean_inc(x_61); +lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_62 = lean_ctor_get(x_5, 1); +lean_inc(x_62); lean_dec(x_5); -x_62 = l_Lean_Elab_Frontend_runCommandElabM___closed__1; -x_63 = l_unreachable_x21___rarg(x_62); -x_64 = lean_apply_1(x_63, x_61); -if (lean_obj_tag(x_64) == 0) +x_63 = l_Lean_Elab_Frontend_runCommandElabM___closed__1; +x_64 = l_unreachable_x21___rarg(x_63); +x_65 = lean_apply_1(x_64, x_62); +if (lean_obj_tag(x_65) == 0) { -lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; -x_65 = lean_ctor_get(x_64, 0); -lean_inc(x_65); -x_66 = lean_ctor_get(x_64, 1); +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_66 = lean_ctor_get(x_65, 0); lean_inc(x_66); -lean_dec(x_64); -x_67 = lean_ctor_get(x_2, 3); -x_68 = lean_ctor_get(x_67, 1); -x_69 = lean_ctor_get(x_67, 2); -x_70 = lean_ctor_get(x_2, 0); -x_71 = lean_unsigned_to_nat(0u); +x_67 = lean_ctor_get(x_65, 1); +lean_inc(x_67); +lean_dec(x_65); +x_68 = lean_ctor_get(x_2, 3); +x_69 = lean_ctor_get(x_68, 1); +x_70 = lean_ctor_get(x_68, 2); +x_71 = lean_ctor_get(x_2, 0); +x_72 = lean_box(0); +x_73 = lean_unsigned_to_nat(0u); +lean_inc(x_71); lean_inc(x_70); lean_inc(x_69); -lean_inc(x_68); -x_72 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_72, 0, x_68); -lean_ctor_set(x_72, 1, x_69); -lean_ctor_set(x_72, 2, x_70); -lean_ctor_set(x_72, 3, x_65); -lean_ctor_set(x_72, 4, x_71); -lean_inc(x_72); -x_73 = l_Lean_Elab_Command_elabCommand(x_1, x_72, x_66); -if (lean_obj_tag(x_73) == 0) +x_74 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_74, 0, x_69); +lean_ctor_set(x_74, 1, x_70); +lean_ctor_set(x_74, 2, x_71); +lean_ctor_set(x_74, 3, x_66); +lean_ctor_set(x_74, 4, x_72); +lean_ctor_set(x_74, 5, x_73); +lean_inc(x_74); +x_75 = l_Lean_Elab_Command_elabCommand(x_1, x_74, x_67); +if (lean_obj_tag(x_75) == 0) { -uint8_t x_74; -lean_dec(x_72); -x_74 = !lean_is_exclusive(x_73); -if (x_74 == 0) +uint8_t x_76; +lean_dec(x_74); +x_76 = !lean_is_exclusive(x_75); +if (x_76 == 0) { -return x_73; +return x_75; } else { -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_73, 0); -x_76 = lean_ctor_get(x_73, 1); -lean_inc(x_76); -lean_inc(x_75); -lean_dec(x_73); -x_77 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_77, 0, x_75); -lean_ctor_set(x_77, 1, x_76); -return x_77; -} -} -else -{ -lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_78 = lean_ctor_get(x_73, 0); +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_75, 0); +x_78 = lean_ctor_get(x_75, 1); lean_inc(x_78); -x_79 = lean_ctor_get(x_73, 1); -lean_inc(x_79); -lean_dec(x_73); -lean_inc(x_72); -x_80 = l___private_Init_Lean_Elab_Command_2__getState(x_72, x_79); -if (lean_obj_tag(x_80) == 0) +lean_inc(x_77); +lean_dec(x_75); +x_79 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_79, 0, x_77); +lean_ctor_set(x_79, 1, x_78); +return x_79; +} +} +else { -lean_object* x_81; lean_object* x_82; uint8_t x_83; -x_81 = lean_ctor_get(x_80, 0); +lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_80 = lean_ctor_get(x_75, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_75, 1); lean_inc(x_81); -x_82 = lean_ctor_get(x_80, 1); -lean_inc(x_82); -lean_dec(x_80); -x_83 = !lean_is_exclusive(x_81); -if (x_83 == 0) +lean_dec(x_75); +lean_inc(x_74); +x_82 = l___private_Init_Lean_Elab_Command_2__getState(x_74, x_81); +if (lean_obj_tag(x_82) == 0) { -lean_object* x_84; lean_object* x_85; lean_object* x_86; -x_84 = lean_ctor_get(x_81, 1); -x_85 = l_PersistentArray_push___rarg(x_84, x_78); -lean_ctor_set(x_81, 1, x_85); -x_86 = l___private_Init_Lean_Elab_Command_3__setState(x_81, x_72, x_82); -if (lean_obj_tag(x_86) == 0) +lean_object* x_83; lean_object* x_84; uint8_t x_85; +x_83 = lean_ctor_get(x_82, 0); +lean_inc(x_83); +x_84 = lean_ctor_get(x_82, 1); +lean_inc(x_84); +lean_dec(x_82); +x_85 = !lean_is_exclusive(x_83); +if (x_85 == 0) { -uint8_t x_87; -x_87 = !lean_is_exclusive(x_86); -if (x_87 == 0) +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_83, 1); +x_87 = l_PersistentArray_push___rarg(x_86, x_80); +lean_ctor_set(x_83, 1, x_87); +x_88 = l___private_Init_Lean_Elab_Command_3__setState(x_83, x_74, x_84); +if (lean_obj_tag(x_88) == 0) { -lean_object* x_88; lean_object* x_89; -x_88 = lean_ctor_get(x_86, 0); -lean_dec(x_88); -x_89 = lean_box(0); -lean_ctor_set(x_86, 0, x_89); -return x_86; -} -else +uint8_t x_89; +x_89 = !lean_is_exclusive(x_88); +if (x_89 == 0) { -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_86, 1); -lean_inc(x_90); -lean_dec(x_86); +lean_object* x_90; lean_object* x_91; +x_90 = lean_ctor_get(x_88, 0); +lean_dec(x_90); x_91 = lean_box(0); -x_92 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_92, 0, x_91); -lean_ctor_set(x_92, 1, x_90); -return x_92; +lean_ctor_set(x_88, 0, x_91); +return x_88; +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; +x_92 = lean_ctor_get(x_88, 1); +lean_inc(x_92); +lean_dec(x_88); +x_93 = lean_box(0); +x_94 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_94, 0, x_93); +lean_ctor_set(x_94, 1, x_92); +return x_94; } } else { -uint8_t x_93; -x_93 = !lean_is_exclusive(x_86); -if (x_93 == 0) +uint8_t x_95; +x_95 = !lean_is_exclusive(x_88); +if (x_95 == 0) { -lean_object* x_94; lean_object* x_95; -x_94 = lean_ctor_get(x_86, 0); -lean_dec(x_94); -x_95 = lean_box(0); -lean_ctor_set_tag(x_86, 0); -lean_ctor_set(x_86, 0, x_95); -return x_86; -} -else -{ -lean_object* x_96; lean_object* x_97; lean_object* x_98; -x_96 = lean_ctor_get(x_86, 1); -lean_inc(x_96); -lean_dec(x_86); +lean_object* x_96; lean_object* x_97; +x_96 = lean_ctor_get(x_88, 0); +lean_dec(x_96); x_97 = lean_box(0); -x_98 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_98, 0, x_97); -lean_ctor_set(x_98, 1, x_96); -return x_98; +lean_ctor_set_tag(x_88, 0); +lean_ctor_set(x_88, 0, x_97); +return x_88; +} +else +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_88, 1); +lean_inc(x_98); +lean_dec(x_88); +x_99 = lean_box(0); +x_100 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_100, 0, x_99); +lean_ctor_set(x_100, 1, x_98); +return x_100; } } } else { -lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; -x_99 = lean_ctor_get(x_81, 0); -x_100 = lean_ctor_get(x_81, 1); -x_101 = lean_ctor_get(x_81, 2); -x_102 = lean_ctor_get(x_81, 3); +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_101 = lean_ctor_get(x_83, 0); +x_102 = lean_ctor_get(x_83, 1); +x_103 = lean_ctor_get(x_83, 2); +x_104 = lean_ctor_get(x_83, 3); +lean_inc(x_104); +lean_inc(x_103); lean_inc(x_102); lean_inc(x_101); -lean_inc(x_100); -lean_inc(x_99); -lean_dec(x_81); -x_103 = l_PersistentArray_push___rarg(x_100, x_78); -x_104 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_104, 0, x_99); -lean_ctor_set(x_104, 1, x_103); -lean_ctor_set(x_104, 2, x_101); -lean_ctor_set(x_104, 3, x_102); -x_105 = l___private_Init_Lean_Elab_Command_3__setState(x_104, x_72, x_82); -if (lean_obj_tag(x_105) == 0) +lean_dec(x_83); +x_105 = l_PersistentArray_push___rarg(x_102, x_80); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_101); +lean_ctor_set(x_106, 1, x_105); +lean_ctor_set(x_106, 2, x_103); +lean_ctor_set(x_106, 3, x_104); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_74, x_84); +if (lean_obj_tag(x_107) == 0) { -lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; -x_106 = lean_ctor_get(x_105, 1); -lean_inc(x_106); -if (lean_is_exclusive(x_105)) { - lean_ctor_release(x_105, 0); - lean_ctor_release(x_105, 1); - x_107 = x_105; -} else { - lean_dec_ref(x_105); - x_107 = lean_box(0); -} -x_108 = lean_box(0); -if (lean_is_scalar(x_107)) { - x_109 = lean_alloc_ctor(0, 2, 0); -} else { +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); x_109 = x_107; -} -lean_ctor_set(x_109, 0, x_108); -lean_ctor_set(x_109, 1, x_106); -return x_109; -} -else -{ -lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; -x_110 = lean_ctor_get(x_105, 1); -lean_inc(x_110); -if (lean_is_exclusive(x_105)) { - lean_ctor_release(x_105, 0); - lean_ctor_release(x_105, 1); - x_111 = x_105; } else { - lean_dec_ref(x_105); - x_111 = lean_box(0); + lean_dec_ref(x_107); + x_109 = lean_box(0); } -x_112 = lean_box(0); -if (lean_is_scalar(x_111)) { - x_113 = lean_alloc_ctor(0, 2, 0); +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); } else { - x_113 = x_111; - lean_ctor_set_tag(x_113, 0); + x_111 = x_109; } -lean_ctor_set(x_113, 0, x_112); -lean_ctor_set(x_113, 1, x_110); -return x_113; +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 1); +lean_inc(x_112); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_113 = x_107; +} else { + lean_dec_ref(x_107); + x_113 = lean_box(0); +} +x_114 = lean_box(0); +if (lean_is_scalar(x_113)) { + x_115 = lean_alloc_ctor(0, 2, 0); +} else { + x_115 = x_113; + lean_ctor_set_tag(x_115, 0); +} +lean_ctor_set(x_115, 0, x_114); +lean_ctor_set(x_115, 1, x_112); +return x_115; } } } else { -uint8_t x_114; -lean_dec(x_78); -lean_dec(x_72); -x_114 = !lean_is_exclusive(x_80); -if (x_114 == 0) -{ -lean_object* x_115; lean_object* x_116; -x_115 = lean_ctor_get(x_80, 0); -lean_dec(x_115); -x_116 = lean_box(0); -lean_ctor_set_tag(x_80, 0); -lean_ctor_set(x_80, 0, x_116); -return x_80; -} -else -{ -lean_object* x_117; lean_object* x_118; lean_object* x_119; -x_117 = lean_ctor_get(x_80, 1); -lean_inc(x_117); +uint8_t x_116; lean_dec(x_80); +lean_dec(x_74); +x_116 = !lean_is_exclusive(x_82); +if (x_116 == 0) +{ +lean_object* x_117; lean_object* x_118; +x_117 = lean_ctor_get(x_82, 0); +lean_dec(x_117); x_118 = lean_box(0); -x_119 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_119, 0, x_118); -lean_ctor_set(x_119, 1, x_117); -return x_119; +lean_ctor_set_tag(x_82, 0); +lean_ctor_set(x_82, 0, x_118); +return x_82; +} +else +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_119 = lean_ctor_get(x_82, 1); +lean_inc(x_119); +lean_dec(x_82); +x_120 = lean_box(0); +x_121 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_121, 0, x_120); +lean_ctor_set(x_121, 1, x_119); +return x_121; } } } } else { -uint8_t x_120; +uint8_t x_122; lean_dec(x_1); -x_120 = !lean_is_exclusive(x_64); -if (x_120 == 0) +x_122 = !lean_is_exclusive(x_65); +if (x_122 == 0) { -return x_64; +return x_65; } else { -lean_object* x_121; lean_object* x_122; lean_object* x_123; -x_121 = lean_ctor_get(x_64, 0); -x_122 = lean_ctor_get(x_64, 1); -lean_inc(x_122); -lean_inc(x_121); -lean_dec(x_64); -x_123 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_123, 0, x_121); -lean_ctor_set(x_123, 1, x_122); -return x_123; +lean_object* x_123; lean_object* x_124; lean_object* x_125; +x_123 = lean_ctor_get(x_65, 0); +x_124 = lean_ctor_get(x_65, 1); +lean_inc(x_124); +lean_inc(x_123); +lean_dec(x_65); +x_125 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_125, 0, x_123); +lean_ctor_set(x_125, 1, x_124); +return x_125; } } } diff --git a/stage0/stdlib/Init/Lean/MetavarContext.c b/stage0/stdlib/Init/Lean/MetavarContext.c index fb778aec40..113f5d4a65 100644 --- a/stage0/stdlib/Init/Lean/MetavarContext.c +++ b/stage0/stdlib/Init/Lean/MetavarContext.c @@ -46,6 +46,7 @@ lean_object* l_Lean_MetavarContext_instantiateMVars(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_findLevelDepth_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_MetavarContext_findLevelDepth_x3f___spec__1(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main___boxed(lean_object*); +lean_object* l_Array_eraseIdx___rarg(lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_MetavarContext_MkBinding_Lean_MonadHashMapCacheAdapter___lambda__2(lean_object*, lean_object*); extern lean_object* l_List_repr___rarg___closed__1; @@ -171,6 +172,7 @@ lean_object* l_Lean_MetavarContext_hasAssignableMVar___main(lean_object*, lean_o uint8_t l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__11(lean_object*, lean_object*); lean_object* l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__11___boxed(lean_object*, lean_object*); uint8_t l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__17(lean_object*, lean_object*); +lean_object* l_Array_findIdxAux___main___at_Lean_LocalInstances_erase___spec__1(lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__37(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); uint8_t lean_metavar_ctx_is_expr_assigned(lean_object*, lean_object*); @@ -285,6 +287,7 @@ lean_object* l_Array_indexOfAux___main___at_Lean_MetavarContext_eraseDelayed___s lean_object* l_Lean_MetavarContext_isWellFormed___main(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__43___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isExprAssigned___spec__2(lean_object*, size_t, lean_object*); +lean_object* l_Lean_LocalInstances_erase(lean_object*, lean_object*); lean_object* l_PersistentArray_anyM___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__28___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_16__abstractRangeAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_anyM___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__16___boxed(lean_object*, lean_object*); @@ -461,6 +464,7 @@ lean_object* l_Array_umapMAux___main___at___private_Init_Lean_MetavarContext_21_ lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_MetavarContext_getLevelAssignment_x3f___spec__1(lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); +lean_object* l_Lean_LocalInstances_erase___boxed(lean_object*, lean_object*); lean_object* l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarContext_20__anyDependsOn___spec__3___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_8__dep___main___lambda__1(lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_MetavarContext_21__elimMVarDepsApp___main___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); @@ -470,6 +474,7 @@ lean_object* l_Lean_MetavarContext_MkBinding_Exception_toString___closed__1; lean_object* l___private_Init_Lean_MetavarContext_9__getLocalDeclWithSmallestIdx(lean_object*, lean_object*); uint8_t l_List_foldr___main___at_Lean_MetavarContext_hasAssignedMVar___main___spec__1(lean_object*, uint8_t, lean_object*); lean_object* l_PersistentHashMap_contains___at_Lean_MetavarContext_isDelayedAssigned___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_Array_findIdxAux___main___at_Lean_LocalInstances_erase___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__44(lean_object*); lean_object* l___private_Init_Lean_MetavarContext_7__visit(lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__32(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -606,6 +611,91 @@ x_1 = l_Lean_LocalInstance_hasBeq___closed__1; return x_1; } } +lean_object* l_Array_findIdxAux___main___at_Lean_LocalInstances_erase___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_array_get_size(x_2); +x_5 = lean_nat_dec_lt(x_3, x_4); +lean_dec(x_4); +if (x_5 == 0) +{ +lean_object* x_6; +lean_dec(x_3); +x_6 = lean_box(0); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_7 = lean_array_fget(x_2, x_3); +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +lean_dec(x_7); +x_9 = l_Lean_Expr_fvarId_x21(x_8); +lean_dec(x_8); +x_10 = lean_name_eq(x_9, x_1); +lean_dec(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_3, x_11); +lean_dec(x_3); +x_3 = x_12; +goto _start; +} +else +{ +lean_object* x_14; +x_14 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_14, 0, x_3); +return x_14; +} +} +} +} +lean_object* l_Lean_LocalInstances_erase(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_unsigned_to_nat(0u); +x_4 = l_Array_findIdxAux___main___at_Lean_LocalInstances_erase___spec__1(x_2, x_1, x_3); +if (lean_obj_tag(x_4) == 0) +{ +return x_1; +} +else +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +lean_dec(x_4); +x_6 = l_Array_eraseIdx___rarg(x_1, x_5); +lean_dec(x_5); +return x_6; +} +} +} +lean_object* l_Array_findIdxAux___main___at_Lean_LocalInstances_erase___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Array_findIdxAux___main___at_Lean_LocalInstances_erase___spec__1(x_1, x_2, x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_LocalInstances_erase___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_LocalInstances_erase(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} uint8_t l_Lean_MetavarKind_isSyntheticOpaque(uint8_t x_1) { _start: { @@ -2014,7 +2104,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_MetavarContext_getDecl___closed__1; -x_2 = lean_unsigned_to_nat(319u); +x_2 = lean_unsigned_to_nat(325u); x_3 = lean_unsigned_to_nat(15u); x_4 = l_Lean_MetavarContext_getDecl___closed__2; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -2244,7 +2334,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_MetavarContext_getDecl___closed__1; -x_2 = lean_unsigned_to_nat(327u); +x_2 = lean_unsigned_to_nat(333u); x_3 = lean_unsigned_to_nat(12u); x_4 = l_Lean_MetavarContext_getDecl___closed__2; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -5639,7 +5729,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_MetavarContext_getDecl___closed__1; -x_2 = lean_unsigned_to_nat(375u); +x_2 = lean_unsigned_to_nat(381u); x_3 = lean_unsigned_to_nat(12u); x_4 = l_Lean_MetavarContext_isLevelAssignable___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); diff --git a/stage0/stdlib/Init/Lean/Util/CollectFVars.c b/stage0/stdlib/Init/Lean/Util/CollectFVars.c new file mode 100644 index 0000000000..cf97042823 --- /dev/null +++ b/stage0/stdlib/Init/Lean/Util/CollectFVars.c @@ -0,0 +1,1421 @@ +// Lean compiler output +// Module: Init.Lean.Util.CollectFVars +// Imports: Init.Lean.Expr +#include "runtime/lean.h" +#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_CollectFVars_State_inhabited; +lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_Lean_CollectFVars_main(lean_object*, lean_object*); +lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +lean_object* l_Lean_CollectFVars_State_inhabited___closed__2; +lean_object* l_Lean_collectFVars(lean_object*, lean_object*); +lean_object* l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2___boxed(lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); +lean_object* l_Lean_CollectFVars_State_inhabited___closed__1; +lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_HashMapImp_expand___at_Lean_CollectFVars_visit___spec__4(lean_object*, lean_object*); +lean_object* lean_array_fget(lean_object*, lean_object*); +lean_object* l_mkHashMap___at_Lean_CollectFVars_State_inhabited___spec__2(lean_object*); +lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); +size_t l_Lean_Expr_hash(lean_object*); +lean_object* l_Lean_CollectFVars_main___main(lean_object*, lean_object*); +size_t lean_usize_modn(size_t, lean_object*); +lean_object* l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(lean_object*, lean_object*, lean_object*); +lean_object* l_mkHashMapImp___rarg(lean_object*); +lean_object* l_RBNode_insert___at_Lean_NameSet_insert___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_CollectFVars_visit(lean_object*, lean_object*, lean_object*); +lean_object* l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(lean_object*, lean_object*, lean_object*); +uint8_t lean_expr_eqv(lean_object*, lean_object*); +uint8_t lean_nat_dec_le(lean_object*, lean_object*); +uint8_t l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(lean_object*, lean_object*); +lean_object* l_mkHashSet___at_Lean_CollectFVars_State_inhabited___spec__1(lean_object*); +lean_object* lean_nat_mul(lean_object*, lean_object*); +uint8_t l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(lean_object*, lean_object*); +lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectFVars_visit___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_array(lean_object*, lean_object*); +uint8_t l_Lean_Expr_hasFVar(lean_object*); +lean_object* l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_AssocList_foldlM___main___at_Lean_CollectFVars_visit___spec__6(lean_object*, lean_object*); +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_mkHashMap___at_Lean_CollectFVars_State_inhabited___spec__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* l_mkHashSet___at_Lean_CollectFVars_State_inhabited___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_CollectFVars_State_inhabited___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(8u); +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_CollectFVars_State_inhabited___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_CollectFVars_State_inhabited___closed__1; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_CollectFVars_State_inhabited() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_CollectFVars_State_inhabited___closed__2; +return x_1; +} +} +uint8_t l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_3; +x_3 = 0; +return x_3; +} +else +{ +lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 2); +x_6 = lean_expr_eqv(x_4, x_1); +if (x_6 == 0) +{ +x_2 = x_5; +goto _start; +} +else +{ +uint8_t x_8; +x_8 = 1; +return x_8; +} +} +} +} +uint8_t l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; uint8_t x_8; +x_3 = lean_ctor_get(x_1, 1); +x_4 = lean_array_get_size(x_3); +x_5 = l_Lean_Expr_hash(x_2); +x_6 = lean_usize_modn(x_5, x_4); +lean_dec(x_4); +x_7 = lean_array_uget(x_3, x_6); +x_8 = l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(x_2, x_7); +lean_dec(x_7); +return x_8; +} +} +lean_object* l_AssocList_foldlM___main___at_Lean_CollectFVars_visit___spec__6(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_2); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 2); +x_6 = lean_array_get_size(x_1); +x_7 = l_Lean_Expr_hash(x_4); +x_8 = lean_usize_modn(x_7, x_6); +lean_dec(x_6); +x_9 = lean_array_uget(x_1, x_8); +lean_ctor_set(x_2, 2, x_9); +x_10 = lean_array_uset(x_1, x_8, x_2); +x_1 = x_10; +x_2 = x_5; +goto _start; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_12 = lean_ctor_get(x_2, 0); +x_13 = lean_ctor_get(x_2, 1); +x_14 = lean_ctor_get(x_2, 2); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_2); +x_15 = lean_array_get_size(x_1); +x_16 = l_Lean_Expr_hash(x_12); +x_17 = lean_usize_modn(x_16, x_15); +lean_dec(x_15); +x_18 = lean_array_uget(x_1, x_17); +x_19 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_19, 0, x_12); +lean_ctor_set(x_19, 1, x_13); +lean_ctor_set(x_19, 2, x_18); +x_20 = lean_array_uset(x_1, x_17, x_19); +x_1 = x_20; +x_2 = x_14; +goto _start; +} +} +} +} +lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectFVars_visit___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_array_get_size(x_2); +x_5 = lean_nat_dec_lt(x_1, x_4); +lean_dec(x_4); +if (x_5 == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_6 = lean_array_fget(x_2, x_1); +x_7 = lean_box(0); +x_8 = lean_array_fset(x_2, x_1, x_7); +x_9 = l_AssocList_foldlM___main___at_Lean_CollectFVars_visit___spec__6(x_3, x_6); +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_1, x_10); +lean_dec(x_1); +x_1 = x_11; +x_2 = x_8; +x_3 = x_9; +goto _start; +} +} +} +lean_object* l_HashMapImp_expand___at_Lean_CollectFVars_visit___spec__4(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_3 = lean_array_get_size(x_2); +x_4 = lean_unsigned_to_nat(2u); +x_5 = lean_nat_mul(x_3, x_4); +lean_dec(x_3); +x_6 = lean_box(0); +x_7 = lean_mk_array(x_5, x_6); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_HashMapImp_moveEntries___main___at_Lean_CollectFVars_visit___spec__5(x_8, x_2, x_7); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_1); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +lean_object* l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_5 = lean_ctor_get(x_3, 0); +x_6 = lean_ctor_get(x_3, 1); +x_7 = lean_ctor_get(x_3, 2); +x_8 = lean_expr_eqv(x_5, x_1); +if (x_8 == 0) +{ +lean_object* x_9; +x_9 = l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(x_1, x_2, x_7); +lean_ctor_set(x_3, 2, x_9); +return x_3; +} +else +{ +lean_dec(x_6); +lean_dec(x_5); +lean_ctor_set(x_3, 1, x_2); +lean_ctor_set(x_3, 0, x_1); +return x_3; +} +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_10 = lean_ctor_get(x_3, 0); +x_11 = lean_ctor_get(x_3, 1); +x_12 = lean_ctor_get(x_3, 2); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_3); +x_13 = lean_expr_eqv(x_10, x_1); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(x_1, x_2, x_12); +x_15 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_15, 0, x_10); +lean_ctor_set(x_15, 1, x_11); +lean_ctor_set(x_15, 2, x_14); +return x_15; +} +else +{ +lean_object* x_16; +lean_dec(x_11); +lean_dec(x_10); +x_16 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_16, 0, x_1); +lean_ctor_set(x_16, 1, x_2); +lean_ctor_set(x_16, 2, x_12); +return x_16; +} +} +} +} +} +lean_object* l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = lean_array_get_size(x_6); +x_8 = l_Lean_Expr_hash(x_2); +x_9 = lean_usize_modn(x_8, x_7); +x_10 = lean_array_uget(x_6, x_9); +x_11 = l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(x_2, x_10); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_5, x_12); +lean_dec(x_5); +x_14 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_14, 0, x_2); +lean_ctor_set(x_14, 1, x_3); +lean_ctor_set(x_14, 2, x_10); +x_15 = lean_array_uset(x_6, x_9, x_14); +x_16 = lean_nat_dec_le(x_13, x_7); +lean_dec(x_7); +if (x_16 == 0) +{ +lean_object* x_17; +lean_free_object(x_1); +x_17 = l_HashMapImp_expand___at_Lean_CollectFVars_visit___spec__4(x_13, x_15); +return x_17; +} +else +{ +lean_ctor_set(x_1, 1, x_15); +lean_ctor_set(x_1, 0, x_13); +return x_1; +} +} +else +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_7); +x_18 = l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(x_2, x_3, x_10); +x_19 = lean_array_uset(x_6, x_9, x_18); +lean_ctor_set(x_1, 1, x_19); +return x_1; +} +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; +x_20 = lean_ctor_get(x_1, 0); +x_21 = lean_ctor_get(x_1, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_1); +x_22 = lean_array_get_size(x_21); +x_23 = l_Lean_Expr_hash(x_2); +x_24 = lean_usize_modn(x_23, x_22); +x_25 = lean_array_uget(x_21, x_24); +x_26 = l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(x_2, x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +x_27 = lean_unsigned_to_nat(1u); +x_28 = lean_nat_add(x_20, x_27); +lean_dec(x_20); +x_29 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_29, 0, x_2); +lean_ctor_set(x_29, 1, x_3); +lean_ctor_set(x_29, 2, x_25); +x_30 = lean_array_uset(x_21, x_24, x_29); +x_31 = lean_nat_dec_le(x_28, x_22); +lean_dec(x_22); +if (x_31 == 0) +{ +lean_object* x_32; +x_32 = l_HashMapImp_expand___at_Lean_CollectFVars_visit___spec__4(x_28, x_30); +return x_32; +} +else +{ +lean_object* x_33; +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_28); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_dec(x_22); +x_34 = l_AssocList_replace___main___at_Lean_CollectFVars_visit___spec__7(x_2, x_3, x_25); +x_35 = lean_array_uset(x_21, x_24, x_34); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_20); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +} +} +lean_object* l_Lean_CollectFVars_visit(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = l_Lean_Expr_hasFVar(x_2); +if (x_4 == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +x_7 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_5, x_2); +if (x_7 == 0) +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_3); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_3, 1); +lean_dec(x_9); +x_10 = lean_ctor_get(x_3, 0); +lean_dec(x_10); +x_11 = lean_box(0); +lean_inc(x_2); +x_12 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_5, x_2, x_11); +lean_ctor_set(x_3, 0, x_12); +x_13 = lean_apply_2(x_1, x_2, x_3); +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +lean_dec(x_3); +x_14 = lean_box(0); +lean_inc(x_2); +x_15 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_5, x_2, x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_6); +x_17 = lean_apply_2(x_1, x_2, x_16); +return x_17; +} +} +else +{ +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} +} +} +lean_object* l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_AssocList_contains___main___at_Lean_CollectFVars_visit___spec__2(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Lean_CollectFVars_main___main(lean_object* x_1, lean_object* x_2) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 1: +{ +lean_object* x_3; uint8_t x_4; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_box(0); +x_7 = l_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_5, x_3, x_6); +lean_ctor_set(x_2, 1, x_7); +return x_2; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_ctor_get(x_2, 0); +x_9 = lean_ctor_get(x_2, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_2); +x_10 = lean_box(0); +x_11 = l_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_9, x_3, x_10); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_8); +lean_ctor_set(x_12, 1, x_11); +return x_12; +} +} +case 5: +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_30; uint8_t x_31; +x_13 = lean_ctor_get(x_1, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_1, 1); +lean_inc(x_14); +lean_dec(x_1); +x_30 = l_Lean_Expr_hasFVar(x_13); +x_31 = l_Lean_Expr_hasFVar(x_14); +if (x_30 == 0) +{ +lean_dec(x_13); +if (x_31 == 0) +{ +lean_dec(x_14); +return x_2; +} +else +{ +x_15 = x_2; +goto block_29; +} +} +else +{ +lean_object* x_32; lean_object* x_33; uint8_t x_34; +x_32 = lean_ctor_get(x_2, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_2, 1); +lean_inc(x_33); +x_34 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_32, x_13); +if (x_34 == 0) +{ +uint8_t x_35; +x_35 = !lean_is_exclusive(x_2); +if (x_35 == 0) +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_36 = lean_ctor_get(x_2, 1); +lean_dec(x_36); +x_37 = lean_ctor_get(x_2, 0); +lean_dec(x_37); +x_38 = lean_box(0); +lean_inc(x_13); +x_39 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_32, x_13, x_38); +lean_ctor_set(x_2, 0, x_39); +x_40 = l_Lean_CollectFVars_main___main(x_13, x_2); +if (x_31 == 0) +{ +lean_dec(x_14); +return x_40; +} +else +{ +x_15 = x_40; +goto block_29; +} +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +lean_dec(x_2); +x_41 = lean_box(0); +lean_inc(x_13); +x_42 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_32, x_13, x_41); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_33); +x_44 = l_Lean_CollectFVars_main___main(x_13, x_43); +if (x_31 == 0) +{ +lean_dec(x_14); +return x_44; +} +else +{ +x_15 = x_44; +goto block_29; +} +} +} +else +{ +lean_dec(x_33); +lean_dec(x_32); +lean_dec(x_13); +if (x_31 == 0) +{ +lean_dec(x_14); +return x_2; +} +else +{ +x_15 = x_2; +goto block_29; +} +} +} +block_29: +{ +lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +x_18 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_16, x_14); +if (x_18 == 0) +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_15); +if (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_15, 1); +lean_dec(x_20); +x_21 = lean_ctor_get(x_15, 0); +lean_dec(x_21); +x_22 = lean_box(0); +lean_inc(x_14); +x_23 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_16, x_14, x_22); +lean_ctor_set(x_15, 0, x_23); +x_1 = x_14; +x_2 = x_15; +goto _start; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +lean_dec(x_15); +x_25 = lean_box(0); +lean_inc(x_14); +x_26 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_16, x_14, x_25); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_17); +x_1 = x_14; +x_2 = x_27; +goto _start; +} +} +else +{ +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_14); +return x_15; +} +} +} +case 6: +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_62; uint8_t x_63; +x_45 = lean_ctor_get(x_1, 1); +lean_inc(x_45); +x_46 = lean_ctor_get(x_1, 2); +lean_inc(x_46); +lean_dec(x_1); +x_62 = l_Lean_Expr_hasFVar(x_45); +x_63 = l_Lean_Expr_hasFVar(x_46); +if (x_62 == 0) +{ +lean_dec(x_45); +if (x_63 == 0) +{ +lean_dec(x_46); +return x_2; +} +else +{ +x_47 = x_2; +goto block_61; +} +} +else +{ +lean_object* x_64; lean_object* x_65; uint8_t x_66; +x_64 = lean_ctor_get(x_2, 0); +lean_inc(x_64); +x_65 = lean_ctor_get(x_2, 1); +lean_inc(x_65); +x_66 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_64, x_45); +if (x_66 == 0) +{ +uint8_t x_67; +x_67 = !lean_is_exclusive(x_2); +if (x_67 == 0) +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_68 = lean_ctor_get(x_2, 1); +lean_dec(x_68); +x_69 = lean_ctor_get(x_2, 0); +lean_dec(x_69); +x_70 = lean_box(0); +lean_inc(x_45); +x_71 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_64, x_45, x_70); +lean_ctor_set(x_2, 0, x_71); +x_72 = l_Lean_CollectFVars_main___main(x_45, x_2); +if (x_63 == 0) +{ +lean_dec(x_46); +return x_72; +} +else +{ +x_47 = x_72; +goto block_61; +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +lean_dec(x_2); +x_73 = lean_box(0); +lean_inc(x_45); +x_74 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_64, x_45, x_73); +x_75 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_65); +x_76 = l_Lean_CollectFVars_main___main(x_45, x_75); +if (x_63 == 0) +{ +lean_dec(x_46); +return x_76; +} +else +{ +x_47 = x_76; +goto block_61; +} +} +} +else +{ +lean_dec(x_65); +lean_dec(x_64); +lean_dec(x_45); +if (x_63 == 0) +{ +lean_dec(x_46); +return x_2; +} +else +{ +x_47 = x_2; +goto block_61; +} +} +} +block_61: +{ +lean_object* x_48; lean_object* x_49; uint8_t x_50; +x_48 = lean_ctor_get(x_47, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_47, 1); +lean_inc(x_49); +x_50 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_48, x_46); +if (x_50 == 0) +{ +uint8_t x_51; +x_51 = !lean_is_exclusive(x_47); +if (x_51 == 0) +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_52 = lean_ctor_get(x_47, 1); +lean_dec(x_52); +x_53 = lean_ctor_get(x_47, 0); +lean_dec(x_53); +x_54 = lean_box(0); +lean_inc(x_46); +x_55 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_48, x_46, x_54); +lean_ctor_set(x_47, 0, x_55); +x_1 = x_46; +x_2 = x_47; +goto _start; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +lean_dec(x_47); +x_57 = lean_box(0); +lean_inc(x_46); +x_58 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_48, x_46, x_57); +x_59 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_59, 0, x_58); +lean_ctor_set(x_59, 1, x_49); +x_1 = x_46; +x_2 = x_59; +goto _start; +} +} +else +{ +lean_dec(x_49); +lean_dec(x_48); +lean_dec(x_46); +return x_47; +} +} +} +case 7: +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_94; uint8_t x_95; +x_77 = lean_ctor_get(x_1, 1); +lean_inc(x_77); +x_78 = lean_ctor_get(x_1, 2); +lean_inc(x_78); +lean_dec(x_1); +x_94 = l_Lean_Expr_hasFVar(x_77); +x_95 = l_Lean_Expr_hasFVar(x_78); +if (x_94 == 0) +{ +lean_dec(x_77); +if (x_95 == 0) +{ +lean_dec(x_78); +return x_2; +} +else +{ +x_79 = x_2; +goto block_93; +} +} +else +{ +lean_object* x_96; lean_object* x_97; uint8_t x_98; +x_96 = lean_ctor_get(x_2, 0); +lean_inc(x_96); +x_97 = lean_ctor_get(x_2, 1); +lean_inc(x_97); +x_98 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_96, x_77); +if (x_98 == 0) +{ +uint8_t x_99; +x_99 = !lean_is_exclusive(x_2); +if (x_99 == 0) +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_100 = lean_ctor_get(x_2, 1); +lean_dec(x_100); +x_101 = lean_ctor_get(x_2, 0); +lean_dec(x_101); +x_102 = lean_box(0); +lean_inc(x_77); +x_103 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_96, x_77, x_102); +lean_ctor_set(x_2, 0, x_103); +x_104 = l_Lean_CollectFVars_main___main(x_77, x_2); +if (x_95 == 0) +{ +lean_dec(x_78); +return x_104; +} +else +{ +x_79 = x_104; +goto block_93; +} +} +else +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; +lean_dec(x_2); +x_105 = lean_box(0); +lean_inc(x_77); +x_106 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_96, x_77, x_105); +x_107 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_107, 0, x_106); +lean_ctor_set(x_107, 1, x_97); +x_108 = l_Lean_CollectFVars_main___main(x_77, x_107); +if (x_95 == 0) +{ +lean_dec(x_78); +return x_108; +} +else +{ +x_79 = x_108; +goto block_93; +} +} +} +else +{ +lean_dec(x_97); +lean_dec(x_96); +lean_dec(x_77); +if (x_95 == 0) +{ +lean_dec(x_78); +return x_2; +} +else +{ +x_79 = x_2; +goto block_93; +} +} +} +block_93: +{ +lean_object* x_80; lean_object* x_81; uint8_t x_82; +x_80 = lean_ctor_get(x_79, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_79, 1); +lean_inc(x_81); +x_82 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_80, x_78); +if (x_82 == 0) +{ +uint8_t x_83; +x_83 = !lean_is_exclusive(x_79); +if (x_83 == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_79, 1); +lean_dec(x_84); +x_85 = lean_ctor_get(x_79, 0); +lean_dec(x_85); +x_86 = lean_box(0); +lean_inc(x_78); +x_87 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_80, x_78, x_86); +lean_ctor_set(x_79, 0, x_87); +x_1 = x_78; +x_2 = x_79; +goto _start; +} +else +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; +lean_dec(x_79); +x_89 = lean_box(0); +lean_inc(x_78); +x_90 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_80, x_78, x_89); +x_91 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_91, 0, x_90); +lean_ctor_set(x_91, 1, x_81); +x_1 = x_78; +x_2 = x_91; +goto _start; +} +} +else +{ +lean_dec(x_81); +lean_dec(x_80); +lean_dec(x_78); +return x_79; +} +} +} +case 8: +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; uint8_t x_127; uint8_t x_128; uint8_t x_129; lean_object* x_130; +x_109 = lean_ctor_get(x_1, 1); +lean_inc(x_109); +x_110 = lean_ctor_get(x_1, 2); +lean_inc(x_110); +x_111 = lean_ctor_get(x_1, 3); +lean_inc(x_111); +lean_dec(x_1); +x_127 = l_Lean_Expr_hasFVar(x_109); +x_128 = l_Lean_Expr_hasFVar(x_110); +x_129 = l_Lean_Expr_hasFVar(x_111); +if (x_127 == 0) +{ +lean_dec(x_109); +if (x_128 == 0) +{ +lean_dec(x_110); +if (x_129 == 0) +{ +lean_dec(x_111); +return x_2; +} +else +{ +x_112 = x_2; +goto block_126; +} +} +else +{ +x_130 = x_2; +goto block_144; +} +} +else +{ +lean_object* x_145; lean_object* x_146; uint8_t x_147; +x_145 = lean_ctor_get(x_2, 0); +lean_inc(x_145); +x_146 = lean_ctor_get(x_2, 1); +lean_inc(x_146); +x_147 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_145, x_109); +if (x_147 == 0) +{ +uint8_t x_148; +x_148 = !lean_is_exclusive(x_2); +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 = lean_ctor_get(x_2, 1); +lean_dec(x_149); +x_150 = lean_ctor_get(x_2, 0); +lean_dec(x_150); +x_151 = lean_box(0); +lean_inc(x_109); +x_152 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_145, x_109, x_151); +lean_ctor_set(x_2, 0, x_152); +x_153 = l_Lean_CollectFVars_main___main(x_109, x_2); +if (x_128 == 0) +{ +lean_dec(x_110); +if (x_129 == 0) +{ +lean_dec(x_111); +return x_153; +} +else +{ +x_112 = x_153; +goto block_126; +} +} +else +{ +x_130 = x_153; +goto block_144; +} +} +else +{ +lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; +lean_dec(x_2); +x_154 = lean_box(0); +lean_inc(x_109); +x_155 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_145, x_109, x_154); +x_156 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_156, 0, x_155); +lean_ctor_set(x_156, 1, x_146); +x_157 = l_Lean_CollectFVars_main___main(x_109, x_156); +if (x_128 == 0) +{ +lean_dec(x_110); +if (x_129 == 0) +{ +lean_dec(x_111); +return x_157; +} +else +{ +x_112 = x_157; +goto block_126; +} +} +else +{ +x_130 = x_157; +goto block_144; +} +} +} +else +{ +lean_dec(x_146); +lean_dec(x_145); +lean_dec(x_109); +if (x_128 == 0) +{ +lean_dec(x_110); +if (x_129 == 0) +{ +lean_dec(x_111); +return x_2; +} +else +{ +x_112 = x_2; +goto block_126; +} +} +else +{ +x_130 = x_2; +goto block_144; +} +} +} +block_126: +{ +lean_object* x_113; lean_object* x_114; uint8_t x_115; +x_113 = lean_ctor_get(x_112, 0); +lean_inc(x_113); +x_114 = lean_ctor_get(x_112, 1); +lean_inc(x_114); +x_115 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_113, x_111); +if (x_115 == 0) +{ +uint8_t x_116; +x_116 = !lean_is_exclusive(x_112); +if (x_116 == 0) +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_117 = lean_ctor_get(x_112, 1); +lean_dec(x_117); +x_118 = lean_ctor_get(x_112, 0); +lean_dec(x_118); +x_119 = lean_box(0); +lean_inc(x_111); +x_120 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_113, x_111, x_119); +lean_ctor_set(x_112, 0, x_120); +x_1 = x_111; +x_2 = x_112; +goto _start; +} +else +{ +lean_object* x_122; lean_object* x_123; lean_object* x_124; +lean_dec(x_112); +x_122 = lean_box(0); +lean_inc(x_111); +x_123 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_113, x_111, x_122); +x_124 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_124, 0, x_123); +lean_ctor_set(x_124, 1, x_114); +x_1 = x_111; +x_2 = x_124; +goto _start; +} +} +else +{ +lean_dec(x_114); +lean_dec(x_113); +lean_dec(x_111); +return x_112; +} +} +block_144: +{ +lean_object* x_131; lean_object* x_132; uint8_t x_133; +x_131 = lean_ctor_get(x_130, 0); +lean_inc(x_131); +x_132 = lean_ctor_get(x_130, 1); +lean_inc(x_132); +x_133 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_131, x_110); +if (x_133 == 0) +{ +uint8_t x_134; +x_134 = !lean_is_exclusive(x_130); +if (x_134 == 0) +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; +x_135 = lean_ctor_get(x_130, 1); +lean_dec(x_135); +x_136 = lean_ctor_get(x_130, 0); +lean_dec(x_136); +x_137 = lean_box(0); +lean_inc(x_110); +x_138 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_131, x_110, x_137); +lean_ctor_set(x_130, 0, x_138); +x_139 = l_Lean_CollectFVars_main___main(x_110, x_130); +if (x_129 == 0) +{ +lean_dec(x_111); +return x_139; +} +else +{ +x_112 = x_139; +goto block_126; +} +} +else +{ +lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; +lean_dec(x_130); +x_140 = lean_box(0); +lean_inc(x_110); +x_141 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_131, x_110, x_140); +x_142 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_142, 0, x_141); +lean_ctor_set(x_142, 1, x_132); +x_143 = l_Lean_CollectFVars_main___main(x_110, x_142); +if (x_129 == 0) +{ +lean_dec(x_111); +return x_143; +} +else +{ +x_112 = x_143; +goto block_126; +} +} +} +else +{ +lean_dec(x_132); +lean_dec(x_131); +lean_dec(x_110); +if (x_129 == 0) +{ +lean_dec(x_111); +return x_130; +} +else +{ +x_112 = x_130; +goto block_126; +} +} +} +} +case 10: +{ +lean_object* x_158; uint8_t x_159; +x_158 = lean_ctor_get(x_1, 1); +lean_inc(x_158); +lean_dec(x_1); +x_159 = l_Lean_Expr_hasFVar(x_158); +if (x_159 == 0) +{ +lean_dec(x_158); +return x_2; +} +else +{ +lean_object* x_160; lean_object* x_161; uint8_t x_162; +x_160 = lean_ctor_get(x_2, 0); +lean_inc(x_160); +x_161 = lean_ctor_get(x_2, 1); +lean_inc(x_161); +x_162 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_160, x_158); +if (x_162 == 0) +{ +uint8_t x_163; +x_163 = !lean_is_exclusive(x_2); +if (x_163 == 0) +{ +lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; +x_164 = lean_ctor_get(x_2, 1); +lean_dec(x_164); +x_165 = lean_ctor_get(x_2, 0); +lean_dec(x_165); +x_166 = lean_box(0); +lean_inc(x_158); +x_167 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_160, x_158, x_166); +lean_ctor_set(x_2, 0, x_167); +x_1 = x_158; +goto _start; +} +else +{ +lean_object* x_169; lean_object* x_170; lean_object* x_171; +lean_dec(x_2); +x_169 = lean_box(0); +lean_inc(x_158); +x_170 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_160, x_158, x_169); +x_171 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_171, 0, x_170); +lean_ctor_set(x_171, 1, x_161); +x_1 = x_158; +x_2 = x_171; +goto _start; +} +} +else +{ +lean_dec(x_161); +lean_dec(x_160); +lean_dec(x_158); +return x_2; +} +} +} +case 11: +{ +lean_object* x_173; uint8_t x_174; +x_173 = lean_ctor_get(x_1, 2); +lean_inc(x_173); +lean_dec(x_1); +x_174 = l_Lean_Expr_hasFVar(x_173); +if (x_174 == 0) +{ +lean_dec(x_173); +return x_2; +} +else +{ +lean_object* x_175; lean_object* x_176; uint8_t x_177; +x_175 = lean_ctor_get(x_2, 0); +lean_inc(x_175); +x_176 = lean_ctor_get(x_2, 1); +lean_inc(x_176); +x_177 = l_HashMapImp_contains___at_Lean_CollectFVars_visit___spec__1(x_175, x_173); +if (x_177 == 0) +{ +uint8_t x_178; +x_178 = !lean_is_exclusive(x_2); +if (x_178 == 0) +{ +lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; +x_179 = lean_ctor_get(x_2, 1); +lean_dec(x_179); +x_180 = lean_ctor_get(x_2, 0); +lean_dec(x_180); +x_181 = lean_box(0); +lean_inc(x_173); +x_182 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_175, x_173, x_181); +lean_ctor_set(x_2, 0, x_182); +x_1 = x_173; +goto _start; +} +else +{ +lean_object* x_184; lean_object* x_185; lean_object* x_186; +lean_dec(x_2); +x_184 = lean_box(0); +lean_inc(x_173); +x_185 = l_HashMapImp_insert___at_Lean_CollectFVars_visit___spec__3(x_175, x_173, x_184); +x_186 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_186, 0, x_185); +lean_ctor_set(x_186, 1, x_176); +x_1 = x_173; +x_2 = x_186; +goto _start; +} +} +else +{ +lean_dec(x_176); +lean_dec(x_175); +lean_dec(x_173); +return x_2; +} +} +} +default: +{ +lean_dec(x_1); +return x_2; +} +} +} +} +lean_object* l_Lean_CollectFVars_main(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_CollectFVars_main___main(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_collectFVars(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_CollectFVars_main___main(x_2, x_1); +return x_3; +} +} +lean_object* initialize_Init_Lean_Expr(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Init_Lean_Util_CollectFVars(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_mk_io_result(lean_box(0)); +_G_initialized = true; +res = initialize_Init_Lean_Expr(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_CollectFVars_State_inhabited___closed__1 = _init_l_Lean_CollectFVars_State_inhabited___closed__1(); +lean_mark_persistent(l_Lean_CollectFVars_State_inhabited___closed__1); +l_Lean_CollectFVars_State_inhabited___closed__2 = _init_l_Lean_CollectFVars_State_inhabited___closed__2(); +lean_mark_persistent(l_Lean_CollectFVars_State_inhabited___closed__2); +l_Lean_CollectFVars_State_inhabited = _init_l_Lean_CollectFVars_State_inhabited(); +lean_mark_persistent(l_Lean_CollectFVars_State_inhabited); +return lean_mk_io_result(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c b/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c index 9ba8f1ffc9..0da37dcc9c 100644 --- a/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c +++ b/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c @@ -14,13 +14,11 @@ extern "C" { #endif lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(lean_object*, lean_object*, lean_object*); -lean_object* l_mkHashMap___at_Lean_collectLevelParams___spec__2(lean_object*); lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(lean_object*, lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_CollectLevelParams_visitLevel(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_collect(lean_object*, lean_object*); -lean_object* l_List_forM___main___at_Lean_CollectLevelParams_main___main___spec__1(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; size_t l_Lean_Level_hash(lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); @@ -32,7 +30,6 @@ lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitE lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_collect___main(lean_object*, lean_object*); lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitExpr___spec__6(lean_object*, lean_object*); -lean_object* l_mkHashSet___at_Lean_collectLevelParams___spec__3(lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); uint8_t l_Lean_Expr_hasLevelParam(lean_object*); lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(lean_object*, lean_object*); @@ -40,32 +37,108 @@ uint8_t l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1( lean_object* l_Lean_CollectLevelParams_visitExpr(lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); +lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__3(lean_object*); size_t l_Lean_Expr_hash(lean_object*); +lean_object* l_mkHashMap___at_Lean_CollectLevelParams_State_inhabited___spec__2(lean_object*); lean_object* l_Lean_CollectLevelParams_main(lean_object*, lean_object*); lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1___boxed(lean_object*, lean_object*); size_t lean_usize_modn(size_t, lean_object*); lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitLevel___spec__6(lean_object*, lean_object*); lean_object* l_mkHashMapImp___rarg(lean_object*); -lean_object* l_Lean_collectLevelParams___closed__2; +lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__1(lean_object*); +lean_object* l_Lean_CollectLevelParams_State_inhabited___closed__3; +lean_object* l_List_foldl___main___at_Lean_CollectLevelParams_main___main___spec__1(lean_object*, lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); +lean_object* l_Lean_CollectLevelParams_State_inhabited___closed__1; +lean_object* l_mkHashMap___at_Lean_CollectLevelParams_State_inhabited___spec__4(lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); -lean_object* l_Lean_collectLevelParams___closed__1; lean_object* lean_nat_mul(lean_object*, lean_object*); -lean_object* l_mkHashMap___at_Lean_collectLevelParams___spec__4(lean_object*); lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2___boxed(lean_object*, lean_object*); lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1___boxed(lean_object*, lean_object*); lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); -lean_object* l_Lean_collectLevelParams___closed__3; +lean_object* l_Lean_CollectLevelParams_State_inhabited; +lean_object* l_Lean_CollectLevelParams_State_inhabited___closed__2; lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2___boxed(lean_object*, lean_object*); -lean_object* l_mkHashSet___at_Lean_collectLevelParams___spec__1(lean_object*); -lean_object* l_Lean_collectLevelParams(lean_object*); +lean_object* l_Lean_collectLevelParams(lean_object*, lean_object*); uint8_t lean_level_eq(lean_object*, lean_object*); uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(lean_object*, lean_object*); lean_object* l_Lean_CollectLevelParams_main___main(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_mkHashMap___at_Lean_CollectLevelParams_State_inhabited___spec__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* l_mkHashMap___at_Lean_CollectLevelParams_State_inhabited___spec__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* l_mkHashSet___at_Lean_CollectLevelParams_State_inhabited___spec__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_CollectLevelParams_State_inhabited___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(8u); +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_CollectLevelParams_State_inhabited___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(8u); +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_CollectLevelParams_State_inhabited___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_CollectLevelParams_State_inhabited___closed__1; +x_2 = l_Lean_CollectLevelParams_State_inhabited___closed__2; +x_3 = l_Array_empty___closed__1; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* _init_l_Lean_CollectLevelParams_State_inhabited() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_CollectLevelParams_State_inhabited___closed__3; +return x_1; +} +} uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(lean_object* x_1, lean_object* x_2) { _start: { @@ -398,73 +471,63 @@ uint8_t x_4; x_4 = l_Lean_Level_hasParam(x_2); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_dec(x_2); lean_dec(x_1); -x_5 = lean_box(0); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_5); -lean_ctor_set(x_6, 1, x_3); -return x_6; +return x_3; } else { -lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_7 = lean_ctor_get(x_3, 0); +lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +x_7 = lean_ctor_get(x_3, 2); lean_inc(x_7); -x_8 = lean_ctor_get(x_3, 1); -lean_inc(x_8); -x_9 = lean_ctor_get(x_3, 2); -lean_inc(x_9); -x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_7, x_2); -if (x_10 == 0) +x_8 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_5, x_2); +if (x_8 == 0) { -uint8_t x_11; -x_11 = !lean_is_exclusive(x_3); -if (x_11 == 0) +uint8_t x_9; +x_9 = !lean_is_exclusive(x_3); +if (x_9 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_12 = lean_ctor_get(x_3, 2); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_10 = lean_ctor_get(x_3, 2); +lean_dec(x_10); +x_11 = lean_ctor_get(x_3, 1); +lean_dec(x_11); +x_12 = lean_ctor_get(x_3, 0); lean_dec(x_12); -x_13 = lean_ctor_get(x_3, 1); -lean_dec(x_13); -x_14 = lean_ctor_get(x_3, 0); -lean_dec(x_14); -x_15 = lean_box(0); +x_13 = lean_box(0); lean_inc(x_2); -x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_2, x_15); -lean_ctor_set(x_3, 0, x_16); -x_17 = lean_apply_2(x_1, x_2, x_3); -return x_17; +x_14 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_2, x_13); +lean_ctor_set(x_3, 0, x_14); +x_15 = lean_apply_2(x_1, x_2, x_3); +return x_15; } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_dec(x_3); -x_18 = lean_box(0); +x_16 = lean_box(0); lean_inc(x_2); -x_19 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_2, x_18); -x_20 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_20, 0, x_19); -lean_ctor_set(x_20, 1, x_8); -lean_ctor_set(x_20, 2, x_9); -x_21 = lean_apply_2(x_1, x_2, x_20); -return x_21; +x_17 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_2, x_16); +x_18 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_6); +lean_ctor_set(x_18, 2, x_7); +x_19 = lean_apply_2(x_1, x_2, x_18); +return x_19; } } else { -lean_object* x_22; lean_object* x_23; -lean_dec(x_9); -lean_dec(x_8); lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); -x_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_3); -return x_23; +return x_3; } } } @@ -504,435 +567,426 @@ lean_dec(x_1); x_4 = l_Lean_Level_hasParam(x_3); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_dec(x_3); -x_5 = lean_box(0); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_5); -lean_ctor_set(x_6, 1, x_2); -return x_6; +return x_2; } else { -lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_7 = lean_ctor_get(x_2, 0); +lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_5 = lean_ctor_get(x_2, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_6); +x_7 = lean_ctor_get(x_2, 2); lean_inc(x_7); -x_8 = lean_ctor_get(x_2, 1); -lean_inc(x_8); -x_9 = lean_ctor_get(x_2, 2); -lean_inc(x_9); -x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_7, x_3); -if (x_10 == 0) +x_8 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_5, x_3); +if (x_8 == 0) { -uint8_t x_11; -x_11 = !lean_is_exclusive(x_2); -if (x_11 == 0) +uint8_t x_9; +x_9 = !lean_is_exclusive(x_2); +if (x_9 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_12 = lean_ctor_get(x_2, 2); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_10 = lean_ctor_get(x_2, 2); +lean_dec(x_10); +x_11 = lean_ctor_get(x_2, 1); +lean_dec(x_11); +x_12 = lean_ctor_get(x_2, 0); lean_dec(x_12); -x_13 = lean_ctor_get(x_2, 1); -lean_dec(x_13); -x_14 = lean_ctor_get(x_2, 0); -lean_dec(x_14); -x_15 = lean_box(0); +x_13 = lean_box(0); lean_inc(x_3); -x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_15); -lean_ctor_set(x_2, 0, x_16); +x_14 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3, x_13); +lean_ctor_set(x_2, 0, x_14); x_1 = x_3; goto _start; } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_dec(x_2); -x_18 = lean_box(0); +x_16 = lean_box(0); lean_inc(x_3); -x_19 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_18); -x_20 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_20, 0, x_19); -lean_ctor_set(x_20, 1, x_8); -lean_ctor_set(x_20, 2, x_9); +x_17 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3, x_16); +x_18 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_6); +lean_ctor_set(x_18, 2, x_7); x_1 = x_3; -x_2 = x_20; +x_2 = x_18; goto _start; } } else { -lean_object* x_22; lean_object* x_23; -lean_dec(x_9); -lean_dec(x_8); lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); 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_2); -return x_23; +return x_2; } } } case 2: { -lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_48; -x_24 = lean_ctor_get(x_1, 0); -lean_inc(x_24); -x_25 = lean_ctor_get(x_1, 1); -lean_inc(x_25); +lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_39; uint8_t x_40; +x_20 = lean_ctor_get(x_1, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_1, 1); +lean_inc(x_21); lean_dec(x_1); -x_48 = l_Lean_Level_hasParam(x_24); -if (x_48 == 0) +x_39 = l_Lean_Level_hasParam(x_20); +x_40 = l_Lean_Level_hasParam(x_21); +if (x_39 == 0) { -lean_dec(x_24); -x_26 = x_2; -goto block_47; +lean_dec(x_20); +if (x_40 == 0) +{ +lean_dec(x_21); +return x_2; } else { -lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; -x_49 = lean_ctor_get(x_2, 0); -lean_inc(x_49); -x_50 = lean_ctor_get(x_2, 1); -lean_inc(x_50); -x_51 = lean_ctor_get(x_2, 2); -lean_inc(x_51); -x_52 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_49, x_24); -if (x_52 == 0) -{ -uint8_t x_53; -x_53 = !lean_is_exclusive(x_2); -if (x_53 == 0) -{ -lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; -x_54 = lean_ctor_get(x_2, 2); -lean_dec(x_54); -x_55 = lean_ctor_get(x_2, 1); -lean_dec(x_55); -x_56 = lean_ctor_get(x_2, 0); -lean_dec(x_56); -x_57 = lean_box(0); -lean_inc(x_24); -x_58 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_49, x_24, x_57); -lean_ctor_set(x_2, 0, x_58); -x_59 = l_Lean_CollectLevelParams_collect___main(x_24, x_2); -x_60 = lean_ctor_get(x_59, 1); -lean_inc(x_60); -lean_dec(x_59); -x_26 = x_60; -goto block_47; +x_22 = x_2; +goto block_38; +} } else { -lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; +x_41 = lean_ctor_get(x_2, 0); +lean_inc(x_41); +x_42 = lean_ctor_get(x_2, 1); +lean_inc(x_42); +x_43 = lean_ctor_get(x_2, 2); +lean_inc(x_43); +x_44 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_41, x_20); +if (x_44 == 0) +{ +uint8_t x_45; +x_45 = !lean_is_exclusive(x_2); +if (x_45 == 0) +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_46 = lean_ctor_get(x_2, 2); +lean_dec(x_46); +x_47 = lean_ctor_get(x_2, 1); +lean_dec(x_47); +x_48 = lean_ctor_get(x_2, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_inc(x_20); +x_50 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_41, x_20, x_49); +lean_ctor_set(x_2, 0, x_50); +x_51 = l_Lean_CollectLevelParams_collect___main(x_20, x_2); +if (x_40 == 0) +{ +lean_dec(x_21); +return x_51; +} +else +{ +x_22 = x_51; +goto block_38; +} +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_dec(x_2); -x_61 = lean_box(0); -lean_inc(x_24); -x_62 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_49, x_24, x_61); -x_63 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_63, 0, x_62); -lean_ctor_set(x_63, 1, x_50); -lean_ctor_set(x_63, 2, x_51); -x_64 = l_Lean_CollectLevelParams_collect___main(x_24, x_63); -x_65 = lean_ctor_get(x_64, 1); -lean_inc(x_65); -lean_dec(x_64); -x_26 = x_65; -goto block_47; +x_52 = lean_box(0); +lean_inc(x_20); +x_53 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_41, x_20, x_52); +x_54 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_42); +lean_ctor_set(x_54, 2, x_43); +x_55 = l_Lean_CollectLevelParams_collect___main(x_20, x_54); +if (x_40 == 0) +{ +lean_dec(x_21); +return x_55; +} +else +{ +x_22 = x_55; +goto block_38; +} } } else { -lean_dec(x_51); -lean_dec(x_50); -lean_dec(x_49); -lean_dec(x_24); -x_26 = x_2; -goto block_47; +lean_dec(x_43); +lean_dec(x_42); +lean_dec(x_41); +lean_dec(x_20); +if (x_40 == 0) +{ +lean_dec(x_21); +return x_2; +} +else +{ +x_22 = x_2; +goto block_38; } } -block_47: +} +block_38: +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +x_25 = lean_ctor_get(x_22, 2); +lean_inc(x_25); +x_26 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_23, x_21); +if (x_26 == 0) { uint8_t x_27; -x_27 = l_Lean_Level_hasParam(x_25); +x_27 = !lean_is_exclusive(x_22); if (x_27 == 0) { -lean_object* x_28; lean_object* x_29; -lean_dec(x_25); -x_28 = lean_box(0); -x_29 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_29, 0, x_28); -lean_ctor_set(x_29, 1, x_26); -return x_29; -} -else -{ -lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; -x_30 = lean_ctor_get(x_26, 0); -lean_inc(x_30); -x_31 = lean_ctor_get(x_26, 1); -lean_inc(x_31); -x_32 = lean_ctor_get(x_26, 2); -lean_inc(x_32); -x_33 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_30, x_25); -if (x_33 == 0) -{ -uint8_t x_34; -x_34 = !lean_is_exclusive(x_26); -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_35 = lean_ctor_get(x_26, 2); -lean_dec(x_35); -x_36 = lean_ctor_get(x_26, 1); -lean_dec(x_36); -x_37 = lean_ctor_get(x_26, 0); -lean_dec(x_37); -x_38 = lean_box(0); -lean_inc(x_25); -x_39 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_30, x_25, x_38); -lean_ctor_set(x_26, 0, x_39); -x_1 = x_25; -x_2 = x_26; -goto _start; -} -else -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; -lean_dec(x_26); -x_41 = lean_box(0); -lean_inc(x_25); -x_42 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_30, x_25, x_41); -x_43 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_43, 0, x_42); -lean_ctor_set(x_43, 1, x_31); -lean_ctor_set(x_43, 2, x_32); -x_1 = x_25; -x_2 = x_43; -goto _start; -} -} -else -{ -lean_object* x_45; lean_object* x_46; -lean_dec(x_32); -lean_dec(x_31); +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_28 = lean_ctor_get(x_22, 2); +lean_dec(x_28); +x_29 = lean_ctor_get(x_22, 1); +lean_dec(x_29); +x_30 = lean_ctor_get(x_22, 0); lean_dec(x_30); -lean_dec(x_25); -x_45 = lean_box(0); -x_46 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_46, 0, x_45); -lean_ctor_set(x_46, 1, x_26); -return x_46; +x_31 = lean_box(0); +lean_inc(x_21); +x_32 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_23, x_21, x_31); +lean_ctor_set(x_22, 0, x_32); +x_1 = x_21; +x_2 = x_22; +goto _start; } +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_dec(x_22); +x_34 = lean_box(0); +lean_inc(x_21); +x_35 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_23, x_21, x_34); +x_36 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_24); +lean_ctor_set(x_36, 2, x_25); +x_1 = x_21; +x_2 = x_36; +goto _start; +} +} +else +{ +lean_dec(x_25); +lean_dec(x_24); +lean_dec(x_23); +lean_dec(x_21); +return x_22; } } } case 3: { -lean_object* x_66; lean_object* x_67; lean_object* x_68; uint8_t x_90; -x_66 = lean_ctor_get(x_1, 0); -lean_inc(x_66); -x_67 = lean_ctor_get(x_1, 1); -lean_inc(x_67); +lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_75; uint8_t x_76; +x_56 = lean_ctor_get(x_1, 0); +lean_inc(x_56); +x_57 = lean_ctor_get(x_1, 1); +lean_inc(x_57); lean_dec(x_1); -x_90 = l_Lean_Level_hasParam(x_66); -if (x_90 == 0) -{ -lean_dec(x_66); -x_68 = x_2; -goto block_89; -} -else -{ -lean_object* x_91; lean_object* x_92; lean_object* x_93; uint8_t x_94; -x_91 = lean_ctor_get(x_2, 0); -lean_inc(x_91); -x_92 = lean_ctor_get(x_2, 1); -lean_inc(x_92); -x_93 = lean_ctor_get(x_2, 2); -lean_inc(x_93); -x_94 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_91, x_66); -if (x_94 == 0) -{ -uint8_t x_95; -x_95 = !lean_is_exclusive(x_2); -if (x_95 == 0) -{ -lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; -x_96 = lean_ctor_get(x_2, 2); -lean_dec(x_96); -x_97 = lean_ctor_get(x_2, 1); -lean_dec(x_97); -x_98 = lean_ctor_get(x_2, 0); -lean_dec(x_98); -x_99 = lean_box(0); -lean_inc(x_66); -x_100 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_91, x_66, x_99); -lean_ctor_set(x_2, 0, x_100); -x_101 = l_Lean_CollectLevelParams_collect___main(x_66, x_2); -x_102 = lean_ctor_get(x_101, 1); -lean_inc(x_102); -lean_dec(x_101); -x_68 = x_102; -goto block_89; -} -else -{ -lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; -lean_dec(x_2); -x_103 = lean_box(0); -lean_inc(x_66); -x_104 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_91, x_66, x_103); -x_105 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_105, 0, x_104); -lean_ctor_set(x_105, 1, x_92); -lean_ctor_set(x_105, 2, x_93); -x_106 = l_Lean_CollectLevelParams_collect___main(x_66, x_105); -x_107 = lean_ctor_get(x_106, 1); -lean_inc(x_107); -lean_dec(x_106); -x_68 = x_107; -goto block_89; -} -} -else -{ -lean_dec(x_93); -lean_dec(x_92); -lean_dec(x_91); -lean_dec(x_66); -x_68 = x_2; -goto block_89; -} -} -block_89: -{ -uint8_t x_69; -x_69 = l_Lean_Level_hasParam(x_67); -if (x_69 == 0) -{ -lean_object* x_70; lean_object* x_71; -lean_dec(x_67); -x_70 = lean_box(0); -x_71 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_71, 0, x_70); -lean_ctor_set(x_71, 1, x_68); -return x_71; -} -else -{ -lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; -x_72 = lean_ctor_get(x_68, 0); -lean_inc(x_72); -x_73 = lean_ctor_get(x_68, 1); -lean_inc(x_73); -x_74 = lean_ctor_get(x_68, 2); -lean_inc(x_74); -x_75 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_72, x_67); +x_75 = l_Lean_Level_hasParam(x_56); +x_76 = l_Lean_Level_hasParam(x_57); if (x_75 == 0) { -uint8_t x_76; -x_76 = !lean_is_exclusive(x_68); +lean_dec(x_56); if (x_76 == 0) { -lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_77 = lean_ctor_get(x_68, 2); -lean_dec(x_77); -x_78 = lean_ctor_get(x_68, 1); -lean_dec(x_78); -x_79 = lean_ctor_get(x_68, 0); +lean_dec(x_57); +return x_2; +} +else +{ +x_58 = x_2; +goto block_74; +} +} +else +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_80; +x_77 = lean_ctor_get(x_2, 0); +lean_inc(x_77); +x_78 = lean_ctor_get(x_2, 1); +lean_inc(x_78); +x_79 = lean_ctor_get(x_2, 2); +lean_inc(x_79); +x_80 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_77, x_56); +if (x_80 == 0) +{ +uint8_t x_81; +x_81 = !lean_is_exclusive(x_2); +if (x_81 == 0) +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_82 = lean_ctor_get(x_2, 2); +lean_dec(x_82); +x_83 = lean_ctor_get(x_2, 1); +lean_dec(x_83); +x_84 = lean_ctor_get(x_2, 0); +lean_dec(x_84); +x_85 = lean_box(0); +lean_inc(x_56); +x_86 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_77, x_56, x_85); +lean_ctor_set(x_2, 0, x_86); +x_87 = l_Lean_CollectLevelParams_collect___main(x_56, x_2); +if (x_76 == 0) +{ +lean_dec(x_57); +return x_87; +} +else +{ +x_58 = x_87; +goto block_74; +} +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +lean_dec(x_2); +x_88 = lean_box(0); +lean_inc(x_56); +x_89 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_77, x_56, x_88); +x_90 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_78); +lean_ctor_set(x_90, 2, x_79); +x_91 = l_Lean_CollectLevelParams_collect___main(x_56, x_90); +if (x_76 == 0) +{ +lean_dec(x_57); +return x_91; +} +else +{ +x_58 = x_91; +goto block_74; +} +} +} +else +{ lean_dec(x_79); -x_80 = lean_box(0); -lean_inc(x_67); -x_81 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_72, x_67, x_80); -lean_ctor_set(x_68, 0, x_81); -x_1 = x_67; -x_2 = x_68; +lean_dec(x_78); +lean_dec(x_77); +lean_dec(x_56); +if (x_76 == 0) +{ +lean_dec(x_57); +return x_2; +} +else +{ +x_58 = x_2; +goto block_74; +} +} +} +block_74: +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; +x_59 = lean_ctor_get(x_58, 0); +lean_inc(x_59); +x_60 = lean_ctor_get(x_58, 1); +lean_inc(x_60); +x_61 = lean_ctor_get(x_58, 2); +lean_inc(x_61); +x_62 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_59, x_57); +if (x_62 == 0) +{ +uint8_t x_63; +x_63 = !lean_is_exclusive(x_58); +if (x_63 == 0) +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_64 = lean_ctor_get(x_58, 2); +lean_dec(x_64); +x_65 = lean_ctor_get(x_58, 1); +lean_dec(x_65); +x_66 = lean_ctor_get(x_58, 0); +lean_dec(x_66); +x_67 = lean_box(0); +lean_inc(x_57); +x_68 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_59, x_57, x_67); +lean_ctor_set(x_58, 0, x_68); +x_1 = x_57; +x_2 = x_58; goto _start; } else { -lean_object* x_83; lean_object* x_84; lean_object* x_85; -lean_dec(x_68); -x_83 = lean_box(0); -lean_inc(x_67); -x_84 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_72, x_67, x_83); -x_85 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_85, 0, x_84); -lean_ctor_set(x_85, 1, x_73); -lean_ctor_set(x_85, 2, x_74); -x_1 = x_67; -x_2 = x_85; +lean_object* x_70; lean_object* x_71; lean_object* x_72; +lean_dec(x_58); +x_70 = lean_box(0); +lean_inc(x_57); +x_71 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_59, x_57, x_70); +x_72 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_60); +lean_ctor_set(x_72, 2, x_61); +x_1 = x_57; +x_2 = x_72; goto _start; } } else { -lean_object* x_87; lean_object* x_88; -lean_dec(x_74); -lean_dec(x_73); -lean_dec(x_72); -lean_dec(x_67); -x_87 = lean_box(0); -x_88 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_88, 0, x_87); -lean_ctor_set(x_88, 1, x_68); -return x_88; -} +lean_dec(x_61); +lean_dec(x_60); +lean_dec(x_59); +lean_dec(x_57); +return x_58; } } } case 4: { -lean_object* x_108; uint8_t x_109; -x_108 = lean_ctor_get(x_1, 0); -lean_inc(x_108); +lean_object* x_92; uint8_t x_93; +x_92 = lean_ctor_get(x_1, 0); +lean_inc(x_92); lean_dec(x_1); -x_109 = !lean_is_exclusive(x_2); -if (x_109 == 0) +x_93 = !lean_is_exclusive(x_2); +if (x_93 == 0) { -lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; -x_110 = lean_ctor_get(x_2, 2); -x_111 = lean_array_push(x_110, x_108); -lean_ctor_set(x_2, 2, x_111); -x_112 = lean_box(0); -x_113 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_113, 0, x_112); -lean_ctor_set(x_113, 1, x_2); -return x_113; +lean_object* x_94; lean_object* x_95; +x_94 = lean_ctor_get(x_2, 2); +x_95 = lean_array_push(x_94, x_92); +lean_ctor_set(x_2, 2, x_95); +return x_2; } else { -lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; -x_114 = lean_ctor_get(x_2, 0); -x_115 = lean_ctor_get(x_2, 1); -x_116 = lean_ctor_get(x_2, 2); -lean_inc(x_116); -lean_inc(x_115); -lean_inc(x_114); +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_96 = lean_ctor_get(x_2, 0); +x_97 = lean_ctor_get(x_2, 1); +x_98 = lean_ctor_get(x_2, 2); +lean_inc(x_98); +lean_inc(x_97); +lean_inc(x_96); lean_dec(x_2); -x_117 = lean_array_push(x_116, x_108); -x_118 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_118, 0, x_114); -lean_ctor_set(x_118, 1, x_115); -lean_ctor_set(x_118, 2, x_117); -x_119 = lean_box(0); -x_120 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_120, 0, x_119); -lean_ctor_set(x_120, 1, x_118); -return x_120; +x_99 = lean_array_push(x_98, x_92); +x_100 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_100, 0, x_96); +lean_ctor_set(x_100, 1, x_97); +lean_ctor_set(x_100, 2, x_99); +return x_100; } } default: { -lean_object* x_121; lean_object* x_122; lean_dec(x_1); -x_121 = lean_box(0); -x_122 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_122, 0, x_121); -lean_ctor_set(x_122, 1, x_2); -return x_122; +return x_2; } } } @@ -1277,73 +1331,63 @@ uint8_t x_4; x_4 = l_Lean_Expr_hasLevelParam(x_2); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_dec(x_2); lean_dec(x_1); -x_5 = lean_box(0); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_5); -lean_ctor_set(x_6, 1, x_3); -return x_6; +return x_3; } else { -lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_7 = lean_ctor_get(x_3, 0); +lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +x_7 = lean_ctor_get(x_3, 2); lean_inc(x_7); -x_8 = lean_ctor_get(x_3, 1); -lean_inc(x_8); -x_9 = lean_ctor_get(x_3, 2); -lean_inc(x_9); -x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_8, x_2); -if (x_10 == 0) +x_8 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_6, x_2); +if (x_8 == 0) { -uint8_t x_11; -x_11 = !lean_is_exclusive(x_3); -if (x_11 == 0) +uint8_t x_9; +x_9 = !lean_is_exclusive(x_3); +if (x_9 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_12 = lean_ctor_get(x_3, 2); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_10 = lean_ctor_get(x_3, 2); +lean_dec(x_10); +x_11 = lean_ctor_get(x_3, 1); +lean_dec(x_11); +x_12 = lean_ctor_get(x_3, 0); lean_dec(x_12); -x_13 = lean_ctor_get(x_3, 1); -lean_dec(x_13); -x_14 = lean_ctor_get(x_3, 0); -lean_dec(x_14); -x_15 = lean_box(0); +x_13 = lean_box(0); lean_inc(x_2); -x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_8, x_2, x_15); -lean_ctor_set(x_3, 1, x_16); -x_17 = lean_apply_2(x_1, x_2, x_3); -return x_17; +x_14 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_6, x_2, x_13); +lean_ctor_set(x_3, 1, x_14); +x_15 = lean_apply_2(x_1, x_2, x_3); +return x_15; } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_dec(x_3); -x_18 = lean_box(0); +x_16 = lean_box(0); lean_inc(x_2); -x_19 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_8, x_2, x_18); -x_20 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_20, 0, x_7); -lean_ctor_set(x_20, 1, x_19); -lean_ctor_set(x_20, 2, x_9); -x_21 = lean_apply_2(x_1, x_2, x_20); -return x_21; +x_17 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_6, x_2, x_16); +x_18 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_18, 0, x_5); +lean_ctor_set(x_18, 1, x_17); +lean_ctor_set(x_18, 2, x_7); +x_19 = lean_apply_2(x_1, x_2, x_18); +return x_19; } } else { -lean_object* x_22; lean_object* x_23; -lean_dec(x_9); -lean_dec(x_8); lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_2); lean_dec(x_1); -x_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_3); -return x_23; +return x_3; } } } @@ -1370,95 +1414,84 @@ x_4 = lean_box(x_3); return x_4; } } -lean_object* l_List_forM___main___at_Lean_CollectLevelParams_main___main___spec__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_foldl___main___at_Lean_CollectLevelParams_main___main___spec__1(lean_object* x_1, lean_object* x_2) { _start: { -if (lean_obj_tag(x_1) == 0) +if (lean_obj_tag(x_2) == 0) { -lean_object* x_3; lean_object* x_4; -x_3 = lean_box(0); -x_4 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_4, 0, x_3); -lean_ctor_set(x_4, 1, x_2); -return x_4; +return x_1; } else { -lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_5 = lean_ctor_get(x_1, 0); -lean_inc(x_5); -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -lean_dec(x_1); -x_7 = l_Lean_Level_hasParam(x_5); -if (x_7 == 0) -{ -lean_dec(x_5); -x_1 = x_6; -goto _start; -} -else -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_9 = lean_ctor_get(x_2, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_2, 1); -lean_inc(x_10); -x_11 = lean_ctor_get(x_2, 2); -lean_inc(x_11); -x_12 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_9, x_5); -if (x_12 == 0) -{ -uint8_t x_13; -x_13 = !lean_is_exclusive(x_2); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_14 = lean_ctor_get(x_2, 2); -lean_dec(x_14); -x_15 = lean_ctor_get(x_2, 1); -lean_dec(x_15); -x_16 = lean_ctor_get(x_2, 0); -lean_dec(x_16); -x_17 = lean_box(0); -lean_inc(x_5); -x_18 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_9, x_5, x_17); -lean_ctor_set(x_2, 0, x_18); -x_19 = l_Lean_CollectLevelParams_collect___main(x_5, x_2); -x_20 = lean_ctor_get(x_19, 1); -lean_inc(x_20); -lean_dec(x_19); -x_1 = x_6; -x_2 = x_20; -goto _start; -} -else -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_3 = lean_ctor_get(x_2, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_2, 1); +lean_inc(x_4); lean_dec(x_2); -x_22 = lean_box(0); -lean_inc(x_5); -x_23 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_9, x_5, x_22); -x_24 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_24, 0, x_23); -lean_ctor_set(x_24, 1, x_10); -lean_ctor_set(x_24, 2, x_11); -x_25 = l_Lean_CollectLevelParams_collect___main(x_5, x_24); -x_26 = lean_ctor_get(x_25, 1); -lean_inc(x_26); -lean_dec(x_25); -x_1 = x_6; -x_2 = x_26; +x_5 = l_Lean_Level_hasParam(x_3); +if (x_5 == 0) +{ +lean_dec(x_3); +x_2 = x_4; +goto _start; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_7 = lean_ctor_get(x_1, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_8); +x_9 = lean_ctor_get(x_1, 2); +lean_inc(x_9); +x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_7, x_3); +if (x_10 == 0) +{ +uint8_t x_11; +x_11 = !lean_is_exclusive(x_1); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_12 = lean_ctor_get(x_1, 2); +lean_dec(x_12); +x_13 = lean_ctor_get(x_1, 1); +lean_dec(x_13); +x_14 = lean_ctor_get(x_1, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_inc(x_3); +x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_15); +lean_ctor_set(x_1, 0, x_16); +x_17 = l_Lean_CollectLevelParams_collect___main(x_3, x_1); +x_1 = x_17; +x_2 = x_4; +goto _start; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_dec(x_1); +x_19 = lean_box(0); +lean_inc(x_3); +x_20 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_19); +x_21 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_8); +lean_ctor_set(x_21, 2, x_9); +x_22 = l_Lean_CollectLevelParams_collect___main(x_3, x_21); +x_1 = x_22; +x_2 = x_4; goto _start; } } else { -lean_dec(x_11); -lean_dec(x_10); lean_dec(x_9); -lean_dec(x_5); -x_1 = x_6; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_3); +x_2 = x_4; goto _start; } } @@ -1478,944 +1511,981 @@ lean_dec(x_1); x_4 = l_Lean_Level_hasParam(x_3); if (x_4 == 0) { -lean_object* x_5; lean_object* x_6; lean_dec(x_3); -x_5 = lean_box(0); -x_6 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_6, 0, x_5); -lean_ctor_set(x_6, 1, x_2); -return x_6; +return x_2; } else { -lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_7 = lean_ctor_get(x_2, 0); +lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_5 = lean_ctor_get(x_2, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_6); +x_7 = lean_ctor_get(x_2, 2); lean_inc(x_7); -x_8 = lean_ctor_get(x_2, 1); -lean_inc(x_8); -x_9 = lean_ctor_get(x_2, 2); -lean_inc(x_9); -x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_7, x_3); -if (x_10 == 0) +x_8 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_5, x_3); +if (x_8 == 0) { -uint8_t x_11; -x_11 = !lean_is_exclusive(x_2); -if (x_11 == 0) +uint8_t x_9; +x_9 = !lean_is_exclusive(x_2); +if (x_9 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_12 = lean_ctor_get(x_2, 2); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_10 = lean_ctor_get(x_2, 2); +lean_dec(x_10); +x_11 = lean_ctor_get(x_2, 1); +lean_dec(x_11); +x_12 = lean_ctor_get(x_2, 0); lean_dec(x_12); -x_13 = lean_ctor_get(x_2, 1); -lean_dec(x_13); -x_14 = lean_ctor_get(x_2, 0); -lean_dec(x_14); -x_15 = lean_box(0); +x_13 = lean_box(0); lean_inc(x_3); -x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_15); -lean_ctor_set(x_2, 0, x_16); -x_17 = l_Lean_CollectLevelParams_collect___main(x_3, x_2); -return x_17; +x_14 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3, x_13); +lean_ctor_set(x_2, 0, x_14); +x_15 = l_Lean_CollectLevelParams_collect___main(x_3, x_2); +return x_15; } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_dec(x_2); -x_18 = lean_box(0); +x_16 = lean_box(0); lean_inc(x_3); -x_19 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_18); -x_20 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_20, 0, x_19); -lean_ctor_set(x_20, 1, x_8); -lean_ctor_set(x_20, 2, x_9); -x_21 = l_Lean_CollectLevelParams_collect___main(x_3, x_20); -return x_21; +x_17 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_5, x_3, x_16); +x_18 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_6); +lean_ctor_set(x_18, 2, x_7); +x_19 = l_Lean_CollectLevelParams_collect___main(x_3, x_18); +return x_19; } } else { -lean_object* x_22; lean_object* x_23; -lean_dec(x_9); -lean_dec(x_8); lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); 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_2); -return x_23; +return x_2; } } } case 4: { -lean_object* x_24; lean_object* x_25; -x_24 = lean_ctor_get(x_1, 1); -lean_inc(x_24); +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_1, 1); +lean_inc(x_20); lean_dec(x_1); -x_25 = l_List_forM___main___at_Lean_CollectLevelParams_main___main___spec__1(x_24, x_2); -return x_25; +x_21 = l_List_foldl___main___at_Lean_CollectLevelParams_main___main___spec__1(x_2, x_20); +return x_21; } case 5: { -lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_50; -x_26 = lean_ctor_get(x_1, 0); -lean_inc(x_26); -x_27 = lean_ctor_get(x_1, 1); -lean_inc(x_27); +lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_41; uint8_t x_42; +x_22 = lean_ctor_get(x_1, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_1, 1); +lean_inc(x_23); lean_dec(x_1); -x_50 = l_Lean_Expr_hasLevelParam(x_26); -if (x_50 == 0) +x_41 = l_Lean_Expr_hasLevelParam(x_22); +x_42 = l_Lean_Expr_hasLevelParam(x_23); +if (x_41 == 0) { -lean_dec(x_26); -x_28 = x_2; -goto block_49; +lean_dec(x_22); +if (x_42 == 0) +{ +lean_dec(x_23); +return x_2; } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54; -x_51 = lean_ctor_get(x_2, 0); -lean_inc(x_51); -x_52 = lean_ctor_get(x_2, 1); -lean_inc(x_52); -x_53 = lean_ctor_get(x_2, 2); -lean_inc(x_53); -x_54 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_52, x_26); -if (x_54 == 0) -{ -uint8_t x_55; -x_55 = !lean_is_exclusive(x_2); -if (x_55 == 0) -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_56 = lean_ctor_get(x_2, 2); -lean_dec(x_56); -x_57 = lean_ctor_get(x_2, 1); -lean_dec(x_57); -x_58 = lean_ctor_get(x_2, 0); -lean_dec(x_58); -x_59 = lean_box(0); -lean_inc(x_26); -x_60 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_52, x_26, x_59); -lean_ctor_set(x_2, 1, x_60); -x_61 = l_Lean_CollectLevelParams_main___main(x_26, x_2); -x_62 = lean_ctor_get(x_61, 1); -lean_inc(x_62); -lean_dec(x_61); -x_28 = x_62; -goto block_49; +x_24 = x_2; +goto block_40; +} } else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; +x_43 = lean_ctor_get(x_2, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_2, 1); +lean_inc(x_44); +x_45 = lean_ctor_get(x_2, 2); +lean_inc(x_45); +x_46 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_44, x_22); +if (x_46 == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_2); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_48 = lean_ctor_get(x_2, 2); +lean_dec(x_48); +x_49 = lean_ctor_get(x_2, 1); +lean_dec(x_49); +x_50 = lean_ctor_get(x_2, 0); +lean_dec(x_50); +x_51 = lean_box(0); +lean_inc(x_22); +x_52 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_44, x_22, x_51); +lean_ctor_set(x_2, 1, x_52); +x_53 = l_Lean_CollectLevelParams_main___main(x_22, x_2); +if (x_42 == 0) +{ +lean_dec(x_23); +return x_53; +} +else +{ +x_24 = x_53; +goto block_40; +} +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_dec(x_2); -x_63 = lean_box(0); -lean_inc(x_26); -x_64 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_52, x_26, x_63); -x_65 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_65, 0, x_51); -lean_ctor_set(x_65, 1, x_64); -lean_ctor_set(x_65, 2, x_53); -x_66 = l_Lean_CollectLevelParams_main___main(x_26, x_65); -x_67 = lean_ctor_get(x_66, 1); -lean_inc(x_67); -lean_dec(x_66); -x_28 = x_67; -goto block_49; +x_54 = lean_box(0); +lean_inc(x_22); +x_55 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_44, x_22, x_54); +x_56 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_56, 0, x_43); +lean_ctor_set(x_56, 1, x_55); +lean_ctor_set(x_56, 2, x_45); +x_57 = l_Lean_CollectLevelParams_main___main(x_22, x_56); +if (x_42 == 0) +{ +lean_dec(x_23); +return x_57; +} +else +{ +x_24 = x_57; +goto block_40; +} } } else { -lean_dec(x_53); -lean_dec(x_52); -lean_dec(x_51); -lean_dec(x_26); -x_28 = x_2; -goto block_49; +lean_dec(x_45); +lean_dec(x_44); +lean_dec(x_43); +lean_dec(x_22); +if (x_42 == 0) +{ +lean_dec(x_23); +return x_2; +} +else +{ +x_24 = x_2; +goto block_40; } } -block_49: +} +block_40: +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +x_27 = lean_ctor_get(x_24, 2); +lean_inc(x_27); +x_28 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_26, x_23); +if (x_28 == 0) { uint8_t x_29; -x_29 = l_Lean_Expr_hasLevelParam(x_27); +x_29 = !lean_is_exclusive(x_24); if (x_29 == 0) { -lean_object* x_30; lean_object* x_31; -lean_dec(x_27); -x_30 = lean_box(0); -x_31 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_31, 0, x_30); -lean_ctor_set(x_31, 1, x_28); -return x_31; -} -else -{ -lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; -x_32 = lean_ctor_get(x_28, 0); -lean_inc(x_32); -x_33 = lean_ctor_get(x_28, 1); -lean_inc(x_33); -x_34 = lean_ctor_get(x_28, 2); -lean_inc(x_34); -x_35 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_33, x_27); -if (x_35 == 0) -{ -uint8_t x_36; -x_36 = !lean_is_exclusive(x_28); -if (x_36 == 0) -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_37 = lean_ctor_get(x_28, 2); -lean_dec(x_37); -x_38 = lean_ctor_get(x_28, 1); -lean_dec(x_38); -x_39 = lean_ctor_get(x_28, 0); -lean_dec(x_39); -x_40 = lean_box(0); -lean_inc(x_27); -x_41 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_33, x_27, x_40); -lean_ctor_set(x_28, 1, x_41); -x_1 = x_27; -x_2 = x_28; -goto _start; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -lean_dec(x_28); -x_43 = lean_box(0); -lean_inc(x_27); -x_44 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_33, x_27, x_43); -x_45 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_45, 0, x_32); -lean_ctor_set(x_45, 1, x_44); -lean_ctor_set(x_45, 2, x_34); -x_1 = x_27; -x_2 = x_45; -goto _start; -} -} -else -{ -lean_object* x_47; lean_object* x_48; -lean_dec(x_34); -lean_dec(x_33); +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_30 = lean_ctor_get(x_24, 2); +lean_dec(x_30); +x_31 = lean_ctor_get(x_24, 1); +lean_dec(x_31); +x_32 = lean_ctor_get(x_24, 0); lean_dec(x_32); -lean_dec(x_27); -x_47 = lean_box(0); -x_48 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_48, 0, x_47); -lean_ctor_set(x_48, 1, x_28); -return x_48; +x_33 = lean_box(0); +lean_inc(x_23); +x_34 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_26, x_23, x_33); +lean_ctor_set(x_24, 1, x_34); +x_1 = x_23; +x_2 = x_24; +goto _start; } +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; +lean_dec(x_24); +x_36 = lean_box(0); +lean_inc(x_23); +x_37 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_26, x_23, x_36); +x_38 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_38, 0, x_25); +lean_ctor_set(x_38, 1, x_37); +lean_ctor_set(x_38, 2, x_27); +x_1 = x_23; +x_2 = x_38; +goto _start; +} +} +else +{ +lean_dec(x_27); +lean_dec(x_26); +lean_dec(x_25); +lean_dec(x_23); +return x_24; } } } case 6: { -lean_object* x_68; lean_object* x_69; lean_object* x_70; uint8_t x_92; -x_68 = lean_ctor_get(x_1, 1); -lean_inc(x_68); -x_69 = lean_ctor_get(x_1, 2); -lean_inc(x_69); +lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_77; uint8_t x_78; +x_58 = lean_ctor_get(x_1, 1); +lean_inc(x_58); +x_59 = lean_ctor_get(x_1, 2); +lean_inc(x_59); lean_dec(x_1); -x_92 = l_Lean_Expr_hasLevelParam(x_68); -if (x_92 == 0) -{ -lean_dec(x_68); -x_70 = x_2; -goto block_91; -} -else -{ -lean_object* x_93; lean_object* x_94; lean_object* x_95; uint8_t x_96; -x_93 = lean_ctor_get(x_2, 0); -lean_inc(x_93); -x_94 = lean_ctor_get(x_2, 1); -lean_inc(x_94); -x_95 = lean_ctor_get(x_2, 2); -lean_inc(x_95); -x_96 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_94, x_68); -if (x_96 == 0) -{ -uint8_t x_97; -x_97 = !lean_is_exclusive(x_2); -if (x_97 == 0) -{ -lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; -x_98 = lean_ctor_get(x_2, 2); -lean_dec(x_98); -x_99 = lean_ctor_get(x_2, 1); -lean_dec(x_99); -x_100 = lean_ctor_get(x_2, 0); -lean_dec(x_100); -x_101 = lean_box(0); -lean_inc(x_68); -x_102 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_94, x_68, x_101); -lean_ctor_set(x_2, 1, x_102); -x_103 = l_Lean_CollectLevelParams_main___main(x_68, x_2); -x_104 = lean_ctor_get(x_103, 1); -lean_inc(x_104); -lean_dec(x_103); -x_70 = x_104; -goto block_91; -} -else -{ -lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; -lean_dec(x_2); -x_105 = lean_box(0); -lean_inc(x_68); -x_106 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_94, x_68, x_105); -x_107 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_107, 0, x_93); -lean_ctor_set(x_107, 1, x_106); -lean_ctor_set(x_107, 2, x_95); -x_108 = l_Lean_CollectLevelParams_main___main(x_68, x_107); -x_109 = lean_ctor_get(x_108, 1); -lean_inc(x_109); -lean_dec(x_108); -x_70 = x_109; -goto block_91; -} -} -else -{ -lean_dec(x_95); -lean_dec(x_94); -lean_dec(x_93); -lean_dec(x_68); -x_70 = x_2; -goto block_91; -} -} -block_91: -{ -uint8_t x_71; -x_71 = l_Lean_Expr_hasLevelParam(x_69); -if (x_71 == 0) -{ -lean_object* x_72; lean_object* x_73; -lean_dec(x_69); -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_70); -return x_73; -} -else -{ -lean_object* x_74; lean_object* x_75; lean_object* x_76; uint8_t x_77; -x_74 = lean_ctor_get(x_70, 0); -lean_inc(x_74); -x_75 = lean_ctor_get(x_70, 1); -lean_inc(x_75); -x_76 = lean_ctor_get(x_70, 2); -lean_inc(x_76); -x_77 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_75, x_69); +x_77 = l_Lean_Expr_hasLevelParam(x_58); +x_78 = l_Lean_Expr_hasLevelParam(x_59); if (x_77 == 0) { -uint8_t x_78; -x_78 = !lean_is_exclusive(x_70); +lean_dec(x_58); if (x_78 == 0) { -lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_79 = lean_ctor_get(x_70, 2); -lean_dec(x_79); -x_80 = lean_ctor_get(x_70, 1); -lean_dec(x_80); -x_81 = lean_ctor_get(x_70, 0); +lean_dec(x_59); +return x_2; +} +else +{ +x_60 = x_2; +goto block_76; +} +} +else +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; +x_79 = lean_ctor_get(x_2, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_2, 1); +lean_inc(x_80); +x_81 = lean_ctor_get(x_2, 2); +lean_inc(x_81); +x_82 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_80, x_58); +if (x_82 == 0) +{ +uint8_t x_83; +x_83 = !lean_is_exclusive(x_2); +if (x_83 == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_84 = lean_ctor_get(x_2, 2); +lean_dec(x_84); +x_85 = lean_ctor_get(x_2, 1); +lean_dec(x_85); +x_86 = lean_ctor_get(x_2, 0); +lean_dec(x_86); +x_87 = lean_box(0); +lean_inc(x_58); +x_88 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_80, x_58, x_87); +lean_ctor_set(x_2, 1, x_88); +x_89 = l_Lean_CollectLevelParams_main___main(x_58, x_2); +if (x_78 == 0) +{ +lean_dec(x_59); +return x_89; +} +else +{ +x_60 = x_89; +goto block_76; +} +} +else +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +lean_dec(x_2); +x_90 = lean_box(0); +lean_inc(x_58); +x_91 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_80, x_58, x_90); +x_92 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_92, 0, x_79); +lean_ctor_set(x_92, 1, x_91); +lean_ctor_set(x_92, 2, x_81); +x_93 = l_Lean_CollectLevelParams_main___main(x_58, x_92); +if (x_78 == 0) +{ +lean_dec(x_59); +return x_93; +} +else +{ +x_60 = x_93; +goto block_76; +} +} +} +else +{ lean_dec(x_81); -x_82 = lean_box(0); -lean_inc(x_69); -x_83 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_75, x_69, x_82); -lean_ctor_set(x_70, 1, x_83); -x_1 = x_69; -x_2 = x_70; +lean_dec(x_80); +lean_dec(x_79); +lean_dec(x_58); +if (x_78 == 0) +{ +lean_dec(x_59); +return x_2; +} +else +{ +x_60 = x_2; +goto block_76; +} +} +} +block_76: +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; +x_61 = lean_ctor_get(x_60, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_60, 1); +lean_inc(x_62); +x_63 = lean_ctor_get(x_60, 2); +lean_inc(x_63); +x_64 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_62, x_59); +if (x_64 == 0) +{ +uint8_t x_65; +x_65 = !lean_is_exclusive(x_60); +if (x_65 == 0) +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_66 = lean_ctor_get(x_60, 2); +lean_dec(x_66); +x_67 = lean_ctor_get(x_60, 1); +lean_dec(x_67); +x_68 = lean_ctor_get(x_60, 0); +lean_dec(x_68); +x_69 = lean_box(0); +lean_inc(x_59); +x_70 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_62, x_59, x_69); +lean_ctor_set(x_60, 1, x_70); +x_1 = x_59; +x_2 = x_60; goto _start; } else { -lean_object* x_85; lean_object* x_86; lean_object* x_87; -lean_dec(x_70); -x_85 = lean_box(0); -lean_inc(x_69); -x_86 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_75, x_69, x_85); -x_87 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_87, 0, x_74); -lean_ctor_set(x_87, 1, x_86); -lean_ctor_set(x_87, 2, x_76); -x_1 = x_69; -x_2 = x_87; +lean_object* x_72; lean_object* x_73; lean_object* x_74; +lean_dec(x_60); +x_72 = lean_box(0); +lean_inc(x_59); +x_73 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_62, x_59, x_72); +x_74 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_74, 0, x_61); +lean_ctor_set(x_74, 1, x_73); +lean_ctor_set(x_74, 2, x_63); +x_1 = x_59; +x_2 = x_74; goto _start; } } else { -lean_object* x_89; lean_object* x_90; -lean_dec(x_76); -lean_dec(x_75); -lean_dec(x_74); -lean_dec(x_69); -x_89 = lean_box(0); -x_90 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_90, 0, x_89); -lean_ctor_set(x_90, 1, x_70); -return x_90; -} +lean_dec(x_63); +lean_dec(x_62); +lean_dec(x_61); +lean_dec(x_59); +return x_60; } } } case 7: { -lean_object* x_110; lean_object* x_111; lean_object* x_112; uint8_t x_134; -x_110 = lean_ctor_get(x_1, 1); -lean_inc(x_110); -x_111 = lean_ctor_get(x_1, 2); -lean_inc(x_111); +lean_object* x_94; lean_object* x_95; lean_object* x_96; uint8_t x_113; uint8_t x_114; +x_94 = lean_ctor_get(x_1, 1); +lean_inc(x_94); +x_95 = lean_ctor_get(x_1, 2); +lean_inc(x_95); lean_dec(x_1); -x_134 = l_Lean_Expr_hasLevelParam(x_110); -if (x_134 == 0) -{ -lean_dec(x_110); -x_112 = x_2; -goto block_133; -} -else -{ -lean_object* x_135; lean_object* x_136; lean_object* x_137; uint8_t x_138; -x_135 = lean_ctor_get(x_2, 0); -lean_inc(x_135); -x_136 = lean_ctor_get(x_2, 1); -lean_inc(x_136); -x_137 = lean_ctor_get(x_2, 2); -lean_inc(x_137); -x_138 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_136, x_110); -if (x_138 == 0) -{ -uint8_t x_139; -x_139 = !lean_is_exclusive(x_2); -if (x_139 == 0) -{ -lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; -x_140 = lean_ctor_get(x_2, 2); -lean_dec(x_140); -x_141 = lean_ctor_get(x_2, 1); -lean_dec(x_141); -x_142 = lean_ctor_get(x_2, 0); -lean_dec(x_142); -x_143 = lean_box(0); -lean_inc(x_110); -x_144 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_136, x_110, x_143); -lean_ctor_set(x_2, 1, x_144); -x_145 = l_Lean_CollectLevelParams_main___main(x_110, x_2); -x_146 = lean_ctor_get(x_145, 1); -lean_inc(x_146); -lean_dec(x_145); -x_112 = x_146; -goto block_133; -} -else -{ -lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; -lean_dec(x_2); -x_147 = lean_box(0); -lean_inc(x_110); -x_148 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_136, x_110, x_147); -x_149 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_149, 0, x_135); -lean_ctor_set(x_149, 1, x_148); -lean_ctor_set(x_149, 2, x_137); -x_150 = l_Lean_CollectLevelParams_main___main(x_110, x_149); -x_151 = lean_ctor_get(x_150, 1); -lean_inc(x_151); -lean_dec(x_150); -x_112 = x_151; -goto block_133; -} -} -else -{ -lean_dec(x_137); -lean_dec(x_136); -lean_dec(x_135); -lean_dec(x_110); -x_112 = x_2; -goto block_133; -} -} -block_133: -{ -uint8_t x_113; -x_113 = l_Lean_Expr_hasLevelParam(x_111); +x_113 = l_Lean_Expr_hasLevelParam(x_94); +x_114 = l_Lean_Expr_hasLevelParam(x_95); if (x_113 == 0) { -lean_object* x_114; lean_object* x_115; -lean_dec(x_111); -x_114 = lean_box(0); -x_115 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_115, 0, x_114); -lean_ctor_set(x_115, 1, x_112); -return x_115; +lean_dec(x_94); +if (x_114 == 0) +{ +lean_dec(x_95); +return x_2; } else { -lean_object* x_116; lean_object* x_117; lean_object* x_118; uint8_t x_119; -x_116 = lean_ctor_get(x_112, 0); +x_96 = x_2; +goto block_112; +} +} +else +{ +lean_object* x_115; lean_object* x_116; lean_object* x_117; uint8_t x_118; +x_115 = lean_ctor_get(x_2, 0); +lean_inc(x_115); +x_116 = lean_ctor_get(x_2, 1); lean_inc(x_116); -x_117 = lean_ctor_get(x_112, 1); +x_117 = lean_ctor_get(x_2, 2); lean_inc(x_117); -x_118 = lean_ctor_get(x_112, 2); -lean_inc(x_118); -x_119 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_117, x_111); +x_118 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_116, x_94); +if (x_118 == 0) +{ +uint8_t x_119; +x_119 = !lean_is_exclusive(x_2); if (x_119 == 0) { -uint8_t x_120; -x_120 = !lean_is_exclusive(x_112); -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 = lean_ctor_get(x_112, 2); +lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; +x_120 = lean_ctor_get(x_2, 2); +lean_dec(x_120); +x_121 = lean_ctor_get(x_2, 1); lean_dec(x_121); -x_122 = lean_ctor_get(x_112, 1); +x_122 = lean_ctor_get(x_2, 0); lean_dec(x_122); -x_123 = lean_ctor_get(x_112, 0); -lean_dec(x_123); -x_124 = lean_box(0); -lean_inc(x_111); -x_125 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_117, x_111, x_124); -lean_ctor_set(x_112, 1, x_125); -x_1 = x_111; -x_2 = x_112; -goto _start; +x_123 = lean_box(0); +lean_inc(x_94); +x_124 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_116, x_94, x_123); +lean_ctor_set(x_2, 1, x_124); +x_125 = l_Lean_CollectLevelParams_main___main(x_94, x_2); +if (x_114 == 0) +{ +lean_dec(x_95); +return x_125; } else { -lean_object* x_127; lean_object* x_128; lean_object* x_129; -lean_dec(x_112); -x_127 = lean_box(0); -lean_inc(x_111); -x_128 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_117, x_111, x_127); -x_129 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_129, 0, x_116); -lean_ctor_set(x_129, 1, x_128); -lean_ctor_set(x_129, 2, x_118); -x_1 = x_111; -x_2 = x_129; -goto _start; +x_96 = x_125; +goto block_112; +} +} +else +{ +lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; +lean_dec(x_2); +x_126 = lean_box(0); +lean_inc(x_94); +x_127 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_116, x_94, x_126); +x_128 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_128, 0, x_115); +lean_ctor_set(x_128, 1, x_127); +lean_ctor_set(x_128, 2, x_117); +x_129 = l_Lean_CollectLevelParams_main___main(x_94, x_128); +if (x_114 == 0) +{ +lean_dec(x_95); +return x_129; +} +else +{ +x_96 = x_129; +goto block_112; +} } } else { -lean_object* x_131; lean_object* x_132; -lean_dec(x_118); lean_dec(x_117); lean_dec(x_116); -lean_dec(x_111); -x_131 = lean_box(0); -x_132 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_132, 0, x_131); -lean_ctor_set(x_132, 1, x_112); -return x_132; +lean_dec(x_115); +lean_dec(x_94); +if (x_114 == 0) +{ +lean_dec(x_95); +return x_2; } +else +{ +x_96 = x_2; +goto block_112; +} +} +} +block_112: +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100; +x_97 = lean_ctor_get(x_96, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_96, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_96, 2); +lean_inc(x_99); +x_100 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_98, x_95); +if (x_100 == 0) +{ +uint8_t x_101; +x_101 = !lean_is_exclusive(x_96); +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 = lean_ctor_get(x_96, 2); +lean_dec(x_102); +x_103 = lean_ctor_get(x_96, 1); +lean_dec(x_103); +x_104 = lean_ctor_get(x_96, 0); +lean_dec(x_104); +x_105 = lean_box(0); +lean_inc(x_95); +x_106 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_98, x_95, x_105); +lean_ctor_set(x_96, 1, x_106); +x_1 = x_95; +x_2 = x_96; +goto _start; +} +else +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; +lean_dec(x_96); +x_108 = lean_box(0); +lean_inc(x_95); +x_109 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_98, x_95, x_108); +x_110 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_110, 0, x_97); +lean_ctor_set(x_110, 1, x_109); +lean_ctor_set(x_110, 2, x_99); +x_1 = x_95; +x_2 = x_110; +goto _start; +} +} +else +{ +lean_dec(x_99); +lean_dec(x_98); +lean_dec(x_97); +lean_dec(x_95); +return x_96; } } } case 8: { -lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_177; uint8_t x_197; -x_152 = lean_ctor_get(x_1, 1); -lean_inc(x_152); -x_153 = lean_ctor_get(x_1, 2); -lean_inc(x_153); -x_154 = lean_ctor_get(x_1, 3); -lean_inc(x_154); +lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; uint8_t x_150; uint8_t x_151; uint8_t x_152; lean_object* x_153; +x_130 = lean_ctor_get(x_1, 1); +lean_inc(x_130); +x_131 = lean_ctor_get(x_1, 2); +lean_inc(x_131); +x_132 = lean_ctor_get(x_1, 3); +lean_inc(x_132); lean_dec(x_1); -x_197 = l_Lean_Expr_hasLevelParam(x_152); -if (x_197 == 0) +x_150 = l_Lean_Expr_hasLevelParam(x_130); +x_151 = l_Lean_Expr_hasLevelParam(x_131); +x_152 = l_Lean_Expr_hasLevelParam(x_132); +if (x_150 == 0) { -lean_dec(x_152); -x_177 = x_2; -goto block_196; +lean_dec(x_130); +if (x_151 == 0) +{ +lean_dec(x_131); +if (x_152 == 0) +{ +lean_dec(x_132); +return x_2; } else { -lean_object* x_198; lean_object* x_199; lean_object* x_200; uint8_t x_201; -x_198 = lean_ctor_get(x_2, 0); -lean_inc(x_198); -x_199 = lean_ctor_get(x_2, 1); -lean_inc(x_199); -x_200 = lean_ctor_get(x_2, 2); -lean_inc(x_200); -x_201 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_199, x_152); -if (x_201 == 0) -{ -uint8_t x_202; -x_202 = !lean_is_exclusive(x_2); -if (x_202 == 0) -{ -lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; -x_203 = lean_ctor_get(x_2, 2); -lean_dec(x_203); -x_204 = lean_ctor_get(x_2, 1); -lean_dec(x_204); -x_205 = lean_ctor_get(x_2, 0); -lean_dec(x_205); -x_206 = lean_box(0); -lean_inc(x_152); -x_207 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_199, x_152, x_206); -lean_ctor_set(x_2, 1, x_207); -x_208 = l_Lean_CollectLevelParams_main___main(x_152, x_2); -x_209 = lean_ctor_get(x_208, 1); -lean_inc(x_209); -lean_dec(x_208); -x_177 = x_209; -goto block_196; -} -else -{ -lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; -lean_dec(x_2); -x_210 = lean_box(0); -lean_inc(x_152); -x_211 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_199, x_152, x_210); -x_212 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_212, 0, x_198); -lean_ctor_set(x_212, 1, x_211); -lean_ctor_set(x_212, 2, x_200); -x_213 = l_Lean_CollectLevelParams_main___main(x_152, x_212); -x_214 = lean_ctor_get(x_213, 1); -lean_inc(x_214); -lean_dec(x_213); -x_177 = x_214; -goto block_196; +x_133 = x_2; +goto block_149; } } else { -lean_dec(x_200); -lean_dec(x_199); -lean_dec(x_198); -lean_dec(x_152); -x_177 = x_2; -goto block_196; -} -} -block_176: -{ -uint8_t x_156; -x_156 = l_Lean_Expr_hasLevelParam(x_154); -if (x_156 == 0) -{ -lean_object* x_157; lean_object* x_158; -lean_dec(x_154); -x_157 = lean_box(0); -x_158 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_158, 0, x_157); -lean_ctor_set(x_158, 1, x_155); -return x_158; -} -else -{ -lean_object* x_159; lean_object* x_160; lean_object* x_161; uint8_t x_162; -x_159 = lean_ctor_get(x_155, 0); -lean_inc(x_159); -x_160 = lean_ctor_get(x_155, 1); -lean_inc(x_160); -x_161 = lean_ctor_get(x_155, 2); -lean_inc(x_161); -x_162 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_160, x_154); -if (x_162 == 0) -{ -uint8_t x_163; -x_163 = !lean_is_exclusive(x_155); -if (x_163 == 0) -{ -lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; -x_164 = lean_ctor_get(x_155, 2); -lean_dec(x_164); -x_165 = lean_ctor_get(x_155, 1); -lean_dec(x_165); -x_166 = lean_ctor_get(x_155, 0); -lean_dec(x_166); -x_167 = lean_box(0); -lean_inc(x_154); -x_168 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_160, x_154, x_167); -lean_ctor_set(x_155, 1, x_168); -x_1 = x_154; -x_2 = x_155; -goto _start; -} -else -{ -lean_object* x_170; lean_object* x_171; lean_object* x_172; -lean_dec(x_155); -x_170 = lean_box(0); -lean_inc(x_154); -x_171 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_160, x_154, x_170); -x_172 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_172, 0, x_159); -lean_ctor_set(x_172, 1, x_171); -lean_ctor_set(x_172, 2, x_161); -x_1 = x_154; -x_2 = x_172; -goto _start; +x_153 = x_2; +goto block_169; } } else { -lean_object* x_174; lean_object* x_175; -lean_dec(x_161); -lean_dec(x_160); -lean_dec(x_159); -lean_dec(x_154); -x_174 = lean_box(0); -x_175 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_175, 0, x_174); -lean_ctor_set(x_175, 1, x_155); -return x_175; -} -} -} -block_196: +lean_object* x_170; lean_object* x_171; lean_object* x_172; uint8_t x_173; +x_170 = lean_ctor_get(x_2, 0); +lean_inc(x_170); +x_171 = lean_ctor_get(x_2, 1); +lean_inc(x_171); +x_172 = lean_ctor_get(x_2, 2); +lean_inc(x_172); +x_173 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_171, x_130); +if (x_173 == 0) { -uint8_t x_178; -x_178 = l_Lean_Expr_hasLevelParam(x_153); -if (x_178 == 0) +uint8_t x_174; +x_174 = !lean_is_exclusive(x_2); +if (x_174 == 0) { -lean_dec(x_153); -x_155 = x_177; -goto block_176; -} -else -{ -lean_object* x_179; lean_object* x_180; lean_object* x_181; uint8_t x_182; -x_179 = lean_ctor_get(x_177, 0); -lean_inc(x_179); -x_180 = lean_ctor_get(x_177, 1); -lean_inc(x_180); -x_181 = lean_ctor_get(x_177, 2); -lean_inc(x_181); -x_182 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_180, x_153); -if (x_182 == 0) -{ -uint8_t x_183; -x_183 = !lean_is_exclusive(x_177); -if (x_183 == 0) -{ -lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; -x_184 = lean_ctor_get(x_177, 2); -lean_dec(x_184); -x_185 = lean_ctor_get(x_177, 1); -lean_dec(x_185); -x_186 = lean_ctor_get(x_177, 0); -lean_dec(x_186); -x_187 = lean_box(0); -lean_inc(x_153); -x_188 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_180, x_153, x_187); -lean_ctor_set(x_177, 1, x_188); -x_189 = l_Lean_CollectLevelParams_main___main(x_153, x_177); -x_190 = lean_ctor_get(x_189, 1); -lean_inc(x_190); -lean_dec(x_189); -x_155 = x_190; -goto block_176; -} -else -{ -lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; +lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; +x_175 = lean_ctor_get(x_2, 2); +lean_dec(x_175); +x_176 = lean_ctor_get(x_2, 1); +lean_dec(x_176); +x_177 = lean_ctor_get(x_2, 0); lean_dec(x_177); -x_191 = lean_box(0); -lean_inc(x_153); -x_192 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_180, x_153, x_191); -x_193 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_193, 0, x_179); -lean_ctor_set(x_193, 1, x_192); -lean_ctor_set(x_193, 2, x_181); -x_194 = l_Lean_CollectLevelParams_main___main(x_153, x_193); -x_195 = lean_ctor_get(x_194, 1); -lean_inc(x_195); -lean_dec(x_194); -x_155 = x_195; -goto block_176; +x_178 = lean_box(0); +lean_inc(x_130); +x_179 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_171, x_130, x_178); +lean_ctor_set(x_2, 1, x_179); +x_180 = l_Lean_CollectLevelParams_main___main(x_130, x_2); +if (x_151 == 0) +{ +lean_dec(x_131); +if (x_152 == 0) +{ +lean_dec(x_132); +return x_180; +} +else +{ +x_133 = x_180; +goto block_149; } } else { -lean_dec(x_181); -lean_dec(x_180); -lean_dec(x_179); +x_153 = x_180; +goto block_169; +} +} +else +{ +lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; +lean_dec(x_2); +x_181 = lean_box(0); +lean_inc(x_130); +x_182 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_171, x_130, x_181); +x_183 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_183, 0, x_170); +lean_ctor_set(x_183, 1, x_182); +lean_ctor_set(x_183, 2, x_172); +x_184 = l_Lean_CollectLevelParams_main___main(x_130, x_183); +if (x_151 == 0) +{ +lean_dec(x_131); +if (x_152 == 0) +{ +lean_dec(x_132); +return x_184; +} +else +{ +x_133 = x_184; +goto block_149; +} +} +else +{ +x_153 = x_184; +goto block_169; +} +} +} +else +{ +lean_dec(x_172); +lean_dec(x_171); +lean_dec(x_170); +lean_dec(x_130); +if (x_151 == 0) +{ +lean_dec(x_131); +if (x_152 == 0) +{ +lean_dec(x_132); +return x_2; +} +else +{ +x_133 = x_2; +goto block_149; +} +} +else +{ +x_153 = x_2; +goto block_169; +} +} +} +block_149: +{ +lean_object* x_134; lean_object* x_135; lean_object* x_136; uint8_t x_137; +x_134 = lean_ctor_get(x_133, 0); +lean_inc(x_134); +x_135 = lean_ctor_get(x_133, 1); +lean_inc(x_135); +x_136 = lean_ctor_get(x_133, 2); +lean_inc(x_136); +x_137 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_135, x_132); +if (x_137 == 0) +{ +uint8_t x_138; +x_138 = !lean_is_exclusive(x_133); +if (x_138 == 0) +{ +lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; +x_139 = lean_ctor_get(x_133, 2); +lean_dec(x_139); +x_140 = lean_ctor_get(x_133, 1); +lean_dec(x_140); +x_141 = lean_ctor_get(x_133, 0); +lean_dec(x_141); +x_142 = lean_box(0); +lean_inc(x_132); +x_143 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_135, x_132, x_142); +lean_ctor_set(x_133, 1, x_143); +x_1 = x_132; +x_2 = x_133; +goto _start; +} +else +{ +lean_object* x_145; lean_object* x_146; lean_object* x_147; +lean_dec(x_133); +x_145 = lean_box(0); +lean_inc(x_132); +x_146 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_135, x_132, x_145); +x_147 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_147, 0, x_134); +lean_ctor_set(x_147, 1, x_146); +lean_ctor_set(x_147, 2, x_136); +x_1 = x_132; +x_2 = x_147; +goto _start; +} +} +else +{ +lean_dec(x_136); +lean_dec(x_135); +lean_dec(x_134); +lean_dec(x_132); +return x_133; +} +} +block_169: +{ +lean_object* x_154; lean_object* x_155; lean_object* x_156; uint8_t x_157; +x_154 = lean_ctor_get(x_153, 0); +lean_inc(x_154); +x_155 = lean_ctor_get(x_153, 1); +lean_inc(x_155); +x_156 = lean_ctor_get(x_153, 2); +lean_inc(x_156); +x_157 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_155, x_131); +if (x_157 == 0) +{ +uint8_t x_158; +x_158 = !lean_is_exclusive(x_153); +if (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_153, 2); +lean_dec(x_159); +x_160 = lean_ctor_get(x_153, 1); +lean_dec(x_160); +x_161 = lean_ctor_get(x_153, 0); +lean_dec(x_161); +x_162 = lean_box(0); +lean_inc(x_131); +x_163 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_155, x_131, x_162); +lean_ctor_set(x_153, 1, x_163); +x_164 = l_Lean_CollectLevelParams_main___main(x_131, x_153); +if (x_152 == 0) +{ +lean_dec(x_132); +return x_164; +} +else +{ +x_133 = x_164; +goto block_149; +} +} +else +{ +lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_dec(x_153); -x_155 = x_177; -goto block_176; +x_165 = lean_box(0); +lean_inc(x_131); +x_166 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_155, x_131, x_165); +x_167 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_167, 0, x_154); +lean_ctor_set(x_167, 1, x_166); +lean_ctor_set(x_167, 2, x_156); +x_168 = l_Lean_CollectLevelParams_main___main(x_131, x_167); +if (x_152 == 0) +{ +lean_dec(x_132); +return x_168; +} +else +{ +x_133 = x_168; +goto block_149; +} +} +} +else +{ +lean_dec(x_156); +lean_dec(x_155); +lean_dec(x_154); +lean_dec(x_131); +if (x_152 == 0) +{ +lean_dec(x_132); +return x_153; +} +else +{ +x_133 = x_153; +goto block_149; } } } } case 10: { -lean_object* x_215; uint8_t x_216; -x_215 = lean_ctor_get(x_1, 1); -lean_inc(x_215); +lean_object* x_185; uint8_t x_186; +x_185 = lean_ctor_get(x_1, 1); +lean_inc(x_185); lean_dec(x_1); -x_216 = l_Lean_Expr_hasLevelParam(x_215); -if (x_216 == 0) +x_186 = l_Lean_Expr_hasLevelParam(x_185); +if (x_186 == 0) { -lean_object* x_217; lean_object* x_218; -lean_dec(x_215); -x_217 = lean_box(0); -x_218 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_218, 0, x_217); -lean_ctor_set(x_218, 1, x_2); -return x_218; +lean_dec(x_185); +return x_2; } else { -lean_object* x_219; lean_object* x_220; lean_object* x_221; uint8_t x_222; -x_219 = lean_ctor_get(x_2, 0); -lean_inc(x_219); -x_220 = lean_ctor_get(x_2, 1); -lean_inc(x_220); -x_221 = lean_ctor_get(x_2, 2); -lean_inc(x_221); -x_222 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_220, x_215); -if (x_222 == 0) +lean_object* x_187; lean_object* x_188; lean_object* x_189; uint8_t x_190; +x_187 = lean_ctor_get(x_2, 0); +lean_inc(x_187); +x_188 = lean_ctor_get(x_2, 1); +lean_inc(x_188); +x_189 = lean_ctor_get(x_2, 2); +lean_inc(x_189); +x_190 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_188, x_185); +if (x_190 == 0) { -uint8_t x_223; -x_223 = !lean_is_exclusive(x_2); -if (x_223 == 0) +uint8_t x_191; +x_191 = !lean_is_exclusive(x_2); +if (x_191 == 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_2, 2); -lean_dec(x_224); -x_225 = lean_ctor_get(x_2, 1); -lean_dec(x_225); -x_226 = lean_ctor_get(x_2, 0); -lean_dec(x_226); -x_227 = lean_box(0); -lean_inc(x_215); -x_228 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_220, x_215, x_227); -lean_ctor_set(x_2, 1, x_228); -x_1 = x_215; +lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; +x_192 = lean_ctor_get(x_2, 2); +lean_dec(x_192); +x_193 = lean_ctor_get(x_2, 1); +lean_dec(x_193); +x_194 = lean_ctor_get(x_2, 0); +lean_dec(x_194); +x_195 = lean_box(0); +lean_inc(x_185); +x_196 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_188, x_185, x_195); +lean_ctor_set(x_2, 1, x_196); +x_1 = x_185; goto _start; } else { -lean_object* x_230; lean_object* x_231; lean_object* x_232; +lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_dec(x_2); -x_230 = lean_box(0); -lean_inc(x_215); -x_231 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_220, x_215, x_230); -x_232 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_232, 0, x_219); -lean_ctor_set(x_232, 1, x_231); -lean_ctor_set(x_232, 2, x_221); -x_1 = x_215; -x_2 = x_232; +x_198 = lean_box(0); +lean_inc(x_185); +x_199 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_188, x_185, x_198); +x_200 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_200, 0, x_187); +lean_ctor_set(x_200, 1, x_199); +lean_ctor_set(x_200, 2, x_189); +x_1 = x_185; +x_2 = x_200; goto _start; } } else { -lean_object* x_234; lean_object* x_235; -lean_dec(x_221); -lean_dec(x_220); -lean_dec(x_219); -lean_dec(x_215); -x_234 = lean_box(0); -x_235 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_235, 0, x_234); -lean_ctor_set(x_235, 1, x_2); -return x_235; +lean_dec(x_189); +lean_dec(x_188); +lean_dec(x_187); +lean_dec(x_185); +return x_2; } } } case 11: { -lean_object* x_236; uint8_t x_237; -x_236 = lean_ctor_get(x_1, 2); -lean_inc(x_236); +lean_object* x_202; uint8_t x_203; +x_202 = lean_ctor_get(x_1, 2); +lean_inc(x_202); lean_dec(x_1); -x_237 = l_Lean_Expr_hasLevelParam(x_236); -if (x_237 == 0) +x_203 = l_Lean_Expr_hasLevelParam(x_202); +if (x_203 == 0) { -lean_object* x_238; lean_object* x_239; -lean_dec(x_236); -x_238 = lean_box(0); -x_239 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_239, 0, x_238); -lean_ctor_set(x_239, 1, x_2); -return x_239; +lean_dec(x_202); +return x_2; } else { -lean_object* x_240; lean_object* x_241; lean_object* x_242; uint8_t x_243; -x_240 = lean_ctor_get(x_2, 0); -lean_inc(x_240); -x_241 = lean_ctor_get(x_2, 1); -lean_inc(x_241); -x_242 = lean_ctor_get(x_2, 2); -lean_inc(x_242); -x_243 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_241, x_236); -if (x_243 == 0) +lean_object* x_204; lean_object* x_205; lean_object* x_206; uint8_t x_207; +x_204 = lean_ctor_get(x_2, 0); +lean_inc(x_204); +x_205 = lean_ctor_get(x_2, 1); +lean_inc(x_205); +x_206 = lean_ctor_get(x_2, 2); +lean_inc(x_206); +x_207 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_205, x_202); +if (x_207 == 0) { -uint8_t x_244; -x_244 = !lean_is_exclusive(x_2); -if (x_244 == 0) +uint8_t x_208; +x_208 = !lean_is_exclusive(x_2); +if (x_208 == 0) { -lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; -x_245 = lean_ctor_get(x_2, 2); -lean_dec(x_245); -x_246 = lean_ctor_get(x_2, 1); -lean_dec(x_246); -x_247 = lean_ctor_get(x_2, 0); -lean_dec(x_247); -x_248 = lean_box(0); -lean_inc(x_236); -x_249 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_241, x_236, x_248); -lean_ctor_set(x_2, 1, x_249); -x_1 = x_236; +lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; +x_209 = lean_ctor_get(x_2, 2); +lean_dec(x_209); +x_210 = lean_ctor_get(x_2, 1); +lean_dec(x_210); +x_211 = lean_ctor_get(x_2, 0); +lean_dec(x_211); +x_212 = lean_box(0); +lean_inc(x_202); +x_213 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_205, x_202, x_212); +lean_ctor_set(x_2, 1, x_213); +x_1 = x_202; goto _start; } else { -lean_object* x_251; lean_object* x_252; lean_object* x_253; +lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_dec(x_2); -x_251 = lean_box(0); -lean_inc(x_236); -x_252 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_241, x_236, x_251); -x_253 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_253, 0, x_240); -lean_ctor_set(x_253, 1, x_252); -lean_ctor_set(x_253, 2, x_242); -x_1 = x_236; -x_2 = x_253; +x_215 = lean_box(0); +lean_inc(x_202); +x_216 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_205, x_202, x_215); +x_217 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_217, 0, x_204); +lean_ctor_set(x_217, 1, x_216); +lean_ctor_set(x_217, 2, x_206); +x_1 = x_202; +x_2 = x_217; goto _start; } } else { -lean_object* x_255; lean_object* x_256; -lean_dec(x_242); -lean_dec(x_241); -lean_dec(x_240); -lean_dec(x_236); -x_255 = lean_box(0); -x_256 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_256, 0, x_255); -lean_ctor_set(x_256, 1, x_2); -return x_256; +lean_dec(x_206); +lean_dec(x_205); +lean_dec(x_204); +lean_dec(x_202); +return x_2; } } } default: { -lean_object* x_257; lean_object* x_258; lean_dec(x_1); -x_257 = lean_box(0); -x_258 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_258, 0, x_257); -lean_ctor_set(x_258, 1, x_2); -return x_258; +return x_2; } } } @@ -2428,83 +2498,12 @@ x_3 = l_Lean_CollectLevelParams_main___main(x_1, x_2); return x_3; } } -lean_object* l_mkHashMap___at_Lean_collectLevelParams___spec__2(lean_object* x_1) { +lean_object* l_Lean_collectLevelParams(lean_object* x_1, lean_object* x_2) { _start: { -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* l_mkHashSet___at_Lean_collectLevelParams___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* l_mkHashMap___at_Lean_collectLevelParams___spec__4(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* l_mkHashSet___at_Lean_collectLevelParams___spec__3(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_collectLevelParams___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_unsigned_to_nat(8u); -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_collectLevelParams___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_unsigned_to_nat(8u); -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_collectLevelParams___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_collectLevelParams___closed__1; -x_2 = l_Lean_collectLevelParams___closed__2; -x_3 = l_Array_empty___closed__1; -x_4 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_4, 0, x_1); -lean_ctor_set(x_4, 1, x_2); -lean_ctor_set(x_4, 2, x_3); -return x_4; -} -} -lean_object* l_Lean_collectLevelParams(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_2 = l_Lean_collectLevelParams___closed__3; -x_3 = l_Lean_CollectLevelParams_main___main(x_1, x_2); -x_4 = lean_ctor_get(x_3, 1); -lean_inc(x_4); -lean_dec(x_3); -x_5 = lean_ctor_get(x_4, 2); -lean_inc(x_5); -lean_dec(x_4); -return x_5; +lean_object* x_3; +x_3 = l_Lean_CollectLevelParams_main___main(x_2, x_1); +return x_3; } } lean_object* initialize_Init_Lean_Expr(lean_object*); @@ -2516,12 +2515,14 @@ _G_initialized = true; res = initialize_Init_Lean_Expr(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_collectLevelParams___closed__1 = _init_l_Lean_collectLevelParams___closed__1(); -lean_mark_persistent(l_Lean_collectLevelParams___closed__1); -l_Lean_collectLevelParams___closed__2 = _init_l_Lean_collectLevelParams___closed__2(); -lean_mark_persistent(l_Lean_collectLevelParams___closed__2); -l_Lean_collectLevelParams___closed__3 = _init_l_Lean_collectLevelParams___closed__3(); -lean_mark_persistent(l_Lean_collectLevelParams___closed__3); +l_Lean_CollectLevelParams_State_inhabited___closed__1 = _init_l_Lean_CollectLevelParams_State_inhabited___closed__1(); +lean_mark_persistent(l_Lean_CollectLevelParams_State_inhabited___closed__1); +l_Lean_CollectLevelParams_State_inhabited___closed__2 = _init_l_Lean_CollectLevelParams_State_inhabited___closed__2(); +lean_mark_persistent(l_Lean_CollectLevelParams_State_inhabited___closed__2); +l_Lean_CollectLevelParams_State_inhabited___closed__3 = _init_l_Lean_CollectLevelParams_State_inhabited___closed__3(); +lean_mark_persistent(l_Lean_CollectLevelParams_State_inhabited___closed__3); +l_Lean_CollectLevelParams_State_inhabited = _init_l_Lean_CollectLevelParams_State_inhabited(); +lean_mark_persistent(l_Lean_CollectLevelParams_State_inhabited); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus