diff --git a/stage0/src/Init/Lean/Data/Name.lean b/stage0/src/Init/Lean/Data/Name.lean index 1670948cbc..e1dff24002 100644 --- a/stage0/src/Init/Lean/Data/Name.lean +++ b/stage0/src/Init/Lean/Data/Name.lean @@ -42,15 +42,6 @@ def components' : Name → List Name def components (n : Name) : List Name := n.components'.reverse -@[extern "lean_name_eq"] -protected def beq : (@& Name) → (@& Name) → Bool -| anonymous, anonymous => true -| str p₁ s₁ _, str p₂ s₂ _ => s₁ == s₂ && beq p₁ p₂ -| num p₁ n₁ _, num p₂ n₂ _ => n₁ == n₂ && beq p₁ p₂ -| _, _ => false - -instance : HasBeq Name := ⟨Name.beq⟩ - def eqStr : Name → String → Bool | str anonymous s _, s' => s == s' | _, _ => false diff --git a/stage0/src/Init/Lean/Elab/Command.lean b/stage0/src/Init/Lean/Elab/Command.lean index b0f6cea77d..1c431023db 100644 --- a/stage0/src/Init/Lean/Elab/Command.lean +++ b/stage0/src/Init/Lean/Elab/Command.lean @@ -207,30 +207,33 @@ private def elabCommandUsing (stx : Syntax) : List CommandElab → CommandElabM | Exception.error _ => throw ex | Exception.unsupportedSyntax => elabCommandUsing elabFns) -def elabCommandAux (stx : Syntax) : CommandElabM Unit := -withIncRecDepth stx $ withFreshMacroScope $ match stx with -| Syntax.node _ _ => do - trace `Elab.step stx $ fun _ => stx; - s ← get; - let table := (commandElabAttribute.ext.getState s.env).table; - let k := stx.getKind; - match table.find? k with - | some elabFns => elabCommandUsing stx elabFns - | none => throwError stx ("command '" ++ toString k ++ "' has not been implemented") -| _ => throwError stx "unexpected command" - -def elabCommand (stx : Syntax) : CommandElabM Unit := -if stx.getKind == nullKind then - -- list of commands => elaborate in order - -- The parser will only ever return a single command at a time, but syntax quotations can return multiple ones - stx.getArgs.forM elabCommandAux -else - elabCommandAux stx - /- 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 +partial def elabCommand : Syntax → CommandElabM Unit +| stx => withIncRecDepth stx $ withFreshMacroScope $ match stx with + | Syntax.node _ _ => do + trace `Elab.step stx $ fun _ => stx; + s ← get; + let table := (commandElabAttribute.ext.getState s.env).table; + let k := stx.getKind; + match table.find? k with + | some elabFns => elabCommandUsing stx elabFns + | none => do + scp ← getCurrMacroScope; + env ← getEnv; + match expandMacro env stx scp with + | some stx' => withMacroExpansion stx $ + if stx'.getKind == nullKind then + -- list of commands => elaborate in order + -- The parser will only ever return a single command at a time, but syntax quotations can return multiple ones + stx'.getArgs.forM elabCommand + else + elabCommand stx' + | none => throwError stx ("command '" ++ toString k ++ "' has not been implemented") + | _ => throwError stx "unexpected command" + /-- Adapt a syntax transformation to a regular, command-producing elaborator. -/ def adaptExpander (exp : Syntax → CommandElabM Syntax) : CommandElab := fun stx => withMacroExpansion stx $ do diff --git a/stage0/src/Init/Lean/Elab/Definition.lean b/stage0/src/Init/Lean/Elab/Definition.lean index bb36ff76dd..d5b8f9025c 100644 --- a/stage0/src/Init/Lean/Elab/Definition.lean +++ b/stage0/src/Init/Lean/Elab/Definition.lean @@ -98,6 +98,7 @@ else withUsedWhen ref vars xs val type view.kind.isDefOrOpaque $ fun vars => do val ← Term.levelMVarToParam val; type ← Term.instantiateMVars ref type; val ← Term.instantiateMVars view.val val; + Term.trace `Elab.definition.body ref $ fun _ => val; let usedParams : CollectLevelParams.State := {}; let usedParams := collectLevelParams usedParams type; let usedParams := collectLevelParams usedParams val; @@ -153,6 +154,10 @@ withDeclId view.declId $ fun name => do compileDecl ref decl; applyAttributes ref declName view.modifiers.attrs AttributeApplicationTime.afterCompilation +@[init] private def regTraceClasses : IO Unit := do +registerTraceClass `Elab.definition; +pure () + end Command end Elab end Lean diff --git a/stage0/src/Init/Lean/Elab/Syntax.lean b/stage0/src/Init/Lean/Elab/Syntax.lean index 86d544e464..daee1d2a10 100644 --- a/stage0/src/Init/Lean/Elab/Syntax.lean +++ b/stage0/src/Init/Lean/Elab/Syntax.lean @@ -118,10 +118,22 @@ fun stx => do let catParserId := mkIdentFrom stx (cat.appendAfter "Parser"); type ← `(Lean.ParserDescr); val ← runTermElabM none $ fun _ => Term.toParserDescr (stx.getArg 2); - d ← `(@[$catParserId:ident] private def $catParserId:ident : $type := ParserDescr.node $(quote kind) $val); + -- TODO: meaningful, unhygienic def name for selective parser `open`ing? + d ← `(@[$catParserId:ident] def myParser : $type := ParserDescr.node $(quote kind) $val); trace `Elab stx $ fun _ => d; withMacroExpansion stx $ elabCommand d +@[builtinCommandElab macro] def elabMacro : CommandElab := +adaptExpander $ fun stx => match_syntax stx with +| `(macro $alts*) => do + -- TODO: clean up with matchAlt quotation + k ← match_syntax ((alts.get! 0).getArg 1).getArg 0 with + | `(`($quot)) => pure quot.getKind + | stx => throwUnsupportedSyntax; + -- TODO: meaningful, unhygienic def name for selective macro `open`ing? + `(@[macro $(Lean.mkSimpleIdent k)] def myMacro : Macro := fun stx => match_syntax stx with $alts* | _ => throw ()) +| _ => throwUnsupportedSyntax + end Command end Elab end Lean diff --git a/stage0/src/Init/Lean/Elab/Term.lean b/stage0/src/Init/Lean/Elab/Term.lean index 58938050db..b2d42ccff4 100644 --- a/stage0/src/Init/Lean/Elab/Term.lean +++ b/stage0/src/Init/Lean/Elab/Term.lean @@ -515,6 +515,29 @@ private def elabTermUsing (s : State) (stx : Syntax) (expectedType? : Option Exp else throw ex) +@[inline] def adaptMacro (x : Macro) (stx : Syntax) : TermElabM Syntax := do +scp ← getCurrMacroScope; +env ← getEnv; +match x stx scp with +| some stx => pure stx +| none => throwUnsupportedSyntax + +/- Main loop for `elabTerm` -/ +partial def elabTermAux (expectedType? : Option Expr) (catchExPostpone := true) (errToSorry := true) : Syntax → TermElabM Expr +| stx => withFreshMacroScope $ withIncRecDepth stx $ withNode stx $ fun node => do + trace `Elab.step stx $ fun _ => stx; + s ← get; + let table := (termElabAttribute.ext.getState s.env).table; + let k := node.getKind; + match table.find? k with + | some elabFns => elabTermUsing s node expectedType? errToSorry catchExPostpone elabFns + | none => do + scp ← getCurrMacroScope; + env ← getEnv; + match expandMacro env stx scp with + | some stx' => withMacroExpansion stx $ elabTermAux stx' + | none => throwError stx ("elaboration function for '" ++ toString k ++ "' has not been implemented") + /-- Main function for elaborating terms. It extracts the elaboration methods from the environment using the node kind. @@ -529,14 +552,7 @@ private def elabTermUsing (s : State) (stx : Syntax) (expectedType? : Option Exp The option `catchExPostpone == false` is used to implement `resumeElabTerm` to prevent the creation of another synthetic metavariable when resuming the elaboration. -/ def elabTerm (stx : Syntax) (expectedType? : Option Expr) (catchExPostpone := true) (errToSorry := true) : TermElabM Expr := -withFreshMacroScope $ withIncRecDepth stx $ withNode stx $ fun node => do - trace `Elab.step stx $ fun _ => stx; - s ← get; - let table := (termElabAttribute.ext.getState s.env).table; - let k := node.getKind; - match table.find? k with - | some elabFns => elabTermUsing s node expectedType? errToSorry catchExPostpone elabFns - | none => throwError stx ("elaboration function for '" ++ toString k ++ "' has not been implemented") +elabTermAux expectedType? catchExPostpone errToSorry stx /-- Auxiliary function used to implement `synthesizeSyntheticMVars`. -/ private def resumeElabTerm (stx : Syntax) (expectedType? : Option Expr) (errToSorry := true) : TermElabM Expr := diff --git a/stage0/src/Init/Lean/Elab/Util.lean b/stage0/src/Init/Lean/Elab/Util.lean index f66e26f8b8..6c2f29c924 100644 --- a/stage0/src/Init/Lean/Elab/Util.lean +++ b/stage0/src/Init/Lean/Elab/Util.lean @@ -106,7 +106,8 @@ match mkElabFnOfConstant γ env typeName constName with pure $ ext.addEntry env { kind := kind, elabFn := f, constName := constName } /- TODO: add support for scoped attributes -/ -def mkElabAttribute (γ) (attrName : Name) (parserNamespace : Name) (typeName : Name) (kind : String) (builtinTableRef : IO.Ref (ElabFnTable γ)) : IO (ElabAttribute γ) := do +def mkElabAttributeAux (γ) (attrName : Name) (parserNamespace : Name) (typeName : Name) (descr : String) (kind : String) (builtinTableRef : IO.Ref (ElabFnTable γ)) + : IO (ElabAttribute γ) := do ext : ElabAttributeExtension γ ← registerPersistentEnvExtension { name := attrName, mkInitial := ElabAttribute.mkInitial builtinTableRef, @@ -124,9 +125,38 @@ let attrImpl : AttributeImpl := { registerBuiltinAttribute attrImpl; pure { ext := ext, attr := attrImpl, kind := kind } +def mkElabAttribute (γ) (attrName : Name) (parserNamespace : Name) (typeName : Name) (kind : String) (builtinTableRef : IO.Ref (ElabFnTable γ)) + : IO (ElabAttribute γ) := +mkElabAttributeAux γ attrName parserNamespace typeName (kind ++ " elaborator") kind builtinTableRef + +abbrev MacroAttribute := ElabAttribute Macro +abbrev MacroFnTable := ElabFnTable Macro + +def mkBuiltinMacroFnTable : IO (IO.Ref MacroFnTable) := IO.mkRef {} +@[init mkBuiltinMacroFnTable] constant builtinMacroFnTable : IO.Ref MacroFnTable := arbitrary _ + +def mkMacroAttribute : IO MacroAttribute := +mkElabAttributeAux Macro `macro Name.anonymous `Lean.Macro "macros" "macro" builtinMacroFnTable + +@[init mkMacroAttribute] constant macroAttribute : MacroAttribute := arbitrary _ + +private def expandMacroFns (stx : Syntax) : List Macro → MacroM Syntax +| [] => throw () +| m::ms => m stx <|> expandMacroFns ms + +def expandMacro (env : Environment) : Macro := +fun stx => + let k := stx.getKind; + let table := (macroAttribute.ext.getState env).table; + match table.find? k with + | some macroFns => expandMacroFns stx macroFns + | none => throw () + @[init] private def regTraceClasses : IO Unit := do registerTraceClass `Elab; registerTraceClass `Elab.step + + end Elab end Lean diff --git a/stage0/src/Init/Lean/Hygiene.lean b/stage0/src/Init/Lean/Hygiene.lean index 1c4cbd8dfb..c5fc099560 100644 --- a/stage0/src/Init/Lean/Hygiene.lean +++ b/stage0/src/Init/Lean/Hygiene.lean @@ -2,59 +2,14 @@ Copyright (c) 2019 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sebastian Ullrich - -Runtime support for making quotation terms auto-hygienic, by mangling identifiers -introduced by them with a "macro scope" supplied by the context. Details to appear in a -paper soon. -/ prelude import Init.Control +import Init.LeanInit import Init.Lean.Syntax namespace Lean - -abbrev MacroScope := Nat - -/-- A monad that supports syntax quotations. Syntax quotations (in term - position) are monadic values that when executed retrieve the current "macro - scope" from the monad and apply it to every identifier they introduce - (independent of whether this identifier turns out to be a reference to an - existing declaration, or an actually fresh binding during further - elaboration). -/ -class MonadQuotation (m : Type → Type) := --- Get the fresh scope of the current macro invocation -(getCurrMacroScope {} : m MacroScope) -/- Execute action in a new macro invocation context. This transformer should be - used at all places that morally qualify as the beginning of a "macro call", - e.g. `elabCommand` and `elabTerm` in the case of the elaborator. However, it - can also be used internally inside a "macro" if identifiers introduced by - e.g. different recursive calls should be independent and not collide. While - returning an intermediate syntax tree that will recursively be expanded by - the elaborator can be used for the same effect, doing direct recursion inside - the macro guarded by this transformer is often easier because one is not - restricted to passing a single syntax tree. Modelling this helper as a - transformer and not just a monadic action ensures that the current macro - scope before the recursive call is restored after it, as expected. -/ -(withFreshMacroScope {α : Type} : m α → m α) -export MonadQuotation - --- TODO: try harder to avoid clashes with other autogenerated names -def addMacroScope (n : Name) (scp : MacroScope) : Name := -mkNameNum n scp - -def addMacroScopes (n : Name) (scps : List MacroScope) : Name := -scps.foldl addMacroScope n - -private def extractMacroScopesAux : Name → List MacroScope → Name × List MacroScope -| Name.num n scp _, acc => extractMacroScopesAux n (scp::acc) -| n , acc => (n, acc.reverse) - -/-- - Revert all `addMacroScope` calls. `(n', scps) = extractMacroScopes n → n = addMacroScopes n' scps`. - This operation is useful for analyzing/transforming the original identifiers, then adding back - the scopes (via `addMacroScopes`). -/ -def extractMacroScopes (n : Name) : Name × List MacroScope := -extractMacroScopesAux n [] +/- Remark: `MonadQuotation` class is part of the `Init` package and loaded by default since it is used in the builtin command `macro`. -/ /-- Simplistic MonadQuotation that does not guarantee globally fresh names, that is, between different runs of this or other MonadQuotation implementations. @@ -80,6 +35,17 @@ instance MonadQuotation : MonadQuotation Unhygienic := { protected def run {α : Type} (x : Unhygienic α) : α := run x 0 1 end Unhygienic +private def extractMacroScopesAux : Name → List MacroScope → Name × List MacroScope +| Name.num n scp _, acc => extractMacroScopesAux n (scp::acc) +| n , acc => (n, acc.reverse) + +/-- + Revert all `addMacroScope` calls. `(n', scps) = extractMacroScopes n → n = addMacroScopes n' scps`. + This operation is useful for analyzing/transforming the original identifiers, then adding back + the scopes (via `addMacroScopes`). -/ +def extractMacroScopes (n : Name) : Name × List MacroScope := +extractMacroScopesAux n [] + instance monadQuotationTrans {m n : Type → Type} [MonadQuotation m] [HasMonadLift m n] [MonadFunctorT m m n n] : MonadQuotation n := { getCurrMacroScope := liftM (getCurrMacroScope : m Nat), withFreshMacroScope := fun α => monadMap (fun α => (withFreshMacroScope : m α → m α)) } diff --git a/stage0/src/Init/Lean/Syntax.lean b/stage0/src/Init/Lean/Syntax.lean index 55ab07b8b6..6f0d54d41d 100644 --- a/stage0/src/Init/Lean/Syntax.lean +++ b/stage0/src/Init/Lean/Syntax.lean @@ -9,13 +9,6 @@ import Init.Lean.Data.Name import Init.Lean.Data.Format namespace Lean -structure SourceInfo := -/- Will be inferred after parsing by `Syntax.updateLeading`. During parsing, - it is not at all clear what the preceding token was, especially with backtracking. -/ -(leading : Substring) -(pos : String.Pos) -(trailing : Substring) - namespace SourceInfo def updateTrailing (info : SourceInfo) (trailing : Substring) : SourceInfo := @@ -36,8 +29,6 @@ end SourceInfo /- Node kind generation -/ -abbrev SyntaxNodeKind := Name - @[matchPattern] def choiceKind : SyntaxNodeKind := `choice @[matchPattern] def nullKind : SyntaxNodeKind := `null def strLitKind : SyntaxNodeKind := `strLit @@ -47,15 +38,6 @@ def fieldIdxKind : SyntaxNodeKind := `fieldIdx /- Syntax AST -/ -inductive Syntax -| missing {} : Syntax -| node (kind : SyntaxNodeKind) (args : Array Syntax) : Syntax -| atom {} (info : Option SourceInfo) (val : String) : Syntax -| ident {} (info : Option SourceInfo) (rawVal : Substring) (val : Name) (preresolved : List (Name × List String)) : Syntax - -instance stxInh : Inhabited Syntax := -⟨Syntax.missing⟩ - def Syntax.isMissing : Syntax → Bool | Syntax.missing => true | _ => false @@ -138,12 +120,6 @@ def asNode : Syntax → SyntaxNode def getNumArgs (stx : Syntax) : Nat := stx.asNode.getNumArgs -def getArgs (stx : Syntax) : Array Syntax := -stx.asNode.getArgs - -def getArg (stx : Syntax) (i : Nat) : Syntax := -stx.asNode.getArg i - def setArgs (stx : Syntax) (args : Array Syntax) : Syntax := match stx with | node k _ => node k args @@ -167,16 +143,6 @@ match stx with def getIdAt (stx : Syntax) (i : Nat) : Name := (stx.getArg i).getId -def getKind (stx : Syntax) : SyntaxNodeKind := -match stx with -| Syntax.node k args => k --- We use these "pseudo kinds" for antiquotation kinds. --- For example, an antiquotation `$id:ident` (using Lean.Parser.Term.ident) --- is compiled to ``if stx.isOfKind `ident ...`` -| Syntax.missing => `missing -| Syntax.atom _ v => v -| Syntax.ident _ _ _ _ => `ident - @[specialize] partial def mreplace {m : Type → Type} [Monad m] (fn : Syntax → m (Option Syntax)) : Syntax → m (Syntax) | stx@(node kind args) => do o ← fn stx; @@ -185,9 +151,6 @@ match stx with | none => do args ← args.mapM mreplace; pure (node kind args) | stx => do o ← fn stx; pure $ o.getD stx -def isOfKind : Syntax → SyntaxNodeKind → Bool -| stx, k => stx.getKind == k - @[specialize] partial def mrewriteBottomUp {m : Type → Type} [Monad m] (fn : Syntax → m (Syntax)) : Syntax → m (Syntax) | node kind args => do args ← args.mapM mrewriteBottomUp; diff --git a/stage0/src/Init/LeanInit.lean b/stage0/src/Init/LeanInit.lean index 186d06c93d..e0b94d0f6b 100644 --- a/stage0/src/Init/LeanInit.lean +++ b/stage0/src/Init/LeanInit.lean @@ -1,12 +1,15 @@ /- Copyright (c) 2019 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -Authors: Leonardo de Moura +Authors: Leonardo de Moura and Sebastian Ullrich -/ prelude import Init.Data.String.Basic +import Init.Data.Array.Basic import Init.Data.UInt import Init.Data.Hashable +import Init.Control.Reader +import Init.Control.Option namespace Lean /- @@ -47,6 +50,15 @@ Name.num p v $ mixHash (hash p) (hash v) def mkNameSimple (s : String) : Name := mkNameStr Name.anonymous s +@[extern "lean_name_eq"] +protected def Name.beq : (@& Name) → (@& Name) → Bool +| Name.anonymous, Name.anonymous => true +| Name.str p₁ s₁ _, Name.str p₂ s₂ _ => s₁ == s₂ && Name.beq p₁ p₂ +| Name.num p₁ n₁ _, Name.num p₂ n₂ _ => n₁ == n₂ && Name.beq p₁ p₂ +| _, _ => false + +instance : HasBeq Name := ⟨Name.beq⟩ + inductive ParserKind | leading | trailing @@ -97,4 +109,99 @@ abbrev TrailingParserDescr := ParserDescrCore ParserKind.trailing @[matchPattern] abbrev ParserDescr.pushLeading := @ParserDescrCore.pushLeading @[matchPattern] abbrev ParserDescr.parser := @ParserDescrCore.parser +/- Syntax -/ + +structure SourceInfo := +/- Will be inferred after parsing by `Syntax.updateLeading`. During parsing, + it is not at all clear what the preceding token was, especially with backtracking. -/ +(leading : Substring) +(pos : String.Pos) +(trailing : Substring) + +abbrev SyntaxNodeKind := Name + +/- Syntax AST -/ + +inductive Syntax +| missing {} : Syntax +| node (kind : SyntaxNodeKind) (args : Array Syntax) : Syntax +| atom {} (info : Option SourceInfo) (val : String) : Syntax +| ident {} (info : Option SourceInfo) (rawVal : Substring) (val : Name) (preresolved : List (Name × List String)) : Syntax + +instance Syntax.inhabited : Inhabited Syntax := +⟨Syntax.missing⟩ + +namespace Syntax + +def getKind (stx : Syntax) : SyntaxNodeKind := +match stx with +| Syntax.node k args => k +-- We use these "pseudo kinds" for antiquotation kinds. +-- For example, an antiquotation `$id:ident` (using Lean.Parser.Term.ident) +-- is compiled to ``if stx.isOfKind `ident ...`` +| Syntax.missing => `missing +| Syntax.atom _ v => mkNameSimple v +| Syntax.ident _ _ _ _ => `ident + +def isOfKind : Syntax → SyntaxNodeKind → Bool +| stx, k => stx.getKind == k + +def getArg (stx : Syntax) (i : Nat) : Syntax := +match stx with +| Syntax.node _ args => args.get! i +| _ => arbitrary _ + +def getArgs (stx : Syntax) : Array Syntax := +match stx with +| Syntax.node _ args => args +| _ => #[] + +end Syntax + +/- +Runtime support for making quotation terms auto-hygienic, by mangling identifiers +introduced by them with a "macro scope" supplied by the context. Details to appear in a +paper soon. +-/ + +abbrev MacroScope := Nat + +/-- A monad that supports syntax quotations. Syntax quotations (in term + position) are monadic values that when executed retrieve the current "macro + scope" from the monad and apply it to every identifier they introduce + (independent of whether this identifier turns out to be a reference to an + existing declaration, or an actually fresh binding during further + elaboration). -/ +class MonadQuotation (m : Type → Type) := +-- Get the fresh scope of the current macro invocation +(getCurrMacroScope {} : m MacroScope) +/- Execute action in a new macro invocation context. This transformer should be + used at all places that morally qualify as the beginning of a "macro call", + e.g. `elabCommand` and `elabTerm` in the case of the elaborator. However, it + can also be used internally inside a "macro" if identifiers introduced by + e.g. different recursive calls should be independent and not collide. While + returning an intermediate syntax tree that will recursively be expanded by + the elaborator can be used for the same effect, doing direct recursion inside + the macro guarded by this transformer is often easier because one is not + restricted to passing a single syntax tree. Modelling this helper as a + transformer and not just a monadic action ensures that the current macro + scope before the recursive call is restored after it, as expected. -/ +(withFreshMacroScope {α : Type} : m α → m α) +export MonadQuotation + +-- TODO: try harder to avoid clashes with other autogenerated names +def addMacroScope (n : Name) (scp : MacroScope) : Name := +mkNameNum n scp + +def addMacroScopes (n : Name) (scps : List MacroScope) : Name := +scps.foldl addMacroScope n + +abbrev MacroM := ReaderT MacroScope (OptionT Id) + +instance MacroM.monadQuotation : MonadQuotation MacroM := +{ getCurrMacroScope := fun scp => some scp, + withFreshMacroScope := fun _ x => x } + +abbrev Macro := Syntax → MacroM Syntax + end Lean diff --git a/stage0/stdlib/Init/Lean/Attributes.c b/stage0/stdlib/Init/Lean/Attributes.c index b6c4e54939..09accee4b2 100644 --- a/stage0/stdlib/Init/Lean/Attributes.c +++ b/stage0/stdlib/Init/Lean/Attributes.c @@ -52,7 +52,6 @@ extern lean_object* l_Lean_mkTagDeclarationExtension___closed__1; lean_object* l_Lean_registerEnumAttributes___rarg___lambda__2___closed__3; lean_object* l_Lean_ParametricAttribute_setParam___rarg___closed__2; lean_object* l_Lean_attributeExtension___elambda__4___rarg(lean_object*); -extern lean_object* l_Lean_stxInh; lean_object* l_Lean_ParametricAttribute_Inhabited(lean_object*); lean_object* l_Lean_registerParametricAttribute___rarg___lambda__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkAttributeExtension___closed__2; @@ -246,6 +245,7 @@ extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed_ lean_object* l_Lean_mkAttributeImplBuilderTable___closed__1; lean_object* l_Array_qsortAux___main___at_Lean_registerEnumAttributes___spec__2(lean_object*); lean_object* l_Array_qsortAux___main___at_Lean_registerEnumAttributes___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Syntax_inhabited; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; lean_object* l_Lean_EnumAttributes_Inhabited___closed__1; uint8_t l_PersistentHashMap_containsAux___main___at_Lean_registerBuiltinAttribute___spec__2(lean_object*, size_t, lean_object*); @@ -10924,7 +10924,7 @@ return x_10; else { lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = l_Lean_stxInh; +x_11 = l_Lean_Syntax_inhabited; x_12 = lean_unsigned_to_nat(0u); x_13 = lean_array_get(x_11, x_3, x_12); if (lean_obj_tag(x_13) == 3) diff --git a/stage0/stdlib/Init/Lean/Compiler/ExternAttr.c b/stage0/stdlib/Init/Lean/Compiler/ExternAttr.c index 9143c9673a..9fa6bf2135 100644 --- a/stage0/stdlib/Init/Lean/Compiler/ExternAttr.c +++ b/stage0/stdlib/Init/Lean/Compiler/ExternAttr.c @@ -28,7 +28,6 @@ extern lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_registerTagAttri uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*); extern lean_object* l_Lean_mkProjectionFnInfoExtension___closed__3; extern lean_object* l_Prod_HasRepr___rarg___closed__1; -extern lean_object* l_Lean_stxInh; lean_object* l_Lean_ExternAttrData_inhabited___closed__1; extern lean_object* l_Array_empty___closed__1; extern lean_object* l_Lean_registerTagAttribute___closed__1; @@ -109,6 +108,7 @@ extern lean_object* l_Option_HasRepr___rarg___closed__3; lean_object* l___private_Init_Lean_Compiler_ExternAttr_2__syntaxToExternAttrData(lean_object*); lean_object* lean_get_extern_attr_data(lean_object*, lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); +extern lean_object* l_Lean_Syntax_inhabited; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; lean_object* l_RBNode_find___main___at_Lean_getExternAttrData___spec__2(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); @@ -266,7 +266,7 @@ x_5 = lean_nat_dec_eq(x_2, x_4); if (x_5 == 0) { lean_object* x_6; lean_object* x_7; -x_6 = l_Lean_stxInh; +x_6 = l_Lean_Syntax_inhabited; x_7 = lean_array_get(x_6, x_1, x_2); if (lean_obj_tag(x_7) == 3) { @@ -596,7 +596,7 @@ x_6 = lean_nat_dec_eq(x_4, x_5); if (x_6 == 0) { lean_object* x_7; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_36 = l_Lean_stxInh; +x_36 = l_Lean_Syntax_inhabited; x_37 = lean_array_get(x_36, x_3, x_5); x_38 = l_Lean_numLitKind; x_39 = l_Lean_Syntax_isNatLitAux(x_38, x_37); @@ -628,7 +628,7 @@ lean_inc(x_8); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); lean_dec(x_7); -x_10 = l_Lean_stxInh; +x_10 = l_Lean_Syntax_inhabited; x_11 = lean_array_get(x_10, x_3, x_9); x_12 = l_Lean_Syntax_isStrLit_x3f(x_11); lean_dec(x_11); diff --git a/stage0/stdlib/Init/Lean/Data/Name.c b/stage0/stdlib/Init/Lean/Data/Name.c index 9ba2c2a350..f14d6617c4 100644 --- a/stage0/stdlib/Init/Lean/Data/Name.c +++ b/stage0/stdlib/Init/Lean/Data/Name.c @@ -29,7 +29,6 @@ uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*); lean_object* l_Lean_Name_isInternal___boxed(lean_object*); lean_object* l_Lean_NameSet_HasEmptyc; lean_object* l_Lean_Name_isPrefixOf___main___boxed(lean_object*, lean_object*); -lean_object* l_Lean_Name_HasBeq; uint8_t l_Lean_Name_DecidableRel(lean_object*, lean_object*); lean_object* l_Lean_Name_quickLt___boxed(lean_object*, lean_object*); lean_object* l_Lean_Name_getNumParts___main___boxed(lean_object*); @@ -103,7 +102,6 @@ lean_object* l_RBNode_find___main___at_Lean_NameMap_find___spec__1(lean_object*) lean_object* l_Lean_Name_getPrefix___boxed(lean_object*); lean_object* l_Lean_Name_append(lean_object*, lean_object*); lean_object* l_Lean_Name_components_x27___main(lean_object*); -lean_object* l_Lean_Name_beq___boxed(lean_object*, lean_object*); uint8_t l_Lean_Name_isAnonymous(lean_object*); lean_object* l_RBNode_ins___main___at_Lean_NameSet_insert___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_NameSet_Inhabited; @@ -112,7 +110,6 @@ lean_object* l_Lean_Name_replacePrefix___boxed(lean_object*, lean_object*, lean_ lean_object* l_List_foldl___main___at_String_toName___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Name_getPrefix(lean_object*); lean_object* l_RBNode_setBlack___rarg(lean_object*); -lean_object* l_Lean_Name_HasBeq___closed__1; lean_object* l_Lean_Name_append___main___boxed(lean_object*, lean_object*); lean_object* l_String_trim(lean_object*); uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*); @@ -314,33 +311,6 @@ x_3 = l_List_reverse___rarg(x_2); return x_3; } } -lean_object* l_Lean_Name_beq___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = lean_name_eq(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -x_4 = lean_box(x_3); -return x_4; -} -} -lean_object* _init_l_Lean_Name_HasBeq___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Name_beq___boxed), 2, 0); -return x_1; -} -} -lean_object* _init_l_Lean_Name_HasBeq() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_Name_HasBeq___closed__1; -return x_1; -} -} uint8_t l_Lean_Name_eqStr(lean_object* x_1, lean_object* x_2) { _start: { @@ -8997,10 +8967,6 @@ l_Lean_stringToName___closed__1 = _init_l_Lean_stringToName___closed__1(); lean_mark_persistent(l_Lean_stringToName___closed__1); l_Lean_stringToName = _init_l_Lean_stringToName(); lean_mark_persistent(l_Lean_stringToName); -l_Lean_Name_HasBeq___closed__1 = _init_l_Lean_Name_HasBeq___closed__1(); -lean_mark_persistent(l_Lean_Name_HasBeq___closed__1); -l_Lean_Name_HasBeq = _init_l_Lean_Name_HasBeq(); -lean_mark_persistent(l_Lean_Name_HasBeq); l_Lean_Name_HasAppend___closed__1 = _init_l_Lean_Name_HasAppend___closed__1(); lean_mark_persistent(l_Lean_Name_HasAppend___closed__1); l_Lean_Name_HasAppend = _init_l_Lean_Name_HasAppend(); diff --git a/stage0/stdlib/Init/Lean/Elab/BuiltinNotation.c b/stage0/stdlib/Init/Lean/Elab/BuiltinNotation.c index 5f90eff8c1..b43cfc0405 100644 --- a/stage0/stdlib/Init/Lean/Elab/BuiltinNotation.c +++ b/stage0/stdlib/Init/Lean/Elab/BuiltinNotation.c @@ -246,7 +246,6 @@ lean_object* l_Lean_Elab_Term_elabSubtype___lambda__1___closed__11; lean_object* l_Lean_Elab_Term_elabAnoymousCtor___closed__2; extern lean_object* l_Lean_Expr_heq_x3f___closed__2; lean_object* l_Lean_Elab_Term_elabDiv___closed__2; -lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabWhere___lambda__1(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_sub___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_elabDollarProj(lean_object*, lean_object*, lean_object*, lean_object*); @@ -277,6 +276,7 @@ extern lean_object* l___private_Init_Lean_Elab_Quotation_4__quoteOption___rarg__ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabDiv___closed__3; lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabBNe___closed__3; lean_object* l_Lean_Elab_Term_elabProd___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabTermAux___main(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_mod___elambda__1___closed__1; extern lean_object* l___private_Init_Lean_Elab_Quotation_13__letBindRhss___main___closed__15; lean_object* l_Lean_Elab_Term_elabMapRev___closed__1; @@ -2537,7 +2537,7 @@ lean_ctor_set(x_60, 0, x_1); lean_ctor_set(x_60, 1, x_59); lean_ctor_set(x_3, 8, x_60); x_61 = 1; -x_62 = l_Lean_Elab_Term_elabTerm(x_57, x_2, x_61, x_61, x_3, x_26); +x_62 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_61, x_61, x_57, x_3, x_26); return x_62; } else @@ -2581,7 +2581,7 @@ lean_ctor_set(x_75, 8, x_74); lean_ctor_set(x_75, 9, x_72); lean_ctor_set_uint8(x_75, sizeof(void*)*10, x_73); x_76 = 1; -x_77 = l_Lean_Elab_Term_elabTerm(x_57, x_2, x_76, x_76, x_75, x_26); +x_77 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_76, x_76, x_57, x_75, x_26); return x_77; } } @@ -5294,7 +5294,7 @@ x_12 = lean_array_push(x_11, x_9); x_13 = l_Array_iterateMAux___main___at_Lean_mkAppStx___spec__1(x_12, x_12, x_6, x_1); lean_dec(x_12); x_14 = 1; -x_15 = l_Lean_Elab_Term_elabTerm(x_13, x_3, x_14, x_14, x_4, x_5); +x_15 = l_Lean_Elab_Term_elabTermAux___main(x_3, x_14, x_14, x_13, x_4, x_5); return x_15; } } diff --git a/stage0/stdlib/Init/Lean/Elab/Command.c b/stage0/stdlib/Init/Lean/Elab/Command.c index 808cfead56..218e780fe8 100644 --- a/stage0/stdlib/Init/Lean/Elab/Command.c +++ b/stage0/stdlib/Init/Lean/Elab/Command.c @@ -18,6 +18,7 @@ uint8_t l_AssocList_contains___main___at_Lean_Elab_Command_addBuiltinCommandElab lean_object* l_Lean_Elab_Command_elabVariable(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_14__addScopes___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___main___spec__7(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__4; lean_object* l_Lean_Elab_Command_elabSection(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace(lean_object*); @@ -27,6 +28,7 @@ lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__3; lean_object* l_List_head_x21___at_Lean_Elab_Command_getScope___spec__1(lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabUniverses___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_catchExceptions(lean_object*, lean_object*, lean_object*); +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___main___spec__3___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_check___closed__1; lean_object* l_Lean_Syntax_isNatLitAux(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_getOptions(lean_object*, lean_object*); @@ -36,17 +38,16 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabInitQuot___closed__ 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_Lean_Elab_Command_elabCommand___main___closed__3; lean_object* lean_nat_div(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabCommandAux___closed__3; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabReserve(lean_object*); -lean_object* l_Lean_Elab_Command_elabCommandAux(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__2; extern lean_object* l_Lean_nameToExprAux___main___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabOpen___closed__3; lean_object* l_unreachable_x21___rarg(lean_object*); extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Elab_Command_withNamespace(lean_object*); -extern lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +extern lean_object* l_Lean_Elab_Term_elabTermAux___main___closed__6; lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__1; lean_object* l_Lean_Elab_Command_trace___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__1; @@ -60,12 +61,13 @@ lean_object* lean_array_uget(lean_object*, size_t); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable(lean_object*); lean_object* lean_io_error_to_string(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; uint8_t l_Lean_Name_lt___main(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSetOption___closed__1; lean_object* l_Lean_Elab_Command_liftIOCore(lean_object*); lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); +lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___main___spec__6___boxed(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___main___spec__6(lean_object*, lean_object*); extern lean_object* l_Lean_registerTraceClass___closed__1; lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_logTrace___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftIO(lean_object*); @@ -79,10 +81,8 @@ lean_object* lean_array_fswap(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_runTermElabM___rarg___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSetOption___closed__2; lean_object* l_Lean_Elab_Command_elabCheck___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommandAux___spec__3___boxed(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_Meta_SynthInstance_SynthM_inhabited___lambda__1___boxed(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_stxInh; lean_object* l___private_Init_Lean_Elab_Command_17__checkEndHeader___main___boxed(lean_object*, lean_object*); 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*); lean_object* l_Lean_Elab_Command_throwUnsupportedSyntax___boxed(lean_object*, lean_object*); @@ -91,7 +91,6 @@ extern lean_object* l_Lean_verboseOption___closed__3; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__2(lean_object*, lean_object*, lean_object*); lean_object* lean_environment_find(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withFreshMacroScope___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommandAux___spec__4___boxed(lean_object*, lean_object*, 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; lean_object* l_Lean_Elab_Command_elabOpen___boxed(lean_object*, lean_object*, lean_object*); @@ -110,13 +109,12 @@ uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__2; lean_object* l___private_Init_Lean_Elab_Command_9__mkTermContext___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_io_ref_get(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabCommandAux___closed__5; lean_object* l_Lean_Elab_Command_compileDecl(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse(lean_object*); +lean_object* l_Lean_Elab_Command_elabCommand___main___closed__7; lean_object* l_Lean_Elab_Command_getCurrMacroScope___boxed(lean_object*, lean_object*); uint8_t l_PersistentHashMap_containsAtAux___main___at_Lean_Parser_mkFreshKindAux___main___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_reprint___main(lean_object*); -lean_object* l_Lean_Elab_Command_elabCommandAux___closed__6; 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___private_Init_Lean_Elab_Command_14__addScopes___main___closed__2; @@ -139,7 +137,6 @@ lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__11; extern lean_object* l_Lean_Name_inhabited; lean_object* l_PersistentArray_push___rarg(lean_object*, lean_object*); lean_object* lean_add_alias(lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_setOption(lean_object*, lean_object*, 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; @@ -151,6 +148,7 @@ lean_object* l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___sp 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_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__1___boxed(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___private_Init_Lean_Elab_Term_20__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Exception_inhabited___closed__1; @@ -164,11 +162,13 @@ lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_throwError___spec__3 lean_object* l_Lean_Elab_Command_elabSetOption___closed__3; extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; lean_object* l_Lean_Elab_Command_elabSynth___closed__2; +extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; 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_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_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__5___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_AttributeImpl_inhabited___closed__2; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__9; @@ -225,13 +225,11 @@ 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_SMap_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_logAt___at_Lean_Elab_Command_logTrace___spec__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getOptionDecl(lean_object*, lean_object*); 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_numLitKind; -extern lean_object* l_Lean_Elab_Term_elabTerm___closed__6; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNotation___closed__2; lean_object* l_Lean_Elab_Command_elabExport___closed__3; lean_object* l_Lean_Elab_Command_dbgTrace(lean_object*); @@ -259,14 +257,12 @@ 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*); uint8_t l_PersistentHashMap_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__4(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__3; lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel(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_Lean_Elab_Command_CommandElabM_monadLog___closed__4; -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommandAux___spec__3(lean_object*, size_t, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__3; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); uint8_t l_HashMapImp_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__2(lean_object*, lean_object*); @@ -275,20 +271,19 @@ extern lean_object* l___private_Init_Lean_Meta_ExprDefEq_17__checkTypesAndAssign lean_object* l_Lean_Elab_Command_elabOpenRenaming(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_mkConst___closed__4; lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); -lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommandAux___spec__6(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabCommand___main___closed__6; lean_object* l_Lean_Elab_Command_resolveNamespace(lean_object*, lean_object*, lean_object*); uint8_t l___private_Init_Lean_Elab_Command_16__checkAnonymousScope(lean_object*); lean_object* l_Lean_Elab_Command_addBuiltinCommandElab___closed__1; lean_object* l_Lean_Elab_Command_mkState(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabCommandAux___closed__7; lean_object* l___private_Init_Lean_Elab_Command_11__getVarDecls(lean_object*); 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_SMap_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState; size_t l_Lean_Name_hash(lean_object*); +lean_object* l_Lean_Elab_Term_elabTermAux___main(lean_object*, uint8_t, uint8_t, lean_object*, 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*); @@ -305,7 +300,6 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverses(lean_obje 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_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_14__addScopes___main___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_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -316,6 +310,7 @@ lean_object* l_Lean_Elab_Command_getScopes(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; uint8_t l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__7(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabCommand___main___closed__5; 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; @@ -330,6 +325,7 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabExport___closed__1; size_t lean_usize_modn(size_t, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_9__mkTermContext(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_elabCommand___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withLogging(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinAttribute(lean_object*, lean_object*); lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*); @@ -338,6 +334,7 @@ lean_object* l_Lean_Elab_Command_elabSynth___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__1___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_List_head_x21___rarg___closed__2; lean_object* l_PersistentHashMap_containsAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__5___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___main___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable___closed__2; extern lean_object* l_Lean_Parser_Command_open___elambda__1___closed__2; uint8_t l_Array_contains___at_Lean_findField_x3f___main___spec__1(lean_object*, lean_object*); @@ -369,7 +366,6 @@ lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___clos 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_Elab_Command_elabCommandAux___closed__4; 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*); @@ -377,6 +373,7 @@ 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; +lean_object* l_Lean_Elab_Command_elabCommand___main___closed__2; extern lean_object* l_Lean_Parser_Command_notation___elambda__1___closed__2; size_t l_USize_land(size_t, size_t); lean_object* l_List_head_x21___at_Lean_Elab_Command_getScope___spec__1___boxed(lean_object*); @@ -390,19 +387,19 @@ lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog; lean_object* l_Lean_Elab_Command_addUnivLevel(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix___closed__3; -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommandAux___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabCommandAux___closed__1; lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__4; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSynth___closed__1; lean_object* l___private_Init_Lean_Elab_Command_2__getState(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_universe___elambda__1___closed__2; -lean_object* l_Lean_Elab_Command_elabCommandAux___closed__2; +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___main___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabOpen___closed__2; extern lean_object* l_Bool_HasRepr___closed__1; +extern lean_object* l_Lean_Syntax_inhabited; lean_object* l_Lean_Meta_synthInstance(lean_object*, lean_object*, lean_object*); 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_Lean_Elab_Command_elabCommand___main___closed__1; 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_Command_elabReserve(lean_object*, lean_object*); @@ -443,6 +440,7 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__5; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__2; lean_object* l___private_Init_Lean_Elab_Command_14__addScopes___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabCommand___main___closed__4; lean_object* l_Lean_Elab_Command_withIncRecDepth(lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__3; @@ -459,6 +457,7 @@ lean_object* l_Lean_Elab_Command_elabReserve___rarg(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabInitQuot(lean_object*); lean_object* l_Lean_Elab_Command_withDeclId___closed__2; +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__2(lean_object*, lean_object*); 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*); @@ -473,6 +472,7 @@ lean_object* l_Lean_Elab_Command_getOpenDecls(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__4; lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__3; lean_object* l_Lean_Elab_Command_trace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___main___spec__3(lean_object*, size_t, lean_object*); extern lean_object* l_Lean_Parser_Command_export___elambda__1___closed__2; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabEnd___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__3; @@ -487,7 +487,9 @@ lean_object* l___private_Init_Lean_Elab_Command_13__addScope(lean_object*, lean_ extern lean_object* l_Lean_mkOptionalNode___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__4; lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*); +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute___closed__3; +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__1(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*); @@ -503,9 +505,11 @@ lean_object* l___private_Init_Lean_Elab_Command_14__addScopes___main(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_elabVariable___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_DataValue_sameCtor(lean_object*, lean_object*); +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__5(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Term_6__fromMetaState(lean_object*, 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_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___main___spec__4___boxed(lean_object*, lean_object*, lean_object*, 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; @@ -520,7 +524,6 @@ 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___regBuiltinCommandElab_Lean_Elab_Command_elabSynth(lean_object*); lean_object* l_Lean_Elab_Command_liftIOCore___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommandAux___spec__6___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_logUnknownDecl___closed__2; lean_object* l_List_foldl___main___at_Lean_addMacroScopes___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute(lean_object*); @@ -533,7 +536,6 @@ lean_object* l_ReaderT_bind___at_Lean_Elab_Command_CommandElabM_monadLog___spec_ 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*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__2___boxed(lean_object*, lean_object*); uint8_t l___private_Init_Lean_Elab_Command_17__checkEndHeader(lean_object*, lean_object*); lean_object* l_Lean_Syntax_asNode(lean_object*); lean_object* l___private_Init_Lean_Elab_Command_12__toCommandResult___rarg___closed__1; @@ -549,8 +551,8 @@ lean_object* l_Lean_Elab_Command_elabInitQuot(lean_object*, lean_object*, lean_o lean_object* l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(lean_object*, 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*); +extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1; 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_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__5___boxed(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; @@ -580,17 +582,16 @@ 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*); extern lean_object* l_Lean_Parser_regBuiltinCommandParserAttr___closed__3; -lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__5(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_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_resolveNamespace(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Parser_Parser_18__BuiltinParserAttribute_add___closed__2; extern lean_object* l_Lean_NameGenerator_Inhabited___closed__3; lean_object* l_Lean_Elab_Command_Exception_inhabited; 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*); +lean_object* l_Lean_Elab_expandMacro(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_HashMapImp_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_logTrace___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); @@ -4018,7 +4019,7 @@ goto block_23; else { lean_object* x_41; uint8_t x_42; -x_41 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1; +x_41 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1; x_42 = lean_string_dec_eq(x_36, x_41); lean_dec(x_36); if (x_42 == 0) @@ -4634,7 +4635,65 @@ x_5 = l___private_Init_Lean_Elab_Command_8__elabCommandUsing___main(x_1, x_2, x_ return x_5; } } -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommandAux___spec__4(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_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, 5); +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, 5, 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; lean_object* x_18; +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); +x_15 = lean_ctor_get(x_3, 6); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_3); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_1); +lean_ctor_set(x_16, 1, x_14); +x_17 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_17, 0, x_9); +lean_ctor_set(x_17, 1, x_10); +lean_ctor_set(x_17, 2, x_11); +lean_ctor_set(x_17, 3, x_12); +lean_ctor_set(x_17, 4, x_13); +lean_ctor_set(x_17, 5, x_16); +lean_ctor_set(x_17, 6, x_15); +x_18 = lean_apply_2(x_2, x_17, x_4); +return x_18; +} +} +} +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_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___main___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; @@ -4676,7 +4735,7 @@ return x_15; } } } -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommandAux___spec__3(lean_object* x_1, size_t x_2, lean_object* x_3) { +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___main___spec__3(lean_object* x_1, size_t x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 0) @@ -4747,14 +4806,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_elabCommandAux___spec__4(x_20, x_21, lean_box(0), x_22, x_3); +x_23 = l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__2(lean_object* x_1, lean_object* x_2) { +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; size_t x_4; lean_object* x_5; @@ -4762,11 +4821,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_elabCommandAux___spec__3(x_3, x_4, x_2); +x_5 = l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___main___spec__3(x_3, x_4, x_2); return x_5; } } -lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommandAux___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___main___spec__6(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -4798,7 +4857,7 @@ return x_9; } } } -lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__5(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___main___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; @@ -4808,12 +4867,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_elabCommandAux___spec__6(x_2, x_7); +x_8 = l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___main___spec__6(x_2, x_7); lean_dec(x_7); return x_8; } } -lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__1(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; @@ -4826,11 +4885,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_elabCommandAux___spec__2(x_5, x_2); +x_6 = l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__5(x_4, x_2); +x_7 = l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__5(x_4, x_2); lean_dec(x_4); return x_7; } @@ -4846,13 +4905,77 @@ 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_elabCommandAux___spec__5(x_8, x_2); +x_9 = l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__5(x_8, x_2); lean_dec(x_8); return x_9; } } } -lean_object* _init_l_Lean_Elab_Command_elabCommandAux___closed__1() { +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___main___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_array_get_size(x_1); +x_6 = lean_nat_dec_lt(x_2, x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +lean_dec(x_3); +lean_dec(x_2); +x_7 = lean_box(0); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_7); +lean_ctor_set(x_8, 1, x_4); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_array_fget(x_1, x_2); +lean_inc(x_3); +x_10 = l_Lean_Elab_Command_elabCommand___main(x_9, x_3, x_4); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 1); +lean_inc(x_11); +lean_dec(x_10); +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_2, x_12); +lean_dec(x_2); +x_2 = x_13; +x_4 = x_11; +goto _start; +} +else +{ +uint8_t x_15; +lean_dec(x_3); +lean_dec(x_2); +x_15 = !lean_is_exclusive(x_10); +if (x_15 == 0) +{ +return x_10; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_10, 0); +x_17 = lean_ctor_get(x_10, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_10); +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; +} +} +} +} +} +lean_object* _init_l_Lean_Elab_Command_elabCommand___main___closed__1() { _start: { lean_object* x_1; @@ -4860,27 +4983,27 @@ x_1 = lean_mk_string("unexpected command"); return x_1; } } -lean_object* _init_l_Lean_Elab_Command_elabCommandAux___closed__2() { +lean_object* _init_l_Lean_Elab_Command_elabCommand___main___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabCommandAux___closed__1; +x_1 = l_Lean_Elab_Command_elabCommand___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_Lean_Elab_Command_elabCommandAux___closed__3() { +lean_object* _init_l_Lean_Elab_Command_elabCommand___main___closed__3() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabCommandAux___closed__2; +x_1 = l_Lean_Elab_Command_elabCommand___main___closed__2; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Command_elabCommandAux___closed__4() { +lean_object* _init_l_Lean_Elab_Command_elabCommand___main___closed__4() { _start: { lean_object* x_1; @@ -4888,37 +5011,37 @@ x_1 = lean_mk_string("command '"); return x_1; } } -lean_object* _init_l_Lean_Elab_Command_elabCommandAux___closed__5() { +lean_object* _init_l_Lean_Elab_Command_elabCommand___main___closed__5() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabCommandAux___closed__4; +x_1 = l_Lean_Elab_Command_elabCommand___main___closed__4; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Command_elabCommandAux___closed__6() { +lean_object* _init_l_Lean_Elab_Command_elabCommand___main___closed__6() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabCommandAux___closed__5; +x_1 = l_Lean_Elab_Command_elabCommand___main___closed__5; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Command_elabCommandAux___closed__7() { +lean_object* _init_l_Lean_Elab_Command_elabCommand___main___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +x_1 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; x_2 = l_Lean_Meta_isLevelDefEqAux___main___closed__5; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l_Lean_Elab_Command_elabCommandAux(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Elab_Command_elabCommand___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -5002,10 +5125,17 @@ lean_ctor_set(x_27, 3, x_31); x_32 = l___private_Init_Lean_Elab_Command_3__setState(x_27, x_2, x_28); if (lean_obj_tag(x_32) == 0) { -lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_object* x_33; lean_object* x_34; x_33 = lean_ctor_get(x_32, 1); lean_inc(x_33); lean_dec(x_32); +lean_inc(x_30); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_25); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); x_34 = lean_alloc_ctor(0, 7, 0); lean_ctor_set(x_34, 0, x_7); lean_ctor_set(x_34, 1, x_8); @@ -5016,101 +5146,107 @@ lean_ctor_set(x_34, 5, x_12); lean_ctor_set(x_34, 6, x_30); if (lean_obj_tag(x_1) == 1) { -lean_object* x_62; +lean_object* x_35; lean_object* x_85; lean_inc(x_34); -x_62 = l_Lean_Elab_Command_getOptions(x_34, x_33); -if (lean_obj_tag(x_62) == 0) +x_85 = l_Lean_Elab_Command_getOptions(x_34, x_33); +if (lean_obj_tag(x_85) == 0) { -lean_object* x_63; lean_object* x_64; lean_object* x_65; uint8_t x_66; -x_63 = lean_ctor_get(x_62, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_62, 1); -lean_inc(x_64); -lean_dec(x_62); -x_65 = l_Lean_Elab_Command_elabCommandAux___closed__7; -x_66 = l_Lean_checkTraceOption(x_63, x_65); -lean_dec(x_63); -if (x_66 == 0) +lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; +x_86 = lean_ctor_get(x_85, 0); +lean_inc(x_86); +x_87 = lean_ctor_get(x_85, 1); +lean_inc(x_87); +lean_dec(x_85); +x_88 = l_Lean_Elab_Command_elabCommand___main___closed__7; +x_89 = l_Lean_checkTraceOption(x_86, x_88); +lean_dec(x_86); +if (x_89 == 0) { -x_35 = x_64; -goto block_61; +x_35 = x_87; +goto block_84; } else { -lean_object* x_67; lean_object* x_68; +lean_object* x_90; lean_object* x_91; lean_inc(x_1); -x_67 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_67, 0, x_1); +x_90 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_90, 0, x_1); lean_inc(x_34); -x_68 = l_Lean_Elab_Command_logTrace(x_65, x_1, x_67, x_34, x_64); -if (lean_obj_tag(x_68) == 0) +x_91 = l_Lean_Elab_Command_logTrace(x_88, x_1, x_90, x_34, x_87); +if (lean_obj_tag(x_91) == 0) { -lean_object* x_69; -x_69 = lean_ctor_get(x_68, 1); -lean_inc(x_69); -lean_dec(x_68); -x_35 = x_69; -goto block_61; +lean_object* x_92; +x_92 = lean_ctor_get(x_91, 1); +lean_inc(x_92); +lean_dec(x_91); +x_35 = x_92; +goto block_84; } else { -uint8_t x_70; +uint8_t x_93; lean_dec(x_34); +lean_dec(x_30); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); lean_dec(x_1); -x_70 = !lean_is_exclusive(x_68); -if (x_70 == 0) +x_93 = !lean_is_exclusive(x_91); +if (x_93 == 0) { -return x_68; +return x_91; } else { -lean_object* x_71; lean_object* x_72; lean_object* x_73; -x_71 = lean_ctor_get(x_68, 0); -x_72 = lean_ctor_get(x_68, 1); -lean_inc(x_72); -lean_inc(x_71); -lean_dec(x_68); -x_73 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_73, 0, x_71); -lean_ctor_set(x_73, 1, x_72); -return x_73; +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_91, 0); +x_95 = lean_ctor_get(x_91, 1); +lean_inc(x_95); +lean_inc(x_94); +lean_dec(x_91); +x_96 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_96, 0, x_94); +lean_ctor_set(x_96, 1, x_95); +return x_96; } } } } else { -uint8_t x_74; +uint8_t x_97; lean_dec(x_34); +lean_dec(x_30); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); lean_dec(x_1); -x_74 = !lean_is_exclusive(x_62); -if (x_74 == 0) +x_97 = !lean_is_exclusive(x_85); +if (x_97 == 0) { -return x_62; +return x_85; } else { -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_62, 0); -x_76 = lean_ctor_get(x_62, 1); -lean_inc(x_76); -lean_inc(x_75); -lean_dec(x_62); -x_77 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_77, 0, x_75); -lean_ctor_set(x_77, 1, x_76); -return x_77; +lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_85, 0); +x_99 = lean_ctor_get(x_85, 1); +lean_inc(x_99); +lean_inc(x_98); +lean_dec(x_85); +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_98); +lean_ctor_set(x_100, 1, x_99); +return x_100; } } -} -else -{ -lean_object* x_78; lean_object* x_79; -x_78 = l_Lean_Elab_Command_elabCommandAux___closed__3; -x_79 = l_Lean_Elab_Command_throwError___rarg(x_1, x_78, x_34, x_33); -return x_79; -} -block_61: +block_84: { lean_object* x_36; lean_inc(x_34); @@ -5137,67 +5273,117 @@ lean_inc(x_43); lean_dec(x_42); lean_inc(x_1); x_44 = l_Lean_Syntax_getKind(x_1); -x_45 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__1(x_43, x_44); +x_45 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__1(x_43, x_44); 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; lean_object* x_53; lean_object* x_54; -x_46 = l_Lean_Name_toString___closed__1; -x_47 = l_Lean_Name_toStringWithSep___main(x_46, x_44); -x_48 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_48, 0, x_47); -x_49 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_49, 0, x_48); -x_50 = l_Lean_Elab_Command_elabCommandAux___closed__6; -x_51 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_51, 0, x_50); -lean_ctor_set(x_51, 1, x_49); -x_52 = l_Lean_Elab_Term_elabTerm___closed__6; -x_53 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_53, 0, x_51); -lean_ctor_set(x_53, 1, x_52); -x_54 = l_Lean_Elab_Command_throwError___rarg(x_1, x_53, x_34, x_38); -return x_54; -} -else +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_46 = l_Lean_Elab_Command_getCurrMacroScope(x_34, x_38); +x_47 = lean_ctor_get(x_46, 0); +lean_inc(x_47); +x_48 = lean_ctor_get(x_46, 1); +lean_inc(x_48); +lean_dec(x_46); +lean_inc(x_34); +x_49 = l_Lean_Elab_Command_getEnv(x_34, x_48); +if (lean_obj_tag(x_49) == 0) { -lean_object* x_55; lean_object* x_56; -lean_dec(x_44); -x_55 = lean_ctor_get(x_45, 0); -lean_inc(x_55); -lean_dec(x_45); -x_56 = l___private_Init_Lean_Elab_Command_8__elabCommandUsing___main(x_1, x_55, x_34, x_38); -return x_56; -} -} -else +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_49, 0); +lean_inc(x_50); +x_51 = lean_ctor_get(x_49, 1); +lean_inc(x_51); +lean_dec(x_49); +lean_inc(x_1); +x_52 = l_Lean_Elab_expandMacro(x_50, x_1, x_47); +lean_dec(x_50); +if (lean_obj_tag(x_52) == 0) { -uint8_t x_57; -lean_dec(x_34); -lean_dec(x_1); -x_57 = !lean_is_exclusive(x_36); -if (x_57 == 0) -{ -return x_36; -} -else -{ -lean_object* x_58; lean_object* x_59; lean_object* x_60; -x_58 = lean_ctor_get(x_36, 0); -x_59 = lean_ctor_get(x_36, 1); -lean_inc(x_59); -lean_inc(x_58); -lean_dec(x_36); -x_60 = lean_alloc_ctor(1, 2, 0); +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_dec(x_30); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_53 = l_Lean_Name_toString___closed__1; +x_54 = l_Lean_Name_toStringWithSep___main(x_53, x_44); +x_55 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_55, 0, x_54); +x_56 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_56, 0, x_55); +x_57 = l_Lean_Elab_Command_elabCommand___main___closed__6; +x_58 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_56); +x_59 = l_Lean_Elab_Term_elabTermAux___main___closed__6; +x_60 = lean_alloc_ctor(8, 2, 0); lean_ctor_set(x_60, 0, x_58); lean_ctor_set(x_60, 1, x_59); -return x_60; +x_61 = l_Lean_Elab_Command_throwError___rarg(x_1, x_60, x_34, x_51); +return x_61; } +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; uint8_t x_65; +lean_dec(x_44); +lean_dec(x_34); +x_62 = lean_ctor_get(x_52, 0); +lean_inc(x_62); +lean_dec(x_52); +lean_inc(x_62); +x_63 = l_Lean_Syntax_getKind(x_62); +x_64 = l_Lean_nullKind; +x_65 = lean_name_eq(x_63, x_64); +lean_dec(x_63); +if (x_65 == 0) +{ +lean_object* x_66; lean_object* x_67; +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_1); +lean_ctor_set(x_66, 1, x_12); +x_67 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_67, 0, x_7); +lean_ctor_set(x_67, 1, x_8); +lean_ctor_set(x_67, 2, x_9); +lean_ctor_set(x_67, 3, x_25); +lean_ctor_set(x_67, 4, x_11); +lean_ctor_set(x_67, 5, x_66); +lean_ctor_set(x_67, 6, x_30); +x_1 = x_62; +x_2 = x_67; +x_3 = x_51; +goto _start; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_69 = l_Lean_Syntax_getArgs(x_62); +lean_dec(x_62); +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_1); +lean_ctor_set(x_70, 1, x_12); +x_71 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_71, 0, x_7); +lean_ctor_set(x_71, 1, x_8); +lean_ctor_set(x_71, 2, x_9); +lean_ctor_set(x_71, 3, x_25); +lean_ctor_set(x_71, 4, x_11); +lean_ctor_set(x_71, 5, x_70); +lean_ctor_set(x_71, 6, x_30); +x_72 = lean_unsigned_to_nat(0u); +x_73 = l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___main___spec__7(x_69, x_72, x_71, x_51); +lean_dec(x_69); +return x_73; } } } else { -uint8_t x_80; +uint8_t x_74; +lean_dec(x_47); +lean_dec(x_44); +lean_dec(x_34); lean_dec(x_30); lean_dec(x_25); lean_dec(x_12); @@ -5206,19 +5392,69 @@ lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_1); -x_80 = !lean_is_exclusive(x_32); +x_74 = !lean_is_exclusive(x_49); +if (x_74 == 0) +{ +return x_49; +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_75 = lean_ctor_get(x_49, 0); +x_76 = lean_ctor_get(x_49, 1); +lean_inc(x_76); +lean_inc(x_75); +lean_dec(x_49); +x_77 = lean_alloc_ctor(1, 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_dec(x_44); +lean_dec(x_30); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_78 = lean_ctor_get(x_45, 0); +lean_inc(x_78); +lean_dec(x_45); +x_79 = l___private_Init_Lean_Elab_Command_8__elabCommandUsing___main(x_1, x_78, x_34, x_38); +return x_79; +} +} +else +{ +uint8_t x_80; +lean_dec(x_34); +lean_dec(x_30); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_80 = !lean_is_exclusive(x_36); if (x_80 == 0) { -return x_32; +return x_36; } else { lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_81 = lean_ctor_get(x_32, 0); -x_82 = lean_ctor_get(x_32, 1); +x_81 = lean_ctor_get(x_36, 0); +x_82 = lean_ctor_get(x_36, 1); lean_inc(x_82); lean_inc(x_81); -lean_dec(x_32); +lean_dec(x_36); x_83 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_83, 0, x_81); lean_ctor_set(x_83, 1, x_82); @@ -5226,233 +5462,26 @@ return x_83; } } } -else -{ -lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; -x_84 = lean_ctor_get(x_27, 0); -x_85 = lean_ctor_get(x_27, 1); -x_86 = lean_ctor_get(x_27, 2); -x_87 = lean_ctor_get(x_27, 3); -x_88 = lean_ctor_get(x_27, 4); -lean_inc(x_88); -lean_inc(x_87); -lean_inc(x_86); -lean_inc(x_85); -lean_inc(x_84); -lean_dec(x_27); -x_89 = lean_nat_add(x_87, x_24); -x_90 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_90, 0, x_84); -lean_ctor_set(x_90, 1, x_85); -lean_ctor_set(x_90, 2, x_86); -lean_ctor_set(x_90, 3, x_89); -lean_ctor_set(x_90, 4, x_88); -x_91 = l___private_Init_Lean_Elab_Command_3__setState(x_90, x_2, x_28); -if (lean_obj_tag(x_91) == 0) -{ -lean_object* x_92; lean_object* x_93; lean_object* x_94; -x_92 = lean_ctor_get(x_91, 1); -lean_inc(x_92); -lean_dec(x_91); -x_93 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_93, 0, x_7); -lean_ctor_set(x_93, 1, x_8); -lean_ctor_set(x_93, 2, x_9); -lean_ctor_set(x_93, 3, x_25); -lean_ctor_set(x_93, 4, x_11); -lean_ctor_set(x_93, 5, x_12); -lean_ctor_set(x_93, 6, x_87); -if (lean_obj_tag(x_1) == 1) -{ -lean_object* x_121; -lean_inc(x_93); -x_121 = l_Lean_Elab_Command_getOptions(x_93, x_92); -if (lean_obj_tag(x_121) == 0) -{ -lean_object* x_122; lean_object* x_123; lean_object* x_124; uint8_t x_125; -x_122 = lean_ctor_get(x_121, 0); -lean_inc(x_122); -x_123 = lean_ctor_get(x_121, 1); -lean_inc(x_123); -lean_dec(x_121); -x_124 = l_Lean_Elab_Command_elabCommandAux___closed__7; -x_125 = l_Lean_checkTraceOption(x_122, x_124); -lean_dec(x_122); -if (x_125 == 0) -{ -x_94 = x_123; -goto block_120; } else { -lean_object* x_126; lean_object* x_127; -lean_inc(x_1); -x_126 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_126, 0, x_1); -lean_inc(x_93); -x_127 = l_Lean_Elab_Command_logTrace(x_124, x_1, x_126, x_93, x_123); -if (lean_obj_tag(x_127) == 0) -{ -lean_object* x_128; -x_128 = lean_ctor_get(x_127, 1); -lean_inc(x_128); -lean_dec(x_127); -x_94 = x_128; -goto block_120; -} -else -{ -lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; -lean_dec(x_93); -lean_dec(x_1); -x_129 = lean_ctor_get(x_127, 0); -lean_inc(x_129); -x_130 = lean_ctor_get(x_127, 1); -lean_inc(x_130); -if (lean_is_exclusive(x_127)) { - lean_ctor_release(x_127, 0); - lean_ctor_release(x_127, 1); - x_131 = x_127; -} else { - lean_dec_ref(x_127); - x_131 = lean_box(0); -} -if (lean_is_scalar(x_131)) { - x_132 = lean_alloc_ctor(1, 2, 0); -} else { - x_132 = x_131; -} -lean_ctor_set(x_132, 0, x_129); -lean_ctor_set(x_132, 1, x_130); -return x_132; -} +lean_object* x_101; lean_object* x_102; +lean_dec(x_30); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_101 = l_Lean_Elab_Command_elabCommand___main___closed__3; +x_102 = l_Lean_Elab_Command_throwError___rarg(x_1, x_101, x_34, x_33); +return x_102; } } else { -lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; -lean_dec(x_93); -lean_dec(x_1); -x_133 = lean_ctor_get(x_121, 0); -lean_inc(x_133); -x_134 = lean_ctor_get(x_121, 1); -lean_inc(x_134); -if (lean_is_exclusive(x_121)) { - lean_ctor_release(x_121, 0); - lean_ctor_release(x_121, 1); - x_135 = x_121; -} else { - lean_dec_ref(x_121); - x_135 = lean_box(0); -} -if (lean_is_scalar(x_135)) { - x_136 = lean_alloc_ctor(1, 2, 0); -} else { - x_136 = x_135; -} -lean_ctor_set(x_136, 0, x_133); -lean_ctor_set(x_136, 1, x_134); -return x_136; -} -} -else -{ -lean_object* x_137; lean_object* x_138; -x_137 = l_Lean_Elab_Command_elabCommandAux___closed__3; -x_138 = l_Lean_Elab_Command_throwError___rarg(x_1, x_137, x_93, x_92); -return x_138; -} -block_120: -{ -lean_object* x_95; -lean_inc(x_93); -x_95 = l___private_Init_Lean_Elab_Command_2__getState(x_93, x_94); -if (lean_obj_tag(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; lean_object* x_103; lean_object* x_104; -x_96 = lean_ctor_get(x_95, 0); -lean_inc(x_96); -x_97 = lean_ctor_get(x_95, 1); -lean_inc(x_97); -lean_dec(x_95); -x_98 = l_Lean_Elab_Command_commandElabAttribute; -x_99 = lean_ctor_get(x_98, 1); -lean_inc(x_99); -x_100 = lean_ctor_get(x_96, 0); -lean_inc(x_100); -lean_dec(x_96); -x_101 = l_Lean_PersistentEnvExtension_getState___rarg(x_99, x_100); -lean_dec(x_100); -lean_dec(x_99); -x_102 = lean_ctor_get(x_101, 1); -lean_inc(x_102); -lean_dec(x_101); -lean_inc(x_1); -x_103 = l_Lean_Syntax_getKind(x_1); -x_104 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__1(x_102, x_103); -if (lean_obj_tag(x_104) == 0) -{ -lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; -x_105 = l_Lean_Name_toString___closed__1; -x_106 = l_Lean_Name_toStringWithSep___main(x_105, x_103); -x_107 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_107, 0, x_106); -x_108 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_108, 0, x_107); -x_109 = l_Lean_Elab_Command_elabCommandAux___closed__6; -x_110 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_110, 0, x_109); -lean_ctor_set(x_110, 1, x_108); -x_111 = l_Lean_Elab_Term_elabTerm___closed__6; -x_112 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_112, 0, x_110); -lean_ctor_set(x_112, 1, x_111); -x_113 = l_Lean_Elab_Command_throwError___rarg(x_1, x_112, x_93, x_97); -return x_113; -} -else -{ -lean_object* x_114; lean_object* x_115; -lean_dec(x_103); -x_114 = lean_ctor_get(x_104, 0); -lean_inc(x_114); -lean_dec(x_104); -x_115 = l___private_Init_Lean_Elab_Command_8__elabCommandUsing___main(x_1, x_114, x_93, x_97); -return x_115; -} -} -else -{ -lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; -lean_dec(x_93); -lean_dec(x_1); -x_116 = lean_ctor_get(x_95, 0); -lean_inc(x_116); -x_117 = lean_ctor_get(x_95, 1); -lean_inc(x_117); -if (lean_is_exclusive(x_95)) { - lean_ctor_release(x_95, 0); - lean_ctor_release(x_95, 1); - x_118 = x_95; -} else { - lean_dec_ref(x_95); - x_118 = lean_box(0); -} -if (lean_is_scalar(x_118)) { - x_119 = lean_alloc_ctor(1, 2, 0); -} else { - x_119 = x_118; -} -lean_ctor_set(x_119, 0, x_116); -lean_ctor_set(x_119, 1, x_117); -return x_119; -} -} -} -else -{ -lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; -lean_dec(x_87); +uint8_t x_103; +lean_dec(x_30); lean_dec(x_25); lean_dec(x_12); lean_dec(x_11); @@ -5460,32 +5489,448 @@ lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_1); -x_139 = lean_ctor_get(x_91, 0); -lean_inc(x_139); -x_140 = lean_ctor_get(x_91, 1); -lean_inc(x_140); -if (lean_is_exclusive(x_91)) { - lean_ctor_release(x_91, 0); - lean_ctor_release(x_91, 1); - x_141 = x_91; -} else { - lean_dec_ref(x_91); - x_141 = lean_box(0); +x_103 = !lean_is_exclusive(x_32); +if (x_103 == 0) +{ +return x_32; } -if (lean_is_scalar(x_141)) { - x_142 = lean_alloc_ctor(1, 2, 0); -} else { - x_142 = x_141; -} -lean_ctor_set(x_142, 0, x_139); -lean_ctor_set(x_142, 1, x_140); -return x_142; +else +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; +x_104 = lean_ctor_get(x_32, 0); +x_105 = lean_ctor_get(x_32, 1); +lean_inc(x_105); +lean_inc(x_104); +lean_dec(x_32); +x_106 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_106, 0, x_104); +lean_ctor_set(x_106, 1, x_105); +return x_106; } } } else { -uint8_t x_143; +lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_107 = lean_ctor_get(x_27, 0); +x_108 = lean_ctor_get(x_27, 1); +x_109 = lean_ctor_get(x_27, 2); +x_110 = lean_ctor_get(x_27, 3); +x_111 = lean_ctor_get(x_27, 4); +lean_inc(x_111); +lean_inc(x_110); +lean_inc(x_109); +lean_inc(x_108); +lean_inc(x_107); +lean_dec(x_27); +x_112 = lean_nat_add(x_110, x_24); +x_113 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_113, 0, x_107); +lean_ctor_set(x_113, 1, x_108); +lean_ctor_set(x_113, 2, x_109); +lean_ctor_set(x_113, 3, x_112); +lean_ctor_set(x_113, 4, x_111); +x_114 = l___private_Init_Lean_Elab_Command_3__setState(x_113, x_2, x_28); +if (lean_obj_tag(x_114) == 0) +{ +lean_object* x_115; lean_object* x_116; +x_115 = lean_ctor_get(x_114, 1); +lean_inc(x_115); +lean_dec(x_114); +lean_inc(x_110); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_25); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_116 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_116, 0, x_7); +lean_ctor_set(x_116, 1, x_8); +lean_ctor_set(x_116, 2, x_9); +lean_ctor_set(x_116, 3, x_25); +lean_ctor_set(x_116, 4, x_11); +lean_ctor_set(x_116, 5, x_12); +lean_ctor_set(x_116, 6, x_110); +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_117; lean_object* x_167; +lean_inc(x_116); +x_167 = l_Lean_Elab_Command_getOptions(x_116, x_115); +if (lean_obj_tag(x_167) == 0) +{ +lean_object* x_168; lean_object* x_169; lean_object* x_170; uint8_t x_171; +x_168 = lean_ctor_get(x_167, 0); +lean_inc(x_168); +x_169 = lean_ctor_get(x_167, 1); +lean_inc(x_169); +lean_dec(x_167); +x_170 = l_Lean_Elab_Command_elabCommand___main___closed__7; +x_171 = l_Lean_checkTraceOption(x_168, x_170); +lean_dec(x_168); +if (x_171 == 0) +{ +x_117 = x_169; +goto block_166; +} +else +{ +lean_object* x_172; lean_object* x_173; +lean_inc(x_1); +x_172 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_172, 0, x_1); +lean_inc(x_116); +x_173 = l_Lean_Elab_Command_logTrace(x_170, x_1, x_172, x_116, x_169); +if (lean_obj_tag(x_173) == 0) +{ +lean_object* x_174; +x_174 = lean_ctor_get(x_173, 1); +lean_inc(x_174); +lean_dec(x_173); +x_117 = x_174; +goto block_166; +} +else +{ +lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; +lean_dec(x_116); +lean_dec(x_110); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_175 = lean_ctor_get(x_173, 0); +lean_inc(x_175); +x_176 = lean_ctor_get(x_173, 1); +lean_inc(x_176); +if (lean_is_exclusive(x_173)) { + lean_ctor_release(x_173, 0); + lean_ctor_release(x_173, 1); + x_177 = x_173; +} else { + lean_dec_ref(x_173); + x_177 = lean_box(0); +} +if (lean_is_scalar(x_177)) { + x_178 = lean_alloc_ctor(1, 2, 0); +} else { + x_178 = x_177; +} +lean_ctor_set(x_178, 0, x_175); +lean_ctor_set(x_178, 1, x_176); +return x_178; +} +} +} +else +{ +lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; +lean_dec(x_116); +lean_dec(x_110); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_179 = lean_ctor_get(x_167, 0); +lean_inc(x_179); +x_180 = lean_ctor_get(x_167, 1); +lean_inc(x_180); +if (lean_is_exclusive(x_167)) { + lean_ctor_release(x_167, 0); + lean_ctor_release(x_167, 1); + x_181 = x_167; +} else { + lean_dec_ref(x_167); + x_181 = lean_box(0); +} +if (lean_is_scalar(x_181)) { + x_182 = lean_alloc_ctor(1, 2, 0); +} else { + x_182 = x_181; +} +lean_ctor_set(x_182, 0, x_179); +lean_ctor_set(x_182, 1, x_180); +return x_182; +} +block_166: +{ +lean_object* x_118; +lean_inc(x_116); +x_118 = l___private_Init_Lean_Elab_Command_2__getState(x_116, x_117); +if (lean_obj_tag(x_118) == 0) +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; +x_119 = lean_ctor_get(x_118, 0); +lean_inc(x_119); +x_120 = lean_ctor_get(x_118, 1); +lean_inc(x_120); +lean_dec(x_118); +x_121 = l_Lean_Elab_Command_commandElabAttribute; +x_122 = lean_ctor_get(x_121, 1); +lean_inc(x_122); +x_123 = lean_ctor_get(x_119, 0); +lean_inc(x_123); +lean_dec(x_119); +x_124 = l_Lean_PersistentEnvExtension_getState___rarg(x_122, x_123); +lean_dec(x_123); +lean_dec(x_122); +x_125 = lean_ctor_get(x_124, 1); +lean_inc(x_125); +lean_dec(x_124); +lean_inc(x_1); +x_126 = l_Lean_Syntax_getKind(x_1); +x_127 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__1(x_125, x_126); +if (lean_obj_tag(x_127) == 0) +{ +lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; +x_128 = l_Lean_Elab_Command_getCurrMacroScope(x_116, x_120); +x_129 = lean_ctor_get(x_128, 0); +lean_inc(x_129); +x_130 = lean_ctor_get(x_128, 1); +lean_inc(x_130); +lean_dec(x_128); +lean_inc(x_116); +x_131 = l_Lean_Elab_Command_getEnv(x_116, x_130); +if (lean_obj_tag(x_131) == 0) +{ +lean_object* x_132; lean_object* x_133; lean_object* x_134; +x_132 = lean_ctor_get(x_131, 0); +lean_inc(x_132); +x_133 = lean_ctor_get(x_131, 1); +lean_inc(x_133); +lean_dec(x_131); +lean_inc(x_1); +x_134 = l_Lean_Elab_expandMacro(x_132, x_1, x_129); +lean_dec(x_132); +if (lean_obj_tag(x_134) == 0) +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; +lean_dec(x_110); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_135 = l_Lean_Name_toString___closed__1; +x_136 = l_Lean_Name_toStringWithSep___main(x_135, x_126); +x_137 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_137, 0, x_136); +x_138 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_138, 0, x_137); +x_139 = l_Lean_Elab_Command_elabCommand___main___closed__6; +x_140 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_140, 0, x_139); +lean_ctor_set(x_140, 1, x_138); +x_141 = l_Lean_Elab_Term_elabTermAux___main___closed__6; +x_142 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_142, 0, x_140); +lean_ctor_set(x_142, 1, x_141); +x_143 = l_Lean_Elab_Command_throwError___rarg(x_1, x_142, x_116, x_133); +return x_143; +} +else +{ +lean_object* x_144; lean_object* x_145; lean_object* x_146; uint8_t x_147; +lean_dec(x_126); +lean_dec(x_116); +x_144 = lean_ctor_get(x_134, 0); +lean_inc(x_144); +lean_dec(x_134); +lean_inc(x_144); +x_145 = l_Lean_Syntax_getKind(x_144); +x_146 = l_Lean_nullKind; +x_147 = lean_name_eq(x_145, x_146); +lean_dec(x_145); +if (x_147 == 0) +{ +lean_object* x_148; lean_object* x_149; +x_148 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_148, 0, x_1); +lean_ctor_set(x_148, 1, x_12); +x_149 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_149, 0, x_7); +lean_ctor_set(x_149, 1, x_8); +lean_ctor_set(x_149, 2, x_9); +lean_ctor_set(x_149, 3, x_25); +lean_ctor_set(x_149, 4, x_11); +lean_ctor_set(x_149, 5, x_148); +lean_ctor_set(x_149, 6, x_110); +x_1 = x_144; +x_2 = x_149; +x_3 = x_133; +goto _start; +} +else +{ +lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; +x_151 = l_Lean_Syntax_getArgs(x_144); +lean_dec(x_144); +x_152 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_152, 0, x_1); +lean_ctor_set(x_152, 1, x_12); +x_153 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_153, 0, x_7); +lean_ctor_set(x_153, 1, x_8); +lean_ctor_set(x_153, 2, x_9); +lean_ctor_set(x_153, 3, x_25); +lean_ctor_set(x_153, 4, x_11); +lean_ctor_set(x_153, 5, x_152); +lean_ctor_set(x_153, 6, x_110); +x_154 = lean_unsigned_to_nat(0u); +x_155 = l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___main___spec__7(x_151, x_154, x_153, x_133); +lean_dec(x_151); +return x_155; +} +} +} +else +{ +lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; +lean_dec(x_129); +lean_dec(x_126); +lean_dec(x_116); +lean_dec(x_110); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_156 = lean_ctor_get(x_131, 0); +lean_inc(x_156); +x_157 = lean_ctor_get(x_131, 1); +lean_inc(x_157); +if (lean_is_exclusive(x_131)) { + lean_ctor_release(x_131, 0); + lean_ctor_release(x_131, 1); + x_158 = x_131; +} else { + lean_dec_ref(x_131); + x_158 = lean_box(0); +} +if (lean_is_scalar(x_158)) { + x_159 = lean_alloc_ctor(1, 2, 0); +} else { + x_159 = x_158; +} +lean_ctor_set(x_159, 0, x_156); +lean_ctor_set(x_159, 1, x_157); +return x_159; +} +} +else +{ +lean_object* x_160; lean_object* x_161; +lean_dec(x_126); +lean_dec(x_110); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_160 = lean_ctor_get(x_127, 0); +lean_inc(x_160); +lean_dec(x_127); +x_161 = l___private_Init_Lean_Elab_Command_8__elabCommandUsing___main(x_1, x_160, x_116, x_120); +return x_161; +} +} +else +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; +lean_dec(x_116); +lean_dec(x_110); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_162 = lean_ctor_get(x_118, 0); +lean_inc(x_162); +x_163 = lean_ctor_get(x_118, 1); +lean_inc(x_163); +if (lean_is_exclusive(x_118)) { + lean_ctor_release(x_118, 0); + lean_ctor_release(x_118, 1); + x_164 = x_118; +} else { + lean_dec_ref(x_118); + x_164 = lean_box(0); +} +if (lean_is_scalar(x_164)) { + x_165 = lean_alloc_ctor(1, 2, 0); +} else { + x_165 = x_164; +} +lean_ctor_set(x_165, 0, x_162); +lean_ctor_set(x_165, 1, x_163); +return x_165; +} +} +} +else +{ +lean_object* x_183; lean_object* x_184; +lean_dec(x_110); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_183 = l_Lean_Elab_Command_elabCommand___main___closed__3; +x_184 = l_Lean_Elab_Command_throwError___rarg(x_1, x_183, x_116, x_115); +return x_184; +} +} +else +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; +lean_dec(x_110); +lean_dec(x_25); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_185 = lean_ctor_get(x_114, 0); +lean_inc(x_185); +x_186 = lean_ctor_get(x_114, 1); +lean_inc(x_186); +if (lean_is_exclusive(x_114)) { + lean_ctor_release(x_114, 0); + lean_ctor_release(x_114, 1); + x_187 = x_114; +} else { + lean_dec_ref(x_114); + x_187 = lean_box(0); +} +if (lean_is_scalar(x_187)) { + x_188 = lean_alloc_ctor(1, 2, 0); +} else { + x_188 = x_187; +} +lean_ctor_set(x_188, 0, x_185); +lean_ctor_set(x_188, 1, x_186); +return x_188; +} +} +} +else +{ +uint8_t x_189; lean_dec(x_2); lean_dec(x_25); lean_dec(x_12); @@ -5494,361 +5939,523 @@ lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_1); -x_143 = !lean_is_exclusive(x_26); -if (x_143 == 0) +x_189 = !lean_is_exclusive(x_26); +if (x_189 == 0) { return x_26; } else { -lean_object* x_144; lean_object* x_145; lean_object* x_146; -x_144 = lean_ctor_get(x_26, 0); -x_145 = lean_ctor_get(x_26, 1); -lean_inc(x_145); -lean_inc(x_144); +lean_object* x_190; lean_object* x_191; lean_object* x_192; +x_190 = lean_ctor_get(x_26, 0); +x_191 = lean_ctor_get(x_26, 1); +lean_inc(x_191); +lean_inc(x_190); lean_dec(x_26); -x_146 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_146, 0, x_144); -lean_ctor_set(x_146, 1, x_145); -return x_146; +x_192 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_192, 0, x_190); +lean_ctor_set(x_192, 1, x_191); +return x_192; } } } else { -lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; +lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_dec(x_2); -x_147 = lean_unsigned_to_nat(1u); -x_148 = lean_nat_add(x_10, x_147); +x_193 = lean_unsigned_to_nat(1u); +x_194 = lean_nat_add(x_10, x_193); lean_dec(x_10); lean_inc(x_12); lean_inc(x_11); -lean_inc(x_148); +lean_inc(x_194); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); -x_149 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_149, 0, x_7); -lean_ctor_set(x_149, 1, x_8); -lean_ctor_set(x_149, 2, x_9); -lean_ctor_set(x_149, 3, x_148); -lean_ctor_set(x_149, 4, x_11); -lean_ctor_set(x_149, 5, x_12); -lean_ctor_set(x_149, 6, x_13); -lean_inc(x_149); -x_150 = l___private_Init_Lean_Elab_Command_2__getState(x_149, x_6); -if (lean_obj_tag(x_150) == 0) +x_195 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_195, 0, x_7); +lean_ctor_set(x_195, 1, x_8); +lean_ctor_set(x_195, 2, x_9); +lean_ctor_set(x_195, 3, x_194); +lean_ctor_set(x_195, 4, x_11); +lean_ctor_set(x_195, 5, x_12); +lean_ctor_set(x_195, 6, x_13); +lean_inc(x_195); +x_196 = l___private_Init_Lean_Elab_Command_2__getState(x_195, x_6); +if (lean_obj_tag(x_196) == 0) { -lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; -x_151 = lean_ctor_get(x_150, 0); -lean_inc(x_151); -x_152 = lean_ctor_get(x_150, 1); -lean_inc(x_152); -lean_dec(x_150); -x_153 = lean_ctor_get(x_151, 0); -lean_inc(x_153); -x_154 = lean_ctor_get(x_151, 1); -lean_inc(x_154); -x_155 = lean_ctor_get(x_151, 2); -lean_inc(x_155); -x_156 = lean_ctor_get(x_151, 3); -lean_inc(x_156); -x_157 = lean_ctor_get(x_151, 4); -lean_inc(x_157); -if (lean_is_exclusive(x_151)) { - lean_ctor_release(x_151, 0); - lean_ctor_release(x_151, 1); - lean_ctor_release(x_151, 2); - lean_ctor_release(x_151, 3); - lean_ctor_release(x_151, 4); - x_158 = x_151; -} else { - lean_dec_ref(x_151); - x_158 = lean_box(0); -} -x_159 = lean_nat_add(x_156, x_147); -if (lean_is_scalar(x_158)) { - x_160 = lean_alloc_ctor(0, 5, 0); -} else { - x_160 = x_158; -} -lean_ctor_set(x_160, 0, x_153); -lean_ctor_set(x_160, 1, x_154); -lean_ctor_set(x_160, 2, x_155); -lean_ctor_set(x_160, 3, x_159); -lean_ctor_set(x_160, 4, x_157); -x_161 = l___private_Init_Lean_Elab_Command_3__setState(x_160, x_149, x_152); -if (lean_obj_tag(x_161) == 0) -{ -lean_object* x_162; lean_object* x_163; lean_object* x_164; -x_162 = lean_ctor_get(x_161, 1); -lean_inc(x_162); -lean_dec(x_161); -x_163 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_163, 0, x_7); -lean_ctor_set(x_163, 1, x_8); -lean_ctor_set(x_163, 2, x_9); -lean_ctor_set(x_163, 3, x_148); -lean_ctor_set(x_163, 4, x_11); -lean_ctor_set(x_163, 5, x_12); -lean_ctor_set(x_163, 6, x_156); -if (lean_obj_tag(x_1) == 1) -{ -lean_object* x_191; -lean_inc(x_163); -x_191 = l_Lean_Elab_Command_getOptions(x_163, x_162); -if (lean_obj_tag(x_191) == 0) -{ -lean_object* x_192; lean_object* x_193; lean_object* x_194; uint8_t x_195; -x_192 = lean_ctor_get(x_191, 0); -lean_inc(x_192); -x_193 = lean_ctor_get(x_191, 1); -lean_inc(x_193); -lean_dec(x_191); -x_194 = l_Lean_Elab_Command_elabCommandAux___closed__7; -x_195 = l_Lean_checkTraceOption(x_192, x_194); -lean_dec(x_192); -if (x_195 == 0) -{ -x_164 = x_193; -goto block_190; -} -else -{ -lean_object* x_196; lean_object* x_197; -lean_inc(x_1); -x_196 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_196, 0, x_1); -lean_inc(x_163); -x_197 = l_Lean_Elab_Command_logTrace(x_194, x_1, x_196, x_163, x_193); -if (lean_obj_tag(x_197) == 0) -{ -lean_object* x_198; -x_198 = lean_ctor_get(x_197, 1); +lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; +x_197 = lean_ctor_get(x_196, 0); +lean_inc(x_197); +x_198 = lean_ctor_get(x_196, 1); lean_inc(x_198); -lean_dec(x_197); -x_164 = x_198; -goto block_190; -} -else -{ -lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; -lean_dec(x_163); -lean_dec(x_1); +lean_dec(x_196); x_199 = lean_ctor_get(x_197, 0); lean_inc(x_199); x_200 = lean_ctor_get(x_197, 1); lean_inc(x_200); +x_201 = lean_ctor_get(x_197, 2); +lean_inc(x_201); +x_202 = lean_ctor_get(x_197, 3); +lean_inc(x_202); +x_203 = lean_ctor_get(x_197, 4); +lean_inc(x_203); if (lean_is_exclusive(x_197)) { lean_ctor_release(x_197, 0); lean_ctor_release(x_197, 1); - x_201 = x_197; + lean_ctor_release(x_197, 2); + lean_ctor_release(x_197, 3); + lean_ctor_release(x_197, 4); + x_204 = x_197; } else { lean_dec_ref(x_197); - x_201 = lean_box(0); + x_204 = lean_box(0); } -if (lean_is_scalar(x_201)) { - x_202 = lean_alloc_ctor(1, 2, 0); +x_205 = lean_nat_add(x_202, x_193); +if (lean_is_scalar(x_204)) { + x_206 = lean_alloc_ctor(0, 5, 0); } else { - x_202 = x_201; + x_206 = x_204; } -lean_ctor_set(x_202, 0, x_199); -lean_ctor_set(x_202, 1, x_200); -return x_202; -} -} -} -else +lean_ctor_set(x_206, 0, x_199); +lean_ctor_set(x_206, 1, x_200); +lean_ctor_set(x_206, 2, x_201); +lean_ctor_set(x_206, 3, x_205); +lean_ctor_set(x_206, 4, x_203); +x_207 = l___private_Init_Lean_Elab_Command_3__setState(x_206, x_195, x_198); +if (lean_obj_tag(x_207) == 0) { -lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; -lean_dec(x_163); -lean_dec(x_1); -x_203 = lean_ctor_get(x_191, 0); -lean_inc(x_203); -x_204 = lean_ctor_get(x_191, 1); -lean_inc(x_204); -if (lean_is_exclusive(x_191)) { - lean_ctor_release(x_191, 0); - lean_ctor_release(x_191, 1); - x_205 = x_191; -} else { - lean_dec_ref(x_191); - x_205 = lean_box(0); -} -if (lean_is_scalar(x_205)) { - x_206 = lean_alloc_ctor(1, 2, 0); -} else { - x_206 = x_205; -} -lean_ctor_set(x_206, 0, x_203); -lean_ctor_set(x_206, 1, x_204); -return x_206; -} -} -else +lean_object* x_208; lean_object* x_209; +x_208 = lean_ctor_get(x_207, 1); +lean_inc(x_208); +lean_dec(x_207); +lean_inc(x_202); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_194); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +x_209 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_209, 0, x_7); +lean_ctor_set(x_209, 1, x_8); +lean_ctor_set(x_209, 2, x_9); +lean_ctor_set(x_209, 3, x_194); +lean_ctor_set(x_209, 4, x_11); +lean_ctor_set(x_209, 5, x_12); +lean_ctor_set(x_209, 6, x_202); +if (lean_obj_tag(x_1) == 1) { -lean_object* x_207; lean_object* x_208; -x_207 = l_Lean_Elab_Command_elabCommandAux___closed__3; -x_208 = l_Lean_Elab_Command_throwError___rarg(x_1, x_207, x_163, x_162); -return x_208; -} -block_190: -{ -lean_object* x_165; -lean_inc(x_163); -x_165 = l___private_Init_Lean_Elab_Command_2__getState(x_163, x_164); -if (lean_obj_tag(x_165) == 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; lean_object* x_172; lean_object* x_173; lean_object* x_174; -x_166 = lean_ctor_get(x_165, 0); -lean_inc(x_166); -x_167 = lean_ctor_get(x_165, 1); -lean_inc(x_167); -lean_dec(x_165); -x_168 = l_Lean_Elab_Command_commandElabAttribute; -x_169 = lean_ctor_get(x_168, 1); -lean_inc(x_169); -x_170 = lean_ctor_get(x_166, 0); -lean_inc(x_170); -lean_dec(x_166); -x_171 = l_Lean_PersistentEnvExtension_getState___rarg(x_169, x_170); -lean_dec(x_170); -lean_dec(x_169); -x_172 = lean_ctor_get(x_171, 1); -lean_inc(x_172); -lean_dec(x_171); -lean_inc(x_1); -x_173 = l_Lean_Syntax_getKind(x_1); -x_174 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommandAux___spec__1(x_172, x_173); -if (lean_obj_tag(x_174) == 0) -{ -lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; -x_175 = l_Lean_Name_toString___closed__1; -x_176 = l_Lean_Name_toStringWithSep___main(x_175, x_173); -x_177 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_177, 0, x_176); -x_178 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_178, 0, x_177); -x_179 = l_Lean_Elab_Command_elabCommandAux___closed__6; -x_180 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_180, 0, x_179); -lean_ctor_set(x_180, 1, x_178); -x_181 = l_Lean_Elab_Term_elabTerm___closed__6; -x_182 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_182, 0, x_180); -lean_ctor_set(x_182, 1, x_181); -x_183 = l_Lean_Elab_Command_throwError___rarg(x_1, x_182, x_163, x_167); -return x_183; -} -else -{ -lean_object* x_184; lean_object* x_185; -lean_dec(x_173); -x_184 = lean_ctor_get(x_174, 0); -lean_inc(x_184); -lean_dec(x_174); -x_185 = l___private_Init_Lean_Elab_Command_8__elabCommandUsing___main(x_1, x_184, x_163, x_167); -return x_185; -} -} -else -{ -lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; -lean_dec(x_163); -lean_dec(x_1); -x_186 = lean_ctor_get(x_165, 0); -lean_inc(x_186); -x_187 = lean_ctor_get(x_165, 1); -lean_inc(x_187); -if (lean_is_exclusive(x_165)) { - lean_ctor_release(x_165, 0); - lean_ctor_release(x_165, 1); - x_188 = x_165; -} else { - lean_dec_ref(x_165); - x_188 = lean_box(0); -} -if (lean_is_scalar(x_188)) { - x_189 = lean_alloc_ctor(1, 2, 0); -} else { - x_189 = x_188; -} -lean_ctor_set(x_189, 0, x_186); -lean_ctor_set(x_189, 1, x_187); -return x_189; -} -} -} -else -{ -lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; -lean_dec(x_156); -lean_dec(x_148); -lean_dec(x_12); -lean_dec(x_11); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_1); -x_209 = lean_ctor_get(x_161, 0); +lean_object* x_210; lean_object* x_260; lean_inc(x_209); -x_210 = lean_ctor_get(x_161, 1); -lean_inc(x_210); -if (lean_is_exclusive(x_161)) { - lean_ctor_release(x_161, 0); - lean_ctor_release(x_161, 1); - x_211 = x_161; -} else { - lean_dec_ref(x_161); - x_211 = lean_box(0); -} -if (lean_is_scalar(x_211)) { - x_212 = lean_alloc_ctor(1, 2, 0); -} else { - x_212 = x_211; -} -lean_ctor_set(x_212, 0, x_209); -lean_ctor_set(x_212, 1, x_210); -return x_212; -} +x_260 = l_Lean_Elab_Command_getOptions(x_209, x_208); +if (lean_obj_tag(x_260) == 0) +{ +lean_object* x_261; lean_object* x_262; lean_object* x_263; uint8_t x_264; +x_261 = lean_ctor_get(x_260, 0); +lean_inc(x_261); +x_262 = lean_ctor_get(x_260, 1); +lean_inc(x_262); +lean_dec(x_260); +x_263 = l_Lean_Elab_Command_elabCommand___main___closed__7; +x_264 = l_Lean_checkTraceOption(x_261, x_263); +lean_dec(x_261); +if (x_264 == 0) +{ +x_210 = x_262; +goto block_259; } else { -lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; -lean_dec(x_149); -lean_dec(x_148); +lean_object* x_265; lean_object* x_266; +lean_inc(x_1); +x_265 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_265, 0, x_1); +lean_inc(x_209); +x_266 = l_Lean_Elab_Command_logTrace(x_263, x_1, x_265, x_209, x_262); +if (lean_obj_tag(x_266) == 0) +{ +lean_object* x_267; +x_267 = lean_ctor_get(x_266, 1); +lean_inc(x_267); +lean_dec(x_266); +x_210 = x_267; +goto block_259; +} +else +{ +lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; +lean_dec(x_209); +lean_dec(x_202); +lean_dec(x_194); lean_dec(x_12); lean_dec(x_11); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_1); -x_213 = lean_ctor_get(x_150, 0); -lean_inc(x_213); -x_214 = lean_ctor_get(x_150, 1); -lean_inc(x_214); -if (lean_is_exclusive(x_150)) { - lean_ctor_release(x_150, 0); - lean_ctor_release(x_150, 1); - x_215 = x_150; +x_268 = lean_ctor_get(x_266, 0); +lean_inc(x_268); +x_269 = lean_ctor_get(x_266, 1); +lean_inc(x_269); +if (lean_is_exclusive(x_266)) { + lean_ctor_release(x_266, 0); + lean_ctor_release(x_266, 1); + x_270 = x_266; } else { - lean_dec_ref(x_150); - x_215 = lean_box(0); + lean_dec_ref(x_266); + x_270 = lean_box(0); } -if (lean_is_scalar(x_215)) { - x_216 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_270)) { + x_271 = lean_alloc_ctor(1, 2, 0); } else { - x_216 = x_215; + x_271 = x_270; } -lean_ctor_set(x_216, 0, x_213); -lean_ctor_set(x_216, 1, x_214); -return x_216; +lean_ctor_set(x_271, 0, x_268); +lean_ctor_set(x_271, 1, x_269); +return x_271; } } } else { -lean_object* x_217; lean_object* x_218; uint8_t x_219; +lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; +lean_dec(x_209); +lean_dec(x_202); +lean_dec(x_194); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_272 = lean_ctor_get(x_260, 0); +lean_inc(x_272); +x_273 = lean_ctor_get(x_260, 1); +lean_inc(x_273); +if (lean_is_exclusive(x_260)) { + lean_ctor_release(x_260, 0); + lean_ctor_release(x_260, 1); + x_274 = x_260; +} else { + lean_dec_ref(x_260); + x_274 = lean_box(0); +} +if (lean_is_scalar(x_274)) { + x_275 = lean_alloc_ctor(1, 2, 0); +} else { + x_275 = x_274; +} +lean_ctor_set(x_275, 0, x_272); +lean_ctor_set(x_275, 1, x_273); +return x_275; +} +block_259: +{ +lean_object* x_211; +lean_inc(x_209); +x_211 = l___private_Init_Lean_Elab_Command_2__getState(x_209, x_210); +if (lean_obj_tag(x_211) == 0) +{ +lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; +x_212 = lean_ctor_get(x_211, 0); +lean_inc(x_212); +x_213 = lean_ctor_get(x_211, 1); +lean_inc(x_213); +lean_dec(x_211); +x_214 = l_Lean_Elab_Command_commandElabAttribute; +x_215 = lean_ctor_get(x_214, 1); +lean_inc(x_215); +x_216 = lean_ctor_get(x_212, 0); +lean_inc(x_216); +lean_dec(x_212); +x_217 = l_Lean_PersistentEnvExtension_getState___rarg(x_215, x_216); +lean_dec(x_216); +lean_dec(x_215); +x_218 = lean_ctor_get(x_217, 1); +lean_inc(x_218); +lean_dec(x_217); +lean_inc(x_1); +x_219 = l_Lean_Syntax_getKind(x_1); +x_220 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__1(x_218, x_219); +if (lean_obj_tag(x_220) == 0) +{ +lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; +x_221 = l_Lean_Elab_Command_getCurrMacroScope(x_209, x_213); +x_222 = lean_ctor_get(x_221, 0); +lean_inc(x_222); +x_223 = lean_ctor_get(x_221, 1); +lean_inc(x_223); +lean_dec(x_221); +lean_inc(x_209); +x_224 = l_Lean_Elab_Command_getEnv(x_209, x_223); +if (lean_obj_tag(x_224) == 0) +{ +lean_object* x_225; lean_object* x_226; lean_object* x_227; +x_225 = lean_ctor_get(x_224, 0); +lean_inc(x_225); +x_226 = lean_ctor_get(x_224, 1); +lean_inc(x_226); +lean_dec(x_224); +lean_inc(x_1); +x_227 = l_Lean_Elab_expandMacro(x_225, x_1, x_222); +lean_dec(x_225); +if (lean_obj_tag(x_227) == 0) +{ +lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; +lean_dec(x_202); +lean_dec(x_194); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_228 = l_Lean_Name_toString___closed__1; +x_229 = l_Lean_Name_toStringWithSep___main(x_228, x_219); +x_230 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_230, 0, x_229); +x_231 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_231, 0, x_230); +x_232 = l_Lean_Elab_Command_elabCommand___main___closed__6; +x_233 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_233, 0, x_232); +lean_ctor_set(x_233, 1, x_231); +x_234 = l_Lean_Elab_Term_elabTermAux___main___closed__6; +x_235 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_235, 0, x_233); +lean_ctor_set(x_235, 1, x_234); +x_236 = l_Lean_Elab_Command_throwError___rarg(x_1, x_235, x_209, x_226); +return x_236; +} +else +{ +lean_object* x_237; lean_object* x_238; lean_object* x_239; uint8_t x_240; +lean_dec(x_219); +lean_dec(x_209); +x_237 = lean_ctor_get(x_227, 0); +lean_inc(x_237); +lean_dec(x_227); +lean_inc(x_237); +x_238 = l_Lean_Syntax_getKind(x_237); +x_239 = l_Lean_nullKind; +x_240 = lean_name_eq(x_238, x_239); +lean_dec(x_238); +if (x_240 == 0) +{ +lean_object* x_241; lean_object* x_242; +x_241 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_241, 0, x_1); +lean_ctor_set(x_241, 1, x_12); +x_242 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_242, 0, x_7); +lean_ctor_set(x_242, 1, x_8); +lean_ctor_set(x_242, 2, x_9); +lean_ctor_set(x_242, 3, x_194); +lean_ctor_set(x_242, 4, x_11); +lean_ctor_set(x_242, 5, x_241); +lean_ctor_set(x_242, 6, x_202); +x_1 = x_237; +x_2 = x_242; +x_3 = x_226; +goto _start; +} +else +{ +lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; +x_244 = l_Lean_Syntax_getArgs(x_237); +lean_dec(x_237); +x_245 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_245, 0, x_1); +lean_ctor_set(x_245, 1, x_12); +x_246 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_246, 0, x_7); +lean_ctor_set(x_246, 1, x_8); +lean_ctor_set(x_246, 2, x_9); +lean_ctor_set(x_246, 3, x_194); +lean_ctor_set(x_246, 4, x_11); +lean_ctor_set(x_246, 5, x_245); +lean_ctor_set(x_246, 6, x_202); +x_247 = lean_unsigned_to_nat(0u); +x_248 = l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___main___spec__7(x_244, x_247, x_246, x_226); +lean_dec(x_244); +return x_248; +} +} +} +else +{ +lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; +lean_dec(x_222); +lean_dec(x_219); +lean_dec(x_209); +lean_dec(x_202); +lean_dec(x_194); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_249 = lean_ctor_get(x_224, 0); +lean_inc(x_249); +x_250 = lean_ctor_get(x_224, 1); +lean_inc(x_250); +if (lean_is_exclusive(x_224)) { + lean_ctor_release(x_224, 0); + lean_ctor_release(x_224, 1); + x_251 = x_224; +} else { + lean_dec_ref(x_224); + x_251 = lean_box(0); +} +if (lean_is_scalar(x_251)) { + x_252 = lean_alloc_ctor(1, 2, 0); +} else { + x_252 = x_251; +} +lean_ctor_set(x_252, 0, x_249); +lean_ctor_set(x_252, 1, x_250); +return x_252; +} +} +else +{ +lean_object* x_253; lean_object* x_254; +lean_dec(x_219); +lean_dec(x_202); +lean_dec(x_194); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_253 = lean_ctor_get(x_220, 0); +lean_inc(x_253); +lean_dec(x_220); +x_254 = l___private_Init_Lean_Elab_Command_8__elabCommandUsing___main(x_1, x_253, x_209, x_213); +return x_254; +} +} +else +{ +lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; +lean_dec(x_209); +lean_dec(x_202); +lean_dec(x_194); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_255 = lean_ctor_get(x_211, 0); +lean_inc(x_255); +x_256 = lean_ctor_get(x_211, 1); +lean_inc(x_256); +if (lean_is_exclusive(x_211)) { + lean_ctor_release(x_211, 0); + lean_ctor_release(x_211, 1); + x_257 = x_211; +} else { + lean_dec_ref(x_211); + x_257 = lean_box(0); +} +if (lean_is_scalar(x_257)) { + x_258 = lean_alloc_ctor(1, 2, 0); +} else { + x_258 = x_257; +} +lean_ctor_set(x_258, 0, x_255); +lean_ctor_set(x_258, 1, x_256); +return x_258; +} +} +} +else +{ +lean_object* x_276; lean_object* x_277; +lean_dec(x_202); +lean_dec(x_194); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +x_276 = l_Lean_Elab_Command_elabCommand___main___closed__3; +x_277 = l_Lean_Elab_Command_throwError___rarg(x_1, x_276, x_209, x_208); +return x_277; +} +} +else +{ +lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; +lean_dec(x_202); +lean_dec(x_194); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_278 = lean_ctor_get(x_207, 0); +lean_inc(x_278); +x_279 = lean_ctor_get(x_207, 1); +lean_inc(x_279); +if (lean_is_exclusive(x_207)) { + lean_ctor_release(x_207, 0); + lean_ctor_release(x_207, 1); + x_280 = x_207; +} else { + lean_dec_ref(x_207); + x_280 = lean_box(0); +} +if (lean_is_scalar(x_280)) { + x_281 = lean_alloc_ctor(1, 2, 0); +} else { + x_281 = x_280; +} +lean_ctor_set(x_281, 0, x_278); +lean_ctor_set(x_281, 1, x_279); +return x_281; +} +} +else +{ +lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; +lean_dec(x_195); +lean_dec(x_194); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_1); +x_282 = lean_ctor_get(x_196, 0); +lean_inc(x_282); +x_283 = lean_ctor_get(x_196, 1); +lean_inc(x_283); +if (lean_is_exclusive(x_196)) { + lean_ctor_release(x_196, 0); + lean_ctor_release(x_196, 1); + x_284 = x_196; +} else { + lean_dec_ref(x_196); + x_284 = lean_box(0); +} +if (lean_is_scalar(x_284)) { + x_285 = lean_alloc_ctor(1, 2, 0); +} else { + x_285 = x_284; +} +lean_ctor_set(x_285, 0, x_282); +lean_ctor_set(x_285, 1, x_283); +return x_285; +} +} +} +else +{ +lean_object* x_286; lean_object* x_287; uint8_t x_288; lean_dec(x_13); lean_dec(x_12); lean_dec(x_11); @@ -5856,270 +6463,129 @@ lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); -x_217 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; -x_218 = l_Lean_Elab_Command_throwError___rarg(x_1, x_217, x_2, x_6); -x_219 = !lean_is_exclusive(x_218); -if (x_219 == 0) +x_286 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; +x_287 = l_Lean_Elab_Command_throwError___rarg(x_1, x_286, x_2, x_6); +x_288 = !lean_is_exclusive(x_287); +if (x_288 == 0) { -return x_218; +return x_287; } else { -lean_object* x_220; lean_object* x_221; lean_object* x_222; -x_220 = lean_ctor_get(x_218, 0); -x_221 = lean_ctor_get(x_218, 1); -lean_inc(x_221); -lean_inc(x_220); -lean_dec(x_218); -x_222 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_222, 0, x_220); -lean_ctor_set(x_222, 1, x_221); -return x_222; +lean_object* x_289; lean_object* x_290; lean_object* x_291; +x_289 = lean_ctor_get(x_287, 0); +x_290 = lean_ctor_get(x_287, 1); +lean_inc(x_290); +lean_inc(x_289); +lean_dec(x_287); +x_291 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_291, 0, x_289); +lean_ctor_set(x_291, 1, x_290); +return x_291; } } } else { -uint8_t x_223; +uint8_t x_292; lean_dec(x_2); lean_dec(x_1); -x_223 = !lean_is_exclusive(x_4); -if (x_223 == 0) +x_292 = !lean_is_exclusive(x_4); +if (x_292 == 0) { return x_4; } else { -lean_object* x_224; lean_object* x_225; lean_object* x_226; -x_224 = lean_ctor_get(x_4, 0); -x_225 = lean_ctor_get(x_4, 1); -lean_inc(x_225); -lean_inc(x_224); +lean_object* x_293; lean_object* x_294; lean_object* x_295; +x_293 = lean_ctor_get(x_4, 0); +x_294 = lean_ctor_get(x_4, 1); +lean_inc(x_294); +lean_inc(x_293); lean_dec(x_4); -x_226 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_226, 0, x_224); -lean_ctor_set(x_226, 1, x_225); -return x_226; +x_295 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_295, 0, x_293); +lean_ctor_set(x_295, 1, x_294); +return x_295; } } } } -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommandAux___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__4(x_1, x_2, x_3, x_4, x_5); +x_6 = l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__3(x_1, x_4, x_3); +x_5 = l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__2(x_1, x_2); +x_3 = l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__2(x_1, x_2); lean_dec(x_2); return x_3; } } -lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommandAux___spec__6___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__6(x_1, x_2); +x_3 = l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__5___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__5(x_1, x_2); +x_3 = l_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___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_elabCommandAux___spec__1(x_1, x_2); +x_3 = l_Lean_SMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__1(x_1, x_2); lean_dec(x_2); return x_3; } } -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___main___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; uint8_t x_6; -x_5 = lean_array_get_size(x_1); -x_6 = lean_nat_dec_lt(x_2, x_5); -lean_dec(x_5); -if (x_6 == 0) -{ -lean_object* x_7; lean_object* x_8; -lean_dec(x_3); -lean_dec(x_2); -x_7 = lean_box(0); -x_8 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_8, 0, x_7); -lean_ctor_set(x_8, 1, x_4); -return x_8; -} -else -{ -lean_object* x_9; lean_object* x_10; -x_9 = lean_array_fget(x_1, x_2); -lean_inc(x_3); -x_10 = l_Lean_Elab_Command_elabCommandAux(x_9, x_3, x_4); -if (lean_obj_tag(x_10) == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = lean_ctor_get(x_10, 1); -lean_inc(x_11); -lean_dec(x_10); -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_2, x_12); -lean_dec(x_2); -x_2 = x_13; -x_4 = x_11; -goto _start; -} -else -{ -uint8_t x_15; -lean_dec(x_3); -lean_dec(x_2); -x_15 = !lean_is_exclusive(x_10); -if (x_15 == 0) -{ -return x_10; -} -else -{ -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_10, 0); -x_17 = lean_ctor_get(x_10, 1); -lean_inc(x_17); -lean_inc(x_16); -lean_dec(x_10); -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; -} -} -} +lean_object* x_5; +x_5 = l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___main___spec__7(x_1, x_2, x_3, x_4); +lean_dec(x_1); +return x_5; } } lean_object* l_Lean_Elab_Command_elabCommand(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; uint8_t x_6; -lean_inc(x_1); -x_4 = l_Lean_Syntax_getKind(x_1); -x_5 = l_Lean_nullKind; -x_6 = lean_name_eq(x_4, x_5); -lean_dec(x_4); -if (x_6 == 0) -{ -lean_object* x_7; -x_7 = l_Lean_Elab_Command_elabCommandAux(x_1, x_2, x_3); -return x_7; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = l_Lean_Syntax_getArgs(x_1); -lean_dec(x_1); -x_9 = lean_unsigned_to_nat(0u); -x_10 = l_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___spec__1(x_8, x_9, x_2, x_3); -lean_dec(x_8); -return x_10; -} -} -} -lean_object* l_Array_forMAux___main___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_Array_forMAux___main___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_2, x_3, x_4); -lean_dec(x_1); -return x_5; -} -} -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, 5); -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, 5, 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; lean_object* x_18; -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); -x_15 = lean_ctor_get(x_3, 6); -lean_inc(x_15); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -lean_dec(x_3); -x_16 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_14); -x_17 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_17, 0, x_9); -lean_ctor_set(x_17, 1, x_10); -lean_ctor_set(x_17, 2, x_11); -lean_ctor_set(x_17, 3, x_12); -lean_ctor_set(x_17, 4, x_13); -lean_ctor_set(x_17, 5, x_16); -lean_ctor_set(x_17, 6, x_15); -x_18 = lean_apply_2(x_2, x_17, x_4); -return x_18; -} -} -} -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* x_4; +x_4 = l_Lean_Elab_Command_elabCommand___main(x_1, x_2, x_3); +return x_4; } } lean_object* l_Lean_Elab_Command_adaptExpander(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { @@ -6146,7 +6612,7 @@ lean_inc(x_9); x_10 = lean_ctor_get(x_8, 1); lean_inc(x_10); lean_dec(x_8); -x_11 = l_Lean_Elab_Command_elabCommand(x_9, x_3, x_10); +x_11 = l_Lean_Elab_Command_elabCommand___main(x_9, x_3, x_10); return x_11; } else @@ -6213,7 +6679,7 @@ lean_inc(x_26); x_27 = lean_ctor_get(x_25, 1); lean_inc(x_27); lean_dec(x_25); -x_28 = l_Lean_Elab_Command_elabCommand(x_26, x_24, x_27); +x_28 = l_Lean_Elab_Command_elabCommand___main(x_26, x_24, x_27); return x_28; } else @@ -12782,7 +13248,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; lean_object* x_10; lean_object* x_11; x_4 = lean_ctor_get(x_1, 1); -x_5 = l_Lean_stxInh; +x_5 = l_Lean_Syntax_inhabited; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_array_get(x_5, x_4, x_6); x_8 = l_Lean_Syntax_getArgs(x_7); @@ -12981,7 +13447,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); -x_5 = l_Lean_stxInh; +x_5 = l_Lean_Syntax_inhabited; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_array_get(x_5, x_4, x_6); x_8 = l_Lean_Syntax_getId(x_7); @@ -13147,7 +13613,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); -x_5 = l_Lean_stxInh; +x_5 = l_Lean_Syntax_inhabited; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_array_get(x_5, x_4, x_6); x_8 = l_Lean_Syntax_getId(x_7); @@ -13460,7 +13926,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); -x_5 = l_Lean_stxInh; +x_5 = l_Lean_Syntax_inhabited; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_array_get(x_5, x_4, x_6); x_8 = l_Lean_Syntax_getId(x_7); @@ -15965,7 +16431,7 @@ _start: uint8_t x_7; lean_object* x_8; x_7 = 1; lean_inc(x_5); -x_8 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_7, x_7, x_5, x_6); +x_8 = l_Lean_Elab_Term_elabTermAux___main(x_1, x_7, x_7, x_2, x_5, x_6); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; @@ -16113,8 +16579,8 @@ x_4 = lean_unsigned_to_nat(1u); x_5 = l_Lean_Syntax_getArg(x_1, x_4); x_6 = lean_box(0); x_7 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabCheck___lambda__1___boxed), 6, 3); -lean_closure_set(x_7, 0, x_5); -lean_closure_set(x_7, 1, x_6); +lean_closure_set(x_7, 0, x_6); +lean_closure_set(x_7, 1, x_5); lean_closure_set(x_7, 2, x_1); lean_inc(x_2); x_8 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); @@ -16595,7 +17061,7 @@ lean_object* x_6; uint8_t x_7; lean_object* x_8; x_6 = lean_box(0); x_7 = 1; lean_inc(x_4); -x_8 = l_Lean_Elab_Term_elabTerm(x_1, x_6, x_7, x_7, x_4, x_5); +x_8 = l_Lean_Elab_Term_elabTermAux___main(x_6, x_7, x_7, x_1, x_4, x_5); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; @@ -22228,20 +22694,20 @@ if (lean_io_result_is_error(res)) return res; l_Lean_Elab_Command_commandElabAttribute = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Elab_Command_commandElabAttribute); lean_dec_ref(res); -l_Lean_Elab_Command_elabCommandAux___closed__1 = _init_l_Lean_Elab_Command_elabCommandAux___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_elabCommandAux___closed__1); -l_Lean_Elab_Command_elabCommandAux___closed__2 = _init_l_Lean_Elab_Command_elabCommandAux___closed__2(); -lean_mark_persistent(l_Lean_Elab_Command_elabCommandAux___closed__2); -l_Lean_Elab_Command_elabCommandAux___closed__3 = _init_l_Lean_Elab_Command_elabCommandAux___closed__3(); -lean_mark_persistent(l_Lean_Elab_Command_elabCommandAux___closed__3); -l_Lean_Elab_Command_elabCommandAux___closed__4 = _init_l_Lean_Elab_Command_elabCommandAux___closed__4(); -lean_mark_persistent(l_Lean_Elab_Command_elabCommandAux___closed__4); -l_Lean_Elab_Command_elabCommandAux___closed__5 = _init_l_Lean_Elab_Command_elabCommandAux___closed__5(); -lean_mark_persistent(l_Lean_Elab_Command_elabCommandAux___closed__5); -l_Lean_Elab_Command_elabCommandAux___closed__6 = _init_l_Lean_Elab_Command_elabCommandAux___closed__6(); -lean_mark_persistent(l_Lean_Elab_Command_elabCommandAux___closed__6); -l_Lean_Elab_Command_elabCommandAux___closed__7 = _init_l_Lean_Elab_Command_elabCommandAux___closed__7(); -lean_mark_persistent(l_Lean_Elab_Command_elabCommandAux___closed__7); +l_Lean_Elab_Command_elabCommand___main___closed__1 = _init_l_Lean_Elab_Command_elabCommand___main___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabCommand___main___closed__1); +l_Lean_Elab_Command_elabCommand___main___closed__2 = _init_l_Lean_Elab_Command_elabCommand___main___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabCommand___main___closed__2); +l_Lean_Elab_Command_elabCommand___main___closed__3 = _init_l_Lean_Elab_Command_elabCommand___main___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabCommand___main___closed__3); +l_Lean_Elab_Command_elabCommand___main___closed__4 = _init_l_Lean_Elab_Command_elabCommand___main___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabCommand___main___closed__4); +l_Lean_Elab_Command_elabCommand___main___closed__5 = _init_l_Lean_Elab_Command_elabCommand___main___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_elabCommand___main___closed__5); +l_Lean_Elab_Command_elabCommand___main___closed__6 = _init_l_Lean_Elab_Command_elabCommand___main___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_elabCommand___main___closed__6); +l_Lean_Elab_Command_elabCommand___main___closed__7 = _init_l_Lean_Elab_Command_elabCommand___main___closed__7(); +lean_mark_persistent(l_Lean_Elab_Command_elabCommand___main___closed__7); l___private_Init_Lean_Elab_Command_12__toCommandResult___rarg___closed__1 = _init_l___private_Init_Lean_Elab_Command_12__toCommandResult___rarg___closed__1(); lean_mark_persistent(l___private_Init_Lean_Elab_Command_12__toCommandResult___rarg___closed__1); l_Lean_Elab_Command_CommandElabM_inhabited___closed__1 = _init_l_Lean_Elab_Command_CommandElabM_inhabited___closed__1(); diff --git a/stage0/stdlib/Init/Lean/Elab/Definition.c b/stage0/stdlib/Init/Lean/Elab/Definition.c index f563a580e4..78e4ba6b8c 100644 --- a/stage0/stdlib/Init/Lean/Elab/Definition.c +++ b/stage0/stdlib/Init/Lean/Elab/Definition.c @@ -15,6 +15,7 @@ extern "C" { #endif lean_object* l_Lean_Elab_Term_mkForall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_extractMacroScopes(lean_object*); +lean_object* l_Lean_registerTraceClass(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*); @@ -24,11 +25,13 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_collectUsedFVarsA 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*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__4; 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; +uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDefVal___closed__2; uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_compileDecl(lean_object*, lean_object*, lean_object*, lean_object*); @@ -43,9 +46,11 @@ lean_object* l___private_Init_Lean_Elab_Term_20__synthesizeSyntheticMVarsAux___m 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*); +extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; 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*); +lean_object* l_Lean_Elab_Term_getOptions(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*); @@ -60,12 +65,13 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(lean_object*); lean_object* l_Lean_Elab_Command_DefKind_isTheorem___boxed(lean_object*); extern lean_object* l___private_Init_Lean_Elab_Term_14__resumePostponed___lambda__1___closed__1; -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___private_Init_Lean_Elab_Command_11__getVarDecls(lean_object*); 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_Elab_Term_elabTermAux___main(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_logTrace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); 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_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*); @@ -74,6 +80,7 @@ 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___private_Init_Lean_Elab_Definition_1__regTraceClasses(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* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -99,7 +106,10 @@ 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_Command_mkDef___lambda__1___closed__3; +lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__6; lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_mkDef___lambda__1___closed__5; 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*); @@ -1347,6 +1357,42 @@ lean_ctor_set_uint32(x_2, 0, x_1); return x_2; } } +lean_object* _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("definition"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; +x_2 = l_Lean_Elab_Command_mkDef___lambda__1___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("body"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_mkDef___lambda__1___closed__4; +x_2 = l_Lean_Elab_Command_mkDef___lambda__1___closed__5; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} 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, lean_object* x_6, uint8_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) { _start: { @@ -1387,7 +1433,7 @@ lean_inc(x_11); x_22 = l_Lean_Elab_Term_mkLambda(x_1, x_10, x_20, x_11, x_21); 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; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; x_23 = lean_ctor_get(x_22, 0); lean_inc(x_23); x_24 = lean_ctor_get(x_22, 1); @@ -1416,312 +1462,265 @@ lean_inc(x_33); lean_dec(x_31); lean_inc(x_11); x_34 = l_Lean_Elab_Term_instantiateMVars(x_5, x_29, x_11, x_33); -x_35 = !lean_is_exclusive(x_34); -if (x_35 == 0) -{ -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; -x_36 = lean_ctor_get(x_34, 0); -x_37 = lean_ctor_get(x_34, 1); -x_38 = l_Lean_Elab_Command_mkDef___lambda__1___closed__1; -lean_inc(x_32); -x_39 = l_Lean_CollectLevelParams_main___main(x_32, x_38); +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_34, 1); lean_inc(x_36); -x_40 = l_Lean_CollectLevelParams_main___main(x_36, 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_6, x_41); +if (lean_is_exclusive(x_34)) { + lean_ctor_release(x_34, 0); + lean_ctor_release(x_34, 1); + x_37 = x_34; +} else { + lean_dec_ref(x_34); + x_37 = lean_box(0); +} +x_69 = l_Lean_Elab_Term_getOptions(x_11, x_36); +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); +x_72 = l_Lean_Elab_Command_mkDef___lambda__1___closed__6; +x_73 = l_Lean_checkTraceOption(x_70, x_72); +lean_dec(x_70); +if (x_73 == 0) +{ +x_38 = x_71; +goto block_68; +} +else +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; +lean_inc(x_35); +x_74 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_74, 0, x_35); +x_75 = l_Lean_Elab_Term_logTrace(x_72, x_1, x_74, x_11, x_71); +x_76 = lean_ctor_get(x_75, 1); +lean_inc(x_76); +lean_dec(x_75); +x_38 = x_76; +goto block_68; +} +block_68: +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_39 = l_Lean_Elab_Command_mkDef___lambda__1___closed__1; +lean_inc(x_32); +x_40 = l_Lean_CollectLevelParams_main___main(x_32, x_39); +lean_inc(x_35); +x_41 = l_Lean_CollectLevelParams_main___main(x_35, x_40); +x_42 = lean_ctor_get(x_41, 2); +lean_inc(x_42); +lean_dec(x_41); +x_43 = l_Lean_Elab_Command_sortDeclLevelParams(x_6, x_42); switch (x_7) { case 0: { -lean_object* x_43; lean_object* x_44; uint8_t x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +lean_object* x_44; lean_object* x_45; uint8_t x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_dec(x_11); -x_43 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_43, 0, x_8); -lean_ctor_set(x_43, 1, x_42); -lean_ctor_set(x_43, 2, x_32); -x_44 = lean_ctor_get(x_9, 1); -x_45 = lean_ctor_get_uint8(x_44, sizeof(void*)*2 + 3); -x_46 = l_Lean_Elab_Command_mkDef___lambda__1___closed__2; -x_47 = lean_alloc_ctor(0, 3, 1); -lean_ctor_set(x_47, 0, x_43); -lean_ctor_set(x_47, 1, x_36); -lean_ctor_set(x_47, 2, x_46); -lean_ctor_set_uint8(x_47, sizeof(void*)*3, x_45); -x_48 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_48, 0, x_47); +x_44 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_44, 0, x_8); +lean_ctor_set(x_44, 1, x_43); +lean_ctor_set(x_44, 2, x_32); +x_45 = lean_ctor_get(x_9, 1); +x_46 = lean_ctor_get_uint8(x_45, sizeof(void*)*2 + 3); +x_47 = l_Lean_Elab_Command_mkDef___lambda__1___closed__2; +x_48 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_48, 0, x_44); +lean_ctor_set(x_48, 1, x_35); +lean_ctor_set(x_48, 2, x_47); +lean_ctor_set_uint8(x_48, sizeof(void*)*3, x_46); x_49 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_34, 0, x_49); -return x_34; +x_50 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_50, 0, x_49); +if (lean_is_scalar(x_37)) { + x_51 = lean_alloc_ctor(0, 2, 0); +} else { + x_51 = x_37; +} +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_38); +return x_51; } case 1: { -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_dec(x_11); -x_50 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_50, 0, x_8); -lean_ctor_set(x_50, 1, x_42); -lean_ctor_set(x_50, 2, x_32); -x_51 = lean_task_pure(x_36); -x_52 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_52, 0, x_50); -lean_ctor_set(x_52, 1, x_51); -x_53 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_53, 0, x_52); -x_54 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_54, 0, x_53); -lean_ctor_set(x_34, 0, x_54); -return x_34; +x_52 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_52, 0, x_8); +lean_ctor_set(x_52, 1, x_43); +lean_ctor_set(x_52, 2, x_32); +x_53 = lean_task_pure(x_35); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +x_55 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_55, 0, x_54); +x_56 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_56, 0, x_55); +if (lean_is_scalar(x_37)) { + x_57 = lean_alloc_ctor(0, 2, 0); +} else { + x_57 = x_37; } -case 2: -{ -lean_object* x_55; lean_object* x_56; lean_object* x_57; -lean_dec(x_42); -lean_free_object(x_34); -lean_dec(x_36); -lean_dec(x_32); -lean_dec(x_8); -x_55 = l___private_Init_Lean_Elab_Term_14__resumePostponed___lambda__1___closed__1; -x_56 = l_unreachable_x21___rarg(x_55); -x_57 = lean_apply_2(x_56, x_11, x_37); +lean_ctor_set(x_57, 0, x_56); +lean_ctor_set(x_57, 1, x_38); return x_57; } -default: -{ -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_dec(x_11); -x_58 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_58, 0, x_8); -lean_ctor_set(x_58, 1, x_42); -lean_ctor_set(x_58, 2, x_32); -x_59 = lean_ctor_get(x_9, 1); -x_60 = lean_ctor_get_uint8(x_59, sizeof(void*)*2 + 3); -x_61 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_61, 0, x_58); -lean_ctor_set(x_61, 1, x_36); -lean_ctor_set_uint8(x_61, sizeof(void*)*2, x_60); -x_62 = lean_alloc_ctor(3, 1, 0); -lean_ctor_set(x_62, 0, x_61); -x_63 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_63, 0, x_62); -lean_ctor_set(x_34, 0, x_63); -return x_34; -} -} -} -else -{ -lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_64 = lean_ctor_get(x_34, 0); -x_65 = lean_ctor_get(x_34, 1); -lean_inc(x_65); -lean_inc(x_64); -lean_dec(x_34); -x_66 = l_Lean_Elab_Command_mkDef___lambda__1___closed__1; -lean_inc(x_32); -x_67 = l_Lean_CollectLevelParams_main___main(x_32, x_66); -lean_inc(x_64); -x_68 = l_Lean_CollectLevelParams_main___main(x_64, x_67); -x_69 = lean_ctor_get(x_68, 2); -lean_inc(x_69); -lean_dec(x_68); -x_70 = l_Lean_Elab_Command_sortDeclLevelParams(x_6, x_69); -switch (x_7) { -case 0: -{ -lean_object* x_71; lean_object* x_72; uint8_t x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; -lean_dec(x_11); -x_71 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_71, 0, x_8); -lean_ctor_set(x_71, 1, x_70); -lean_ctor_set(x_71, 2, x_32); -x_72 = lean_ctor_get(x_9, 1); -x_73 = lean_ctor_get_uint8(x_72, sizeof(void*)*2 + 3); -x_74 = l_Lean_Elab_Command_mkDef___lambda__1___closed__2; -x_75 = lean_alloc_ctor(0, 3, 1); -lean_ctor_set(x_75, 0, x_71); -lean_ctor_set(x_75, 1, x_64); -lean_ctor_set(x_75, 2, x_74); -lean_ctor_set_uint8(x_75, sizeof(void*)*3, x_73); -x_76 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_76, 0, x_75); -x_77 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_77, 0, x_76); -x_78 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_78, 0, x_77); -lean_ctor_set(x_78, 1, x_65); -return x_78; -} -case 1: -{ -lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; -lean_dec(x_11); -x_79 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_79, 0, x_8); -lean_ctor_set(x_79, 1, x_70); -lean_ctor_set(x_79, 2, x_32); -x_80 = lean_task_pure(x_64); -x_81 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_81, 0, x_79); -lean_ctor_set(x_81, 1, x_80); -x_82 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_82, 0, x_81); -x_83 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_83, 0, x_82); -x_84 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_84, 0, x_83); -lean_ctor_set(x_84, 1, x_65); -return x_84; -} case 2: { -lean_object* x_85; lean_object* x_86; lean_object* x_87; -lean_dec(x_70); -lean_dec(x_64); +lean_object* x_58; lean_object* x_59; lean_object* x_60; +lean_dec(x_43); +lean_dec(x_37); +lean_dec(x_35); lean_dec(x_32); lean_dec(x_8); -x_85 = l___private_Init_Lean_Elab_Term_14__resumePostponed___lambda__1___closed__1; -x_86 = l_unreachable_x21___rarg(x_85); -x_87 = lean_apply_2(x_86, x_11, x_65); -return x_87; +x_58 = l___private_Init_Lean_Elab_Term_14__resumePostponed___lambda__1___closed__1; +x_59 = l_unreachable_x21___rarg(x_58); +x_60 = lean_apply_2(x_59, x_11, x_38); +return x_60; } default: { -lean_object* x_88; lean_object* x_89; uint8_t x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; +lean_object* x_61; lean_object* x_62; uint8_t x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_dec(x_11); -x_88 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_88, 0, x_8); -lean_ctor_set(x_88, 1, x_70); -lean_ctor_set(x_88, 2, x_32); -x_89 = lean_ctor_get(x_9, 1); -x_90 = lean_ctor_get_uint8(x_89, sizeof(void*)*2 + 3); -x_91 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_91, 0, x_88); -lean_ctor_set(x_91, 1, x_64); -lean_ctor_set_uint8(x_91, sizeof(void*)*2, x_90); -x_92 = lean_alloc_ctor(3, 1, 0); -lean_ctor_set(x_92, 0, x_91); -x_93 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_93, 0, x_92); -x_94 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_94, 0, x_93); -lean_ctor_set(x_94, 1, x_65); -return x_94; +x_61 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_61, 0, x_8); +lean_ctor_set(x_61, 1, x_43); +lean_ctor_set(x_61, 2, x_32); +x_62 = lean_ctor_get(x_9, 1); +x_63 = lean_ctor_get_uint8(x_62, sizeof(void*)*2 + 3); +x_64 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_64, 0, x_61); +lean_ctor_set(x_64, 1, x_35); +lean_ctor_set_uint8(x_64, sizeof(void*)*2, x_63); +x_65 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_65, 0, x_64); +x_66 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_66, 0, x_65); +if (lean_is_scalar(x_37)) { + x_67 = lean_alloc_ctor(0, 2, 0); +} else { + x_67 = x_37; +} +lean_ctor_set(x_67, 0, x_66); +lean_ctor_set(x_67, 1, x_38); +return x_67; } } } } else { -uint8_t x_95; +uint8_t x_77; lean_dec(x_17); lean_dec(x_11); lean_dec(x_8); lean_dec(x_6); -x_95 = !lean_is_exclusive(x_22); -if (x_95 == 0) +x_77 = !lean_is_exclusive(x_22); +if (x_77 == 0) { return x_22; } else { -lean_object* x_96; lean_object* x_97; lean_object* x_98; -x_96 = lean_ctor_get(x_22, 0); -x_97 = lean_ctor_get(x_22, 1); -lean_inc(x_97); -lean_inc(x_96); +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_22, 0); +x_79 = lean_ctor_get(x_22, 1); +lean_inc(x_79); +lean_inc(x_78); lean_dec(x_22); -x_98 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_98, 0, x_96); -lean_ctor_set(x_98, 1, x_97); -return x_98; +x_80 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_80, 0, x_78); +lean_ctor_set(x_80, 1, x_79); +return x_80; } } } else { -uint8_t x_99; +uint8_t x_81; lean_dec(x_17); lean_dec(x_11); lean_dec(x_10); lean_dec(x_8); lean_dec(x_6); -x_99 = !lean_is_exclusive(x_19); -if (x_99 == 0) +x_81 = !lean_is_exclusive(x_19); +if (x_81 == 0) { return x_19; } else { -lean_object* x_100; lean_object* x_101; lean_object* x_102; -x_100 = lean_ctor_get(x_19, 0); -x_101 = lean_ctor_get(x_19, 1); -lean_inc(x_101); -lean_inc(x_100); +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_19, 0); +x_83 = lean_ctor_get(x_19, 1); +lean_inc(x_83); +lean_inc(x_82); lean_dec(x_19); -x_102 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_102, 0, x_100); -lean_ctor_set(x_102, 1, x_101); -return x_102; +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; } } } else { -uint8_t x_103; +uint8_t x_85; lean_dec(x_11); lean_dec(x_10); lean_dec(x_8); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); -x_103 = !lean_is_exclusive(x_16); -if (x_103 == 0) +x_85 = !lean_is_exclusive(x_16); +if (x_85 == 0) { return x_16; } else { -lean_object* x_104; lean_object* x_105; lean_object* x_106; -x_104 = lean_ctor_get(x_16, 0); -x_105 = lean_ctor_get(x_16, 1); -lean_inc(x_105); -lean_inc(x_104); +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_16, 0); +x_87 = lean_ctor_get(x_16, 1); +lean_inc(x_87); +lean_inc(x_86); lean_dec(x_16); -x_106 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_106, 0, x_104); -lean_ctor_set(x_106, 1, x_105); -return x_106; +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_86); +lean_ctor_set(x_88, 1, x_87); +return x_88; } } } else { -uint8_t x_107; +uint8_t x_89; lean_dec(x_11); lean_dec(x_10); lean_dec(x_8); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); -x_107 = !lean_is_exclusive(x_13); -if (x_107 == 0) +x_89 = !lean_is_exclusive(x_13); +if (x_89 == 0) { return x_13; } else { -lean_object* x_108; lean_object* x_109; lean_object* x_110; -x_108 = lean_ctor_get(x_13, 0); -x_109 = lean_ctor_get(x_13, 1); -lean_inc(x_109); -lean_inc(x_108); +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_13, 0); +x_91 = lean_ctor_get(x_13, 1); +lean_inc(x_91); +lean_inc(x_90); lean_dec(x_13); -x_110 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_110, 0, x_108); -lean_ctor_set(x_110, 1, x_109); -return x_110; +x_92 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_92, 0, x_90); +lean_ctor_set(x_92, 1, x_91); +return x_92; } } } @@ -2065,7 +2064,7 @@ lean_dec(x_1); x_15 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_15, 0, x_2); x_16 = 1; -x_17 = l_Lean_Elab_Term_elabTerm(x_14, x_15, x_16, x_16, x_3, x_4); +x_17 = l_Lean_Elab_Term_elabTermAux___main(x_15, x_16, x_16, x_14, x_3, x_4); return x_17; } } @@ -5683,6 +5682,62 @@ lean_dec(x_2); return x_10; } } +lean_object* l___private_Init_Lean_Elab_Definition_1__regTraceClasses(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = l_Lean_Elab_Command_mkDef___lambda__1___closed__4; +x_3 = l_Lean_registerTraceClass(x_2, x_1); +if (lean_obj_tag(x_3) == 0) +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_3, 0); +lean_dec(x_5); +x_6 = lean_box(0); +lean_ctor_set(x_3, 0, x_6); +return x_3; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = lean_ctor_get(x_3, 1); +lean_inc(x_7); +lean_dec(x_3); +x_8 = lean_box(0); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_7); +return x_9; +} +} +else +{ +uint8_t x_10; +x_10 = !lean_is_exclusive(x_3); +if (x_10 == 0) +{ +return x_3; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_3, 0); +x_12 = lean_ctor_get(x_3, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_3); +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_11); +lean_ctor_set(x_13, 1, x_12); +return x_13; +} +} +} +} 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*); @@ -5710,12 +5765,23 @@ l_Lean_Elab_Command_mkDef___lambda__1___closed__1 = _init_l_Lean_Elab_Command_mk 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_mkDef___lambda__1___closed__3 = _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_mkDef___lambda__1___closed__3); +l_Lean_Elab_Command_mkDef___lambda__1___closed__4 = _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_mkDef___lambda__1___closed__4); +l_Lean_Elab_Command_mkDef___lambda__1___closed__5 = _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_mkDef___lambda__1___closed__5); +l_Lean_Elab_Command_mkDef___lambda__1___closed__6 = _init_l_Lean_Elab_Command_mkDef___lambda__1___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_mkDef___lambda__1___closed__6); 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); +res = l___private_Init_Lean_Elab_Definition_1__regTraceClasses(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Lean/Elab/Frontend.c b/stage0/stdlib/Init/Lean/Elab/Frontend.c index 9e698669be..16cced2dca 100644 --- a/stage0/stdlib/Init/Lean/Elab/Frontend.c +++ b/stage0/stdlib/Init/Lean/Elab/Frontend.c @@ -43,8 +43,8 @@ lean_object* l_Lean_Parser_parseCommand___main(lean_object*, lean_object*, lean_ lean_object* l_Lean_Elab_Frontend_processCommandsAux___boxed(lean_object*); extern lean_object* l_PersistentArray_empty___closed__3; lean_object* l_Lean_Elab_Frontend_elabCommandAtFrontend(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabCommand___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Frontend_updateCmdPos(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabCommand(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Frontend_processCommand(lean_object*, lean_object*); lean_object* l_Lean_Elab_Frontend_processCommandsAux___main(lean_object*); lean_object* l_Lean_Elab_Frontend_liftIOCore_x21___rarg(lean_object*, lean_object*, lean_object*); @@ -376,7 +376,7 @@ lean_ctor_set(x_14, 4, x_6); lean_ctor_set(x_14, 5, x_12); lean_ctor_set(x_14, 6, x_13); lean_inc(x_14); -x_15 = l_Lean_Elab_Command_elabCommand(x_1, x_14, x_7); +x_15 = l_Lean_Elab_Command_elabCommand___main(x_1, x_14, x_7); if (lean_obj_tag(x_15) == 0) { uint8_t x_16; @@ -683,7 +683,7 @@ lean_ctor_set(x_90, 4, x_82); lean_ctor_set(x_90, 5, x_88); lean_ctor_set(x_90, 6, x_89); lean_inc(x_90); -x_91 = l_Lean_Elab_Command_elabCommand(x_1, x_90, x_83); +x_91 = l_Lean_Elab_Command_elabCommand___main(x_1, x_90, x_83); if (lean_obj_tag(x_91) == 0) { uint8_t x_92; diff --git a/stage0/stdlib/Init/Lean/Elab/Import.c b/stage0/stdlib/Init/Lean/Elab/Import.c index e842d40960..d86ec1d044 100644 --- a/stage0/stdlib/Init/Lean/Elab/Import.c +++ b/stage0/stdlib/Init/Lean/Elab/Import.c @@ -18,7 +18,6 @@ lean_object* l_Lean_Parser_parseHeader(lean_object*, lean_object*); lean_object* lean_io_error_to_string(lean_object*); lean_object* l_List_map___main___at_Lean_Elab_headerToImports___spec__1(lean_object*); lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); -extern lean_object* l_Lean_stxInh; lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_headerToImports___closed__2; lean_object* l_Lean_Elab_headerToImports(lean_object*); @@ -41,6 +40,7 @@ lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*); lean_object* l_Lean_FileMap_ofString(lean_object*); lean_object* lean_mk_empty_environment(uint32_t, lean_object*); lean_object* lean_import_modules(lean_object*, uint32_t, lean_object*); +extern lean_object* l_Lean_Syntax_inhabited; extern lean_object* l_Lean_normalizeModuleName___closed__1; lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* lean_parse_imports(lean_object*, lean_object*, lean_object*); @@ -200,7 +200,7 @@ x_2 = l_Lean_Syntax_asNode(x_1); x_3 = lean_ctor_get(x_2, 1); lean_inc(x_3); lean_dec(x_2); -x_4 = l_Lean_stxInh; +x_4 = l_Lean_Syntax_inhabited; x_5 = lean_unsigned_to_nat(0u); x_6 = lean_array_get(x_4, x_3, x_5); x_7 = l_Lean_Syntax_isNone(x_6); diff --git a/stage0/stdlib/Init/Lean/Elab/Quotation.c b/stage0/stdlib/Init/Lean/Elab/Quotation.c index ddcd5e0f60..3c9ea7414d 100644 --- a/stage0/stdlib/Init/Lean/Elab/Quotation.c +++ b/stage0/stdlib/Init/Lean/Elab/Quotation.c @@ -112,7 +112,6 @@ lean_object* l___private_Init_Lean_Elab_Quotation_8__getHeadInfo___lambda__4___b lean_object* l___private_Init_Lean_Elab_Quotation_6__quoteSyntax___main___closed__1; lean_object* l_Lean_Elab_Term_stxQuot_expand___closed__5; lean_object* l_Lean_Elab_Term_stxQuot_expand___closed__3; -extern lean_object* l_Lean_stxInh; lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Elab_Quotation_8__getHeadInfo___spec__2___closed__2; lean_object* l_Lean_Elab_Term_elabStxQuot___closed__1; extern lean_object* l_PersistentHashMap_mkCollisionNode___rarg___closed__1; @@ -463,6 +462,7 @@ lean_object* l___private_Init_Lean_Elab_Quotation_10__compileStxMatch___main___c lean_object* l___private_Init_Lean_Elab_Quotation_6__quoteSyntax___main___closed__14; lean_object* l___private_Init_Lean_Elab_Quotation_6__quoteSyntax___main___closed__28; extern lean_object* l_Lean_Parser_Term_str___elambda__1___closed__2; +extern lean_object* l_Lean_Syntax_inhabited; lean_object* l___private_Init_Lean_Elab_Quotation_9__explodeHeadPat___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Quotation_6__quoteSyntax___main___closed__15; lean_object* l_List_mapM___main___at___private_Init_Lean_Elab_Quotation_10__compileStxMatch___main___spec__8___closed__8; @@ -2273,7 +2273,7 @@ return x_8; else { lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_9 = l_Lean_stxInh; +x_9 = l_Lean_Syntax_inhabited; x_10 = lean_unsigned_to_nat(2u); x_11 = lean_array_get(x_9, x_3, x_10); x_12 = l_Lean_Syntax_isNone(x_11); @@ -6059,7 +6059,7 @@ _start: if (lean_obj_tag(x_1) == 0) { lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_2 = l_Lean_stxInh; +x_2 = l_Lean_Syntax_inhabited; x_3 = l_List_head_x21___rarg___closed__2; x_4 = lean_panic_fn(x_2, x_3); return x_4; @@ -7546,7 +7546,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_List_Monad; -x_2 = l_Lean_stxInh; +x_2 = l_Lean_Syntax_inhabited; x_3 = l_monadInhabited___rarg(x_1, x_2); return x_3; } @@ -7556,7 +7556,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_List_head_x21___at___private_Init_Lean_Elab_Quotation_10__compileStxMatch___main___spec__2___closed__1; -x_2 = l_Lean_stxInh; +x_2 = l_Lean_Syntax_inhabited; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -12047,7 +12047,7 @@ return x_18; else { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_object* x_24; uint8_t x_41; -x_19 = l_Lean_stxInh; +x_19 = l_Lean_Syntax_inhabited; x_20 = lean_unsigned_to_nat(1u); x_21 = lean_array_get(x_19, x_4, x_20); x_22 = l_Lean_Parser_Term_paren___elambda__1___closed__1; @@ -15645,7 +15645,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_Name_inhabited; -x_2 = l_Lean_stxInh; +x_2 = l_Lean_Syntax_inhabited; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -15967,7 +15967,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_197 = l_Lean_stxInh; +x_197 = l_Lean_Syntax_inhabited; x_198 = lean_unsigned_to_nat(0u); x_199 = lean_array_get(x_197, x_4, x_198); x_200 = lean_unsigned_to_nat(2u); @@ -15995,7 +15995,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_207 = l_Lean_stxInh; +x_207 = l_Lean_Syntax_inhabited; x_208 = lean_unsigned_to_nat(0u); x_209 = lean_array_get(x_207, x_4, x_208); x_210 = lean_unsigned_to_nat(2u); @@ -16023,7 +16023,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_217 = l_Lean_stxInh; +x_217 = l_Lean_Syntax_inhabited; x_218 = lean_unsigned_to_nat(1u); x_219 = lean_array_get(x_217, x_4, x_218); lean_dec(x_4); @@ -16068,7 +16068,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_233 = l_Lean_stxInh; +x_233 = l_Lean_Syntax_inhabited; x_234 = lean_unsigned_to_nat(2u); x_235 = lean_array_get(x_233, x_4, x_234); x_236 = lean_unsigned_to_nat(4u); @@ -16099,7 +16099,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_245 = l_Lean_stxInh; +x_245 = l_Lean_Syntax_inhabited; x_246 = lean_unsigned_to_nat(0u); x_247 = lean_array_get(x_245, x_4, x_246); lean_inc(x_2); @@ -16202,7 +16202,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_269 = l_Lean_stxInh; +x_269 = l_Lean_Syntax_inhabited; x_270 = lean_unsigned_to_nat(1u); x_271 = lean_array_get(x_269, x_4, x_270); lean_inc(x_271); @@ -16418,7 +16418,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_317 = l_Lean_stxInh; +x_317 = l_Lean_Syntax_inhabited; x_318 = lean_unsigned_to_nat(1u); x_319 = lean_array_get(x_317, x_4, x_318); x_320 = l_Lean_Syntax_getArgs(x_319); @@ -17470,7 +17470,7 @@ lean_free_object(x_116); lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); -x_627 = l_Lean_stxInh; +x_627 = l_Lean_Syntax_inhabited; x_628 = lean_unsigned_to_nat(0u); x_629 = lean_array_get(x_627, x_4, x_628); lean_dec(x_4); @@ -18189,7 +18189,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_821 = l_Lean_stxInh; +x_821 = l_Lean_Syntax_inhabited; x_822 = lean_unsigned_to_nat(0u); x_823 = lean_array_get(x_821, x_4, x_822); x_824 = lean_unsigned_to_nat(2u); @@ -18216,7 +18216,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_831 = l_Lean_stxInh; +x_831 = l_Lean_Syntax_inhabited; x_832 = lean_unsigned_to_nat(0u); x_833 = lean_array_get(x_831, x_4, x_832); x_834 = lean_unsigned_to_nat(2u); @@ -18243,7 +18243,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_841 = l_Lean_stxInh; +x_841 = l_Lean_Syntax_inhabited; x_842 = lean_unsigned_to_nat(1u); x_843 = lean_array_get(x_841, x_4, x_842); lean_dec(x_4); @@ -18287,7 +18287,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_857 = l_Lean_stxInh; +x_857 = l_Lean_Syntax_inhabited; x_858 = lean_unsigned_to_nat(2u); x_859 = lean_array_get(x_857, x_4, x_858); x_860 = lean_unsigned_to_nat(4u); @@ -18317,7 +18317,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_869 = l_Lean_stxInh; +x_869 = l_Lean_Syntax_inhabited; x_870 = lean_unsigned_to_nat(0u); x_871 = lean_array_get(x_869, x_4, x_870); lean_inc(x_2); @@ -18421,7 +18421,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_891 = l_Lean_stxInh; +x_891 = l_Lean_Syntax_inhabited; x_892 = lean_unsigned_to_nat(1u); x_893 = lean_array_get(x_891, x_4, x_892); lean_inc(x_893); @@ -18636,7 +18636,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_939 = l_Lean_stxInh; +x_939 = l_Lean_Syntax_inhabited; x_940 = lean_unsigned_to_nat(1u); x_941 = lean_array_get(x_939, x_4, x_940); x_942 = l_Lean_Syntax_getArgs(x_941); @@ -19269,7 +19269,7 @@ lean_free_object(x_116); lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); -x_1132 = l_Lean_stxInh; +x_1132 = l_Lean_Syntax_inhabited; x_1133 = lean_unsigned_to_nat(0u); x_1134 = lean_array_get(x_1132, x_4, x_1133); lean_dec(x_4); @@ -19964,7 +19964,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1294 = l_Lean_stxInh; +x_1294 = l_Lean_Syntax_inhabited; x_1295 = lean_unsigned_to_nat(0u); x_1296 = lean_array_get(x_1294, x_4, x_1295); x_1297 = lean_unsigned_to_nat(2u); @@ -19991,7 +19991,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1304 = l_Lean_stxInh; +x_1304 = l_Lean_Syntax_inhabited; x_1305 = lean_unsigned_to_nat(0u); x_1306 = lean_array_get(x_1304, x_4, x_1305); x_1307 = lean_unsigned_to_nat(2u); @@ -20018,7 +20018,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1314 = l_Lean_stxInh; +x_1314 = l_Lean_Syntax_inhabited; x_1315 = lean_unsigned_to_nat(1u); x_1316 = lean_array_get(x_1314, x_4, x_1315); lean_dec(x_4); @@ -20062,7 +20062,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1330 = l_Lean_stxInh; +x_1330 = l_Lean_Syntax_inhabited; x_1331 = lean_unsigned_to_nat(2u); x_1332 = lean_array_get(x_1330, x_4, x_1331); x_1333 = lean_unsigned_to_nat(4u); @@ -20092,7 +20092,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1342 = l_Lean_stxInh; +x_1342 = l_Lean_Syntax_inhabited; x_1343 = lean_unsigned_to_nat(0u); x_1344 = lean_array_get(x_1342, x_4, x_1343); lean_inc(x_2); @@ -20196,7 +20196,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1364 = l_Lean_stxInh; +x_1364 = l_Lean_Syntax_inhabited; x_1365 = lean_unsigned_to_nat(1u); x_1366 = lean_array_get(x_1364, x_4, x_1365); lean_inc(x_1366); @@ -20411,7 +20411,7 @@ lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1412 = l_Lean_stxInh; +x_1412 = l_Lean_Syntax_inhabited; x_1413 = lean_unsigned_to_nat(1u); x_1414 = lean_array_get(x_1412, x_4, x_1413); x_1415 = l_Lean_Syntax_getArgs(x_1414); @@ -21044,7 +21044,7 @@ lean_dec(x_1225); lean_free_object(x_115); lean_free_object(x_105); lean_dec(x_118); -x_1605 = l_Lean_stxInh; +x_1605 = l_Lean_Syntax_inhabited; x_1606 = lean_unsigned_to_nat(0u); x_1607 = lean_array_get(x_1605, x_4, x_1606); lean_dec(x_4); @@ -21772,7 +21772,7 @@ lean_dec(x_1697); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1773 = l_Lean_stxInh; +x_1773 = l_Lean_Syntax_inhabited; x_1774 = lean_unsigned_to_nat(0u); x_1775 = lean_array_get(x_1773, x_4, x_1774); x_1776 = lean_unsigned_to_nat(2u); @@ -21799,7 +21799,7 @@ lean_dec(x_1697); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1783 = l_Lean_stxInh; +x_1783 = l_Lean_Syntax_inhabited; x_1784 = lean_unsigned_to_nat(0u); x_1785 = lean_array_get(x_1783, x_4, x_1784); x_1786 = lean_unsigned_to_nat(2u); @@ -21826,7 +21826,7 @@ lean_dec(x_1697); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1793 = l_Lean_stxInh; +x_1793 = l_Lean_Syntax_inhabited; x_1794 = lean_unsigned_to_nat(1u); x_1795 = lean_array_get(x_1793, x_4, x_1794); lean_dec(x_4); @@ -21870,7 +21870,7 @@ lean_dec(x_1697); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1809 = l_Lean_stxInh; +x_1809 = l_Lean_Syntax_inhabited; x_1810 = lean_unsigned_to_nat(2u); x_1811 = lean_array_get(x_1809, x_4, x_1810); x_1812 = lean_unsigned_to_nat(4u); @@ -21900,7 +21900,7 @@ lean_dec(x_1697); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1821 = l_Lean_stxInh; +x_1821 = l_Lean_Syntax_inhabited; x_1822 = lean_unsigned_to_nat(0u); x_1823 = lean_array_get(x_1821, x_4, x_1822); lean_inc(x_2); @@ -22004,7 +22004,7 @@ lean_dec(x_1697); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1843 = l_Lean_stxInh; +x_1843 = l_Lean_Syntax_inhabited; x_1844 = lean_unsigned_to_nat(1u); x_1845 = lean_array_get(x_1843, x_4, x_1844); lean_inc(x_1845); @@ -22219,7 +22219,7 @@ lean_dec(x_1697); lean_free_object(x_105); lean_dec(x_118); lean_dec(x_1); -x_1891 = l_Lean_stxInh; +x_1891 = l_Lean_Syntax_inhabited; x_1892 = lean_unsigned_to_nat(1u); x_1893 = lean_array_get(x_1891, x_4, x_1892); x_1894 = l_Lean_Syntax_getArgs(x_1893); @@ -22852,7 +22852,7 @@ lean_dec(x_1701); lean_dec(x_1697); lean_free_object(x_105); lean_dec(x_118); -x_2084 = l_Lean_stxInh; +x_2084 = l_Lean_Syntax_inhabited; x_2085 = lean_unsigned_to_nat(0u); x_2086 = lean_array_get(x_2084, x_4, x_2085); lean_dec(x_4); @@ -23612,7 +23612,7 @@ lean_dec(x_2180); lean_dec(x_2177); lean_dec(x_118); lean_dec(x_1); -x_2259 = l_Lean_stxInh; +x_2259 = l_Lean_Syntax_inhabited; x_2260 = lean_unsigned_to_nat(0u); x_2261 = lean_array_get(x_2259, x_4, x_2260); x_2262 = lean_unsigned_to_nat(2u); @@ -23639,7 +23639,7 @@ lean_dec(x_2180); lean_dec(x_2177); lean_dec(x_118); lean_dec(x_1); -x_2269 = l_Lean_stxInh; +x_2269 = l_Lean_Syntax_inhabited; x_2270 = lean_unsigned_to_nat(0u); x_2271 = lean_array_get(x_2269, x_4, x_2270); x_2272 = lean_unsigned_to_nat(2u); @@ -23666,7 +23666,7 @@ lean_dec(x_2180); lean_dec(x_2177); lean_dec(x_118); lean_dec(x_1); -x_2279 = l_Lean_stxInh; +x_2279 = l_Lean_Syntax_inhabited; x_2280 = lean_unsigned_to_nat(1u); x_2281 = lean_array_get(x_2279, x_4, x_2280); lean_dec(x_4); @@ -23710,7 +23710,7 @@ lean_dec(x_2180); lean_dec(x_2177); lean_dec(x_118); lean_dec(x_1); -x_2295 = l_Lean_stxInh; +x_2295 = l_Lean_Syntax_inhabited; x_2296 = lean_unsigned_to_nat(2u); x_2297 = lean_array_get(x_2295, x_4, x_2296); x_2298 = lean_unsigned_to_nat(4u); @@ -23740,7 +23740,7 @@ lean_dec(x_2180); lean_dec(x_2177); lean_dec(x_118); lean_dec(x_1); -x_2307 = l_Lean_stxInh; +x_2307 = l_Lean_Syntax_inhabited; x_2308 = lean_unsigned_to_nat(0u); x_2309 = lean_array_get(x_2307, x_4, x_2308); lean_inc(x_2); @@ -23844,7 +23844,7 @@ lean_dec(x_2180); lean_dec(x_2177); lean_dec(x_118); lean_dec(x_1); -x_2329 = l_Lean_stxInh; +x_2329 = l_Lean_Syntax_inhabited; x_2330 = lean_unsigned_to_nat(1u); x_2331 = lean_array_get(x_2329, x_4, x_2330); lean_inc(x_2331); @@ -24059,7 +24059,7 @@ lean_dec(x_2180); lean_dec(x_2177); lean_dec(x_118); lean_dec(x_1); -x_2377 = l_Lean_stxInh; +x_2377 = l_Lean_Syntax_inhabited; x_2378 = lean_unsigned_to_nat(1u); x_2379 = lean_array_get(x_2377, x_4, x_2378); x_2380 = l_Lean_Syntax_getArgs(x_2379); @@ -24692,7 +24692,7 @@ lean_dec(x_2184); lean_dec(x_2180); lean_dec(x_2177); lean_dec(x_118); -x_2570 = l_Lean_stxInh; +x_2570 = l_Lean_Syntax_inhabited; x_2571 = lean_unsigned_to_nat(0u); x_2572 = lean_array_get(x_2570, x_4, x_2571); lean_dec(x_4); @@ -25202,7 +25202,7 @@ lean_dec(x_11); x_14 = l___private_Init_Lean_Elab_Quotation_14__exprPlaceholder; lean_inc_n(x_6, 2); x_15 = lean_local_ctx_mk_let_decl(x_12, x_6, x_6, x_14, x_9); -x_16 = l_Lean_stxInh; +x_16 = l_Lean_Syntax_inhabited; x_17 = lean_unsigned_to_nat(3u); x_18 = lean_array_get(x_16, x_4, x_17); lean_dec(x_4); diff --git a/stage0/stdlib/Init/Lean/Elab/Syntax.c b/stage0/stdlib/Init/Lean/Elab/Syntax.c index e14114ac04..15c9f65a91 100644 --- a/stage0/stdlib/Init/Lean/Elab/Syntax.c +++ b/stage0/stdlib/Init/Lean/Elab/Syntax.c @@ -22,6 +22,7 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__37; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__55; extern lean_object* l_Lean_Parser_Term_andthen___elambda__1___closed__1; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__3; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__7; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__71; lean_object* l_Lean_Syntax_isNatLitAux(lean_object*, lean_object*); @@ -37,27 +38,29 @@ extern lean_object* l_Lean_Parser_Syntax_many1___elambda__1___closed__1; extern lean_object* l_Lean_Elab_Term_elabArrayLit___closed__13; lean_object* l_unreachable_x21___rarg(lean_object*); extern lean_object* l_Lean_nullKind; -extern lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Syntax_2__mkParserSeq___spec__1___closed__4; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__4; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__7; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__57; extern lean_object* l_Lean_Syntax_formatStxAux___main___closed__5; +extern lean_object* l___private_Init_Lean_Elab_Quotation_13__letBindRhss___main___closed__9; lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Syntax_1__getOptNum___boxed(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__12; extern lean_object* l_Lean_Parser_Syntax_many1___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__25; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__53; lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__42; extern lean_object* l_Lean_Parser_Syntax_paren___elambda__1___closed__3; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__100; extern lean_object* l_Lean_nameToExprAux___main___closed__4; +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__3; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__17; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__8; extern lean_object* l_Lean_Elab_Command_runTermElabM___rarg___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__94; lean_object* l_Lean_Elab_Command_elabSyntax___closed__7; -extern lean_object* l_Lean_stxInh; extern lean_object* l_Lean_Parser_Syntax_orelse___elambda__1___closed__1; extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__31; @@ -78,19 +81,23 @@ lean_object* l_Lean_Elab_Command_elabSyntax___closed__16; lean_object* l_Lean_Elab_Command_elabSyntax___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +extern lean_object* l___private_Init_Lean_Elab_TermBinders_10__expandFunBindersAux___main___closed__7; extern lean_object* l_Lean_Parser_Term_num___elambda__1___closed__1; lean_object* l_ReaderT_bind___at___private_Init_Lean_Elab_Quotation_1__quoteName___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__20; +extern lean_object* l_Lean_Elab_mkMacroAttribute___closed__3; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__3; lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescr___main___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclareSyntaxCat___closed__2; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Syntax_2__mkParserSeq___spec__1___closed__6; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__22; extern lean_object* l_Lean_Parser_Syntax_ident___elambda__1___closed__1; lean_object* lean_string_utf8_byte_size(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__61; lean_object* l_Lean_Elab_Command_elabSyntax___closed__10; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1; lean_object* l___private_Init_Lean_Elab_Quotation_1__quoteName___main(lean_object*); +extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; extern lean_object* l___private_Init_Lean_Elab_Quotation_4__quoteOption___rarg___lambda__2___closed__3; extern lean_object* l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4; lean_object* lean_nat_add(lean_object*, lean_object*); @@ -105,6 +112,8 @@ lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__80; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__14; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__28; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__5; +lean_object* lean_mk_syntax_ident(lean_object*); +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__75; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__26; lean_object* lean_array_fget(lean_object*, lean_object*); @@ -116,10 +125,12 @@ extern lean_object* l___private_Init_Lean_Elab_Quotation_4__quoteOption___rarg__ lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__34; extern lean_object* l_Lean_Parser_Term_id___elambda__1___closed__2; extern lean_object* l_Lean_numLitKind; +extern lean_object* l_Lean_Parser_Term_stxQuot___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Syntax_num___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__48; lean_object* l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(lean_object*); lean_object* l___private_Init_Lean_Elab_Quotation_4__quoteOption___at_Lean_Elab_Term_toParserDescr___main___spec__1(lean_object*); +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__24; lean_object* l_Lean_Syntax_isStrLit_x3f(lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__6; lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); @@ -130,6 +141,7 @@ lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__32; extern lean_object* l_Lean_Parser_Command_def___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__20; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__16; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Unhygienic_run___rarg(lean_object*); extern lean_object* l_Lean_Parser_Command_def___elambda__1___closed__1; @@ -149,52 +161,66 @@ lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__72; extern lean_object* l_Lean_Parser_Command_attrInstance___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__23; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__88; +extern lean_object* l_Lean_Elab_Term_expandCDot_x3f___closed__3; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__20; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__30; lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__10; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__76; +lean_object* l_Lean_Elab_Command_adaptExpander(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__18; extern lean_object* l_Lean_Parser_mkParserAttributeImpl___closed__1; lean_object* lean_name_mk_string(lean_object*, lean_object*); extern lean_object* l_Lean_choiceKind; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Syntax_2__mkParserSeq___spec__1___closed__7; +extern lean_object* l___private_Init_Lean_Elab_TermBinders_10__expandFunBindersAux___main___closed__4; lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__66; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__56; lean_object* l_Lean_Elab_Command_elabSyntax___closed__22; +extern lean_object* l_Lean_Parser_Term_fun___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__77; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Syntax_2__mkParserSeq___spec__1___closed__1; lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__41; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__13; lean_object* l_Lean_Elab_Command_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__11; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Syntax_2__mkParserSeq___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__104; extern lean_object* l_Lean_Elab_Term_elabArrow___lambda__1___closed__6; +extern lean_object* l_Lean_Parser_Term_match__syntax___elambda__1___closed__1; extern lean_object* l_Lean_Options_empty; lean_object* l_Lean_Elab_Command_elabSyntax___closed__5; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__3; +uint8_t l_coeDecidableEq(uint8_t); lean_object* l_Lean_Elab_Command_elabSyntax___closed__14; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__35; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__19; extern lean_object* l_Lean_Parser_Syntax_char___elambda__1___closed__1; +extern lean_object* l_Lean_Elab_Term_expandCDot_x3f___closed__2; extern lean_object* l_Lean_Parser_Command_attributes___elambda__1___closed__5; lean_object* l_Lean_Elab_Command_elabSyntax___closed__18; lean_object* l___private_Init_Lean_Elab_Command_9__mkTermContext(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabCommand___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__15; extern lean_object* l_Lean_Parser_Syntax_cat___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Command_attributes___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__36; lean_object* l_Lean_Elab_Command_elabSyntax___closed__3; -lean_object* l_Lean_Elab_Command_elabCommand(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__83; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax(lean_object*); +lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_declModifiers___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__16; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__86; +lean_object* l_Lean_Elab_Command_elabMacro(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__85; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__65; extern lean_object* l_Lean_nullKind___closed__2; extern lean_object* l_Lean_Parser_Term_str___elambda__1___closed__1; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__12; extern lean_object* l_Lean_Unhygienic_MonadQuotation___closed__1; extern lean_object* l___private_Init_Lean_Elab_Quotation_4__quoteOption___rarg___lambda__2___closed__8; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__70; @@ -208,28 +234,36 @@ lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__33; lean_object* l_Lean_Elab_Command_elabSyntax___closed__9; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__22; extern lean_object* l_Lean_Parser_Term_str___elambda__1___closed__2; +extern lean_object* l_Lean_Syntax_inhabited; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__26; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__93; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__54; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__84; +extern lean_object* l_Lean_Parser_Term_matchAlt___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabSyntax___closed__4; lean_object* l_Lean_Name_appendAfter(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Syntax_lookahead___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__45; lean_object* l_Lean_Elab_Command_elabSyntax___closed__17; +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__40; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__67; extern lean_object* l_Lean_Parser_Syntax_sepBy1___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__78; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__91; +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__2; uint8_t l_Lean_Parser_isParserCategory(lean_object*, lean_object*); +extern uint8_t l___private_Init_Lean_Elab_Term_7__hasCDot___main___closed__1; lean_object* l_Lean_Elab_Command_getCurrMacroScope(lean_object*, lean_object*); -extern lean_object* l_Lean_Parser_Command_private___elambda__1___closed__1; +extern lean_object* l___private_Init_Lean_Elab_Quotation_13__letBindRhss___main___closed__7; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__103; +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__1; extern lean_object* l_Lean_Parser_Syntax_optional___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabSyntax___closed__8; lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* l_Lean_Syntax_getKind(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__51; +extern lean_object* l_Lean_Parser_Term_match__syntax___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Syntax_atom___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabSyntax___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__21; @@ -239,6 +273,7 @@ extern lean_object* l_Lean_Parser_Term_app___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__39; lean_object* l_Lean_Parser_mkFreshKind(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__21; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Syntax_2__mkParserSeq___spec__1___closed__5; lean_object* l_Lean_Elab_Command_elabSyntax___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__62; @@ -248,39 +283,52 @@ extern lean_object* l_Lean_Parser_Syntax_str___elambda__1___closed__1; lean_object* l_Lean_mkStxStrLit(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__87; lean_object* l_Lean_Elab_Command_elabSyntax(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__13; lean_object* l_Lean_Elab_Command_elabSyntax___closed__21; extern lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__3; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__23; uint8_t l_Lean_Syntax_isNone(lean_object*); lean_object* l_Lean_Elab_Command_getEnv(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabSyntax___closed__23; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__11; extern lean_object* l_Lean_mkOptionalNode___closed__1; lean_object* l_Lean_Elab_Command_elabSyntax___closed__13; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__68; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__6; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__25; +uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_macro___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__9; lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_setEnv(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__27; extern lean_object* l_Lean_Syntax_getKind___closed__3; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__52; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__4; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclareSyntaxCat___closed__3; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__27; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Syntax_2__mkParserSeq___spec__1___closed__9; extern lean_object* l_Lean_Parser_Command_syntaxCat___elambda__1___closed__2; lean_object* l_Lean_mkStxLit(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Parser_Command_private___elambda__1___closed__2; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__9; extern lean_object* l_Lean_Parser_Command_optDeclSig___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_elabMacro___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__29; extern lean_object* l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__64; lean_object* l___private_Init_Lean_Elab_Syntax_3__elabKind___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_DiscrTree_Trie_format___main___rarg___closed__1; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__8; lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__17; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__1; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_macro___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabSyntax___closed__12; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__97; +extern lean_object* l_Lean_Elab_mkMacroAttribute___closed__2; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__1; extern lean_object* l_Lean_Parser_Syntax_sepBy___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__90; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__102; @@ -288,20 +336,27 @@ lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__2; extern lean_object* l_Lean_Parser_mkParserOfConstantUnsafe___closed__3; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__74; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__47; +extern lean_object* l_Lean_Elab_mkMacroAttribute___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__60; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__89; extern lean_object* l_Lean_Parser_Command_syntax___elambda__1___closed__1; extern lean_object* l_Lean_Parser_Term_orelse___elambda__1___closed__1; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__2; lean_object* lean_name_mk_numeral(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Syntax_3__elabKind(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__69; lean_object* l_Lean_Elab_Command_elabDeclareSyntaxCat(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Syntax_try___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__92; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__15; extern lean_object* l_Lean_Parser_Term_char___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_toParserDescr___main___closed__44; lean_object* l___private_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__18; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__5; extern lean_object* l___private_Init_Lean_Elab_Quotation_4__quoteOption___rarg___closed__3; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__28; +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___closed__14; 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___private_Init_Lean_Elab_Command_10__mkTermState(lean_object*); @@ -514,7 +569,7 @@ lean_dec(x_4); if (x_8 == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_9 = l_Lean_stxInh; +x_9 = l_Lean_Syntax_inhabited; x_10 = lean_array_get(x_9, x_1, x_5); x_11 = l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Syntax_2__mkParserSeq___spec__1(x_1, x_1, x_7, x_10, x_2, x_3); return x_11; @@ -522,7 +577,7 @@ return x_11; else { lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = l_Lean_stxInh; +x_12 = l_Lean_Syntax_inhabited; x_13 = lean_array_get(x_12, x_1, x_5); x_14 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_14, 0, x_13); @@ -4048,7 +4103,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Parser_Command_private___elambda__1___closed__1; +x_2 = l_Lean_Parser_Command_def___elambda__1___closed__1; x_3 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); @@ -4068,35 +4123,32 @@ return x_3; lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__11() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_private___elambda__1___closed__2; -x_2 = l_Lean_Elab_Command_elabSyntax___closed__10; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; +lean_object* x_1; +x_1 = lean_mk_string("myParser"); +return x_1; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__12() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_empty___closed__1; -x_2 = l_Lean_Elab_Command_elabSyntax___closed__11; -x_3 = lean_array_push(x_1, x_2); -return x_3; +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__11; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; } } lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__13() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_nullKind___closed__2; -x_2 = l_Lean_Elab_Command_elabSyntax___closed__12; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__11; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Command_elabSyntax___closed__12; +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_Elab_Command_elabSyntax___closed__14() { @@ -4104,10 +4156,8 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Parser_Command_def___elambda__1___closed__1; -x_3 = lean_alloc_ctor(2, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); +x_2 = l_Lean_Elab_Command_elabSyntax___closed__11; +x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } @@ -4116,22 +4166,12 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_empty___closed__1; -x_2 = l_Lean_Elab_Command_elabSyntax___closed__14; -x_3 = lean_array_push(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__16() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_empty___closed__1; x_2 = l___private_Init_Lean_Elab_Quotation_8__getHeadInfo___elambda__3___closed__4; x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__17() { +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__16() { _start: { lean_object* x_1; @@ -4139,22 +4179,22 @@ x_1 = lean_mk_string("ParserDescr.node"); return x_1; } } -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__18() { +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__17() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__17; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__16; x_2 = lean_string_utf8_byte_size(x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__19() { +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__18() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Elab_Command_elabSyntax___closed__17; +x_1 = l_Lean_Elab_Command_elabSyntax___closed__16; x_2 = lean_unsigned_to_nat(0u); -x_3 = l_Lean_Elab_Command_elabSyntax___closed__18; +x_3 = l_Lean_Elab_Command_elabSyntax___closed__17; x_4 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_4, 0, x_1); lean_ctor_set(x_4, 1, x_2); @@ -4162,7 +4202,7 @@ lean_ctor_set(x_4, 2, x_3); return x_4; } } -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__20() { +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__19() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -4172,7 +4212,7 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__21() { +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__20() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; @@ -4182,24 +4222,24 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__22() { +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__21() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_elabSyntax___closed__21; +x_2 = l_Lean_Elab_Command_elabSyntax___closed__20; 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_Elab_Command_elabSyntax___closed__23() { +lean_object* _init_l_Lean_Elab_Command_elabSyntax___closed__22() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_elabSyntax___closed__22; +x_2 = l_Lean_Elab_Command_elabSyntax___closed__21; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); @@ -4214,7 +4254,7 @@ lean_inc(x_2); x_4 = l_Lean_Elab_Command_getEnv(x_2, x_3); if (lean_obj_tag(x_4) == 0) { -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_242; +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_248; x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_4, 1); @@ -4222,49 +4262,49 @@ lean_inc(x_6); lean_dec(x_4); x_7 = lean_unsigned_to_nat(4u); x_8 = l_Lean_Syntax_getIdAt(x_1, x_7); -x_242 = l_Lean_Parser_isParserCategory(x_5, x_8); +x_248 = l_Lean_Parser_isParserCategory(x_5, x_8); lean_dec(x_5); -if (x_242 == 0) +if (x_248 == 0) { -lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; uint8_t x_250; -x_243 = l_Lean_Syntax_getArg(x_1, x_7); +lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; uint8_t x_256; +x_249 = l_Lean_Syntax_getArg(x_1, x_7); lean_dec(x_1); -x_244 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_244, 0, x_8); -x_245 = l_Lean_Elab_Term_toParserDescr___main___closed__104; -x_246 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_246, 0, x_245); -lean_ctor_set(x_246, 1, x_244); -x_247 = l_Lean_Elab_Term_mkConst___closed__4; -x_248 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_248, 0, x_246); -lean_ctor_set(x_248, 1, x_247); -x_249 = l_Lean_Elab_Command_throwError___rarg(x_243, x_248, x_2, x_6); -x_250 = !lean_is_exclusive(x_249); -if (x_250 == 0) +x_250 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_250, 0, x_8); +x_251 = l_Lean_Elab_Term_toParserDescr___main___closed__104; +x_252 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_252, 0, x_251); +lean_ctor_set(x_252, 1, x_250); +x_253 = l_Lean_Elab_Term_mkConst___closed__4; +x_254 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_254, 0, x_252); +lean_ctor_set(x_254, 1, x_253); +x_255 = l_Lean_Elab_Command_throwError___rarg(x_249, x_254, x_2, x_6); +x_256 = !lean_is_exclusive(x_255); +if (x_256 == 0) { -return x_249; +return x_255; } else { -lean_object* x_251; lean_object* x_252; lean_object* x_253; -x_251 = lean_ctor_get(x_249, 0); -x_252 = lean_ctor_get(x_249, 1); -lean_inc(x_252); -lean_inc(x_251); -lean_dec(x_249); -x_253 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_253, 0, x_251); -lean_ctor_set(x_253, 1, x_252); -return x_253; +lean_object* x_257; lean_object* x_258; lean_object* x_259; +x_257 = lean_ctor_get(x_255, 0); +x_258 = lean_ctor_get(x_255, 1); +lean_inc(x_258); +lean_inc(x_257); +lean_dec(x_255); +x_259 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_259, 0, x_257); +lean_ctor_set(x_259, 1, x_258); +return x_259; } } else { x_9 = x_6; -goto block_241; +goto block_247; } -block_241: +block_247: { lean_object* x_10; lean_object* x_11; lean_object* x_12; x_10 = lean_unsigned_to_nat(1u); @@ -4275,7 +4315,7 @@ x_12 = l___private_Init_Lean_Elab_Syntax_3__elabKind(x_11, x_8, x_2, x_9); lean_dec(x_11); if (lean_obj_tag(x_12) == 0) { -lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_148; lean_object* x_149; +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_154; lean_object* x_155; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); @@ -4293,806 +4333,816 @@ lean_dec(x_18); x_21 = lean_box(0); x_22 = l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Syntax_2__mkParserSeq___spec__1___closed__6; x_23 = lean_name_mk_numeral(x_22, x_19); -x_24 = l_Lean_Elab_Command_elabSyntax___closed__3; -x_25 = l_Lean_Elab_Command_elabSyntax___closed__5; -x_26 = lean_alloc_ctor(3, 4, 0); -lean_ctor_set(x_26, 0, x_21); -lean_ctor_set(x_26, 1, x_24); -lean_ctor_set(x_26, 2, x_23); -lean_ctor_set(x_26, 3, x_25); -x_27 = l_Array_empty___closed__1; -x_28 = lean_array_push(x_27, x_26); -x_29 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4; -x_30 = lean_array_push(x_28, x_29); -x_31 = l_Lean_Parser_Term_id___elambda__1___closed__2; -x_32 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_30); +x_24 = lean_box(0); +x_25 = l_Lean_Elab_Command_elabSyntax___closed__3; +x_26 = l_Lean_Elab_Command_elabSyntax___closed__5; +x_27 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_27, 0, x_21); +lean_ctor_set(x_27, 1, x_25); +lean_ctor_set(x_27, 2, x_23); +lean_ctor_set(x_27, 3, x_26); +x_28 = l_Array_empty___closed__1; +x_29 = lean_array_push(x_28, x_27); +x_30 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4; +x_31 = lean_array_push(x_29, x_30); +x_32 = l_Lean_Parser_Term_id___elambda__1___closed__2; +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_31); lean_inc(x_1); -x_148 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabSyntax___lambda__1___boxed), 4, 1); -lean_closure_set(x_148, 0, x_1); +x_154 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabSyntax___lambda__1___boxed), 4, 1); +lean_closure_set(x_154, 0, x_1); lean_inc(x_2); -x_149 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_20); -if (lean_obj_tag(x_149) == 0) -{ -lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; -x_150 = lean_ctor_get(x_149, 0); -lean_inc(x_150); -x_151 = lean_ctor_get(x_149, 1); -lean_inc(x_151); -lean_dec(x_149); -x_152 = l___private_Init_Lean_Elab_Command_11__getVarDecls(x_150); -x_153 = l___private_Init_Lean_Elab_Command_9__mkTermContext(x_2, x_150, x_21); -x_154 = l___private_Init_Lean_Elab_Command_10__mkTermState(x_150); -lean_dec(x_150); -x_155 = l_Lean_Elab_Term_elabBinders___rarg(x_152, x_148, x_153, x_154); -lean_dec(x_152); +x_155 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_20); if (lean_obj_tag(x_155) == 0) { -lean_object* x_156; lean_object* x_157; lean_object* x_158; +lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; x_156 = lean_ctor_get(x_155, 0); lean_inc(x_156); x_157 = lean_ctor_get(x_155, 1); lean_inc(x_157); lean_dec(x_155); -lean_inc(x_2); -x_158 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_151); -if (lean_obj_tag(x_158) == 0) -{ -lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; uint8_t x_164; -x_159 = lean_ctor_get(x_157, 0); -lean_inc(x_159); -x_160 = lean_ctor_get(x_158, 0); -lean_inc(x_160); -x_161 = lean_ctor_get(x_158, 1); -lean_inc(x_161); +x_158 = l___private_Init_Lean_Elab_Command_11__getVarDecls(x_156); +x_159 = l___private_Init_Lean_Elab_Command_9__mkTermContext(x_2, x_156, x_21); +x_160 = l___private_Init_Lean_Elab_Command_10__mkTermState(x_156); +lean_dec(x_156); +x_161 = l_Lean_Elab_Term_elabBinders___rarg(x_158, x_154, x_159, x_160); lean_dec(x_158); -x_162 = lean_ctor_get(x_159, 0); +if (lean_obj_tag(x_161) == 0) +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; +x_162 = lean_ctor_get(x_161, 0); lean_inc(x_162); -lean_dec(x_159); -x_163 = lean_ctor_get(x_157, 2); +x_163 = lean_ctor_get(x_161, 1); lean_inc(x_163); -lean_dec(x_157); -x_164 = !lean_is_exclusive(x_160); -if (x_164 == 0) -{ -lean_object* x_165; lean_object* x_166; lean_object* x_167; -x_165 = lean_ctor_get(x_160, 1); -lean_dec(x_165); -x_166 = lean_ctor_get(x_160, 0); -lean_dec(x_166); -lean_ctor_set(x_160, 1, x_163); -lean_ctor_set(x_160, 0, x_162); +lean_dec(x_161); lean_inc(x_2); -x_167 = l___private_Init_Lean_Elab_Command_3__setState(x_160, x_2, x_161); -if (lean_obj_tag(x_167) == 0) +x_164 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_157); +if (lean_obj_tag(x_164) == 0) { -lean_object* x_168; -x_168 = lean_ctor_get(x_167, 1); +lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; uint8_t x_170; +x_165 = lean_ctor_get(x_163, 0); +lean_inc(x_165); +x_166 = lean_ctor_get(x_164, 0); +lean_inc(x_166); +x_167 = lean_ctor_get(x_164, 1); +lean_inc(x_167); +lean_dec(x_164); +x_168 = lean_ctor_get(x_165, 0); lean_inc(x_168); -lean_dec(x_167); -x_33 = x_156; -x_34 = x_168; -goto block_147; -} -else +lean_dec(x_165); +x_169 = lean_ctor_get(x_163, 2); +lean_inc(x_169); +lean_dec(x_163); +x_170 = !lean_is_exclusive(x_166); +if (x_170 == 0) { -uint8_t x_169; -lean_dec(x_156); -lean_dec(x_32); -lean_dec(x_17); -lean_dec(x_13); -lean_dec(x_2); -lean_dec(x_1); -x_169 = !lean_is_exclusive(x_167); -if (x_169 == 0) +lean_object* x_171; lean_object* x_172; lean_object* x_173; +x_171 = lean_ctor_get(x_166, 1); +lean_dec(x_171); +x_172 = lean_ctor_get(x_166, 0); +lean_dec(x_172); +lean_ctor_set(x_166, 1, x_169); +lean_ctor_set(x_166, 0, x_168); +lean_inc(x_2); +x_173 = l___private_Init_Lean_Elab_Command_3__setState(x_166, x_2, x_167); +if (lean_obj_tag(x_173) == 0) { -return x_167; -} -else -{ -lean_object* x_170; lean_object* x_171; lean_object* x_172; -x_170 = lean_ctor_get(x_167, 0); -x_171 = lean_ctor_get(x_167, 1); -lean_inc(x_171); -lean_inc(x_170); -lean_dec(x_167); -x_172 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_172, 0, x_170); -lean_ctor_set(x_172, 1, x_171); -return x_172; -} -} -} -else -{ -lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; -x_173 = lean_ctor_get(x_160, 2); -x_174 = lean_ctor_get(x_160, 3); -x_175 = lean_ctor_get(x_160, 4); -lean_inc(x_175); +lean_object* x_174; +x_174 = lean_ctor_get(x_173, 1); lean_inc(x_174); -lean_inc(x_173); -lean_dec(x_160); -x_176 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_176, 0, x_162); -lean_ctor_set(x_176, 1, x_163); -lean_ctor_set(x_176, 2, x_173); -lean_ctor_set(x_176, 3, x_174); -lean_ctor_set(x_176, 4, x_175); -lean_inc(x_2); -x_177 = l___private_Init_Lean_Elab_Command_3__setState(x_176, x_2, x_161); -if (lean_obj_tag(x_177) == 0) -{ -lean_object* x_178; -x_178 = lean_ctor_get(x_177, 1); -lean_inc(x_178); -lean_dec(x_177); -x_33 = x_156; -x_34 = x_178; -goto block_147; +lean_dec(x_173); +x_34 = x_162; +x_35 = x_174; +goto block_153; } else { -lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; -lean_dec(x_156); -lean_dec(x_32); +uint8_t x_175; +lean_dec(x_162); +lean_dec(x_33); lean_dec(x_17); lean_dec(x_13); lean_dec(x_2); lean_dec(x_1); -x_179 = lean_ctor_get(x_177, 0); -lean_inc(x_179); -x_180 = lean_ctor_get(x_177, 1); +x_175 = !lean_is_exclusive(x_173); +if (x_175 == 0) +{ +return x_173; +} +else +{ +lean_object* x_176; lean_object* x_177; lean_object* x_178; +x_176 = lean_ctor_get(x_173, 0); +x_177 = lean_ctor_get(x_173, 1); +lean_inc(x_177); +lean_inc(x_176); +lean_dec(x_173); +x_178 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_178, 0, x_176); +lean_ctor_set(x_178, 1, x_177); +return x_178; +} +} +} +else +{ +lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; +x_179 = lean_ctor_get(x_166, 2); +x_180 = lean_ctor_get(x_166, 3); +x_181 = lean_ctor_get(x_166, 4); +lean_inc(x_181); lean_inc(x_180); -if (lean_is_exclusive(x_177)) { - lean_ctor_release(x_177, 0); - lean_ctor_release(x_177, 1); - x_181 = x_177; -} else { - lean_dec_ref(x_177); - x_181 = lean_box(0); -} -if (lean_is_scalar(x_181)) { - x_182 = lean_alloc_ctor(1, 2, 0); -} else { - x_182 = x_181; -} -lean_ctor_set(x_182, 0, x_179); -lean_ctor_set(x_182, 1, x_180); -return x_182; -} -} -} -else +lean_inc(x_179); +lean_dec(x_166); +x_182 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_182, 0, x_168); +lean_ctor_set(x_182, 1, x_169); +lean_ctor_set(x_182, 2, x_179); +lean_ctor_set(x_182, 3, x_180); +lean_ctor_set(x_182, 4, x_181); +lean_inc(x_2); +x_183 = l___private_Init_Lean_Elab_Command_3__setState(x_182, x_2, x_167); +if (lean_obj_tag(x_183) == 0) { -uint8_t x_183; -lean_dec(x_157); -lean_dec(x_156); -lean_dec(x_32); -lean_dec(x_17); -lean_dec(x_13); -lean_dec(x_2); -lean_dec(x_1); -x_183 = !lean_is_exclusive(x_158); -if (x_183 == 0) -{ -return x_158; -} -else -{ -lean_object* x_184; lean_object* x_185; lean_object* x_186; -x_184 = lean_ctor_get(x_158, 0); -x_185 = lean_ctor_get(x_158, 1); -lean_inc(x_185); +lean_object* x_184; +x_184 = lean_ctor_get(x_183, 1); lean_inc(x_184); -lean_dec(x_158); -x_186 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_186, 0, x_184); -lean_ctor_set(x_186, 1, x_185); -return x_186; +lean_dec(x_183); +x_34 = x_162; +x_35 = x_184; +goto block_153; +} +else +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; +lean_dec(x_162); +lean_dec(x_33); +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_2); +lean_dec(x_1); +x_185 = lean_ctor_get(x_183, 0); +lean_inc(x_185); +x_186 = lean_ctor_get(x_183, 1); +lean_inc(x_186); +if (lean_is_exclusive(x_183)) { + lean_ctor_release(x_183, 0); + lean_ctor_release(x_183, 1); + x_187 = x_183; +} else { + lean_dec_ref(x_183); + x_187 = lean_box(0); +} +if (lean_is_scalar(x_187)) { + x_188 = lean_alloc_ctor(1, 2, 0); +} else { + x_188 = x_187; +} +lean_ctor_set(x_188, 0, x_185); +lean_ctor_set(x_188, 1, x_186); +return x_188; } } } else { -lean_object* x_187; -x_187 = lean_ctor_get(x_155, 0); -lean_inc(x_187); -if (lean_obj_tag(x_187) == 0) -{ -lean_object* x_188; lean_object* x_189; lean_object* x_190; -lean_dec(x_32); +uint8_t x_189; +lean_dec(x_163); +lean_dec(x_162); +lean_dec(x_33); lean_dec(x_17); lean_dec(x_13); +lean_dec(x_2); lean_dec(x_1); -x_188 = lean_ctor_get(x_155, 1); -lean_inc(x_188); -lean_dec(x_155); -x_189 = lean_ctor_get(x_187, 0); -lean_inc(x_189); -lean_dec(x_187); -lean_inc(x_2); -x_190 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_151); -if (lean_obj_tag(x_190) == 0) +x_189 = !lean_is_exclusive(x_164); +if (x_189 == 0) { -lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; uint8_t x_196; -x_191 = lean_ctor_get(x_188, 0); +return x_164; +} +else +{ +lean_object* x_190; lean_object* x_191; lean_object* x_192; +x_190 = lean_ctor_get(x_164, 0); +x_191 = lean_ctor_get(x_164, 1); lean_inc(x_191); -x_192 = lean_ctor_get(x_190, 0); -lean_inc(x_192); -x_193 = lean_ctor_get(x_190, 1); +lean_inc(x_190); +lean_dec(x_164); +x_192 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_192, 0, x_190); +lean_ctor_set(x_192, 1, x_191); +return x_192; +} +} +} +else +{ +lean_object* x_193; +x_193 = lean_ctor_get(x_161, 0); lean_inc(x_193); -lean_dec(x_190); -x_194 = lean_ctor_get(x_191, 0); -lean_inc(x_194); -lean_dec(x_191); -x_195 = lean_ctor_get(x_188, 2); -lean_inc(x_195); -lean_dec(x_188); -x_196 = !lean_is_exclusive(x_192); -if (x_196 == 0) +if (lean_obj_tag(x_193) == 0) { -lean_object* x_197; lean_object* x_198; lean_object* x_199; -x_197 = lean_ctor_get(x_192, 1); -lean_dec(x_197); -x_198 = lean_ctor_get(x_192, 0); -lean_dec(x_198); -lean_ctor_set(x_192, 1, x_195); -lean_ctor_set(x_192, 0, x_194); -x_199 = l___private_Init_Lean_Elab_Command_3__setState(x_192, x_2, x_193); -if (lean_obj_tag(x_199) == 0) -{ -uint8_t x_200; -x_200 = !lean_is_exclusive(x_199); -if (x_200 == 0) -{ -lean_object* x_201; -x_201 = lean_ctor_get(x_199, 0); -lean_dec(x_201); -lean_ctor_set_tag(x_199, 1); -lean_ctor_set(x_199, 0, x_189); -return x_199; -} -else -{ -lean_object* x_202; lean_object* x_203; -x_202 = lean_ctor_get(x_199, 1); -lean_inc(x_202); -lean_dec(x_199); -x_203 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_203, 0, x_189); -lean_ctor_set(x_203, 1, x_202); -return x_203; -} -} -else -{ -uint8_t x_204; -lean_dec(x_189); -x_204 = !lean_is_exclusive(x_199); -if (x_204 == 0) -{ -return x_199; -} -else -{ -lean_object* x_205; lean_object* x_206; lean_object* x_207; -x_205 = lean_ctor_get(x_199, 0); -x_206 = lean_ctor_get(x_199, 1); -lean_inc(x_206); -lean_inc(x_205); -lean_dec(x_199); -x_207 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_207, 0, x_205); -lean_ctor_set(x_207, 1, x_206); -return x_207; -} -} -} -else -{ -lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; -x_208 = lean_ctor_get(x_192, 2); -x_209 = lean_ctor_get(x_192, 3); -x_210 = lean_ctor_get(x_192, 4); -lean_inc(x_210); -lean_inc(x_209); -lean_inc(x_208); -lean_dec(x_192); -x_211 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_211, 0, x_194); -lean_ctor_set(x_211, 1, x_195); -lean_ctor_set(x_211, 2, x_208); -lean_ctor_set(x_211, 3, x_209); -lean_ctor_set(x_211, 4, x_210); -x_212 = l___private_Init_Lean_Elab_Command_3__setState(x_211, x_2, x_193); -if (lean_obj_tag(x_212) == 0) -{ -lean_object* x_213; lean_object* x_214; lean_object* x_215; -x_213 = lean_ctor_get(x_212, 1); -lean_inc(x_213); -if (lean_is_exclusive(x_212)) { - lean_ctor_release(x_212, 0); - lean_ctor_release(x_212, 1); - x_214 = x_212; -} else { - lean_dec_ref(x_212); - x_214 = lean_box(0); -} -if (lean_is_scalar(x_214)) { - x_215 = lean_alloc_ctor(1, 2, 0); -} else { - x_215 = x_214; - lean_ctor_set_tag(x_215, 1); -} -lean_ctor_set(x_215, 0, x_189); -lean_ctor_set(x_215, 1, x_213); -return x_215; -} -else -{ -lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; -lean_dec(x_189); -x_216 = lean_ctor_get(x_212, 0); -lean_inc(x_216); -x_217 = lean_ctor_get(x_212, 1); -lean_inc(x_217); -if (lean_is_exclusive(x_212)) { - lean_ctor_release(x_212, 0); - lean_ctor_release(x_212, 1); - x_218 = x_212; -} else { - lean_dec_ref(x_212); - x_218 = lean_box(0); -} -if (lean_is_scalar(x_218)) { - x_219 = lean_alloc_ctor(1, 2, 0); -} else { - x_219 = x_218; -} -lean_ctor_set(x_219, 0, x_216); -lean_ctor_set(x_219, 1, x_217); -return x_219; -} -} -} -else -{ -uint8_t x_220; -lean_dec(x_189); -lean_dec(x_188); -lean_dec(x_2); -x_220 = !lean_is_exclusive(x_190); -if (x_220 == 0) -{ -return x_190; -} -else -{ -lean_object* x_221; lean_object* x_222; lean_object* x_223; -x_221 = lean_ctor_get(x_190, 0); -x_222 = lean_ctor_get(x_190, 1); -lean_inc(x_222); -lean_inc(x_221); -lean_dec(x_190); -x_223 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_223, 0, x_221); -lean_ctor_set(x_223, 1, x_222); -return x_223; -} -} -} -else -{ -lean_object* x_224; lean_object* x_225; lean_object* x_226; -lean_dec(x_155); -x_224 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; -x_225 = l_unreachable_x21___rarg(x_224); -lean_inc(x_2); -x_226 = lean_apply_2(x_225, x_2, x_151); -if (lean_obj_tag(x_226) == 0) -{ -lean_object* x_227; lean_object* x_228; -x_227 = lean_ctor_get(x_226, 0); -lean_inc(x_227); -x_228 = lean_ctor_get(x_226, 1); -lean_inc(x_228); -lean_dec(x_226); -x_33 = x_227; -x_34 = x_228; -goto block_147; -} -else -{ -uint8_t x_229; -lean_dec(x_32); +lean_object* x_194; lean_object* x_195; lean_object* x_196; +lean_dec(x_33); lean_dec(x_17); lean_dec(x_13); -lean_dec(x_2); lean_dec(x_1); -x_229 = !lean_is_exclusive(x_226); -if (x_229 == 0) +x_194 = lean_ctor_get(x_161, 1); +lean_inc(x_194); +lean_dec(x_161); +x_195 = lean_ctor_get(x_193, 0); +lean_inc(x_195); +lean_dec(x_193); +lean_inc(x_2); +x_196 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_157); +if (lean_obj_tag(x_196) == 0) { -return x_226; +lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; uint8_t x_202; +x_197 = lean_ctor_get(x_194, 0); +lean_inc(x_197); +x_198 = lean_ctor_get(x_196, 0); +lean_inc(x_198); +x_199 = lean_ctor_get(x_196, 1); +lean_inc(x_199); +lean_dec(x_196); +x_200 = lean_ctor_get(x_197, 0); +lean_inc(x_200); +lean_dec(x_197); +x_201 = lean_ctor_get(x_194, 2); +lean_inc(x_201); +lean_dec(x_194); +x_202 = !lean_is_exclusive(x_198); +if (x_202 == 0) +{ +lean_object* x_203; lean_object* x_204; lean_object* x_205; +x_203 = lean_ctor_get(x_198, 1); +lean_dec(x_203); +x_204 = lean_ctor_get(x_198, 0); +lean_dec(x_204); +lean_ctor_set(x_198, 1, x_201); +lean_ctor_set(x_198, 0, x_200); +x_205 = l___private_Init_Lean_Elab_Command_3__setState(x_198, x_2, x_199); +if (lean_obj_tag(x_205) == 0) +{ +uint8_t x_206; +x_206 = !lean_is_exclusive(x_205); +if (x_206 == 0) +{ +lean_object* x_207; +x_207 = lean_ctor_get(x_205, 0); +lean_dec(x_207); +lean_ctor_set_tag(x_205, 1); +lean_ctor_set(x_205, 0, x_195); +return x_205; +} +else +{ +lean_object* x_208; lean_object* x_209; +x_208 = lean_ctor_get(x_205, 1); +lean_inc(x_208); +lean_dec(x_205); +x_209 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_209, 0, x_195); +lean_ctor_set(x_209, 1, x_208); +return x_209; +} +} +else +{ +uint8_t x_210; +lean_dec(x_195); +x_210 = !lean_is_exclusive(x_205); +if (x_210 == 0) +{ +return x_205; +} +else +{ +lean_object* x_211; lean_object* x_212; lean_object* x_213; +x_211 = lean_ctor_get(x_205, 0); +x_212 = lean_ctor_get(x_205, 1); +lean_inc(x_212); +lean_inc(x_211); +lean_dec(x_205); +x_213 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_213, 0, x_211); +lean_ctor_set(x_213, 1, x_212); +return x_213; +} +} +} +else +{ +lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; +x_214 = lean_ctor_get(x_198, 2); +x_215 = lean_ctor_get(x_198, 3); +x_216 = lean_ctor_get(x_198, 4); +lean_inc(x_216); +lean_inc(x_215); +lean_inc(x_214); +lean_dec(x_198); +x_217 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_217, 0, x_200); +lean_ctor_set(x_217, 1, x_201); +lean_ctor_set(x_217, 2, x_214); +lean_ctor_set(x_217, 3, x_215); +lean_ctor_set(x_217, 4, x_216); +x_218 = l___private_Init_Lean_Elab_Command_3__setState(x_217, x_2, x_199); +if (lean_obj_tag(x_218) == 0) +{ +lean_object* x_219; lean_object* x_220; lean_object* x_221; +x_219 = lean_ctor_get(x_218, 1); +lean_inc(x_219); +if (lean_is_exclusive(x_218)) { + lean_ctor_release(x_218, 0); + lean_ctor_release(x_218, 1); + x_220 = x_218; +} else { + lean_dec_ref(x_218); + x_220 = lean_box(0); +} +if (lean_is_scalar(x_220)) { + x_221 = lean_alloc_ctor(1, 2, 0); +} else { + x_221 = x_220; + lean_ctor_set_tag(x_221, 1); +} +lean_ctor_set(x_221, 0, x_195); +lean_ctor_set(x_221, 1, x_219); +return x_221; +} +else +{ +lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; +lean_dec(x_195); +x_222 = lean_ctor_get(x_218, 0); +lean_inc(x_222); +x_223 = lean_ctor_get(x_218, 1); +lean_inc(x_223); +if (lean_is_exclusive(x_218)) { + lean_ctor_release(x_218, 0); + lean_ctor_release(x_218, 1); + x_224 = x_218; +} else { + lean_dec_ref(x_218); + x_224 = lean_box(0); +} +if (lean_is_scalar(x_224)) { + x_225 = lean_alloc_ctor(1, 2, 0); +} else { + x_225 = x_224; +} +lean_ctor_set(x_225, 0, x_222); +lean_ctor_set(x_225, 1, x_223); +return x_225; +} +} +} +else +{ +uint8_t x_226; +lean_dec(x_195); +lean_dec(x_194); +lean_dec(x_2); +x_226 = !lean_is_exclusive(x_196); +if (x_226 == 0) +{ +return x_196; +} +else +{ +lean_object* x_227; lean_object* x_228; lean_object* x_229; +x_227 = lean_ctor_get(x_196, 0); +x_228 = lean_ctor_get(x_196, 1); +lean_inc(x_228); +lean_inc(x_227); +lean_dec(x_196); +x_229 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_229, 0, x_227); +lean_ctor_set(x_229, 1, x_228); +return x_229; +} +} } else { lean_object* x_230; lean_object* x_231; lean_object* x_232; -x_230 = lean_ctor_get(x_226, 0); -x_231 = lean_ctor_get(x_226, 1); -lean_inc(x_231); -lean_inc(x_230); -lean_dec(x_226); -x_232 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_232, 0, x_230); -lean_ctor_set(x_232, 1, x_231); -return x_232; -} -} -} -} +lean_dec(x_161); +x_230 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +x_231 = l_unreachable_x21___rarg(x_230); +lean_inc(x_2); +x_232 = lean_apply_2(x_231, x_2, x_157); +if (lean_obj_tag(x_232) == 0) +{ +lean_object* x_233; lean_object* x_234; +x_233 = lean_ctor_get(x_232, 0); +lean_inc(x_233); +x_234 = lean_ctor_get(x_232, 1); +lean_inc(x_234); +lean_dec(x_232); +x_34 = x_233; +x_35 = x_234; +goto block_153; } else { -uint8_t x_233; -lean_dec(x_148); -lean_dec(x_32); +uint8_t x_235; +lean_dec(x_33); lean_dec(x_17); lean_dec(x_13); lean_dec(x_2); lean_dec(x_1); -x_233 = !lean_is_exclusive(x_149); -if (x_233 == 0) +x_235 = !lean_is_exclusive(x_232); +if (x_235 == 0) { -return x_149; +return x_232; } else { -lean_object* x_234; lean_object* x_235; lean_object* x_236; -x_234 = lean_ctor_get(x_149, 0); -x_235 = lean_ctor_get(x_149, 1); -lean_inc(x_235); -lean_inc(x_234); -lean_dec(x_149); -x_236 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_236, 0, x_234); -lean_ctor_set(x_236, 1, x_235); -return x_236; +lean_object* x_236; lean_object* x_237; lean_object* x_238; +x_236 = lean_ctor_get(x_232, 0); +x_237 = lean_ctor_get(x_232, 1); +lean_inc(x_237); +lean_inc(x_236); +lean_dec(x_232); +x_238 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_238, 0, x_236); +lean_ctor_set(x_238, 1, x_237); +return x_238; } } -block_147: +} +} +} +else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; 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; lean_object* x_103; -x_35 = l_Lean_Elab_Command_getCurrMacroScope(x_2, x_34); -x_36 = lean_ctor_get(x_35, 0); -lean_inc(x_36); -x_37 = lean_ctor_get(x_35, 1); +uint8_t x_239; +lean_dec(x_154); +lean_dec(x_33); +lean_dec(x_17); +lean_dec(x_13); +lean_dec(x_2); +lean_dec(x_1); +x_239 = !lean_is_exclusive(x_155); +if (x_239 == 0) +{ +return x_155; +} +else +{ +lean_object* x_240; lean_object* x_241; lean_object* x_242; +x_240 = lean_ctor_get(x_155, 0); +x_241 = lean_ctor_get(x_155, 1); +lean_inc(x_241); +lean_inc(x_240); +lean_dec(x_155); +x_242 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_242, 0, x_240); +lean_ctor_set(x_242, 1, x_241); +return x_242; +} +} +block_153: +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; 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; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; +x_36 = l_Lean_Elab_Command_getCurrMacroScope(x_2, x_35); +x_37 = lean_ctor_get(x_36, 0); lean_inc(x_37); -lean_dec(x_35); -x_38 = lean_array_push(x_27, x_17); -x_39 = lean_array_push(x_38, x_29); -x_40 = l_Lean_Parser_Command_attrInstance___elambda__1___closed__2; -lean_inc(x_39); -x_41 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_41, 0, x_40); -lean_ctor_set(x_41, 1, x_39); -x_42 = lean_array_push(x_27, x_41); -x_43 = l_Lean_nullKind___closed__2; -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_44, 1, x_42); -x_45 = l_Lean_Elab_Command_elabSyntax___closed__8; -x_46 = lean_array_push(x_45, x_44); -x_47 = l_Lean_Elab_Term_elabArrayLit___closed__13; -x_48 = lean_array_push(x_46, x_47); -x_49 = l_Lean_Parser_Command_attributes___elambda__1___closed__2; -x_50 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_50, 1, x_48); -x_51 = lean_array_push(x_27, x_50); -x_52 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_52, 0, x_43); -lean_ctor_set(x_52, 1, x_51); -x_53 = l_Lean_Elab_Command_elabSyntax___closed__6; -x_54 = lean_array_push(x_53, x_52); -x_55 = l_Lean_Elab_Command_elabSyntax___closed__13; -x_56 = lean_array_push(x_54, x_55); -x_57 = lean_array_push(x_56, x_29); -x_58 = lean_array_push(x_57, x_29); -x_59 = lean_array_push(x_58, x_29); +x_38 = lean_ctor_get(x_36, 1); +lean_inc(x_38); +lean_dec(x_36); +x_39 = lean_array_push(x_28, x_17); +x_40 = lean_array_push(x_39, x_30); +x_41 = l_Lean_Parser_Command_attrInstance___elambda__1___closed__2; +x_42 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_40); +x_43 = lean_array_push(x_28, x_42); +x_44 = l_Lean_nullKind___closed__2; +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_43); +x_46 = l_Lean_Elab_Command_elabSyntax___closed__8; +x_47 = lean_array_push(x_46, x_45); +x_48 = l_Lean_Elab_Term_elabArrayLit___closed__13; +x_49 = lean_array_push(x_47, x_48); +x_50 = l_Lean_Parser_Command_attributes___elambda__1___closed__2; +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_49); +x_52 = lean_array_push(x_28, x_51); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_44); +lean_ctor_set(x_53, 1, x_52); +x_54 = l_Lean_Elab_Command_elabSyntax___closed__6; +x_55 = lean_array_push(x_54, x_53); +x_56 = lean_array_push(x_55, x_30); +x_57 = lean_array_push(x_56, x_30); +x_58 = lean_array_push(x_57, x_30); +x_59 = lean_array_push(x_58, x_30); x_60 = l_Lean_Parser_Command_declModifiers___elambda__1___closed__2; x_61 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_61, 0, x_60); lean_ctor_set(x_61, 1, x_59); -x_62 = lean_array_push(x_27, x_61); -x_63 = l_Lean_Parser_Command_declId___elambda__1___closed__2; -x_64 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_64, 0, x_63); -lean_ctor_set(x_64, 1, x_39); -x_65 = l_Lean_Elab_Command_elabSyntax___closed__15; -x_66 = lean_array_push(x_65, x_64); -x_67 = l_Lean_Elab_Term_elabArrow___lambda__1___closed__6; -x_68 = lean_array_push(x_67, x_32); -x_69 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_62 = lean_array_push(x_28, x_61); +x_63 = l_Lean_Elab_Command_elabSyntax___closed__14; +lean_inc(x_37); +x_64 = lean_name_mk_numeral(x_63, x_37); +x_65 = l_Lean_Elab_Command_elabSyntax___closed__13; +x_66 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_66, 0, x_21); +lean_ctor_set(x_66, 1, x_65); +lean_ctor_set(x_66, 2, x_64); +lean_ctor_set(x_66, 3, x_24); +x_67 = lean_array_push(x_28, x_66); +x_68 = lean_array_push(x_67, x_30); +x_69 = l_Lean_Parser_Command_declId___elambda__1___closed__2; x_70 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_70, 0, x_69); lean_ctor_set(x_70, 1, x_68); -x_71 = lean_array_push(x_27, x_70); -x_72 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_72, 0, x_43); -lean_ctor_set(x_72, 1, x_71); -x_73 = lean_array_push(x_53, x_72); -x_74 = l_Lean_Parser_Command_optDeclSig___elambda__1___closed__2; -x_75 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_75, 0, x_74); -lean_ctor_set(x_75, 1, x_73); -x_76 = lean_array_push(x_66, x_75); -x_77 = l_Lean_Elab_Command_elabSyntax___closed__20; -x_78 = lean_name_mk_numeral(x_77, x_36); -x_79 = l_Lean_Elab_Command_elabSyntax___closed__19; -x_80 = l_Lean_Elab_Command_elabSyntax___closed__23; -x_81 = lean_alloc_ctor(3, 4, 0); -lean_ctor_set(x_81, 0, x_21); +x_71 = l_Lean_Elab_Command_elabSyntax___closed__10; +x_72 = lean_array_push(x_71, x_70); +x_73 = l_Lean_Elab_Term_elabArrow___lambda__1___closed__6; +x_74 = lean_array_push(x_73, x_33); +x_75 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_76 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_74); +x_77 = lean_array_push(x_28, x_76); +x_78 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_78, 0, x_44); +lean_ctor_set(x_78, 1, x_77); +x_79 = lean_array_push(x_54, x_78); +x_80 = l_Lean_Parser_Command_optDeclSig___elambda__1___closed__2; +x_81 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_81, 0, x_80); lean_ctor_set(x_81, 1, x_79); -lean_ctor_set(x_81, 2, x_78); -lean_ctor_set(x_81, 3, x_80); -x_82 = lean_array_push(x_27, x_81); -x_83 = lean_array_push(x_82, x_29); -x_84 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_84, 0, x_31); -lean_ctor_set(x_84, 1, x_83); -x_85 = lean_array_push(x_27, x_84); -x_86 = l___private_Init_Lean_Elab_Quotation_1__quoteName___main(x_13); -x_87 = lean_array_push(x_85, x_86); -x_88 = l_Lean_Parser_Term_app___elambda__1___closed__2; -x_89 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_89, 0, x_88); -lean_ctor_set(x_89, 1, x_87); -x_90 = lean_array_push(x_27, x_89); -x_91 = lean_array_push(x_90, x_33); -x_92 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_92, 0, x_88); -lean_ctor_set(x_92, 1, x_91); -x_93 = l_Lean_Elab_Command_elabSyntax___closed__16; -x_94 = lean_array_push(x_93, x_92); -x_95 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; -x_96 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_96, 0, x_95); -lean_ctor_set(x_96, 1, x_94); -x_97 = lean_array_push(x_76, x_96); -x_98 = l_Lean_Parser_Command_def___elambda__1___closed__2; -x_99 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_99, 0, x_98); -lean_ctor_set(x_99, 1, x_97); -x_100 = lean_array_push(x_62, x_99); -x_101 = l_Lean_Parser_Command_declaration___elambda__1___closed__2; +x_82 = lean_array_push(x_72, x_81); +x_83 = l_Lean_Elab_Command_elabSyntax___closed__19; +x_84 = lean_name_mk_numeral(x_83, x_37); +x_85 = l_Lean_Elab_Command_elabSyntax___closed__18; +x_86 = l_Lean_Elab_Command_elabSyntax___closed__22; +x_87 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_87, 0, x_21); +lean_ctor_set(x_87, 1, x_85); +lean_ctor_set(x_87, 2, x_84); +lean_ctor_set(x_87, 3, x_86); +x_88 = lean_array_push(x_28, x_87); +x_89 = lean_array_push(x_88, x_30); +x_90 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_90, 0, x_32); +lean_ctor_set(x_90, 1, x_89); +x_91 = lean_array_push(x_28, x_90); +x_92 = l___private_Init_Lean_Elab_Quotation_1__quoteName___main(x_13); +x_93 = lean_array_push(x_91, x_92); +x_94 = l_Lean_Parser_Term_app___elambda__1___closed__2; +x_95 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_95, 0, x_94); +lean_ctor_set(x_95, 1, x_93); +x_96 = lean_array_push(x_28, x_95); +x_97 = lean_array_push(x_96, x_34); +x_98 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_98, 0, x_94); +lean_ctor_set(x_98, 1, x_97); +x_99 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_100 = lean_array_push(x_99, x_98); +x_101 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; x_102 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_102, 0, x_101); lean_ctor_set(x_102, 1, x_100); +x_103 = lean_array_push(x_82, x_102); +x_104 = l_Lean_Parser_Command_def___elambda__1___closed__2; +x_105 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_103); +x_106 = lean_array_push(x_62, x_105); +x_107 = l_Lean_Parser_Command_declaration___elambda__1___closed__2; +x_108 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_108, 0, x_107); +lean_ctor_set(x_108, 1, x_106); lean_inc(x_2); -x_103 = l_Lean_Elab_Command_getOptions(x_2, x_37); -if (lean_obj_tag(x_103) == 0) +x_109 = l_Lean_Elab_Command_getOptions(x_2, x_38); +if (lean_obj_tag(x_109) == 0) { -lean_object* x_104; lean_object* x_105; lean_object* x_106; uint8_t x_107; -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_106 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; -x_107 = l_Lean_checkTraceOption(x_104, x_106); -lean_dec(x_104); -if (x_107 == 0) +lean_object* x_110; lean_object* x_111; lean_object* x_112; uint8_t x_113; +x_110 = lean_ctor_get(x_109, 0); +lean_inc(x_110); +x_111 = lean_ctor_get(x_109, 1); +lean_inc(x_111); +lean_dec(x_109); +x_112 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; +x_113 = l_Lean_checkTraceOption(x_110, x_112); +lean_dec(x_110); +if (x_113 == 0) { -uint8_t x_108; -x_108 = !lean_is_exclusive(x_2); -if (x_108 == 0) +uint8_t x_114; +x_114 = !lean_is_exclusive(x_2); +if (x_114 == 0) { -lean_object* x_109; lean_object* x_110; lean_object* x_111; -x_109 = lean_ctor_get(x_2, 5); -x_110 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_110, 0, x_1); -lean_ctor_set(x_110, 1, x_109); -lean_ctor_set(x_2, 5, x_110); -x_111 = l_Lean_Elab_Command_elabCommand(x_102, x_2, x_105); -return x_111; +lean_object* x_115; lean_object* x_116; lean_object* x_117; +x_115 = lean_ctor_get(x_2, 5); +x_116 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_116, 0, x_1); +lean_ctor_set(x_116, 1, x_115); +lean_ctor_set(x_2, 5, x_116); +x_117 = l_Lean_Elab_Command_elabCommand___main(x_108, x_2, x_111); +return x_117; } else { -lean_object* x_112; lean_object* x_113; 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; lean_object* x_121; -x_112 = lean_ctor_get(x_2, 0); -x_113 = lean_ctor_get(x_2, 1); -x_114 = lean_ctor_get(x_2, 2); -x_115 = lean_ctor_get(x_2, 3); -x_116 = lean_ctor_get(x_2, 4); -x_117 = lean_ctor_get(x_2, 5); -x_118 = lean_ctor_get(x_2, 6); -lean_inc(x_118); -lean_inc(x_117); -lean_inc(x_116); -lean_inc(x_115); -lean_inc(x_114); -lean_inc(x_113); -lean_inc(x_112); -lean_dec(x_2); -x_119 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_119, 0, x_1); -lean_ctor_set(x_119, 1, x_117); -x_120 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_120, 0, x_112); -lean_ctor_set(x_120, 1, x_113); -lean_ctor_set(x_120, 2, x_114); -lean_ctor_set(x_120, 3, x_115); -lean_ctor_set(x_120, 4, x_116); -lean_ctor_set(x_120, 5, x_119); -lean_ctor_set(x_120, 6, x_118); -x_121 = l_Lean_Elab_Command_elabCommand(x_102, x_120, x_105); -return x_121; -} -} -else -{ -lean_object* x_122; lean_object* x_123; -lean_inc(x_102); -x_122 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_122, 0, x_102); -lean_inc(x_2); -x_123 = l_Lean_Elab_Command_logTrace(x_106, x_1, x_122, x_2, x_105); -if (lean_obj_tag(x_123) == 0) -{ -lean_object* x_124; uint8_t x_125; -x_124 = lean_ctor_get(x_123, 1); +lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; +x_118 = lean_ctor_get(x_2, 0); +x_119 = lean_ctor_get(x_2, 1); +x_120 = lean_ctor_get(x_2, 2); +x_121 = lean_ctor_get(x_2, 3); +x_122 = lean_ctor_get(x_2, 4); +x_123 = lean_ctor_get(x_2, 5); +x_124 = lean_ctor_get(x_2, 6); lean_inc(x_124); -lean_dec(x_123); -x_125 = !lean_is_exclusive(x_2); -if (x_125 == 0) -{ -lean_object* x_126; lean_object* x_127; lean_object* x_128; -x_126 = lean_ctor_get(x_2, 5); -x_127 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_127, 0, x_1); -lean_ctor_set(x_127, 1, x_126); -lean_ctor_set(x_2, 5, x_127); -x_128 = l_Lean_Elab_Command_elabCommand(x_102, x_2, x_124); -return x_128; +lean_inc(x_123); +lean_inc(x_122); +lean_inc(x_121); +lean_inc(x_120); +lean_inc(x_119); +lean_inc(x_118); +lean_dec(x_2); +x_125 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_125, 0, x_1); +lean_ctor_set(x_125, 1, x_123); +x_126 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_126, 0, x_118); +lean_ctor_set(x_126, 1, x_119); +lean_ctor_set(x_126, 2, x_120); +lean_ctor_set(x_126, 3, x_121); +lean_ctor_set(x_126, 4, x_122); +lean_ctor_set(x_126, 5, x_125); +lean_ctor_set(x_126, 6, x_124); +x_127 = l_Lean_Elab_Command_elabCommand___main(x_108, x_126, x_111); +return x_127; +} } else { -lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; -x_129 = lean_ctor_get(x_2, 0); -x_130 = lean_ctor_get(x_2, 1); -x_131 = lean_ctor_get(x_2, 2); -x_132 = lean_ctor_get(x_2, 3); -x_133 = lean_ctor_get(x_2, 4); -x_134 = lean_ctor_get(x_2, 5); -x_135 = lean_ctor_get(x_2, 6); -lean_inc(x_135); -lean_inc(x_134); -lean_inc(x_133); -lean_inc(x_132); -lean_inc(x_131); +lean_object* x_128; lean_object* x_129; +lean_inc(x_108); +x_128 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_128, 0, x_108); +lean_inc(x_2); +x_129 = l_Lean_Elab_Command_logTrace(x_112, x_1, x_128, x_2, x_111); +if (lean_obj_tag(x_129) == 0) +{ +lean_object* x_130; uint8_t x_131; +x_130 = lean_ctor_get(x_129, 1); lean_inc(x_130); -lean_inc(x_129); -lean_dec(x_2); -x_136 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_136, 0, x_1); -lean_ctor_set(x_136, 1, x_134); -x_137 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_137, 0, x_129); -lean_ctor_set(x_137, 1, x_130); -lean_ctor_set(x_137, 2, x_131); -lean_ctor_set(x_137, 3, x_132); -lean_ctor_set(x_137, 4, x_133); -lean_ctor_set(x_137, 5, x_136); -lean_ctor_set(x_137, 6, x_135); -x_138 = l_Lean_Elab_Command_elabCommand(x_102, x_137, x_124); -return x_138; -} +lean_dec(x_129); +x_131 = !lean_is_exclusive(x_2); +if (x_131 == 0) +{ +lean_object* x_132; lean_object* x_133; lean_object* x_134; +x_132 = lean_ctor_get(x_2, 5); +x_133 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_133, 0, x_1); +lean_ctor_set(x_133, 1, x_132); +lean_ctor_set(x_2, 5, x_133); +x_134 = l_Lean_Elab_Command_elabCommand___main(x_108, x_2, x_130); +return x_134; } else { -uint8_t x_139; -lean_dec(x_102); -lean_dec(x_2); -lean_dec(x_1); -x_139 = !lean_is_exclusive(x_123); -if (x_139 == 0) -{ -return x_123; -} -else -{ -lean_object* x_140; lean_object* x_141; lean_object* x_142; -x_140 = lean_ctor_get(x_123, 0); -x_141 = lean_ctor_get(x_123, 1); +lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; +x_135 = lean_ctor_get(x_2, 0); +x_136 = lean_ctor_get(x_2, 1); +x_137 = lean_ctor_get(x_2, 2); +x_138 = lean_ctor_get(x_2, 3); +x_139 = lean_ctor_get(x_2, 4); +x_140 = lean_ctor_get(x_2, 5); +x_141 = lean_ctor_get(x_2, 6); lean_inc(x_141); lean_inc(x_140); -lean_dec(x_123); +lean_inc(x_139); +lean_inc(x_138); +lean_inc(x_137); +lean_inc(x_136); +lean_inc(x_135); +lean_dec(x_2); x_142 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_142, 0, x_140); -lean_ctor_set(x_142, 1, x_141); -return x_142; -} -} +lean_ctor_set(x_142, 0, x_1); +lean_ctor_set(x_142, 1, x_140); +x_143 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_143, 0, x_135); +lean_ctor_set(x_143, 1, x_136); +lean_ctor_set(x_143, 2, x_137); +lean_ctor_set(x_143, 3, x_138); +lean_ctor_set(x_143, 4, x_139); +lean_ctor_set(x_143, 5, x_142); +lean_ctor_set(x_143, 6, x_141); +x_144 = l_Lean_Elab_Command_elabCommand___main(x_108, x_143, x_130); +return x_144; } } else { -uint8_t x_143; -lean_dec(x_102); +uint8_t x_145; +lean_dec(x_108); lean_dec(x_2); lean_dec(x_1); -x_143 = !lean_is_exclusive(x_103); -if (x_143 == 0) +x_145 = !lean_is_exclusive(x_129); +if (x_145 == 0) { -return x_103; +return x_129; } else { -lean_object* x_144; lean_object* x_145; lean_object* x_146; -x_144 = lean_ctor_get(x_103, 0); -x_145 = lean_ctor_get(x_103, 1); -lean_inc(x_145); -lean_inc(x_144); -lean_dec(x_103); -x_146 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_146, 0, x_144); -lean_ctor_set(x_146, 1, x_145); -return x_146; +lean_object* x_146; lean_object* x_147; lean_object* x_148; +x_146 = lean_ctor_get(x_129, 0); +x_147 = lean_ctor_get(x_129, 1); +lean_inc(x_147); +lean_inc(x_146); +lean_dec(x_129); +x_148 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_148, 0, x_146); +lean_ctor_set(x_148, 1, x_147); +return x_148; } } } } else { -uint8_t x_237; +uint8_t x_149; +lean_dec(x_108); +lean_dec(x_2); +lean_dec(x_1); +x_149 = !lean_is_exclusive(x_109); +if (x_149 == 0) +{ +return x_109; +} +else +{ +lean_object* x_150; lean_object* x_151; lean_object* x_152; +x_150 = lean_ctor_get(x_109, 0); +x_151 = lean_ctor_get(x_109, 1); +lean_inc(x_151); +lean_inc(x_150); +lean_dec(x_109); +x_152 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_152, 0, x_150); +lean_ctor_set(x_152, 1, x_151); +return x_152; +} +} +} +} +else +{ +uint8_t x_243; lean_dec(x_8); lean_dec(x_2); lean_dec(x_1); -x_237 = !lean_is_exclusive(x_12); -if (x_237 == 0) +x_243 = !lean_is_exclusive(x_12); +if (x_243 == 0) { return x_12; } else { -lean_object* x_238; lean_object* x_239; lean_object* x_240; -x_238 = lean_ctor_get(x_12, 0); -x_239 = lean_ctor_get(x_12, 1); -lean_inc(x_239); -lean_inc(x_238); +lean_object* x_244; lean_object* x_245; lean_object* x_246; +x_244 = lean_ctor_get(x_12, 0); +x_245 = lean_ctor_get(x_12, 1); +lean_inc(x_245); +lean_inc(x_244); lean_dec(x_12); -x_240 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_240, 0, x_238); -lean_ctor_set(x_240, 1, x_239); -return x_240; +x_246 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_246, 0, x_244); +lean_ctor_set(x_246, 1, x_245); +return x_246; } } } } else { -uint8_t x_254; +uint8_t x_260; lean_dec(x_2); lean_dec(x_1); -x_254 = !lean_is_exclusive(x_4); -if (x_254 == 0) +x_260 = !lean_is_exclusive(x_4); +if (x_260 == 0) { return x_4; } else { -lean_object* x_255; lean_object* x_256; lean_object* x_257; -x_255 = lean_ctor_get(x_4, 0); -x_256 = lean_ctor_get(x_4, 1); -lean_inc(x_256); -lean_inc(x_255); +lean_object* x_261; lean_object* x_262; lean_object* x_263; +x_261 = lean_ctor_get(x_4, 0); +x_262 = lean_ctor_get(x_4, 1); +lean_inc(x_262); +lean_inc(x_261); lean_dec(x_4); -x_257 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_257, 0, x_255); -lean_ctor_set(x_257, 1, x_256); -return x_257; +x_263 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_263, 0, x_261); +lean_ctor_set(x_263, 1, x_262); +return x_263; } } } @@ -5144,6 +5194,1272 @@ 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_elabMacro___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_macro___elambda__1___closed__1; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Parser_Command_macro___elambda__1___closed__1; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Command_elabMacro___lambda__1___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_Elab_Command_elabMacro___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("myMacro"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__3; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__3; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__4; +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_Elab_Command_elabMacro___lambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_mkMacroAttribute___closed__2; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Elab_mkMacroAttribute___closed__2; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__7; +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_Elab_Command_elabMacro___lambda__1___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_mkMacroAttribute___closed__2; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_mkMacroAttribute___closed__3; +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_Elab_Command_elabMacro___lambda__1___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__10; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__12() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("stx"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__12; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__12; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__13; +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_Elab_Command_elabMacro___lambda__1___closed__15() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__12; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__16() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Parser_Term_match__syntax___elambda__1___closed__1; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__17() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__16; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__18() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___private_Init_Lean_Elab_TermBinders_10__expandFunBindersAux___main___closed__7; +x_2 = l___private_Init_Lean_Elab_Quotation_13__letBindRhss___main___closed__9; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__19() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__18; +x_2 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__20() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("throw"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__21() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__20; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__22() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__20; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__21; +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_Elab_Command_elabMacro___lambda__1___closed__23() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__20; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__24() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("MonadExcept"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__25() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__24; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__26() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__25; +x_2 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__20; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__27() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__26; +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_Elab_Command_elabMacro___lambda__1___closed__28() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__27; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_513; uint8_t x_514; +x_513 = l_Lean_Parser_Command_macro___elambda__1___closed__2; +lean_inc(x_1); +x_514 = l_Lean_Syntax_isOfKind(x_1, x_513); +if (x_514 == 0) +{ +uint8_t x_515; +x_515 = 0; +x_4 = x_515; +goto block_512; +} +else +{ +lean_object* x_516; lean_object* x_517; lean_object* x_518; uint8_t x_519; +x_516 = l_Lean_Syntax_getArgs(x_1); +x_517 = lean_array_get_size(x_516); +lean_dec(x_516); +x_518 = lean_unsigned_to_nat(2u); +x_519 = lean_nat_dec_eq(x_517, x_518); +lean_dec(x_517); +x_4 = x_519; +goto block_512; +} +block_512: +{ +uint8_t x_5; +x_5 = l_coeDecidableEq(x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_1); +x_6 = lean_box(1); +x_7 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_3); +return x_7; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_8 = lean_unsigned_to_nat(1u); +x_9 = l_Lean_Syntax_getArg(x_1, x_8); +lean_dec(x_1); +x_10 = l_Lean_Syntax_getArgs(x_9); +lean_dec(x_9); +x_11 = l_Lean_Syntax_inhabited; +x_12 = lean_unsigned_to_nat(0u); +x_13 = lean_array_get(x_11, x_10, x_12); +x_14 = l_Lean_Syntax_getArg(x_13, x_8); +lean_dec(x_13); +x_15 = l_Lean_Syntax_getArg(x_14, x_12); +lean_dec(x_14); +x_16 = l_Lean_Parser_Term_stxQuot___elambda__1___closed__2; +lean_inc(x_15); +x_17 = l_Lean_Syntax_isOfKind(x_15, x_16); +if (x_17 == 0) +{ +uint8_t x_18; +x_18 = l___private_Init_Lean_Elab_Term_7__hasCDot___main___closed__1; +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; +lean_dec(x_15); +lean_dec(x_10); +x_19 = lean_box(1); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_3); +return x_20; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_21 = l_Lean_Syntax_getArg(x_15, x_8); +lean_dec(x_15); +x_22 = l_Lean_Syntax_getKind(x_21); +x_23 = l_Lean_Elab_Command_getCurrMacroScope(x_2, x_3); +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; 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; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; 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; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; +x_25 = lean_ctor_get(x_23, 0); +x_26 = lean_box(0); +x_27 = l_Lean_Elab_mkMacroAttribute___closed__1; +lean_inc(x_25); +x_28 = lean_name_mk_numeral(x_27, x_25); +x_29 = lean_box(0); +x_30 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__2; +x_31 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_31, 0, x_26); +lean_ctor_set(x_31, 1, x_30); +lean_ctor_set(x_31, 2, x_28); +lean_ctor_set(x_31, 3, x_29); +x_32 = l_Array_empty___closed__1; +x_33 = lean_array_push(x_32, x_31); +x_34 = lean_mk_syntax_ident(x_22); +x_35 = lean_array_push(x_32, x_34); +x_36 = l_Lean_nullKind___closed__2; +x_37 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_35); +x_38 = lean_array_push(x_33, x_37); +x_39 = l_Lean_Parser_Command_attrInstance___elambda__1___closed__2; +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); +x_41 = lean_array_push(x_32, x_40); +x_42 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_42, 0, x_36); +lean_ctor_set(x_42, 1, x_41); +x_43 = l_Lean_Elab_Command_elabSyntax___closed__8; +x_44 = lean_array_push(x_43, x_42); +x_45 = l_Lean_Elab_Term_elabArrayLit___closed__13; +x_46 = lean_array_push(x_44, x_45); +x_47 = l_Lean_Parser_Command_attributes___elambda__1___closed__2; +x_48 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_46); +x_49 = lean_array_push(x_32, x_48); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_36); +lean_ctor_set(x_50, 1, x_49); +x_51 = l_Lean_Elab_Command_elabSyntax___closed__6; +x_52 = lean_array_push(x_51, x_50); +x_53 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4; +x_54 = lean_array_push(x_52, x_53); +x_55 = lean_array_push(x_54, x_53); +x_56 = lean_array_push(x_55, x_53); +x_57 = lean_array_push(x_56, x_53); +x_58 = l_Lean_Parser_Command_declModifiers___elambda__1___closed__2; +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_58); +lean_ctor_set(x_59, 1, x_57); +x_60 = lean_array_push(x_32, x_59); +x_61 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__6; +lean_inc(x_25); +x_62 = lean_name_mk_numeral(x_61, x_25); +x_63 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__5; +x_64 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_64, 0, x_26); +lean_ctor_set(x_64, 1, x_63); +lean_ctor_set(x_64, 2, x_62); +lean_ctor_set(x_64, 3, x_29); +x_65 = lean_array_push(x_32, x_64); +x_66 = lean_array_push(x_65, x_53); +x_67 = l_Lean_Parser_Command_declId___elambda__1___closed__2; +x_68 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_66); +x_69 = l_Lean_Elab_Command_elabSyntax___closed__10; +x_70 = lean_array_push(x_69, x_68); +x_71 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__9; +lean_inc(x_25); +x_72 = lean_name_mk_numeral(x_71, x_25); +x_73 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__8; +x_74 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__11; +x_75 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_75, 0, x_26); +lean_ctor_set(x_75, 1, x_73); +lean_ctor_set(x_75, 2, x_72); +lean_ctor_set(x_75, 3, x_74); +x_76 = lean_array_push(x_32, x_75); +x_77 = lean_array_push(x_76, x_53); +x_78 = l_Lean_Parser_Term_id___elambda__1___closed__2; +x_79 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_79, 0, x_78); +lean_ctor_set(x_79, 1, x_77); +x_80 = l_Lean_Elab_Term_elabArrow___lambda__1___closed__6; +x_81 = lean_array_push(x_80, x_79); +x_82 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_83 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_83, 0, x_82); +lean_ctor_set(x_83, 1, x_81); +x_84 = lean_array_push(x_32, x_83); +x_85 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_85, 0, x_36); +lean_ctor_set(x_85, 1, x_84); +x_86 = lean_array_push(x_51, x_85); +x_87 = l_Lean_Parser_Command_optDeclSig___elambda__1___closed__2; +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_87); +lean_ctor_set(x_88, 1, x_86); +x_89 = lean_array_push(x_70, x_88); +x_90 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__15; +lean_inc(x_25); +x_91 = lean_name_mk_numeral(x_90, x_25); +x_92 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__14; +x_93 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_93, 0, x_26); +lean_ctor_set(x_93, 1, x_92); +lean_ctor_set(x_93, 2, x_91); +lean_ctor_set(x_93, 3, x_29); +x_94 = lean_array_push(x_32, x_93); +x_95 = lean_array_push(x_94, x_53); +x_96 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_96, 0, x_78); +lean_ctor_set(x_96, 1, x_95); +lean_inc(x_96); +x_97 = lean_array_push(x_32, x_96); +x_98 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_98, 0, x_36); +lean_ctor_set(x_98, 1, x_97); +x_99 = l_Lean_Elab_Term_expandCDot_x3f___closed__2; +x_100 = lean_array_push(x_99, x_98); +x_101 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; +x_102 = lean_array_push(x_100, x_101); +x_103 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__17; +x_104 = lean_array_push(x_103, x_96); +x_105 = l___private_Init_Lean_Elab_TermBinders_10__expandFunBindersAux___main___closed__4; +x_106 = lean_array_push(x_104, x_105); +x_107 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_10, x_10, x_12, x_32); +lean_dec(x_10); +x_108 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__23; +x_109 = lean_name_mk_numeral(x_108, x_25); +x_110 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__22; +x_111 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__28; +x_112 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_112, 0, x_26); +lean_ctor_set(x_112, 1, x_110); +lean_ctor_set(x_112, 2, x_109); +lean_ctor_set(x_112, 3, x_111); +x_113 = lean_array_push(x_32, x_112); +x_114 = lean_array_push(x_113, x_53); +x_115 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_115, 0, x_78); +lean_ctor_set(x_115, 1, x_114); +x_116 = lean_array_push(x_32, x_115); +x_117 = l___private_Init_Lean_Elab_Quotation_13__letBindRhss___main___closed__7; +x_118 = lean_array_push(x_116, x_117); +x_119 = l_Lean_Parser_Term_app___elambda__1___closed__2; +x_120 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_120, 0, x_119); +lean_ctor_set(x_120, 1, x_118); +x_121 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__19; +x_122 = lean_array_push(x_121, x_120); +x_123 = l_Lean_Parser_Term_matchAlt___elambda__1___closed__2; +x_124 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_124, 0, x_123); +lean_ctor_set(x_124, 1, x_122); +x_125 = lean_array_push(x_107, x_124); +x_126 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_126, 0, x_36); +lean_ctor_set(x_126, 1, x_125); +x_127 = lean_array_push(x_106, x_126); +x_128 = l_Lean_Parser_Term_match__syntax___elambda__1___closed__2; +x_129 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_129, 0, x_128); +lean_ctor_set(x_129, 1, x_127); +x_130 = lean_array_push(x_102, x_129); +x_131 = l_Lean_Parser_Term_fun___elambda__1___closed__2; +x_132 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_132, 0, x_131); +lean_ctor_set(x_132, 1, x_130); +x_133 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_134 = lean_array_push(x_133, x_132); +x_135 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; +x_136 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_136, 0, x_135); +lean_ctor_set(x_136, 1, x_134); +x_137 = lean_array_push(x_89, x_136); +x_138 = l_Lean_Parser_Command_def___elambda__1___closed__2; +x_139 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_139, 0, x_138); +lean_ctor_set(x_139, 1, x_137); +x_140 = lean_array_push(x_60, x_139); +x_141 = l_Lean_Parser_Command_declaration___elambda__1___closed__2; +x_142 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_142, 0, x_141); +lean_ctor_set(x_142, 1, x_140); +lean_ctor_set(x_23, 0, x_142); +return x_23; +} +else +{ +lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; 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; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; 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; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; +x_143 = lean_ctor_get(x_23, 0); +x_144 = lean_ctor_get(x_23, 1); +lean_inc(x_144); +lean_inc(x_143); +lean_dec(x_23); +x_145 = lean_box(0); +x_146 = l_Lean_Elab_mkMacroAttribute___closed__1; +lean_inc(x_143); +x_147 = lean_name_mk_numeral(x_146, x_143); +x_148 = lean_box(0); +x_149 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__2; +x_150 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_150, 0, x_145); +lean_ctor_set(x_150, 1, x_149); +lean_ctor_set(x_150, 2, x_147); +lean_ctor_set(x_150, 3, x_148); +x_151 = l_Array_empty___closed__1; +x_152 = lean_array_push(x_151, x_150); +x_153 = lean_mk_syntax_ident(x_22); +x_154 = lean_array_push(x_151, x_153); +x_155 = l_Lean_nullKind___closed__2; +x_156 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_156, 0, x_155); +lean_ctor_set(x_156, 1, x_154); +x_157 = lean_array_push(x_152, x_156); +x_158 = l_Lean_Parser_Command_attrInstance___elambda__1___closed__2; +x_159 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_159, 0, x_158); +lean_ctor_set(x_159, 1, x_157); +x_160 = lean_array_push(x_151, x_159); +x_161 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_161, 0, x_155); +lean_ctor_set(x_161, 1, x_160); +x_162 = l_Lean_Elab_Command_elabSyntax___closed__8; +x_163 = lean_array_push(x_162, x_161); +x_164 = l_Lean_Elab_Term_elabArrayLit___closed__13; +x_165 = lean_array_push(x_163, x_164); +x_166 = l_Lean_Parser_Command_attributes___elambda__1___closed__2; +x_167 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_167, 0, x_166); +lean_ctor_set(x_167, 1, x_165); +x_168 = lean_array_push(x_151, x_167); +x_169 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_169, 0, x_155); +lean_ctor_set(x_169, 1, x_168); +x_170 = l_Lean_Elab_Command_elabSyntax___closed__6; +x_171 = lean_array_push(x_170, x_169); +x_172 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4; +x_173 = lean_array_push(x_171, x_172); +x_174 = lean_array_push(x_173, x_172); +x_175 = lean_array_push(x_174, x_172); +x_176 = lean_array_push(x_175, x_172); +x_177 = l_Lean_Parser_Command_declModifiers___elambda__1___closed__2; +x_178 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_178, 0, x_177); +lean_ctor_set(x_178, 1, x_176); +x_179 = lean_array_push(x_151, x_178); +x_180 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__6; +lean_inc(x_143); +x_181 = lean_name_mk_numeral(x_180, x_143); +x_182 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__5; +x_183 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_183, 0, x_145); +lean_ctor_set(x_183, 1, x_182); +lean_ctor_set(x_183, 2, x_181); +lean_ctor_set(x_183, 3, x_148); +x_184 = lean_array_push(x_151, x_183); +x_185 = lean_array_push(x_184, x_172); +x_186 = l_Lean_Parser_Command_declId___elambda__1___closed__2; +x_187 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_187, 0, x_186); +lean_ctor_set(x_187, 1, x_185); +x_188 = l_Lean_Elab_Command_elabSyntax___closed__10; +x_189 = lean_array_push(x_188, x_187); +x_190 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__9; +lean_inc(x_143); +x_191 = lean_name_mk_numeral(x_190, x_143); +x_192 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__8; +x_193 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__11; +x_194 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_194, 0, x_145); +lean_ctor_set(x_194, 1, x_192); +lean_ctor_set(x_194, 2, x_191); +lean_ctor_set(x_194, 3, x_193); +x_195 = lean_array_push(x_151, x_194); +x_196 = lean_array_push(x_195, x_172); +x_197 = l_Lean_Parser_Term_id___elambda__1___closed__2; +x_198 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_198, 0, x_197); +lean_ctor_set(x_198, 1, x_196); +x_199 = l_Lean_Elab_Term_elabArrow___lambda__1___closed__6; +x_200 = lean_array_push(x_199, x_198); +x_201 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_202 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_202, 0, x_201); +lean_ctor_set(x_202, 1, x_200); +x_203 = lean_array_push(x_151, x_202); +x_204 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_204, 0, x_155); +lean_ctor_set(x_204, 1, x_203); +x_205 = lean_array_push(x_170, x_204); +x_206 = l_Lean_Parser_Command_optDeclSig___elambda__1___closed__2; +x_207 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_207, 0, x_206); +lean_ctor_set(x_207, 1, x_205); +x_208 = lean_array_push(x_189, x_207); +x_209 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__15; +lean_inc(x_143); +x_210 = lean_name_mk_numeral(x_209, x_143); +x_211 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__14; +x_212 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_212, 0, x_145); +lean_ctor_set(x_212, 1, x_211); +lean_ctor_set(x_212, 2, x_210); +lean_ctor_set(x_212, 3, x_148); +x_213 = lean_array_push(x_151, x_212); +x_214 = lean_array_push(x_213, x_172); +x_215 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_215, 0, x_197); +lean_ctor_set(x_215, 1, x_214); +lean_inc(x_215); +x_216 = lean_array_push(x_151, x_215); +x_217 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_217, 0, x_155); +lean_ctor_set(x_217, 1, x_216); +x_218 = l_Lean_Elab_Term_expandCDot_x3f___closed__2; +x_219 = lean_array_push(x_218, x_217); +x_220 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; +x_221 = lean_array_push(x_219, x_220); +x_222 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__17; +x_223 = lean_array_push(x_222, x_215); +x_224 = l___private_Init_Lean_Elab_TermBinders_10__expandFunBindersAux___main___closed__4; +x_225 = lean_array_push(x_223, x_224); +x_226 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_10, x_10, x_12, x_151); +lean_dec(x_10); +x_227 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__23; +x_228 = lean_name_mk_numeral(x_227, x_143); +x_229 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__22; +x_230 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__28; +x_231 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_231, 0, x_145); +lean_ctor_set(x_231, 1, x_229); +lean_ctor_set(x_231, 2, x_228); +lean_ctor_set(x_231, 3, x_230); +x_232 = lean_array_push(x_151, x_231); +x_233 = lean_array_push(x_232, x_172); +x_234 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_234, 0, x_197); +lean_ctor_set(x_234, 1, x_233); +x_235 = lean_array_push(x_151, x_234); +x_236 = l___private_Init_Lean_Elab_Quotation_13__letBindRhss___main___closed__7; +x_237 = lean_array_push(x_235, x_236); +x_238 = l_Lean_Parser_Term_app___elambda__1___closed__2; +x_239 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_239, 0, x_238); +lean_ctor_set(x_239, 1, x_237); +x_240 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__19; +x_241 = lean_array_push(x_240, x_239); +x_242 = l_Lean_Parser_Term_matchAlt___elambda__1___closed__2; +x_243 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_243, 0, x_242); +lean_ctor_set(x_243, 1, x_241); +x_244 = lean_array_push(x_226, x_243); +x_245 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_245, 0, x_155); +lean_ctor_set(x_245, 1, x_244); +x_246 = lean_array_push(x_225, x_245); +x_247 = l_Lean_Parser_Term_match__syntax___elambda__1___closed__2; +x_248 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_248, 0, x_247); +lean_ctor_set(x_248, 1, x_246); +x_249 = lean_array_push(x_221, x_248); +x_250 = l_Lean_Parser_Term_fun___elambda__1___closed__2; +x_251 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_251, 0, x_250); +lean_ctor_set(x_251, 1, x_249); +x_252 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_253 = lean_array_push(x_252, x_251); +x_254 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; +x_255 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_255, 0, x_254); +lean_ctor_set(x_255, 1, x_253); +x_256 = lean_array_push(x_208, x_255); +x_257 = l_Lean_Parser_Command_def___elambda__1___closed__2; +x_258 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_258, 0, x_257); +lean_ctor_set(x_258, 1, x_256); +x_259 = lean_array_push(x_179, x_258); +x_260 = l_Lean_Parser_Command_declaration___elambda__1___closed__2; +x_261 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_261, 0, x_260); +lean_ctor_set(x_261, 1, x_259); +x_262 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_262, 0, x_261); +lean_ctor_set(x_262, 1, x_144); +return x_262; +} +} +} +else +{ +lean_object* x_263; lean_object* x_264; lean_object* x_265; uint8_t x_266; uint8_t x_267; +x_263 = l_Lean_Syntax_getArgs(x_15); +x_264 = lean_array_get_size(x_263); +lean_dec(x_263); +x_265 = lean_unsigned_to_nat(3u); +x_266 = lean_nat_dec_eq(x_264, x_265); +lean_dec(x_264); +x_267 = l_coeDecidableEq(x_266); +if (x_267 == 0) +{ +lean_object* x_268; lean_object* x_269; +lean_dec(x_15); +lean_dec(x_10); +x_268 = lean_box(1); +x_269 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_269, 0, x_268); +lean_ctor_set(x_269, 1, x_3); +return x_269; +} +else +{ +lean_object* x_270; lean_object* x_271; lean_object* x_272; uint8_t x_273; +x_270 = l_Lean_Syntax_getArg(x_15, x_8); +lean_dec(x_15); +x_271 = l_Lean_Syntax_getKind(x_270); +x_272 = l_Lean_Elab_Command_getCurrMacroScope(x_2, x_3); +x_273 = !lean_is_exclusive(x_272); +if (x_273 == 0) +{ +lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; lean_object* x_298; lean_object* x_299; lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; lean_object* x_314; lean_object* x_315; lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; lean_object* x_334; lean_object* x_335; lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372; lean_object* x_373; lean_object* x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; lean_object* x_380; lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; lean_object* x_386; lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; +x_274 = lean_ctor_get(x_272, 0); +x_275 = lean_box(0); +x_276 = l_Lean_Elab_mkMacroAttribute___closed__1; +lean_inc(x_274); +x_277 = lean_name_mk_numeral(x_276, x_274); +x_278 = lean_box(0); +x_279 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__2; +x_280 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_280, 0, x_275); +lean_ctor_set(x_280, 1, x_279); +lean_ctor_set(x_280, 2, x_277); +lean_ctor_set(x_280, 3, x_278); +x_281 = l_Array_empty___closed__1; +x_282 = lean_array_push(x_281, x_280); +x_283 = lean_mk_syntax_ident(x_271); +x_284 = lean_array_push(x_281, x_283); +x_285 = l_Lean_nullKind___closed__2; +x_286 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_286, 0, x_285); +lean_ctor_set(x_286, 1, x_284); +x_287 = lean_array_push(x_282, x_286); +x_288 = l_Lean_Parser_Command_attrInstance___elambda__1___closed__2; +x_289 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_289, 0, x_288); +lean_ctor_set(x_289, 1, x_287); +x_290 = lean_array_push(x_281, x_289); +x_291 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_291, 0, x_285); +lean_ctor_set(x_291, 1, x_290); +x_292 = l_Lean_Elab_Command_elabSyntax___closed__8; +x_293 = lean_array_push(x_292, x_291); +x_294 = l_Lean_Elab_Term_elabArrayLit___closed__13; +x_295 = lean_array_push(x_293, x_294); +x_296 = l_Lean_Parser_Command_attributes___elambda__1___closed__2; +x_297 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_297, 0, x_296); +lean_ctor_set(x_297, 1, x_295); +x_298 = lean_array_push(x_281, x_297); +x_299 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_299, 0, x_285); +lean_ctor_set(x_299, 1, x_298); +x_300 = l_Lean_Elab_Command_elabSyntax___closed__6; +x_301 = lean_array_push(x_300, x_299); +x_302 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4; +x_303 = lean_array_push(x_301, x_302); +x_304 = lean_array_push(x_303, x_302); +x_305 = lean_array_push(x_304, x_302); +x_306 = lean_array_push(x_305, x_302); +x_307 = l_Lean_Parser_Command_declModifiers___elambda__1___closed__2; +x_308 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_308, 0, x_307); +lean_ctor_set(x_308, 1, x_306); +x_309 = lean_array_push(x_281, x_308); +x_310 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__6; +lean_inc(x_274); +x_311 = lean_name_mk_numeral(x_310, x_274); +x_312 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__5; +x_313 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_313, 0, x_275); +lean_ctor_set(x_313, 1, x_312); +lean_ctor_set(x_313, 2, x_311); +lean_ctor_set(x_313, 3, x_278); +x_314 = lean_array_push(x_281, x_313); +x_315 = lean_array_push(x_314, x_302); +x_316 = l_Lean_Parser_Command_declId___elambda__1___closed__2; +x_317 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_317, 0, x_316); +lean_ctor_set(x_317, 1, x_315); +x_318 = l_Lean_Elab_Command_elabSyntax___closed__10; +x_319 = lean_array_push(x_318, x_317); +x_320 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__9; +lean_inc(x_274); +x_321 = lean_name_mk_numeral(x_320, x_274); +x_322 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__8; +x_323 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__11; +x_324 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_324, 0, x_275); +lean_ctor_set(x_324, 1, x_322); +lean_ctor_set(x_324, 2, x_321); +lean_ctor_set(x_324, 3, x_323); +x_325 = lean_array_push(x_281, x_324); +x_326 = lean_array_push(x_325, x_302); +x_327 = l_Lean_Parser_Term_id___elambda__1___closed__2; +x_328 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_328, 0, x_327); +lean_ctor_set(x_328, 1, x_326); +x_329 = l_Lean_Elab_Term_elabArrow___lambda__1___closed__6; +x_330 = lean_array_push(x_329, x_328); +x_331 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_332 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_332, 0, x_331); +lean_ctor_set(x_332, 1, x_330); +x_333 = lean_array_push(x_281, x_332); +x_334 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_334, 0, x_285); +lean_ctor_set(x_334, 1, x_333); +x_335 = lean_array_push(x_300, x_334); +x_336 = l_Lean_Parser_Command_optDeclSig___elambda__1___closed__2; +x_337 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_337, 0, x_336); +lean_ctor_set(x_337, 1, x_335); +x_338 = lean_array_push(x_319, x_337); +x_339 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__15; +lean_inc(x_274); +x_340 = lean_name_mk_numeral(x_339, x_274); +x_341 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__14; +x_342 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_342, 0, x_275); +lean_ctor_set(x_342, 1, x_341); +lean_ctor_set(x_342, 2, x_340); +lean_ctor_set(x_342, 3, x_278); +x_343 = lean_array_push(x_281, x_342); +x_344 = lean_array_push(x_343, x_302); +x_345 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_345, 0, x_327); +lean_ctor_set(x_345, 1, x_344); +lean_inc(x_345); +x_346 = lean_array_push(x_281, x_345); +x_347 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_347, 0, x_285); +lean_ctor_set(x_347, 1, x_346); +x_348 = l_Lean_Elab_Term_expandCDot_x3f___closed__2; +x_349 = lean_array_push(x_348, x_347); +x_350 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; +x_351 = lean_array_push(x_349, x_350); +x_352 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__17; +x_353 = lean_array_push(x_352, x_345); +x_354 = l___private_Init_Lean_Elab_TermBinders_10__expandFunBindersAux___main___closed__4; +x_355 = lean_array_push(x_353, x_354); +x_356 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_10, x_10, x_12, x_281); +lean_dec(x_10); +x_357 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__23; +x_358 = lean_name_mk_numeral(x_357, x_274); +x_359 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__22; +x_360 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__28; +x_361 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_361, 0, x_275); +lean_ctor_set(x_361, 1, x_359); +lean_ctor_set(x_361, 2, x_358); +lean_ctor_set(x_361, 3, x_360); +x_362 = lean_array_push(x_281, x_361); +x_363 = lean_array_push(x_362, x_302); +x_364 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_364, 0, x_327); +lean_ctor_set(x_364, 1, x_363); +x_365 = lean_array_push(x_281, x_364); +x_366 = l___private_Init_Lean_Elab_Quotation_13__letBindRhss___main___closed__7; +x_367 = lean_array_push(x_365, x_366); +x_368 = l_Lean_Parser_Term_app___elambda__1___closed__2; +x_369 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_369, 0, x_368); +lean_ctor_set(x_369, 1, x_367); +x_370 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__19; +x_371 = lean_array_push(x_370, x_369); +x_372 = l_Lean_Parser_Term_matchAlt___elambda__1___closed__2; +x_373 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_373, 0, x_372); +lean_ctor_set(x_373, 1, x_371); +x_374 = lean_array_push(x_356, x_373); +x_375 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_375, 0, x_285); +lean_ctor_set(x_375, 1, x_374); +x_376 = lean_array_push(x_355, x_375); +x_377 = l_Lean_Parser_Term_match__syntax___elambda__1___closed__2; +x_378 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_378, 0, x_377); +lean_ctor_set(x_378, 1, x_376); +x_379 = lean_array_push(x_351, x_378); +x_380 = l_Lean_Parser_Term_fun___elambda__1___closed__2; +x_381 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_381, 0, x_380); +lean_ctor_set(x_381, 1, x_379); +x_382 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_383 = lean_array_push(x_382, x_381); +x_384 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; +x_385 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_385, 0, x_384); +lean_ctor_set(x_385, 1, x_383); +x_386 = lean_array_push(x_338, x_385); +x_387 = l_Lean_Parser_Command_def___elambda__1___closed__2; +x_388 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_388, 0, x_387); +lean_ctor_set(x_388, 1, x_386); +x_389 = lean_array_push(x_309, x_388); +x_390 = l_Lean_Parser_Command_declaration___elambda__1___closed__2; +x_391 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_391, 0, x_390); +lean_ctor_set(x_391, 1, x_389); +lean_ctor_set(x_272, 0, x_391); +return x_272; +} +else +{ +lean_object* x_392; lean_object* x_393; lean_object* x_394; lean_object* x_395; lean_object* x_396; lean_object* x_397; lean_object* x_398; lean_object* x_399; lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404; lean_object* x_405; lean_object* x_406; lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; lean_object* x_421; lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; lean_object* x_446; lean_object* x_447; lean_object* x_448; lean_object* x_449; lean_object* x_450; lean_object* x_451; lean_object* x_452; lean_object* x_453; lean_object* x_454; lean_object* x_455; lean_object* x_456; lean_object* x_457; lean_object* x_458; lean_object* x_459; lean_object* x_460; lean_object* x_461; lean_object* x_462; lean_object* x_463; lean_object* x_464; lean_object* x_465; lean_object* x_466; lean_object* x_467; lean_object* x_468; lean_object* x_469; lean_object* x_470; lean_object* x_471; lean_object* x_472; lean_object* x_473; lean_object* x_474; lean_object* x_475; lean_object* x_476; lean_object* x_477; lean_object* x_478; lean_object* x_479; lean_object* x_480; lean_object* x_481; lean_object* x_482; lean_object* x_483; lean_object* x_484; lean_object* x_485; lean_object* x_486; lean_object* x_487; lean_object* x_488; lean_object* x_489; lean_object* x_490; lean_object* x_491; lean_object* x_492; lean_object* x_493; lean_object* x_494; lean_object* x_495; lean_object* x_496; lean_object* x_497; lean_object* x_498; lean_object* x_499; lean_object* x_500; lean_object* x_501; lean_object* x_502; lean_object* x_503; lean_object* x_504; lean_object* x_505; lean_object* x_506; lean_object* x_507; lean_object* x_508; lean_object* x_509; lean_object* x_510; lean_object* x_511; +x_392 = lean_ctor_get(x_272, 0); +x_393 = lean_ctor_get(x_272, 1); +lean_inc(x_393); +lean_inc(x_392); +lean_dec(x_272); +x_394 = lean_box(0); +x_395 = l_Lean_Elab_mkMacroAttribute___closed__1; +lean_inc(x_392); +x_396 = lean_name_mk_numeral(x_395, x_392); +x_397 = lean_box(0); +x_398 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__2; +x_399 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_399, 0, x_394); +lean_ctor_set(x_399, 1, x_398); +lean_ctor_set(x_399, 2, x_396); +lean_ctor_set(x_399, 3, x_397); +x_400 = l_Array_empty___closed__1; +x_401 = lean_array_push(x_400, x_399); +x_402 = lean_mk_syntax_ident(x_271); +x_403 = lean_array_push(x_400, x_402); +x_404 = l_Lean_nullKind___closed__2; +x_405 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_405, 0, x_404); +lean_ctor_set(x_405, 1, x_403); +x_406 = lean_array_push(x_401, x_405); +x_407 = l_Lean_Parser_Command_attrInstance___elambda__1___closed__2; +x_408 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_408, 0, x_407); +lean_ctor_set(x_408, 1, x_406); +x_409 = lean_array_push(x_400, x_408); +x_410 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_410, 0, x_404); +lean_ctor_set(x_410, 1, x_409); +x_411 = l_Lean_Elab_Command_elabSyntax___closed__8; +x_412 = lean_array_push(x_411, x_410); +x_413 = l_Lean_Elab_Term_elabArrayLit___closed__13; +x_414 = lean_array_push(x_412, x_413); +x_415 = l_Lean_Parser_Command_attributes___elambda__1___closed__2; +x_416 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_416, 0, x_415); +lean_ctor_set(x_416, 1, x_414); +x_417 = lean_array_push(x_400, x_416); +x_418 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_418, 0, x_404); +lean_ctor_set(x_418, 1, x_417); +x_419 = l_Lean_Elab_Command_elabSyntax___closed__6; +x_420 = lean_array_push(x_419, x_418); +x_421 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4; +x_422 = lean_array_push(x_420, x_421); +x_423 = lean_array_push(x_422, x_421); +x_424 = lean_array_push(x_423, x_421); +x_425 = lean_array_push(x_424, x_421); +x_426 = l_Lean_Parser_Command_declModifiers___elambda__1___closed__2; +x_427 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_427, 0, x_426); +lean_ctor_set(x_427, 1, x_425); +x_428 = lean_array_push(x_400, x_427); +x_429 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__6; +lean_inc(x_392); +x_430 = lean_name_mk_numeral(x_429, x_392); +x_431 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__5; +x_432 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_432, 0, x_394); +lean_ctor_set(x_432, 1, x_431); +lean_ctor_set(x_432, 2, x_430); +lean_ctor_set(x_432, 3, x_397); +x_433 = lean_array_push(x_400, x_432); +x_434 = lean_array_push(x_433, x_421); +x_435 = l_Lean_Parser_Command_declId___elambda__1___closed__2; +x_436 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_436, 0, x_435); +lean_ctor_set(x_436, 1, x_434); +x_437 = l_Lean_Elab_Command_elabSyntax___closed__10; +x_438 = lean_array_push(x_437, x_436); +x_439 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__9; +lean_inc(x_392); +x_440 = lean_name_mk_numeral(x_439, x_392); +x_441 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__8; +x_442 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__11; +x_443 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_443, 0, x_394); +lean_ctor_set(x_443, 1, x_441); +lean_ctor_set(x_443, 2, x_440); +lean_ctor_set(x_443, 3, x_442); +x_444 = lean_array_push(x_400, x_443); +x_445 = lean_array_push(x_444, x_421); +x_446 = l_Lean_Parser_Term_id___elambda__1___closed__2; +x_447 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_447, 0, x_446); +lean_ctor_set(x_447, 1, x_445); +x_448 = l_Lean_Elab_Term_elabArrow___lambda__1___closed__6; +x_449 = lean_array_push(x_448, x_447); +x_450 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_451 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_451, 0, x_450); +lean_ctor_set(x_451, 1, x_449); +x_452 = lean_array_push(x_400, x_451); +x_453 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_453, 0, x_404); +lean_ctor_set(x_453, 1, x_452); +x_454 = lean_array_push(x_419, x_453); +x_455 = l_Lean_Parser_Command_optDeclSig___elambda__1___closed__2; +x_456 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_456, 0, x_455); +lean_ctor_set(x_456, 1, x_454); +x_457 = lean_array_push(x_438, x_456); +x_458 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__15; +lean_inc(x_392); +x_459 = lean_name_mk_numeral(x_458, x_392); +x_460 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__14; +x_461 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_461, 0, x_394); +lean_ctor_set(x_461, 1, x_460); +lean_ctor_set(x_461, 2, x_459); +lean_ctor_set(x_461, 3, x_397); +x_462 = lean_array_push(x_400, x_461); +x_463 = lean_array_push(x_462, x_421); +x_464 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_464, 0, x_446); +lean_ctor_set(x_464, 1, x_463); +lean_inc(x_464); +x_465 = lean_array_push(x_400, x_464); +x_466 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_466, 0, x_404); +lean_ctor_set(x_466, 1, x_465); +x_467 = l_Lean_Elab_Term_expandCDot_x3f___closed__2; +x_468 = lean_array_push(x_467, x_466); +x_469 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; +x_470 = lean_array_push(x_468, x_469); +x_471 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__17; +x_472 = lean_array_push(x_471, x_464); +x_473 = l___private_Init_Lean_Elab_TermBinders_10__expandFunBindersAux___main___closed__4; +x_474 = lean_array_push(x_472, x_473); +x_475 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_10, x_10, x_12, x_400); +lean_dec(x_10); +x_476 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__23; +x_477 = lean_name_mk_numeral(x_476, x_392); +x_478 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__22; +x_479 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__28; +x_480 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_480, 0, x_394); +lean_ctor_set(x_480, 1, x_478); +lean_ctor_set(x_480, 2, x_477); +lean_ctor_set(x_480, 3, x_479); +x_481 = lean_array_push(x_400, x_480); +x_482 = lean_array_push(x_481, x_421); +x_483 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_483, 0, x_446); +lean_ctor_set(x_483, 1, x_482); +x_484 = lean_array_push(x_400, x_483); +x_485 = l___private_Init_Lean_Elab_Quotation_13__letBindRhss___main___closed__7; +x_486 = lean_array_push(x_484, x_485); +x_487 = l_Lean_Parser_Term_app___elambda__1___closed__2; +x_488 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_488, 0, x_487); +lean_ctor_set(x_488, 1, x_486); +x_489 = l_Lean_Elab_Command_elabMacro___lambda__1___closed__19; +x_490 = lean_array_push(x_489, x_488); +x_491 = l_Lean_Parser_Term_matchAlt___elambda__1___closed__2; +x_492 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_492, 0, x_491); +lean_ctor_set(x_492, 1, x_490); +x_493 = lean_array_push(x_475, x_492); +x_494 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_494, 0, x_404); +lean_ctor_set(x_494, 1, x_493); +x_495 = lean_array_push(x_474, x_494); +x_496 = l_Lean_Parser_Term_match__syntax___elambda__1___closed__2; +x_497 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_497, 0, x_496); +lean_ctor_set(x_497, 1, x_495); +x_498 = lean_array_push(x_470, x_497); +x_499 = l_Lean_Parser_Term_fun___elambda__1___closed__2; +x_500 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_500, 0, x_499); +lean_ctor_set(x_500, 1, x_498); +x_501 = l_Lean_Elab_Command_elabSyntax___closed__15; +x_502 = lean_array_push(x_501, x_500); +x_503 = l_Lean_Parser_Command_declValSimple___elambda__1___closed__2; +x_504 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_504, 0, x_503); +lean_ctor_set(x_504, 1, x_502); +x_505 = lean_array_push(x_457, x_504); +x_506 = l_Lean_Parser_Command_def___elambda__1___closed__2; +x_507 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_507, 0, x_506); +lean_ctor_set(x_507, 1, x_505); +x_508 = lean_array_push(x_428, x_507); +x_509 = l_Lean_Parser_Command_declaration___elambda__1___closed__2; +x_510 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_510, 0, x_509); +lean_ctor_set(x_510, 1, x_508); +x_511 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_511, 0, x_510); +lean_ctor_set(x_511, 1, x_393); +return x_511; +} +} +} +} +} +} +} +lean_object* _init_l_Lean_Elab_Command_elabMacro___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabMacro___lambda__1___boxed), 3, 0); +return x_1; +} +} +lean_object* l_Lean_Elab_Command_elabMacro(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; +x_4 = l_Lean_Elab_Command_elabMacro___closed__1; +x_5 = l_Lean_Elab_Command_adaptExpander(x_4, x_1, x_2, x_3); +return x_5; +} +} +lean_object* l_Lean_Elab_Command_elabMacro___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_Command_elabMacro___lambda__1(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elabMacro"); +return x_1; +} +} +lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_declareBuiltinCommandElab___closed__3; +x_2 = l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabMacro), 3, 0); +return x_1; +} +} +lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro(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_Parser_Command_macro___elambda__1___closed__2; +x_3 = l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__2; +x_4 = l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__3; +x_5 = l_Lean_Elab_Command_addBuiltinCommandElab(x_2, x_3, x_4, x_1); +return x_5; +} +} lean_object* initialize_Init_Lean_Elab_Command(lean_object*); lean_object* initialize_Init_Lean_Elab_Quotation(lean_object*); static bool _G_initialized = false; @@ -5436,8 +6752,6 @@ l_Lean_Elab_Command_elabSyntax___closed__21 = _init_l_Lean_Elab_Command_elabSynt lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__21); l_Lean_Elab_Command_elabSyntax___closed__22 = _init_l_Lean_Elab_Command_elabSyntax___closed__22(); lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__22); -l_Lean_Elab_Command_elabSyntax___closed__23 = _init_l_Lean_Elab_Command_elabSyntax___closed__23(); -lean_mark_persistent(l_Lean_Elab_Command_elabSyntax___closed__23); l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1(); lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__1); l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__2 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___closed__2(); @@ -5447,6 +6761,73 @@ lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax___cl res = l___regBuiltinCommandElab_Lean_Elab_Command_elabSyntax(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__1 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__1); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__2 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__2); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__3 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__3); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__4 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__4); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__5 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__5); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__6 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__6); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__7 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__7(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__7); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__8 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__8(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__8); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__9 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__9(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__9); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__10 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__10(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__10); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__11 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__11(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__11); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__12 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__12(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__12); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__13 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__13(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__13); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__14 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__14(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__14); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__15 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__15(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__15); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__16 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__16(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__16); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__17 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__17(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__17); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__18 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__18(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__18); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__19 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__19(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__19); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__20 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__20(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__20); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__21 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__21(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__21); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__22 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__22(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__22); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__23 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__23(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__23); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__24 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__24(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__24); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__25 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__25(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__25); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__26 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__26(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__26); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__27 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__27(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__27); +l_Lean_Elab_Command_elabMacro___lambda__1___closed__28 = _init_l_Lean_Elab_Command_elabMacro___lambda__1___closed__28(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___lambda__1___closed__28); +l_Lean_Elab_Command_elabMacro___closed__1 = _init_l_Lean_Elab_Command_elabMacro___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabMacro___closed__1); +l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__1 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__1(); +lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__1); +l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__2 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__2(); +lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__2); +l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__3 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__3(); +lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro___closed__3); +res = l___regBuiltinCommandElab_Lean_Elab_Command_elabMacro(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Lean/Elab/Term.c b/stage0/stdlib/Init/Lean/Elab/Term.c index 2aefd169d7..eb6869899e 100644 --- a/stage0/stdlib/Init/Lean/Elab/Term.c +++ b/stage0/stdlib/Init/Lean/Elab/Term.c @@ -15,6 +15,7 @@ extern "C" { #endif lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Term_throwError___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_reverse___rarg(lean_object*); +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Term_elabTermAux___main___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__4; lean_object* l_Lean_Elab_Term_elabChar(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkAppM(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -58,7 +59,7 @@ lean_object* l_Lean_Elab_Term_declareBuiltinTermElab___closed__1; extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Meta_whnfForall(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_declareBuiltinTermElab___closed__8; -extern lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +lean_object* l_Lean_Elab_Term_elabTermAux___main___closed__6; lean_object* l_String_toFormat(lean_object*); lean_object* l_Lean_Elab_Term_TermElabM_MonadQuotation; extern lean_object* l_Lean_MessageData_ofList___closed__3; @@ -69,7 +70,6 @@ lean_object* l_Lean_Elab_Term_tryPostpone___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Term_10__exceptionToSorry(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___private_Init_Lean_Elab_Term_21__mkPairsAux___boxed(lean_object*, 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_Term_assignExprMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Expr_hasSorry___main___closed__1; lean_object* l___private_Init_Lean_Elab_Term_17__synthesizeSyntheticMVar___closed__2; @@ -88,6 +88,7 @@ lean_object* l_Lean_Elab_Term_registerBuiltinTermElabAttr___closed__3; lean_object* l_Lean_SMap_empty___at_Lean_Elab_Term_mkBuiltinTermElabTable___spec__1___closed__1; lean_object* l_Lean_Meta_mkForall(lean_object*, lean_object*, lean_object*, lean_object*); extern size_t l_PersistentHashMap_insertAux___main___rarg___closed__2; +lean_object* l_Lean_Elab_Term_elabTermAux___main___closed__4; extern lean_object* l_Option_get_x21___rarg___closed__3; lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Term_3__addMacroStack___spec__1___closed__1; lean_object* l___private_Init_Lean_Elab_Term_14__resumePostponed___closed__1; @@ -109,7 +110,6 @@ uint8_t l_List_elem___main___at_Lean_addAliasEntry___spec__18(lean_object*, lean extern lean_object* l_Prod_HasRepr___rarg___closed__1; lean_object* l___private_Init_Lean_Elab_Term_17__synthesizeSyntheticMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Term_6__fromMetaState___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_stxInh; lean_object* l_Lean_Meta_Exception_toMessageData(lean_object*); lean_object* l_Lean_Elab_Term_TermElabM_MonadLog; lean_object* l_Lean_mkMVar(lean_object*); @@ -193,6 +193,7 @@ lean_object* l_Lean_Elab_Term_withIncRecDepth(lean_object*); lean_object* l_Lean_WHNF_unfoldDefinitionAux___at_Lean_Meta_unfoldDefinition_x3f___spec__1(lean_object*, lean_object*, lean_object*); extern lean_object* l_List_repr___rarg___closed__3; extern lean_object* l_Lean_Parser_Term_typeAscription___elambda__1___closed__2; +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTermAux___main___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_throwError(lean_object*); lean_object* l___private_Init_Lean_Elab_Term_25__mkFreshLevelMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabSort___boxed(lean_object*, lean_object*, lean_object*); @@ -200,13 +201,10 @@ lean_object* l___private_Init_Lean_Elab_Term_21__mkPairsAux___main___boxed(lean_ lean_object* l_Lean_Elab_Term_getMCtx(lean_object*); size_t l_USize_shiftRight(size_t, size_t); lean_object* l_Lean_Elab_Term_withLCtx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Term_elabTerm___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabArrayLit___closed__6; lean_object* l___private_Init_Lean_Elab_Term_21__mkPairsAux___main___closed__9; lean_object* l_Lean_Elab_Term_resolveName___closed__6; lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars(uint8_t, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabTypeStx___rarg(lean_object*); lean_object* lean_string_utf8_byte_size(lean_object*); lean_object* l___private_Init_Lean_Elab_Term_21__mkPairsAux___main___closed__8; @@ -220,9 +218,9 @@ lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Term_3__addMacro lean_object* l_ReaderT_read___at_Lean_Elab_Term_TermElabM_MonadLog___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_dbgTrace___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_sort___elambda__1___closed__2; +lean_object* l_Lean_Elab_Term_adaptMacro___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_MetaHasEval___rarg___closed__4; lean_object* l_Lean_Elab_Term_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_AssocList_find___main___at_Lean_Elab_Term_elabTerm___spec__6(lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Term_TermElabM_MonadLog___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_Exception_hasToString(lean_object*); extern lean_object* l_Array_iterateMAux___main___at_Lean_mkAppStx___spec__1___closed__1; @@ -232,6 +230,7 @@ extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; lean_object* l_Lean_Elab_Term_resolveName___closed__5; lean_object* l_Lean_Elab_Term_mkFreshExprMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_LVal_hasToString(lean_object*); +extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; lean_object* l_Lean_Elab_Term_mkFreshAnonymousName___rarg___closed__2; lean_object* l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4; lean_object* l_Lean_Elab_Term_trace___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -252,9 +251,11 @@ lean_object* l_Lean_Elab_Term_getTraceState(lean_object*); lean_object* l___private_Init_Lean_Elab_Term_21__mkPairsAux___main___closed__2; lean_object* l_Lean_Elab_Term_mkFreshTypeMVar(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_TermElabM_MonadLog___closed__7; +lean_object* l_Lean_Elab_Term_elabTermAux___main___closed__1; lean_object* l_Lean_Elab_Term_mkFreshAnonymousIdent(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabParen___closed__2; lean_object* l_Lean_Elab_Term_mkLet(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabTermAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_whnf(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabArrayLit(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getOptions(lean_object*, lean_object*); @@ -269,6 +270,7 @@ lean_object* l_Lean_Elab_Term_elabListLit___boxed(lean_object*, lean_object*, le uint8_t lean_metavar_ctx_is_expr_assigned(lean_object*, lean_object*); lean_object* l_Lean_Meta_isClass(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_contains___at_Lean_Elab_Term_addBuiltinTermElab___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__5___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_synthesizeUsingDefault(lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Term_3__addMacroStack___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withIncRecDepth___rarg___closed__1; @@ -289,7 +291,6 @@ lean_object* l_Lean_Syntax_isCharLit_x3f(lean_object*); lean_object* l_Array_isEqvAux___main___at_Lean_Elab_Term_withMVarContext___spec__1___boxed(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_Term_synthesizeInstMVarCore___closed__5; -lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_declareBuiltinTermElab___closed__3; lean_object* l_Lean_Elab_Term_elabChar___closed__1; lean_object* l_Lean_Elab_Term_mkFreshAnonymousName___rarg(lean_object*); @@ -297,6 +298,7 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabProp___closed__3; extern lean_object* l_Lean_Expr_Inhabited___closed__1; lean_object* l_PersistentArray_foldlMAux___main___at___private_Init_Lean_Elab_Term_6__fromMetaState___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l_AssocList_find___main___at_Lean_Elab_Term_elabTermAux___main___spec__6___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withMVarContext(lean_object*); extern lean_object* l_Lean_Name_appendIndexAfter___closed__1; lean_object* l_Lean_Elab_Term_termElabAttribute___closed__4; @@ -318,7 +320,6 @@ extern lean_object* l_Lean_Parser_Term_id___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_elabArrayLit___closed__11; lean_object* l_Lean_Elab_Term_decLevel_x3f(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_numLitKind; -lean_object* l_Lean_Elab_Term_elabTerm___closed__6; lean_object* l___private_Init_Lean_Elab_Term_24__resolveLocalName(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_levelMVarToParam(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabChar___closed__2; @@ -334,7 +335,6 @@ lean_object* l___private_Init_Lean_Elab_Term_18__synthesizeSyntheticMVarsStep___ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabSort___closed__3; lean_object* l___private_Init_Lean_Elab_Term_12__elabTermUsing___main___closed__3; extern lean_object* l_Lean_Expr_isSyntheticSorry___closed__1; -extern lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Term_6__fromMetaState___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_isExprMVarAssigned___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabProp___rarg(lean_object*); @@ -378,6 +378,7 @@ lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkConst___closed__4; lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabTermAux___main___closed__5; lean_object* l_Lean_Name_appendIndexAfter(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Term_6__fromMetaState___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Term_21__mkPairsAux___main___closed__7; @@ -388,6 +389,7 @@ uint8_t l___private_Init_Lean_Elab_Term_1__getBetterRef___lambda__1(lean_object* lean_object* l_Lean_Elab_Term_resolveName___closed__7; size_t l_Lean_Name_hash(lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Term_6__fromMetaState___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabTermAux___main(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_termElabAttribute___closed__3; lean_object* l_Nat_repr(lean_object*); lean_object* l_Lean_Elab_Term_State_inhabited___closed__2; @@ -415,28 +417,29 @@ lean_object* l_Lean_Elab_Term_isClass___boxed(lean_object*, lean_object*, lean_o lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabParen___closed__3; lean_object* l_Lean_Elab_Term_elabNum___closed__1; lean_object* l_Lean_Elab_Term_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_adaptMacro(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_log___at_Lean_Elab_Term_logTrace___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__5; extern lean_object* l_Lean_Parser_Term_fun___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_elabTypeStx___rarg___closed__1; extern lean_object* l_Lean_Elab_Exception_hasToString___closed__1; +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Term_elabTermAux___main___spec__3(lean_object*, size_t, lean_object*); extern lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__2; extern lean_object* l_PersistentArray_empty___closed__3; -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTerm___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_synthesizeSyntheticMVars___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkBuiltinTermElabTable(lean_object*); lean_object* l_Lean_Elab_Term_resolveName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabStr___closed__2; extern lean_object* l_Lean_Parser_regBuiltinTermParserAttr___closed__3; lean_object* l___private_Init_Lean_Elab_Term_2__prettyPrint(lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTerm___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabProp___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_assignExpr(lean_object*, lean_object*, lean_object*); -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Term_elabTerm___spec__3(lean_object*, size_t, lean_object*); lean_object* l_Lean_Elab_Term_applyResult___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_throwUnsupportedSyntax___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkTermElabAttribute(lean_object*); +lean_object* l_AssocList_find___main___at_Lean_Elab_Term_elabTermAux___main___spec__6(lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Term_3__addMacroStack___spec__1___closed__3; uint8_t l_PersistentHashMap_contains___at_Lean_Elab_Term_addBuiltinTermElab___spec__4(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_fun___elambda__1___closed__1; @@ -448,6 +451,7 @@ lean_object* l___private_Init_Lean_Elab_Term_13__resumeElabTerm___boxed(lean_obj extern lean_object* l_Lean_Options_empty; lean_object* l_Lean_Elab_Term_mkConst___closed__7; lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabTypeStx___closed__3; +lean_object* l_Lean_Elab_Term_elabTermAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabLevel___boxed(lean_object*, lean_object*, lean_object*); uint8_t l_coeDecidableEq(uint8_t); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabSort(lean_object*); @@ -463,6 +467,7 @@ lean_object* l_Lean_Elab_Term_liftLevelM(lean_object*); lean_object* l_Lean_Elab_Term_elabProp(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_resolveName___closed__8; lean_object* l_Lean_LocalDecl_toExpr(lean_object*); +lean_object* l_Lean_Elab_Term_elabTermAux(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_termElabAttribute___closed__5; lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabArrayLit___closed__3; @@ -474,7 +479,6 @@ lean_object* l_Lean_Elab_Term_addBuiltinTermElab___closed__1; lean_object* l_mkHashMapImp___rarg(lean_object*); lean_object* l_Lean_Elab_Term_whnfCore___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getCurrNamespace___boxed(lean_object*, lean_object*); -lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTerm___spec__5(lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabParen___closed__1; lean_object* l_Lean_Elab_Level_elabLevel___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_ensureHasType___closed__1; @@ -496,6 +500,7 @@ lean_object* l_Lean_Elab_Term_elabArrayLit___closed__4; lean_object* l_Lean_Elab_Term_TermElabM_inhabited___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_TermElabM_MonadLog___lambda__4___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkFreshAnonymousIdent___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabTermAux___main___closed__3; extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; lean_object* l___private_Init_Lean_Elab_Term_9__expandCDotInApp___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ConstantInfo_type(lean_object*); @@ -512,7 +517,6 @@ size_t l_USize_land(size_t, size_t); lean_object* l_Lean_Elab_Term_mkConst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_contains___at_Lean_Elab_Term_addBuiltinTermElab___spec__2___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Term_19__reportStuckSyntheticMVars(lean_object*, lean_object*); -lean_object* l_AssocList_find___main___at_Lean_Elab_Term_elabTerm___spec__6___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkConst___closed__3; lean_object* l_Lean_Elab_Term_resolveName___closed__4; lean_object* l_Lean_Elab_Term_withNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -545,7 +549,7 @@ lean_object* l_Lean_Elab_Term_withNode(lean_object*); extern lean_object* l_Option_HasRepr___rarg___closed__3; lean_object* l_Lean_Elab_Term_traceAtCmdPos___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterAuxM___main___at___private_Init_Lean_Elab_Term_18__synthesizeSyntheticMVarsStep___spec__2___closed__9; -lean_object* l_Lean_Elab_Term_elabTerm___closed__4; +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTermAux___main___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Term_16__checkWithDefault(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withoutPostponing___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_prop___elambda__1___closed__2; @@ -555,6 +559,7 @@ extern lean_object* l_Lean_Meta_Exception_mkAppTypeMismatchMessage___closed__8; lean_object* l_Lean_Elab_Term_Exception_inhabited; lean_object* l_Lean_Elab_Term_elabHole(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_str___elambda__1___closed__2; +extern lean_object* l_Lean_Syntax_inhabited; lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabProp___closed__2; lean_object* l_Lean_Elab_Term_elabBadCDot___closed__2; lean_object* l_Lean_Elab_Term_liftMetaM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -583,6 +588,7 @@ lean_object* l_Lean_Elab_Term_termElabAttribute___closed__6; lean_object* l_Lean_Meta_mkFreshExprMVar(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkConst___closed__5; lean_object* l_Lean_mkApp(lean_object*, lean_object*); +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__5(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabArrayLit___closed__12; extern lean_object* l_Lean_Syntax_asNode___closed__1; lean_object* l_Lean_nameToExprAux___main(lean_object*); @@ -599,14 +605,15 @@ lean_object* l_Lean_Elab_Term_TermElabM_MonadLog___closed__1; lean_object* l_Lean_Environment_addAndCompile(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_registerSyntheticMVar(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getKind(lean_object*); +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__2(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Term_6__fromMetaState___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_registerBuiltinTermElabAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_registerBuiltinTermElabAttr(lean_object*); lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_decLevel___closed__3; -lean_object* l_Lean_Elab_Term_elabTerm___closed__1; extern lean_object* l_Lean_Parser_Term_paren___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_registerBuiltinTermElabAttr___lambda__1___closed__1; +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__1(lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_decLevel_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_ensureType___closed__1; @@ -629,7 +636,6 @@ lean_object* l_Lean_Elab_Term_resettingSynthInstanceCacheWhen___rarg(uint8_t, le lean_object* l_Lean_Elab_logAt___at_Lean_Elab_Term_logTrace___spec__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkConst___closed__1; lean_object* l_Lean_Elab_Term_isExprMVarAssigned(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_elabTerm___closed__2; lean_object* l_Lean_Elab_Term_whnf___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabHole___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_declareBuiltinTermElab___closed__4; @@ -653,8 +659,6 @@ lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*) uint8_t l_Array_anyRangeMAux___main___at_Lean_Elab_Term_expandCDot_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Meta_LevelDefEq_10__processPostponedStep___closed__1; lean_object* l_Lean_Elab_Term_registerBuiltinTermElabAttr___closed__2; -lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__2(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_elabTerm___closed__5; lean_object* l_Lean_Elab_Term_whnfForall(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instantiateMVars___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabStr___closed__3; @@ -682,7 +686,6 @@ lean_object* l_Lean_Elab_Term_elabChar___closed__3; lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__12; lean_object* l_Lean_Meta_mkLambda(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_KernelException_toMessageData___closed__12; -lean_object* l_Lean_Elab_Term_elabTerm___closed__3; extern lean_object* l_Lean_Expr_Inhabited; lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_addBuiltinTermElab(lean_object*, lean_object*, lean_object*, lean_object*); @@ -696,6 +699,7 @@ lean_object* l_List_forM___main___at___private_Init_Lean_Elab_Term_19__reportStu lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabHole___closed__3; 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_mkMessage___at_Lean_Elab_Term_throwError___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getOpenDecls___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getTraceState___boxed(lean_object*); lean_object* l_Lean_Elab_Term_mkFreshLevelMVar(lean_object*, lean_object*, lean_object*); @@ -720,6 +724,7 @@ lean_object* l_Lean_Elab_Term_tryPostpone(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkPairs(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_foldlMAux___main___at___private_Init_Lean_Elab_Term_6__fromMetaState___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_tryEnsureHasType_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4; lean_object* l_Lean_Meta_mkFreshLevelMVar___rarg(lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); extern lean_object* l_Lean_MetavarContext_Inhabited___closed__1; @@ -743,6 +748,7 @@ lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, lean_object*, lean_ lean_object* l_Lean_Elab_Term_resetSynthInstanceCache___boxed(lean_object*); lean_object* l_Lean_Elab_Term_decLevel___closed__2; lean_object* l_Lean_Elab_Term_decLevel___closed__1; +lean_object* l_Lean_Elab_Term_elabTermAux___main___closed__2; lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabBadCDot___closed__1; lean_object* l_Lean_Elab_Term_registerBuiltinTermElabAttr___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l___private_Init_Lean_Elab_Term_10__exceptionToSorry___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -754,6 +760,7 @@ lean_object* l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(lean_object*, lean_object* l_Lean_Elab_Term_getMCtx___boxed(lean_object*); lean_object* l_Lean_Elab_Term_applyResult(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); +extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1; lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabHole___closed__1; lean_object* l_Lean_SMap_empty___at_Lean_Elab_Term_mkBuiltinTermElabTable___spec__1; lean_object* lean_usize_to_nat(size_t); @@ -764,7 +771,6 @@ lean_object* l___private_Init_Lean_Elab_Term_10__exceptionToSorry___closed__1; extern lean_object* l_Lean_levelOne; lean_object* l_Lean_Message_toString(lean_object*); lean_object* l_Lean_mkAppB(lean_object*, lean_object*, lean_object*); -lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTerm___spec__5___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_char___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_TermElabM_MonadLog___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_Elab_Term_expandCDot_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -825,6 +831,7 @@ lean_object* l_Lean_Elab_Term_mkFreshTypeMVar___boxed(lean_object*, lean_object* lean_object* l_Lean_Elab_Term_elabBadCDot(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabNum___closed__4; uint8_t lean_string_dec_eq(lean_object*, lean_object*); +lean_object* l_Lean_Elab_expandMacro(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_decLevel___closed__6; lean_object* _init_l_Lean_Elab_Term_State_inhabited___closed__1() { @@ -3251,7 +3258,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_nameToExprAux___main___closed__4; -x_2 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1; +x_2 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } @@ -3538,7 +3545,7 @@ goto block_23; else { lean_object* x_41; uint8_t x_42; -x_41 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1; +x_41 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1; x_42 = lean_string_dec_eq(x_36, x_41); lean_dec(x_36); if (x_42 == 0) @@ -9821,7 +9828,7 @@ else { lean_object* x_8; lean_object* x_9; lean_dec(x_1); -x_8 = l_Lean_stxInh; +x_8 = l_Lean_Syntax_inhabited; x_9 = l_unreachable_x21___rarg(x_8); return x_9; } @@ -11403,7 +11410,7 @@ lean_object* _init_l___private_Init_Lean_Elab_Term_11__postponeElabTerm___closed _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +x_1 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; x_2 = l___private_Init_Lean_Elab_Term_11__postponeElabTerm___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; @@ -11754,7 +11761,79 @@ x_11 = l___private_Init_Lean_Elab_Term_12__elabTermUsing(x_1, x_2, x_3, x_9, x_1 return x_11; } } -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTerm___spec__4(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_Term_adaptMacro(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_5 = l_Lean_Elab_Term_getCurrMacroScope(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); +x_8 = l_Lean_Elab_Term_getEnv___rarg(x_7); +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_8, 1); +x_11 = lean_ctor_get(x_8, 0); +lean_dec(x_11); +x_12 = lean_apply_2(x_1, x_2, x_6); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; +lean_free_object(x_8); +x_13 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_10); +return x_13; +} +else +{ +lean_object* x_14; +x_14 = lean_ctor_get(x_12, 0); +lean_inc(x_14); +lean_dec(x_12); +lean_ctor_set(x_8, 0, x_14); +return x_8; +} +} +else +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_ctor_get(x_8, 1); +lean_inc(x_15); +lean_dec(x_8); +x_16 = lean_apply_2(x_1, x_2, x_6); +if (lean_obj_tag(x_16) == 0) +{ +lean_object* x_17; +x_17 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_15); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_ctor_get(x_16, 0); +lean_inc(x_18); +lean_dec(x_16); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_15); +return x_19; +} +} +} +} +lean_object* l_Lean_Elab_Term_adaptMacro___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_Term_adaptMacro(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTermAux___main___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; @@ -11796,7 +11875,7 @@ return x_15; } } } -lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Term_elabTerm___spec__3(lean_object* x_1, size_t x_2, lean_object* x_3) { +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Term_elabTermAux___main___spec__3(lean_object* x_1, size_t x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_1) == 0) @@ -11867,14 +11946,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_Term_elabTerm___spec__4(x_20, x_21, lean_box(0), x_22, x_3); +x_23 = l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__2(lean_object* x_1, lean_object* x_2) { +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__2(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; size_t x_4; lean_object* x_5; @@ -11882,11 +11961,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_Term_elabTerm___spec__3(x_3, x_4, x_2); +x_5 = l_PersistentHashMap_findAux___main___at_Lean_Elab_Term_elabTermAux___main___spec__3(x_3, x_4, x_2); return x_5; } } -lean_object* l_AssocList_find___main___at_Lean_Elab_Term_elabTerm___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_AssocList_find___main___at_Lean_Elab_Term_elabTermAux___main___spec__6(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -11918,7 +11997,7 @@ return x_9; } } } -lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTerm___spec__5(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTermAux___main___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; @@ -11928,12 +12007,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_Term_elabTerm___spec__6(x_2, x_7); +x_8 = l_AssocList_find___main___at_Lean_Elab_Term_elabTermAux___main___spec__6(x_2, x_7); lean_dec(x_7); return x_8; } } -lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__1(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__1(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; @@ -11946,11 +12025,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_Term_elabTerm___spec__2(x_5, x_2); +x_6 = l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__5(x_4, x_2); +x_7 = l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__5(x_4, x_2); lean_dec(x_4); return x_7; } @@ -11966,13 +12045,13 @@ 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_Term_elabTerm___spec__5(x_8, x_2); +x_9 = l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__5(x_8, x_2); lean_dec(x_8); return x_9; } } } -lean_object* _init_l_Lean_Elab_Term_elabTerm___closed__1() { +lean_object* _init_l_Lean_Elab_Term_elabTermAux___main___closed__1() { _start: { lean_object* x_1; @@ -11980,27 +12059,27 @@ x_1 = lean_mk_string("elaboration function for '"); return x_1; } } -lean_object* _init_l_Lean_Elab_Term_elabTerm___closed__2() { +lean_object* _init_l_Lean_Elab_Term_elabTermAux___main___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_elabTerm___closed__1; +x_1 = l_Lean_Elab_Term_elabTermAux___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_Lean_Elab_Term_elabTerm___closed__3() { +lean_object* _init_l_Lean_Elab_Term_elabTermAux___main___closed__3() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_elabTerm___closed__2; +x_1 = l_Lean_Elab_Term_elabTermAux___main___closed__2; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Term_elabTerm___closed__4() { +lean_object* _init_l_Lean_Elab_Term_elabTermAux___main___closed__4() { _start: { lean_object* x_1; @@ -12008,27 +12087,27 @@ x_1 = lean_mk_string("' has not been implemented"); return x_1; } } -lean_object* _init_l_Lean_Elab_Term_elabTerm___closed__5() { +lean_object* _init_l_Lean_Elab_Term_elabTermAux___main___closed__5() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_elabTerm___closed__4; +x_1 = l_Lean_Elab_Term_elabTermAux___main___closed__4; x_2 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Elab_Term_elabTerm___closed__6() { +lean_object* _init_l_Lean_Elab_Term_elabTermAux___main___closed__6() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_elabTerm___closed__5; +x_1 = l_Lean_Elab_Term_elabTermAux___main___closed__5; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l_Lean_Elab_Term_elabTerm(lean_object* x_1, lean_object* x_2, uint8_t x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_Elab_Term_elabTermAux___main(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; @@ -12079,11 +12158,21 @@ x_28 = lean_ctor_get(x_12, 4); x_29 = lean_nat_dec_eq(x_27, x_28); if (x_29 == 0) { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_53; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_64; lean_dec(x_5); x_30 = lean_nat_add(x_27, x_9); lean_dec(x_27); lean_ctor_set(x_12, 3, x_30); +lean_inc(x_8); +lean_inc(x_20); +lean_inc(x_19); +lean_inc(x_18); +lean_inc(x_17); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); x_31 = lean_alloc_ctor(0, 10, 1); lean_ctor_set(x_31, 0, x_12); lean_ctor_set(x_31, 1, x_13); @@ -12096,46 +12185,56 @@ lean_ctor_set(x_31, 7, x_19); lean_ctor_set(x_31, 8, x_20); lean_ctor_set(x_31, 9, x_8); lean_ctor_set_uint8(x_31, sizeof(void*)*10, x_21); -if (lean_obj_tag(x_1) == 1) +if (lean_obj_tag(x_4) == 1) { -lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; uint8_t x_69; -x_65 = l_Lean_Elab_Term_getOptions(x_31, x_6); -x_66 = lean_ctor_get(x_65, 0); -lean_inc(x_66); -x_67 = lean_ctor_get(x_65, 1); -lean_inc(x_67); -lean_dec(x_65); -x_68 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4; -x_69 = l_Lean_checkTraceOption(x_66, x_68); -lean_dec(x_66); -if (x_69 == 0) +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; uint8_t x_80; +x_76 = l_Lean_Elab_Term_getOptions(x_31, x_6); +x_77 = lean_ctor_get(x_76, 0); +lean_inc(x_77); +x_78 = lean_ctor_get(x_76, 1); +lean_inc(x_78); +lean_dec(x_76); +x_79 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4; +x_80 = l_Lean_checkTraceOption(x_77, x_79); +lean_dec(x_77); +if (x_80 == 0) { -x_32 = x_67; -goto block_52; +x_32 = x_78; +goto block_63; } else { -lean_object* x_70; lean_object* x_71; lean_object* x_72; -lean_inc(x_1); -x_70 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_70, 0, x_1); -x_71 = l_Lean_Elab_Term_logTrace(x_68, x_1, x_70, x_31, x_67); -x_72 = lean_ctor_get(x_71, 1); -lean_inc(x_72); -lean_dec(x_71); -x_32 = x_72; -goto block_52; +lean_object* x_81; lean_object* x_82; lean_object* x_83; +lean_inc(x_4); +x_81 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_81, 0, x_4); +x_82 = l_Lean_Elab_Term_logTrace(x_79, x_4, x_81, x_31, x_78); +x_83 = lean_ctor_get(x_82, 1); +lean_inc(x_83); +lean_dec(x_82); +x_32 = x_83; +goto block_63; } } else { -lean_object* x_73; -lean_dec(x_2); -x_73 = lean_box(0); -x_53 = x_73; -goto block_64; +lean_object* x_84; +lean_dec(x_12); +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_8); +lean_dec(x_1); +x_84 = lean_box(0); +x_64 = x_84; +goto block_75; } -block_52: +block_63: { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; x_33 = l_Lean_Elab_Term_termElabAttribute; @@ -12152,67 +12251,134 @@ lean_dec(x_34); x_38 = lean_ctor_get(x_37, 1); lean_inc(x_38); lean_dec(x_37); -lean_inc(x_1); -x_39 = l_Lean_Syntax_getKind(x_1); -x_40 = l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__1(x_38, x_39); +lean_inc(x_4); +x_39 = l_Lean_Syntax_getKind(x_4); +x_40 = l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__1(x_38, x_39); if (lean_obj_tag(x_40) == 0) { -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; -lean_dec(x_2); -x_41 = l_Lean_Name_toString___closed__1; -x_42 = l_Lean_Name_toStringWithSep___main(x_41, x_39); -x_43 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_43, 0, x_42); -x_44 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_44, 0, x_43); -x_45 = l_Lean_Elab_Term_elabTerm___closed__3; -x_46 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_46, 0, x_45); -lean_ctor_set(x_46, 1, x_44); -x_47 = l_Lean_Elab_Term_elabTerm___closed__6; -x_48 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_48, 0, x_46); -lean_ctor_set(x_48, 1, x_47); -x_49 = l_Lean_Elab_Term_throwError___rarg(x_1, x_48, x_31, x_32); -return x_49; +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 = l_Lean_Elab_Term_getCurrMacroScope(x_31, x_32); +x_42 = lean_ctor_get(x_41, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_41, 1); +lean_inc(x_43); +lean_dec(x_41); +x_44 = l_Lean_Elab_Term_getEnv___rarg(x_43); +x_45 = lean_ctor_get(x_44, 0); +lean_inc(x_45); +x_46 = lean_ctor_get(x_44, 1); +lean_inc(x_46); +lean_dec(x_44); +lean_inc(x_4); +x_47 = l_Lean_Elab_expandMacro(x_45, x_4, x_42); +lean_dec(x_45); +if (lean_obj_tag(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; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_dec(x_12); +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_8); +lean_dec(x_1); +x_48 = l_Lean_Name_toString___closed__1; +x_49 = l_Lean_Name_toStringWithSep___main(x_48, x_39); +x_50 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_50, 0, x_49); +x_51 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_51, 0, x_50); +x_52 = l_Lean_Elab_Term_elabTermAux___main___closed__3; +x_53 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_51); +x_54 = l_Lean_Elab_Term_elabTermAux___main___closed__6; +x_55 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_55, 0, x_53); +lean_ctor_set(x_55, 1, x_54); +x_56 = l_Lean_Elab_Term_throwError___rarg(x_4, x_55, x_31, x_46); +return x_56; } else { -lean_object* x_50; lean_object* x_51; +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_dec(x_39); -x_50 = lean_ctor_get(x_40, 0); -lean_inc(x_50); +lean_dec(x_31); +x_57 = lean_ctor_get(x_47, 0); +lean_inc(x_57); +lean_dec(x_47); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_4); +lean_ctor_set(x_58, 1, x_20); +x_59 = lean_alloc_ctor(0, 10, 1); +lean_ctor_set(x_59, 0, x_12); +lean_ctor_set(x_59, 1, x_13); +lean_ctor_set(x_59, 2, x_14); +lean_ctor_set(x_59, 3, x_15); +lean_ctor_set(x_59, 4, x_16); +lean_ctor_set(x_59, 5, x_17); +lean_ctor_set(x_59, 6, x_18); +lean_ctor_set(x_59, 7, x_19); +lean_ctor_set(x_59, 8, x_58); +lean_ctor_set(x_59, 9, x_8); +lean_ctor_set_uint8(x_59, sizeof(void*)*10, x_21); +x_4 = x_57; +x_5 = x_59; +x_6 = x_46; +goto _start; +} +} +else +{ +lean_object* x_61; lean_object* x_62; +lean_dec(x_39); +lean_dec(x_12); +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_8); +x_61 = lean_ctor_get(x_40, 0); +lean_inc(x_61); lean_dec(x_40); lean_inc(x_32); -x_51 = l___private_Init_Lean_Elab_Term_12__elabTermUsing___main(x_32, x_1, x_2, x_4, x_3, x_50, x_31, x_32); -return x_51; +x_62 = l___private_Init_Lean_Elab_Term_12__elabTermUsing___main(x_32, x_4, x_1, x_3, x_2, x_61, x_31, x_32); +return x_62; } } -block_64: +block_75: { -lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; -lean_dec(x_53); -x_54 = lean_box(0); -x_55 = lean_unsigned_to_nat(0u); -lean_inc(x_1); -x_56 = l_Lean_Syntax_formatStxAux___main(x_54, x_55, x_1); -x_57 = l_Lean_Options_empty; -x_58 = l_Lean_Format_pretty(x_56, x_57); -x_59 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_59, 0, x_58); -x_60 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_60, 0, x_59); -x_61 = l_Lean_Elab_Term_withNode___rarg___closed__3; -x_62 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_62, 0, x_61); -lean_ctor_set(x_62, 1, x_60); -x_63 = l_Lean_Elab_Term_throwError___rarg(x_1, x_62, x_31, x_6); -return x_63; +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; +lean_dec(x_64); +x_65 = lean_box(0); +x_66 = lean_unsigned_to_nat(0u); +lean_inc(x_4); +x_67 = l_Lean_Syntax_formatStxAux___main(x_65, x_66, x_4); +x_68 = l_Lean_Options_empty; +x_69 = l_Lean_Format_pretty(x_67, x_68); +x_70 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_70, 0, x_69); +x_71 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_71, 0, x_70); +x_72 = l_Lean_Elab_Term_withNode___rarg___closed__3; +x_73 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_73, 0, x_72); +lean_ctor_set(x_73, 1, x_71); +x_74 = l_Lean_Elab_Term_throwError___rarg(x_4, x_73, x_31, x_6); +return x_74; } } else { -lean_object* x_74; lean_object* x_75; uint8_t x_76; +lean_object* x_85; lean_object* x_86; uint8_t x_87; lean_free_object(x_12); lean_dec(x_28); lean_dec(x_27); @@ -12228,190 +12394,113 @@ lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_8); -lean_dec(x_2); -x_74 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; -x_75 = l_Lean_Elab_Term_throwError___rarg(x_1, x_74, x_5, x_6); -x_76 = !lean_is_exclusive(x_75); -if (x_76 == 0) +lean_dec(x_1); +x_85 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; +x_86 = l_Lean_Elab_Term_throwError___rarg(x_4, x_85, x_5, x_6); +x_87 = !lean_is_exclusive(x_86); +if (x_87 == 0) { -return x_75; +return x_86; } else { -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); -lean_inc(x_77); -lean_dec(x_75); -x_79 = lean_alloc_ctor(1, 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_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; uint8_t x_85; -x_80 = lean_ctor_get(x_12, 0); -x_81 = lean_ctor_get(x_12, 1); -x_82 = lean_ctor_get(x_12, 2); -x_83 = lean_ctor_get(x_12, 3); -x_84 = lean_ctor_get(x_12, 4); -lean_inc(x_84); -lean_inc(x_83); -lean_inc(x_82); -lean_inc(x_81); -lean_inc(x_80); -lean_dec(x_12); -x_85 = lean_nat_dec_eq(x_83, x_84); -if (x_85 == 0) -{ -lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_110; -lean_dec(x_5); -x_86 = lean_nat_add(x_83, x_9); -lean_dec(x_83); -x_87 = lean_alloc_ctor(0, 5, 0); -lean_ctor_set(x_87, 0, x_80); -lean_ctor_set(x_87, 1, x_81); -lean_ctor_set(x_87, 2, x_82); -lean_ctor_set(x_87, 3, x_86); -lean_ctor_set(x_87, 4, x_84); -x_88 = lean_alloc_ctor(0, 10, 1); -lean_ctor_set(x_88, 0, x_87); -lean_ctor_set(x_88, 1, x_13); -lean_ctor_set(x_88, 2, x_14); -lean_ctor_set(x_88, 3, x_15); -lean_ctor_set(x_88, 4, x_16); -lean_ctor_set(x_88, 5, x_17); -lean_ctor_set(x_88, 6, x_18); -lean_ctor_set(x_88, 7, x_19); -lean_ctor_set(x_88, 8, x_20); -lean_ctor_set(x_88, 9, x_8); -lean_ctor_set_uint8(x_88, sizeof(void*)*10, x_21); -if (lean_obj_tag(x_1) == 1) -{ -lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; uint8_t x_126; -x_122 = l_Lean_Elab_Term_getOptions(x_88, x_6); -x_123 = lean_ctor_get(x_122, 0); -lean_inc(x_123); -x_124 = lean_ctor_get(x_122, 1); -lean_inc(x_124); -lean_dec(x_122); -x_125 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4; -x_126 = l_Lean_checkTraceOption(x_123, x_125); -lean_dec(x_123); -if (x_126 == 0) -{ -x_89 = x_124; -goto block_109; -} -else -{ -lean_object* x_127; lean_object* x_128; lean_object* x_129; -lean_inc(x_1); -x_127 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_127, 0, x_1); -x_128 = l_Lean_Elab_Term_logTrace(x_125, x_1, x_127, x_88, x_124); -x_129 = lean_ctor_get(x_128, 1); -lean_inc(x_129); -lean_dec(x_128); -x_89 = x_129; -goto block_109; -} -} -else -{ -lean_object* x_130; -lean_dec(x_2); -x_130 = lean_box(0); -x_110 = x_130; -goto block_121; -} -block_109: -{ -lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; -x_90 = l_Lean_Elab_Term_termElabAttribute; -x_91 = lean_ctor_get(x_90, 1); -lean_inc(x_91); -x_92 = lean_ctor_get(x_89, 0); -lean_inc(x_92); -x_93 = lean_ctor_get(x_92, 0); -lean_inc(x_93); -lean_dec(x_92); -x_94 = l_Lean_PersistentEnvExtension_getState___rarg(x_91, x_93); -lean_dec(x_93); -lean_dec(x_91); -x_95 = lean_ctor_get(x_94, 1); -lean_inc(x_95); -lean_dec(x_94); -lean_inc(x_1); -x_96 = l_Lean_Syntax_getKind(x_1); -x_97 = l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__1(x_95, x_96); -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; -lean_dec(x_2); -x_98 = l_Lean_Name_toString___closed__1; -x_99 = l_Lean_Name_toStringWithSep___main(x_98, x_96); -x_100 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_100, 0, x_99); -x_101 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_101, 0, x_100); -x_102 = l_Lean_Elab_Term_elabTerm___closed__3; -x_103 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_103, 0, x_102); -lean_ctor_set(x_103, 1, x_101); -x_104 = l_Lean_Elab_Term_elabTerm___closed__6; -x_105 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_105, 0, x_103); -lean_ctor_set(x_105, 1, x_104); -x_106 = l_Lean_Elab_Term_throwError___rarg(x_1, x_105, x_88, x_89); -return x_106; -} -else -{ -lean_object* x_107; lean_object* x_108; -lean_dec(x_96); -x_107 = lean_ctor_get(x_97, 0); -lean_inc(x_107); -lean_dec(x_97); +lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_88 = lean_ctor_get(x_86, 0); +x_89 = lean_ctor_get(x_86, 1); lean_inc(x_89); -x_108 = l___private_Init_Lean_Elab_Term_12__elabTermUsing___main(x_89, x_1, x_2, x_4, x_3, x_107, x_88, x_89); -return x_108; +lean_inc(x_88); +lean_dec(x_86); +x_90 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_90, 0, x_88); +lean_ctor_set(x_90, 1, x_89); +return x_90; } } -block_121: -{ -lean_object* x_111; lean_object* x_112; lean_object* x_113; 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; -lean_dec(x_110); -x_111 = lean_box(0); -x_112 = lean_unsigned_to_nat(0u); -lean_inc(x_1); -x_113 = l_Lean_Syntax_formatStxAux___main(x_111, x_112, x_1); -x_114 = l_Lean_Options_empty; -x_115 = l_Lean_Format_pretty(x_113, x_114); -x_116 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_116, 0, x_115); -x_117 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_117, 0, x_116); -x_118 = l_Lean_Elab_Term_withNode___rarg___closed__3; -x_119 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_119, 0, x_118); -lean_ctor_set(x_119, 1, x_117); -x_120 = l_Lean_Elab_Term_throwError___rarg(x_1, x_119, x_88, x_6); -return x_120; -} } else { -lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; -lean_dec(x_84); -lean_dec(x_83); -lean_dec(x_82); -lean_dec(x_81); -lean_dec(x_80); +lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; uint8_t x_96; +x_91 = lean_ctor_get(x_12, 0); +x_92 = lean_ctor_get(x_12, 1); +x_93 = lean_ctor_get(x_12, 2); +x_94 = lean_ctor_get(x_12, 3); +x_95 = lean_ctor_get(x_12, 4); +lean_inc(x_95); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_12); +x_96 = lean_nat_dec_eq(x_94, x_95); +if (x_96 == 0) +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_132; +lean_dec(x_5); +x_97 = lean_nat_add(x_94, x_9); +lean_dec(x_94); +x_98 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_98, 0, x_91); +lean_ctor_set(x_98, 1, x_92); +lean_ctor_set(x_98, 2, x_93); +lean_ctor_set(x_98, 3, x_97); +lean_ctor_set(x_98, 4, x_95); +lean_inc(x_8); +lean_inc(x_20); +lean_inc(x_19); +lean_inc(x_18); +lean_inc(x_17); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_98); +x_99 = lean_alloc_ctor(0, 10, 1); +lean_ctor_set(x_99, 0, x_98); +lean_ctor_set(x_99, 1, x_13); +lean_ctor_set(x_99, 2, x_14); +lean_ctor_set(x_99, 3, x_15); +lean_ctor_set(x_99, 4, x_16); +lean_ctor_set(x_99, 5, x_17); +lean_ctor_set(x_99, 6, x_18); +lean_ctor_set(x_99, 7, x_19); +lean_ctor_set(x_99, 8, x_20); +lean_ctor_set(x_99, 9, x_8); +lean_ctor_set_uint8(x_99, sizeof(void*)*10, x_21); +if (lean_obj_tag(x_4) == 1) +{ +lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; uint8_t x_148; +x_144 = l_Lean_Elab_Term_getOptions(x_99, x_6); +x_145 = lean_ctor_get(x_144, 0); +lean_inc(x_145); +x_146 = lean_ctor_get(x_144, 1); +lean_inc(x_146); +lean_dec(x_144); +x_147 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4; +x_148 = l_Lean_checkTraceOption(x_145, x_147); +lean_dec(x_145); +if (x_148 == 0) +{ +x_100 = x_146; +goto block_131; +} +else +{ +lean_object* x_149; lean_object* x_150; lean_object* x_151; +lean_inc(x_4); +x_149 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_149, 0, x_4); +x_150 = l_Lean_Elab_Term_logTrace(x_147, x_4, x_149, x_99, x_146); +x_151 = lean_ctor_get(x_150, 1); +lean_inc(x_151); +lean_dec(x_150); +x_100 = x_151; +goto block_131; +} +} +else +{ +lean_object* x_152; +lean_dec(x_98); lean_dec(x_20); lean_dec(x_19); lean_dec(x_18); @@ -12421,329 +12510,580 @@ lean_dec(x_15); lean_dec(x_14); lean_dec(x_13); lean_dec(x_8); -lean_dec(x_2); -x_131 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; -x_132 = l_Lean_Elab_Term_throwError___rarg(x_1, x_131, x_5, x_6); -x_133 = lean_ctor_get(x_132, 0); -lean_inc(x_133); -x_134 = lean_ctor_get(x_132, 1); -lean_inc(x_134); -if (lean_is_exclusive(x_132)) { - lean_ctor_release(x_132, 0); - lean_ctor_release(x_132, 1); - x_135 = x_132; -} else { - lean_dec_ref(x_132); - x_135 = lean_box(0); +lean_dec(x_1); +x_152 = lean_box(0); +x_132 = x_152; +goto block_143; } -if (lean_is_scalar(x_135)) { - x_136 = lean_alloc_ctor(1, 2, 0); -} else { - x_136 = x_135; +block_131: +{ +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; lean_object* x_108; +x_101 = l_Lean_Elab_Term_termElabAttribute; +x_102 = lean_ctor_get(x_101, 1); +lean_inc(x_102); +x_103 = lean_ctor_get(x_100, 0); +lean_inc(x_103); +x_104 = lean_ctor_get(x_103, 0); +lean_inc(x_104); +lean_dec(x_103); +x_105 = l_Lean_PersistentEnvExtension_getState___rarg(x_102, x_104); +lean_dec(x_104); +lean_dec(x_102); +x_106 = lean_ctor_get(x_105, 1); +lean_inc(x_106); +lean_dec(x_105); +lean_inc(x_4); +x_107 = l_Lean_Syntax_getKind(x_4); +x_108 = l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__1(x_106, x_107); +if (lean_obj_tag(x_108) == 0) +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_109 = l_Lean_Elab_Term_getCurrMacroScope(x_99, x_100); +x_110 = lean_ctor_get(x_109, 0); +lean_inc(x_110); +x_111 = lean_ctor_get(x_109, 1); +lean_inc(x_111); +lean_dec(x_109); +x_112 = l_Lean_Elab_Term_getEnv___rarg(x_111); +x_113 = lean_ctor_get(x_112, 0); +lean_inc(x_113); +x_114 = lean_ctor_get(x_112, 1); +lean_inc(x_114); +lean_dec(x_112); +lean_inc(x_4); +x_115 = l_Lean_Elab_expandMacro(x_113, x_4, x_110); +lean_dec(x_113); +if (lean_obj_tag(x_115) == 0) +{ +lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; +lean_dec(x_98); +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_8); +lean_dec(x_1); +x_116 = l_Lean_Name_toString___closed__1; +x_117 = l_Lean_Name_toStringWithSep___main(x_116, x_107); +x_118 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_118, 0, x_117); +x_119 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_119, 0, x_118); +x_120 = l_Lean_Elab_Term_elabTermAux___main___closed__3; +x_121 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_121, 0, x_120); +lean_ctor_set(x_121, 1, x_119); +x_122 = l_Lean_Elab_Term_elabTermAux___main___closed__6; +x_123 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_123, 0, x_121); +lean_ctor_set(x_123, 1, x_122); +x_124 = l_Lean_Elab_Term_throwError___rarg(x_4, x_123, x_99, x_114); +return x_124; } -lean_ctor_set(x_136, 0, x_133); -lean_ctor_set(x_136, 1, x_134); -return x_136; +else +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; +lean_dec(x_107); +lean_dec(x_99); +x_125 = lean_ctor_get(x_115, 0); +lean_inc(x_125); +lean_dec(x_115); +x_126 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_126, 0, x_4); +lean_ctor_set(x_126, 1, x_20); +x_127 = lean_alloc_ctor(0, 10, 1); +lean_ctor_set(x_127, 0, x_98); +lean_ctor_set(x_127, 1, x_13); +lean_ctor_set(x_127, 2, x_14); +lean_ctor_set(x_127, 3, x_15); +lean_ctor_set(x_127, 4, x_16); +lean_ctor_set(x_127, 5, x_17); +lean_ctor_set(x_127, 6, x_18); +lean_ctor_set(x_127, 7, x_19); +lean_ctor_set(x_127, 8, x_126); +lean_ctor_set(x_127, 9, x_8); +lean_ctor_set_uint8(x_127, sizeof(void*)*10, x_21); +x_4 = x_125; +x_5 = x_127; +x_6 = x_114; +goto _start; +} +} +else +{ +lean_object* x_129; lean_object* x_130; +lean_dec(x_107); +lean_dec(x_98); +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_8); +x_129 = lean_ctor_get(x_108, 0); +lean_inc(x_129); +lean_dec(x_108); +lean_inc(x_100); +x_130 = l___private_Init_Lean_Elab_Term_12__elabTermUsing___main(x_100, x_4, x_1, x_3, x_2, x_129, x_99, x_100); +return x_130; +} +} +block_143: +{ +lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; +lean_dec(x_132); +x_133 = lean_box(0); +x_134 = lean_unsigned_to_nat(0u); +lean_inc(x_4); +x_135 = l_Lean_Syntax_formatStxAux___main(x_133, x_134, x_4); +x_136 = l_Lean_Options_empty; +x_137 = l_Lean_Format_pretty(x_135, x_136); +x_138 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_138, 0, x_137); +x_139 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_139, 0, x_138); +x_140 = l_Lean_Elab_Term_withNode___rarg___closed__3; +x_141 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_141, 0, x_140); +lean_ctor_set(x_141, 1, x_139); +x_142 = l_Lean_Elab_Term_throwError___rarg(x_4, x_141, x_99, x_6); +return x_142; +} +} +else +{ +lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; +lean_dec(x_95); +lean_dec(x_94); +lean_dec(x_93); +lean_dec(x_92); +lean_dec(x_91); +lean_dec(x_20); +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_8); +lean_dec(x_1); +x_153 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; +x_154 = l_Lean_Elab_Term_throwError___rarg(x_4, x_153, x_5, x_6); +x_155 = lean_ctor_get(x_154, 0); +lean_inc(x_155); +x_156 = lean_ctor_get(x_154, 1); +lean_inc(x_156); +if (lean_is_exclusive(x_154)) { + lean_ctor_release(x_154, 0); + lean_ctor_release(x_154, 1); + x_157 = x_154; +} else { + lean_dec_ref(x_154); + x_157 = lean_box(0); +} +if (lean_is_scalar(x_157)) { + x_158 = lean_alloc_ctor(1, 2, 0); +} else { + x_158 = x_157; +} +lean_ctor_set(x_158, 0, x_155); +lean_ctor_set(x_158, 1, x_156); +return x_158; } } } else { -lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; uint8_t x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; uint8_t x_154; -x_137 = lean_ctor_get(x_5, 0); -x_138 = lean_ctor_get(x_5, 1); -x_139 = lean_ctor_get(x_5, 2); -x_140 = lean_ctor_get(x_5, 3); -x_141 = lean_ctor_get(x_5, 4); -x_142 = lean_ctor_get(x_5, 5); -x_143 = lean_ctor_get(x_5, 6); -x_144 = lean_ctor_get(x_5, 7); -x_145 = lean_ctor_get(x_5, 8); -x_146 = lean_ctor_get_uint8(x_5, sizeof(void*)*10); -lean_inc(x_145); -lean_inc(x_144); -lean_inc(x_143); -lean_inc(x_142); -lean_inc(x_141); -lean_inc(x_140); -lean_inc(x_139); -lean_inc(x_138); -lean_inc(x_137); +lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; uint8_t x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; uint8_t x_176; +x_159 = lean_ctor_get(x_5, 0); +x_160 = lean_ctor_get(x_5, 1); +x_161 = lean_ctor_get(x_5, 2); +x_162 = lean_ctor_get(x_5, 3); +x_163 = lean_ctor_get(x_5, 4); +x_164 = lean_ctor_get(x_5, 5); +x_165 = lean_ctor_get(x_5, 6); +x_166 = lean_ctor_get(x_5, 7); +x_167 = lean_ctor_get(x_5, 8); +x_168 = lean_ctor_get_uint8(x_5, sizeof(void*)*10); +lean_inc(x_167); +lean_inc(x_166); +lean_inc(x_165); +lean_inc(x_164); +lean_inc(x_163); +lean_inc(x_162); +lean_inc(x_161); +lean_inc(x_160); +lean_inc(x_159); lean_dec(x_5); lean_inc(x_8); -lean_inc(x_145); -lean_inc(x_144); -lean_inc(x_143); -lean_inc(x_142); -lean_inc(x_141); -lean_inc(x_140); -lean_inc(x_139); -lean_inc(x_138); -lean_inc(x_137); -x_147 = lean_alloc_ctor(0, 10, 1); -lean_ctor_set(x_147, 0, x_137); -lean_ctor_set(x_147, 1, x_138); -lean_ctor_set(x_147, 2, x_139); -lean_ctor_set(x_147, 3, x_140); -lean_ctor_set(x_147, 4, x_141); -lean_ctor_set(x_147, 5, x_142); -lean_ctor_set(x_147, 6, x_143); -lean_ctor_set(x_147, 7, x_144); -lean_ctor_set(x_147, 8, x_145); -lean_ctor_set(x_147, 9, x_8); -lean_ctor_set_uint8(x_147, sizeof(void*)*10, x_146); -x_148 = lean_ctor_get(x_137, 0); -lean_inc(x_148); -x_149 = lean_ctor_get(x_137, 1); -lean_inc(x_149); -x_150 = lean_ctor_get(x_137, 2); -lean_inc(x_150); -x_151 = lean_ctor_get(x_137, 3); -lean_inc(x_151); -x_152 = lean_ctor_get(x_137, 4); -lean_inc(x_152); -if (lean_is_exclusive(x_137)) { - lean_ctor_release(x_137, 0); - lean_ctor_release(x_137, 1); - lean_ctor_release(x_137, 2); - lean_ctor_release(x_137, 3); - lean_ctor_release(x_137, 4); - x_153 = x_137; -} else { - lean_dec_ref(x_137); - x_153 = lean_box(0); -} -x_154 = lean_nat_dec_eq(x_151, x_152); -if (x_154 == 0) -{ -lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_179; -lean_dec(x_147); -x_155 = lean_nat_add(x_151, x_9); -lean_dec(x_151); -if (lean_is_scalar(x_153)) { - x_156 = lean_alloc_ctor(0, 5, 0); -} else { - x_156 = x_153; -} -lean_ctor_set(x_156, 0, x_148); -lean_ctor_set(x_156, 1, x_149); -lean_ctor_set(x_156, 2, x_150); -lean_ctor_set(x_156, 3, x_155); -lean_ctor_set(x_156, 4, x_152); -x_157 = lean_alloc_ctor(0, 10, 1); -lean_ctor_set(x_157, 0, x_156); -lean_ctor_set(x_157, 1, x_138); -lean_ctor_set(x_157, 2, x_139); -lean_ctor_set(x_157, 3, x_140); -lean_ctor_set(x_157, 4, x_141); -lean_ctor_set(x_157, 5, x_142); -lean_ctor_set(x_157, 6, x_143); -lean_ctor_set(x_157, 7, x_144); -lean_ctor_set(x_157, 8, x_145); -lean_ctor_set(x_157, 9, x_8); -lean_ctor_set_uint8(x_157, sizeof(void*)*10, x_146); -if (lean_obj_tag(x_1) == 1) -{ -lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; uint8_t x_195; -x_191 = l_Lean_Elab_Term_getOptions(x_157, x_6); -x_192 = lean_ctor_get(x_191, 0); -lean_inc(x_192); -x_193 = lean_ctor_get(x_191, 1); -lean_inc(x_193); -lean_dec(x_191); -x_194 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4; -x_195 = l_Lean_checkTraceOption(x_192, x_194); -lean_dec(x_192); -if (x_195 == 0) -{ -x_158 = x_193; -goto block_178; -} -else -{ -lean_object* x_196; lean_object* x_197; lean_object* x_198; -lean_inc(x_1); -x_196 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_196, 0, x_1); -x_197 = l_Lean_Elab_Term_logTrace(x_194, x_1, x_196, x_157, x_193); -x_198 = lean_ctor_get(x_197, 1); -lean_inc(x_198); -lean_dec(x_197); -x_158 = x_198; -goto block_178; -} -} -else -{ -lean_object* x_199; -lean_dec(x_2); -x_199 = lean_box(0); -x_179 = x_199; -goto block_190; -} -block_178: -{ -lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; -x_159 = l_Lean_Elab_Term_termElabAttribute; -x_160 = lean_ctor_get(x_159, 1); -lean_inc(x_160); -x_161 = lean_ctor_get(x_158, 0); -lean_inc(x_161); -x_162 = lean_ctor_get(x_161, 0); -lean_inc(x_162); -lean_dec(x_161); -x_163 = l_Lean_PersistentEnvExtension_getState___rarg(x_160, x_162); -lean_dec(x_162); -lean_dec(x_160); -x_164 = lean_ctor_get(x_163, 1); +lean_inc(x_167); +lean_inc(x_166); +lean_inc(x_165); lean_inc(x_164); -lean_dec(x_163); -lean_inc(x_1); -x_165 = l_Lean_Syntax_getKind(x_1); -x_166 = l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__1(x_164, x_165); -if (lean_obj_tag(x_166) == 0) +lean_inc(x_163); +lean_inc(x_162); +lean_inc(x_161); +lean_inc(x_160); +lean_inc(x_159); +x_169 = lean_alloc_ctor(0, 10, 1); +lean_ctor_set(x_169, 0, x_159); +lean_ctor_set(x_169, 1, x_160); +lean_ctor_set(x_169, 2, x_161); +lean_ctor_set(x_169, 3, x_162); +lean_ctor_set(x_169, 4, x_163); +lean_ctor_set(x_169, 5, x_164); +lean_ctor_set(x_169, 6, x_165); +lean_ctor_set(x_169, 7, x_166); +lean_ctor_set(x_169, 8, x_167); +lean_ctor_set(x_169, 9, x_8); +lean_ctor_set_uint8(x_169, sizeof(void*)*10, x_168); +x_170 = lean_ctor_get(x_159, 0); +lean_inc(x_170); +x_171 = lean_ctor_get(x_159, 1); +lean_inc(x_171); +x_172 = lean_ctor_get(x_159, 2); +lean_inc(x_172); +x_173 = lean_ctor_get(x_159, 3); +lean_inc(x_173); +x_174 = lean_ctor_get(x_159, 4); +lean_inc(x_174); +if (lean_is_exclusive(x_159)) { + lean_ctor_release(x_159, 0); + lean_ctor_release(x_159, 1); + lean_ctor_release(x_159, 2); + lean_ctor_release(x_159, 3); + lean_ctor_release(x_159, 4); + x_175 = x_159; +} else { + lean_dec_ref(x_159); + x_175 = lean_box(0); +} +x_176 = lean_nat_dec_eq(x_173, x_174); +if (x_176 == 0) { -lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; -lean_dec(x_2); -x_167 = l_Lean_Name_toString___closed__1; -x_168 = l_Lean_Name_toStringWithSep___main(x_167, x_165); -x_169 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_169, 0, x_168); -x_170 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_170, 0, x_169); -x_171 = l_Lean_Elab_Term_elabTerm___closed__3; -x_172 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_172, 0, x_171); -lean_ctor_set(x_172, 1, x_170); -x_173 = l_Lean_Elab_Term_elabTerm___closed__6; -x_174 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_174, 0, x_172); -lean_ctor_set(x_174, 1, x_173); -x_175 = l_Lean_Elab_Term_throwError___rarg(x_1, x_174, x_157, x_158); -return x_175; +lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_212; +lean_dec(x_169); +x_177 = lean_nat_add(x_173, x_9); +lean_dec(x_173); +if (lean_is_scalar(x_175)) { + x_178 = lean_alloc_ctor(0, 5, 0); +} else { + x_178 = x_175; +} +lean_ctor_set(x_178, 0, x_170); +lean_ctor_set(x_178, 1, x_171); +lean_ctor_set(x_178, 2, x_172); +lean_ctor_set(x_178, 3, x_177); +lean_ctor_set(x_178, 4, x_174); +lean_inc(x_8); +lean_inc(x_167); +lean_inc(x_166); +lean_inc(x_165); +lean_inc(x_164); +lean_inc(x_163); +lean_inc(x_162); +lean_inc(x_161); +lean_inc(x_160); +lean_inc(x_178); +x_179 = lean_alloc_ctor(0, 10, 1); +lean_ctor_set(x_179, 0, x_178); +lean_ctor_set(x_179, 1, x_160); +lean_ctor_set(x_179, 2, x_161); +lean_ctor_set(x_179, 3, x_162); +lean_ctor_set(x_179, 4, x_163); +lean_ctor_set(x_179, 5, x_164); +lean_ctor_set(x_179, 6, x_165); +lean_ctor_set(x_179, 7, x_166); +lean_ctor_set(x_179, 8, x_167); +lean_ctor_set(x_179, 9, x_8); +lean_ctor_set_uint8(x_179, sizeof(void*)*10, x_168); +if (lean_obj_tag(x_4) == 1) +{ +lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; uint8_t x_228; +x_224 = l_Lean_Elab_Term_getOptions(x_179, x_6); +x_225 = lean_ctor_get(x_224, 0); +lean_inc(x_225); +x_226 = lean_ctor_get(x_224, 1); +lean_inc(x_226); +lean_dec(x_224); +x_227 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4; +x_228 = l_Lean_checkTraceOption(x_225, x_227); +lean_dec(x_225); +if (x_228 == 0) +{ +x_180 = x_226; +goto block_211; } else { -lean_object* x_176; lean_object* x_177; -lean_dec(x_165); -x_176 = lean_ctor_get(x_166, 0); -lean_inc(x_176); +lean_object* x_229; lean_object* x_230; lean_object* x_231; +lean_inc(x_4); +x_229 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_229, 0, x_4); +x_230 = l_Lean_Elab_Term_logTrace(x_227, x_4, x_229, x_179, x_226); +x_231 = lean_ctor_get(x_230, 1); +lean_inc(x_231); +lean_dec(x_230); +x_180 = x_231; +goto block_211; +} +} +else +{ +lean_object* x_232; +lean_dec(x_178); +lean_dec(x_167); lean_dec(x_166); -lean_inc(x_158); -x_177 = l___private_Init_Lean_Elab_Term_12__elabTermUsing___main(x_158, x_1, x_2, x_4, x_3, x_176, x_157, x_158); -return x_177; -} -} -block_190: -{ -lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; 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_dec(x_179); -x_180 = lean_box(0); -x_181 = lean_unsigned_to_nat(0u); -lean_inc(x_1); -x_182 = l_Lean_Syntax_formatStxAux___main(x_180, x_181, x_1); -x_183 = l_Lean_Options_empty; -x_184 = l_Lean_Format_pretty(x_182, x_183); -x_185 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_185, 0, x_184); -x_186 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_186, 0, x_185); -x_187 = l_Lean_Elab_Term_withNode___rarg___closed__3; -x_188 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_188, 0, x_187); -lean_ctor_set(x_188, 1, x_186); -x_189 = l_Lean_Elab_Term_throwError___rarg(x_1, x_188, x_157, x_6); -return x_189; -} -} -else -{ -lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; -lean_dec(x_153); -lean_dec(x_152); -lean_dec(x_151); -lean_dec(x_150); -lean_dec(x_149); -lean_dec(x_148); -lean_dec(x_145); -lean_dec(x_144); -lean_dec(x_143); -lean_dec(x_142); -lean_dec(x_141); -lean_dec(x_140); -lean_dec(x_139); -lean_dec(x_138); +lean_dec(x_165); +lean_dec(x_164); +lean_dec(x_163); +lean_dec(x_162); +lean_dec(x_161); +lean_dec(x_160); lean_dec(x_8); -lean_dec(x_2); -x_200 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; -x_201 = l_Lean_Elab_Term_throwError___rarg(x_1, x_200, x_147, x_6); -x_202 = lean_ctor_get(x_201, 0); -lean_inc(x_202); -x_203 = lean_ctor_get(x_201, 1); -lean_inc(x_203); -if (lean_is_exclusive(x_201)) { - lean_ctor_release(x_201, 0); - lean_ctor_release(x_201, 1); - x_204 = x_201; -} else { - lean_dec_ref(x_201); - x_204 = lean_box(0); +lean_dec(x_1); +x_232 = lean_box(0); +x_212 = x_232; +goto block_223; } -if (lean_is_scalar(x_204)) { - x_205 = lean_alloc_ctor(1, 2, 0); -} else { - x_205 = x_204; +block_211: +{ +lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; +x_181 = l_Lean_Elab_Term_termElabAttribute; +x_182 = lean_ctor_get(x_181, 1); +lean_inc(x_182); +x_183 = lean_ctor_get(x_180, 0); +lean_inc(x_183); +x_184 = lean_ctor_get(x_183, 0); +lean_inc(x_184); +lean_dec(x_183); +x_185 = l_Lean_PersistentEnvExtension_getState___rarg(x_182, x_184); +lean_dec(x_184); +lean_dec(x_182); +x_186 = lean_ctor_get(x_185, 1); +lean_inc(x_186); +lean_dec(x_185); +lean_inc(x_4); +x_187 = l_Lean_Syntax_getKind(x_4); +x_188 = l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__1(x_186, x_187); +if (lean_obj_tag(x_188) == 0) +{ +lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; +x_189 = l_Lean_Elab_Term_getCurrMacroScope(x_179, x_180); +x_190 = lean_ctor_get(x_189, 0); +lean_inc(x_190); +x_191 = lean_ctor_get(x_189, 1); +lean_inc(x_191); +lean_dec(x_189); +x_192 = l_Lean_Elab_Term_getEnv___rarg(x_191); +x_193 = lean_ctor_get(x_192, 0); +lean_inc(x_193); +x_194 = lean_ctor_get(x_192, 1); +lean_inc(x_194); +lean_dec(x_192); +lean_inc(x_4); +x_195 = l_Lean_Elab_expandMacro(x_193, x_4, x_190); +lean_dec(x_193); +if (lean_obj_tag(x_195) == 0) +{ +lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; +lean_dec(x_178); +lean_dec(x_167); +lean_dec(x_166); +lean_dec(x_165); +lean_dec(x_164); +lean_dec(x_163); +lean_dec(x_162); +lean_dec(x_161); +lean_dec(x_160); +lean_dec(x_8); +lean_dec(x_1); +x_196 = l_Lean_Name_toString___closed__1; +x_197 = l_Lean_Name_toStringWithSep___main(x_196, x_187); +x_198 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_198, 0, x_197); +x_199 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_199, 0, x_198); +x_200 = l_Lean_Elab_Term_elabTermAux___main___closed__3; +x_201 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_201, 0, x_200); +lean_ctor_set(x_201, 1, x_199); +x_202 = l_Lean_Elab_Term_elabTermAux___main___closed__6; +x_203 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_203, 0, x_201); +lean_ctor_set(x_203, 1, x_202); +x_204 = l_Lean_Elab_Term_throwError___rarg(x_4, x_203, x_179, x_194); +return x_204; } -lean_ctor_set(x_205, 0, x_202); -lean_ctor_set(x_205, 1, x_203); -return x_205; +else +{ +lean_object* x_205; lean_object* x_206; lean_object* x_207; +lean_dec(x_187); +lean_dec(x_179); +x_205 = lean_ctor_get(x_195, 0); +lean_inc(x_205); +lean_dec(x_195); +x_206 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_206, 0, x_4); +lean_ctor_set(x_206, 1, x_167); +x_207 = lean_alloc_ctor(0, 10, 1); +lean_ctor_set(x_207, 0, x_178); +lean_ctor_set(x_207, 1, x_160); +lean_ctor_set(x_207, 2, x_161); +lean_ctor_set(x_207, 3, x_162); +lean_ctor_set(x_207, 4, x_163); +lean_ctor_set(x_207, 5, x_164); +lean_ctor_set(x_207, 6, x_165); +lean_ctor_set(x_207, 7, x_166); +lean_ctor_set(x_207, 8, x_206); +lean_ctor_set(x_207, 9, x_8); +lean_ctor_set_uint8(x_207, sizeof(void*)*10, x_168); +x_4 = x_205; +x_5 = x_207; +x_6 = x_194; +goto _start; +} +} +else +{ +lean_object* x_209; lean_object* x_210; +lean_dec(x_187); +lean_dec(x_178); +lean_dec(x_167); +lean_dec(x_166); +lean_dec(x_165); +lean_dec(x_164); +lean_dec(x_163); +lean_dec(x_162); +lean_dec(x_161); +lean_dec(x_160); +lean_dec(x_8); +x_209 = lean_ctor_get(x_188, 0); +lean_inc(x_209); +lean_dec(x_188); +lean_inc(x_180); +x_210 = l___private_Init_Lean_Elab_Term_12__elabTermUsing___main(x_180, x_4, x_1, x_3, x_2, x_209, x_179, x_180); +return x_210; +} +} +block_223: +{ +lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; +lean_dec(x_212); +x_213 = lean_box(0); +x_214 = lean_unsigned_to_nat(0u); +lean_inc(x_4); +x_215 = l_Lean_Syntax_formatStxAux___main(x_213, x_214, x_4); +x_216 = l_Lean_Options_empty; +x_217 = l_Lean_Format_pretty(x_215, x_216); +x_218 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_218, 0, x_217); +x_219 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_219, 0, x_218); +x_220 = l_Lean_Elab_Term_withNode___rarg___closed__3; +x_221 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_221, 0, x_220); +lean_ctor_set(x_221, 1, x_219); +x_222 = l_Lean_Elab_Term_throwError___rarg(x_4, x_221, x_179, x_6); +return x_222; +} +} +else +{ +lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; +lean_dec(x_175); +lean_dec(x_174); +lean_dec(x_173); +lean_dec(x_172); +lean_dec(x_171); +lean_dec(x_170); +lean_dec(x_167); +lean_dec(x_166); +lean_dec(x_165); +lean_dec(x_164); +lean_dec(x_163); +lean_dec(x_162); +lean_dec(x_161); +lean_dec(x_160); +lean_dec(x_8); +lean_dec(x_1); +x_233 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; +x_234 = l_Lean_Elab_Term_throwError___rarg(x_4, x_233, x_169, x_6); +x_235 = lean_ctor_get(x_234, 0); +lean_inc(x_235); +x_236 = lean_ctor_get(x_234, 1); +lean_inc(x_236); +if (lean_is_exclusive(x_234)) { + lean_ctor_release(x_234, 0); + lean_ctor_release(x_234, 1); + x_237 = x_234; +} else { + lean_dec_ref(x_234); + x_237 = lean_box(0); +} +if (lean_is_scalar(x_237)) { + x_238 = lean_alloc_ctor(1, 2, 0); +} else { + x_238 = x_237; +} +lean_ctor_set(x_238, 0, x_235); +lean_ctor_set(x_238, 1, x_236); +return x_238; } } } else { -lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; uint8_t x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; uint8_t x_233; -x_206 = lean_ctor_get(x_6, 0); -x_207 = lean_ctor_get(x_6, 1); -x_208 = lean_ctor_get(x_6, 2); -x_209 = lean_ctor_get(x_6, 3); -x_210 = lean_ctor_get(x_6, 4); -x_211 = lean_ctor_get(x_6, 5); -lean_inc(x_211); -lean_inc(x_210); -lean_inc(x_209); -lean_inc(x_208); -lean_inc(x_207); -lean_inc(x_206); +lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; uint8_t x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; uint8_t x_266; +x_239 = lean_ctor_get(x_6, 0); +x_240 = lean_ctor_get(x_6, 1); +x_241 = lean_ctor_get(x_6, 2); +x_242 = lean_ctor_get(x_6, 3); +x_243 = lean_ctor_get(x_6, 4); +x_244 = lean_ctor_get(x_6, 5); +lean_inc(x_244); +lean_inc(x_243); +lean_inc(x_242); +lean_inc(x_241); +lean_inc(x_240); +lean_inc(x_239); lean_dec(x_6); -x_212 = lean_unsigned_to_nat(1u); -x_213 = lean_nat_add(x_211, x_212); -x_214 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_214, 0, x_206); -lean_ctor_set(x_214, 1, x_207); -lean_ctor_set(x_214, 2, x_208); -lean_ctor_set(x_214, 3, x_209); -lean_ctor_set(x_214, 4, x_210); -lean_ctor_set(x_214, 5, x_213); -x_215 = lean_ctor_get(x_5, 0); -lean_inc(x_215); -x_216 = lean_ctor_get(x_5, 1); -lean_inc(x_216); -x_217 = lean_ctor_get(x_5, 2); -lean_inc(x_217); -x_218 = lean_ctor_get(x_5, 3); -lean_inc(x_218); -x_219 = lean_ctor_get(x_5, 4); -lean_inc(x_219); -x_220 = lean_ctor_get(x_5, 5); -lean_inc(x_220); -x_221 = lean_ctor_get(x_5, 6); -lean_inc(x_221); -x_222 = lean_ctor_get(x_5, 7); -lean_inc(x_222); -x_223 = lean_ctor_get(x_5, 8); -lean_inc(x_223); -x_224 = lean_ctor_get_uint8(x_5, sizeof(void*)*10); +x_245 = lean_unsigned_to_nat(1u); +x_246 = lean_nat_add(x_244, x_245); +x_247 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_247, 0, x_239); +lean_ctor_set(x_247, 1, x_240); +lean_ctor_set(x_247, 2, x_241); +lean_ctor_set(x_247, 3, x_242); +lean_ctor_set(x_247, 4, x_243); +lean_ctor_set(x_247, 5, x_246); +x_248 = lean_ctor_get(x_5, 0); +lean_inc(x_248); +x_249 = lean_ctor_get(x_5, 1); +lean_inc(x_249); +x_250 = lean_ctor_get(x_5, 2); +lean_inc(x_250); +x_251 = lean_ctor_get(x_5, 3); +lean_inc(x_251); +x_252 = lean_ctor_get(x_5, 4); +lean_inc(x_252); +x_253 = lean_ctor_get(x_5, 5); +lean_inc(x_253); +x_254 = lean_ctor_get(x_5, 6); +lean_inc(x_254); +x_255 = lean_ctor_get(x_5, 7); +lean_inc(x_255); +x_256 = lean_ctor_get(x_5, 8); +lean_inc(x_256); +x_257 = lean_ctor_get_uint8(x_5, sizeof(void*)*10); if (lean_is_exclusive(x_5)) { lean_ctor_release(x_5, 0); lean_ctor_release(x_5, 1); @@ -12755,306 +13095,433 @@ if (lean_is_exclusive(x_5)) { lean_ctor_release(x_5, 7); lean_ctor_release(x_5, 8); lean_ctor_release(x_5, 9); - x_225 = x_5; + x_258 = x_5; } else { lean_dec_ref(x_5); - x_225 = lean_box(0); + x_258 = lean_box(0); } -lean_inc(x_211); -lean_inc(x_223); -lean_inc(x_222); -lean_inc(x_221); -lean_inc(x_220); -lean_inc(x_219); -lean_inc(x_218); -lean_inc(x_217); -lean_inc(x_216); -lean_inc(x_215); -if (lean_is_scalar(x_225)) { - x_226 = lean_alloc_ctor(0, 10, 1); -} else { - x_226 = x_225; -} -lean_ctor_set(x_226, 0, x_215); -lean_ctor_set(x_226, 1, x_216); -lean_ctor_set(x_226, 2, x_217); -lean_ctor_set(x_226, 3, x_218); -lean_ctor_set(x_226, 4, x_219); -lean_ctor_set(x_226, 5, x_220); -lean_ctor_set(x_226, 6, x_221); -lean_ctor_set(x_226, 7, x_222); -lean_ctor_set(x_226, 8, x_223); -lean_ctor_set(x_226, 9, x_211); -lean_ctor_set_uint8(x_226, sizeof(void*)*10, x_224); -x_227 = lean_ctor_get(x_215, 0); -lean_inc(x_227); -x_228 = lean_ctor_get(x_215, 1); -lean_inc(x_228); -x_229 = lean_ctor_get(x_215, 2); -lean_inc(x_229); -x_230 = lean_ctor_get(x_215, 3); -lean_inc(x_230); -x_231 = lean_ctor_get(x_215, 4); -lean_inc(x_231); -if (lean_is_exclusive(x_215)) { - lean_ctor_release(x_215, 0); - lean_ctor_release(x_215, 1); - lean_ctor_release(x_215, 2); - lean_ctor_release(x_215, 3); - lean_ctor_release(x_215, 4); - x_232 = x_215; -} else { - lean_dec_ref(x_215); - x_232 = lean_box(0); -} -x_233 = lean_nat_dec_eq(x_230, x_231); -if (x_233 == 0) -{ -lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_258; -lean_dec(x_226); -x_234 = lean_nat_add(x_230, x_212); -lean_dec(x_230); -if (lean_is_scalar(x_232)) { - x_235 = lean_alloc_ctor(0, 5, 0); -} else { - x_235 = x_232; -} -lean_ctor_set(x_235, 0, x_227); -lean_ctor_set(x_235, 1, x_228); -lean_ctor_set(x_235, 2, x_229); -lean_ctor_set(x_235, 3, x_234); -lean_ctor_set(x_235, 4, x_231); -x_236 = lean_alloc_ctor(0, 10, 1); -lean_ctor_set(x_236, 0, x_235); -lean_ctor_set(x_236, 1, x_216); -lean_ctor_set(x_236, 2, x_217); -lean_ctor_set(x_236, 3, x_218); -lean_ctor_set(x_236, 4, x_219); -lean_ctor_set(x_236, 5, x_220); -lean_ctor_set(x_236, 6, x_221); -lean_ctor_set(x_236, 7, x_222); -lean_ctor_set(x_236, 8, x_223); -lean_ctor_set(x_236, 9, x_211); -lean_ctor_set_uint8(x_236, sizeof(void*)*10, x_224); -if (lean_obj_tag(x_1) == 1) -{ -lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; uint8_t x_274; -x_270 = l_Lean_Elab_Term_getOptions(x_236, x_214); -x_271 = lean_ctor_get(x_270, 0); -lean_inc(x_271); -x_272 = lean_ctor_get(x_270, 1); -lean_inc(x_272); -lean_dec(x_270); -x_273 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4; -x_274 = l_Lean_checkTraceOption(x_271, x_273); -lean_dec(x_271); -if (x_274 == 0) -{ -x_237 = x_272; -goto block_257; -} -else -{ -lean_object* x_275; lean_object* x_276; lean_object* x_277; -lean_inc(x_1); -x_275 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_275, 0, x_1); -x_276 = l_Lean_Elab_Term_logTrace(x_273, x_1, x_275, x_236, x_272); -x_277 = lean_ctor_get(x_276, 1); -lean_inc(x_277); -lean_dec(x_276); -x_237 = x_277; -goto block_257; -} -} -else -{ -lean_object* x_278; -lean_dec(x_2); -x_278 = lean_box(0); -x_258 = x_278; -goto block_269; -} -block_257: -{ -lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; -x_238 = l_Lean_Elab_Term_termElabAttribute; -x_239 = lean_ctor_get(x_238, 1); -lean_inc(x_239); -x_240 = lean_ctor_get(x_237, 0); -lean_inc(x_240); -x_241 = lean_ctor_get(x_240, 0); -lean_inc(x_241); -lean_dec(x_240); -x_242 = l_Lean_PersistentEnvExtension_getState___rarg(x_239, x_241); -lean_dec(x_241); -lean_dec(x_239); -x_243 = lean_ctor_get(x_242, 1); -lean_inc(x_243); -lean_dec(x_242); -lean_inc(x_1); -x_244 = l_Lean_Syntax_getKind(x_1); -x_245 = l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__1(x_243, x_244); -if (lean_obj_tag(x_245) == 0) -{ -lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; -lean_dec(x_2); -x_246 = l_Lean_Name_toString___closed__1; -x_247 = l_Lean_Name_toStringWithSep___main(x_246, x_244); -x_248 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_248, 0, x_247); -x_249 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_249, 0, x_248); -x_250 = l_Lean_Elab_Term_elabTerm___closed__3; -x_251 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_251, 0, x_250); -lean_ctor_set(x_251, 1, x_249); -x_252 = l_Lean_Elab_Term_elabTerm___closed__6; -x_253 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_253, 0, x_251); -lean_ctor_set(x_253, 1, x_252); -x_254 = l_Lean_Elab_Term_throwError___rarg(x_1, x_253, x_236, x_237); -return x_254; -} -else -{ -lean_object* x_255; lean_object* x_256; -lean_dec(x_244); -x_255 = lean_ctor_get(x_245, 0); +lean_inc(x_244); +lean_inc(x_256); lean_inc(x_255); -lean_dec(x_245); -lean_inc(x_237); -x_256 = l___private_Init_Lean_Elab_Term_12__elabTermUsing___main(x_237, x_1, x_2, x_4, x_3, x_255, x_236, x_237); -return x_256; +lean_inc(x_254); +lean_inc(x_253); +lean_inc(x_252); +lean_inc(x_251); +lean_inc(x_250); +lean_inc(x_249); +lean_inc(x_248); +if (lean_is_scalar(x_258)) { + x_259 = lean_alloc_ctor(0, 10, 1); +} else { + x_259 = x_258; } +lean_ctor_set(x_259, 0, x_248); +lean_ctor_set(x_259, 1, x_249); +lean_ctor_set(x_259, 2, x_250); +lean_ctor_set(x_259, 3, x_251); +lean_ctor_set(x_259, 4, x_252); +lean_ctor_set(x_259, 5, x_253); +lean_ctor_set(x_259, 6, x_254); +lean_ctor_set(x_259, 7, x_255); +lean_ctor_set(x_259, 8, x_256); +lean_ctor_set(x_259, 9, x_244); +lean_ctor_set_uint8(x_259, sizeof(void*)*10, x_257); +x_260 = lean_ctor_get(x_248, 0); +lean_inc(x_260); +x_261 = lean_ctor_get(x_248, 1); +lean_inc(x_261); +x_262 = lean_ctor_get(x_248, 2); +lean_inc(x_262); +x_263 = lean_ctor_get(x_248, 3); +lean_inc(x_263); +x_264 = lean_ctor_get(x_248, 4); +lean_inc(x_264); +if (lean_is_exclusive(x_248)) { + lean_ctor_release(x_248, 0); + lean_ctor_release(x_248, 1); + lean_ctor_release(x_248, 2); + lean_ctor_release(x_248, 3); + lean_ctor_release(x_248, 4); + x_265 = x_248; +} else { + lean_dec_ref(x_248); + x_265 = lean_box(0); } -block_269: +x_266 = lean_nat_dec_eq(x_263, x_264); +if (x_266 == 0) { -lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; -lean_dec(x_258); -x_259 = lean_box(0); -x_260 = lean_unsigned_to_nat(0u); -lean_inc(x_1); -x_261 = l_Lean_Syntax_formatStxAux___main(x_259, x_260, x_1); -x_262 = l_Lean_Options_empty; -x_263 = l_Lean_Format_pretty(x_261, x_262); -x_264 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_264, 0, x_263); -x_265 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_265, 0, x_264); -x_266 = l_Lean_Elab_Term_withNode___rarg___closed__3; -x_267 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_267, 0, x_266); -lean_ctor_set(x_267, 1, x_265); -x_268 = l_Lean_Elab_Term_throwError___rarg(x_1, x_267, x_236, x_214); -return x_268; +lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_302; +lean_dec(x_259); +x_267 = lean_nat_add(x_263, x_245); +lean_dec(x_263); +if (lean_is_scalar(x_265)) { + x_268 = lean_alloc_ctor(0, 5, 0); +} else { + x_268 = x_265; +} +lean_ctor_set(x_268, 0, x_260); +lean_ctor_set(x_268, 1, x_261); +lean_ctor_set(x_268, 2, x_262); +lean_ctor_set(x_268, 3, x_267); +lean_ctor_set(x_268, 4, x_264); +lean_inc(x_244); +lean_inc(x_256); +lean_inc(x_255); +lean_inc(x_254); +lean_inc(x_253); +lean_inc(x_252); +lean_inc(x_251); +lean_inc(x_250); +lean_inc(x_249); +lean_inc(x_268); +x_269 = lean_alloc_ctor(0, 10, 1); +lean_ctor_set(x_269, 0, x_268); +lean_ctor_set(x_269, 1, x_249); +lean_ctor_set(x_269, 2, x_250); +lean_ctor_set(x_269, 3, x_251); +lean_ctor_set(x_269, 4, x_252); +lean_ctor_set(x_269, 5, x_253); +lean_ctor_set(x_269, 6, x_254); +lean_ctor_set(x_269, 7, x_255); +lean_ctor_set(x_269, 8, x_256); +lean_ctor_set(x_269, 9, x_244); +lean_ctor_set_uint8(x_269, sizeof(void*)*10, x_257); +if (lean_obj_tag(x_4) == 1) +{ +lean_object* x_314; lean_object* x_315; lean_object* x_316; lean_object* x_317; uint8_t x_318; +x_314 = l_Lean_Elab_Term_getOptions(x_269, x_247); +x_315 = lean_ctor_get(x_314, 0); +lean_inc(x_315); +x_316 = lean_ctor_get(x_314, 1); +lean_inc(x_316); +lean_dec(x_314); +x_317 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4; +x_318 = l_Lean_checkTraceOption(x_315, x_317); +lean_dec(x_315); +if (x_318 == 0) +{ +x_270 = x_316; +goto block_301; +} +else +{ +lean_object* x_319; lean_object* x_320; lean_object* x_321; +lean_inc(x_4); +x_319 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_319, 0, x_4); +x_320 = l_Lean_Elab_Term_logTrace(x_317, x_4, x_319, x_269, x_316); +x_321 = lean_ctor_get(x_320, 1); +lean_inc(x_321); +lean_dec(x_320); +x_270 = x_321; +goto block_301; } } else { -lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; -lean_dec(x_232); -lean_dec(x_231); -lean_dec(x_230); -lean_dec(x_229); -lean_dec(x_228); -lean_dec(x_227); -lean_dec(x_223); -lean_dec(x_222); -lean_dec(x_221); -lean_dec(x_220); -lean_dec(x_219); -lean_dec(x_218); -lean_dec(x_217); -lean_dec(x_216); -lean_dec(x_211); -lean_dec(x_2); -x_279 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; -x_280 = l_Lean_Elab_Term_throwError___rarg(x_1, x_279, x_226, x_214); -x_281 = lean_ctor_get(x_280, 0); +lean_object* x_322; +lean_dec(x_268); +lean_dec(x_256); +lean_dec(x_255); +lean_dec(x_254); +lean_dec(x_253); +lean_dec(x_252); +lean_dec(x_251); +lean_dec(x_250); +lean_dec(x_249); +lean_dec(x_244); +lean_dec(x_1); +x_322 = lean_box(0); +x_302 = x_322; +goto block_313; +} +block_301: +{ +lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; +x_271 = l_Lean_Elab_Term_termElabAttribute; +x_272 = lean_ctor_get(x_271, 1); +lean_inc(x_272); +x_273 = lean_ctor_get(x_270, 0); +lean_inc(x_273); +x_274 = lean_ctor_get(x_273, 0); +lean_inc(x_274); +lean_dec(x_273); +x_275 = l_Lean_PersistentEnvExtension_getState___rarg(x_272, x_274); +lean_dec(x_274); +lean_dec(x_272); +x_276 = lean_ctor_get(x_275, 1); +lean_inc(x_276); +lean_dec(x_275); +lean_inc(x_4); +x_277 = l_Lean_Syntax_getKind(x_4); +x_278 = l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__1(x_276, x_277); +if (lean_obj_tag(x_278) == 0) +{ +lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_object* x_282; lean_object* x_283; lean_object* x_284; lean_object* x_285; +x_279 = l_Lean_Elab_Term_getCurrMacroScope(x_269, x_270); +x_280 = lean_ctor_get(x_279, 0); +lean_inc(x_280); +x_281 = lean_ctor_get(x_279, 1); lean_inc(x_281); -x_282 = lean_ctor_get(x_280, 1); -lean_inc(x_282); -if (lean_is_exclusive(x_280)) { - lean_ctor_release(x_280, 0); - lean_ctor_release(x_280, 1); - x_283 = x_280; +lean_dec(x_279); +x_282 = l_Lean_Elab_Term_getEnv___rarg(x_281); +x_283 = lean_ctor_get(x_282, 0); +lean_inc(x_283); +x_284 = lean_ctor_get(x_282, 1); +lean_inc(x_284); +lean_dec(x_282); +lean_inc(x_4); +x_285 = l_Lean_Elab_expandMacro(x_283, x_4, x_280); +lean_dec(x_283); +if (lean_obj_tag(x_285) == 0) +{ +lean_object* x_286; lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; lean_object* x_294; +lean_dec(x_268); +lean_dec(x_256); +lean_dec(x_255); +lean_dec(x_254); +lean_dec(x_253); +lean_dec(x_252); +lean_dec(x_251); +lean_dec(x_250); +lean_dec(x_249); +lean_dec(x_244); +lean_dec(x_1); +x_286 = l_Lean_Name_toString___closed__1; +x_287 = l_Lean_Name_toStringWithSep___main(x_286, x_277); +x_288 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_288, 0, x_287); +x_289 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_289, 0, x_288); +x_290 = l_Lean_Elab_Term_elabTermAux___main___closed__3; +x_291 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_291, 0, x_290); +lean_ctor_set(x_291, 1, x_289); +x_292 = l_Lean_Elab_Term_elabTermAux___main___closed__6; +x_293 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_293, 0, x_291); +lean_ctor_set(x_293, 1, x_292); +x_294 = l_Lean_Elab_Term_throwError___rarg(x_4, x_293, x_269, x_284); +return x_294; +} +else +{ +lean_object* x_295; lean_object* x_296; lean_object* x_297; +lean_dec(x_277); +lean_dec(x_269); +x_295 = lean_ctor_get(x_285, 0); +lean_inc(x_295); +lean_dec(x_285); +x_296 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_296, 0, x_4); +lean_ctor_set(x_296, 1, x_256); +x_297 = lean_alloc_ctor(0, 10, 1); +lean_ctor_set(x_297, 0, x_268); +lean_ctor_set(x_297, 1, x_249); +lean_ctor_set(x_297, 2, x_250); +lean_ctor_set(x_297, 3, x_251); +lean_ctor_set(x_297, 4, x_252); +lean_ctor_set(x_297, 5, x_253); +lean_ctor_set(x_297, 6, x_254); +lean_ctor_set(x_297, 7, x_255); +lean_ctor_set(x_297, 8, x_296); +lean_ctor_set(x_297, 9, x_244); +lean_ctor_set_uint8(x_297, sizeof(void*)*10, x_257); +x_4 = x_295; +x_5 = x_297; +x_6 = x_284; +goto _start; +} +} +else +{ +lean_object* x_299; lean_object* x_300; +lean_dec(x_277); +lean_dec(x_268); +lean_dec(x_256); +lean_dec(x_255); +lean_dec(x_254); +lean_dec(x_253); +lean_dec(x_252); +lean_dec(x_251); +lean_dec(x_250); +lean_dec(x_249); +lean_dec(x_244); +x_299 = lean_ctor_get(x_278, 0); +lean_inc(x_299); +lean_dec(x_278); +lean_inc(x_270); +x_300 = l___private_Init_Lean_Elab_Term_12__elabTermUsing___main(x_270, x_4, x_1, x_3, x_2, x_299, x_269, x_270); +return x_300; +} +} +block_313: +{ +lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; +lean_dec(x_302); +x_303 = lean_box(0); +x_304 = lean_unsigned_to_nat(0u); +lean_inc(x_4); +x_305 = l_Lean_Syntax_formatStxAux___main(x_303, x_304, x_4); +x_306 = l_Lean_Options_empty; +x_307 = l_Lean_Format_pretty(x_305, x_306); +x_308 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_308, 0, x_307); +x_309 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_309, 0, x_308); +x_310 = l_Lean_Elab_Term_withNode___rarg___closed__3; +x_311 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_311, 0, x_310); +lean_ctor_set(x_311, 1, x_309); +x_312 = l_Lean_Elab_Term_throwError___rarg(x_4, x_311, x_269, x_247); +return x_312; +} +} +else +{ +lean_object* x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; +lean_dec(x_265); +lean_dec(x_264); +lean_dec(x_263); +lean_dec(x_262); +lean_dec(x_261); +lean_dec(x_260); +lean_dec(x_256); +lean_dec(x_255); +lean_dec(x_254); +lean_dec(x_253); +lean_dec(x_252); +lean_dec(x_251); +lean_dec(x_250); +lean_dec(x_249); +lean_dec(x_244); +lean_dec(x_1); +x_323 = l_Lean_Elab_Term_withIncRecDepth___rarg___closed__2; +x_324 = l_Lean_Elab_Term_throwError___rarg(x_4, x_323, x_259, x_247); +x_325 = lean_ctor_get(x_324, 0); +lean_inc(x_325); +x_326 = lean_ctor_get(x_324, 1); +lean_inc(x_326); +if (lean_is_exclusive(x_324)) { + lean_ctor_release(x_324, 0); + lean_ctor_release(x_324, 1); + x_327 = x_324; } else { - lean_dec_ref(x_280); - x_283 = lean_box(0); + lean_dec_ref(x_324); + x_327 = lean_box(0); } -if (lean_is_scalar(x_283)) { - x_284 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_327)) { + x_328 = lean_alloc_ctor(1, 2, 0); } else { - x_284 = x_283; + x_328 = x_327; } -lean_ctor_set(x_284, 0, x_281); -lean_ctor_set(x_284, 1, x_282); -return x_284; +lean_ctor_set(x_328, 0, x_325); +lean_ctor_set(x_328, 1, x_326); +return x_328; } } } } -lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTerm___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__4(x_1, x_2, x_3, x_4, x_5); +x_6 = l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__3(x_1, x_4, x_3); +x_5 = l_PersistentHashMap_findAux___main___at_Lean_Elab_Term_elabTermAux___main___spec__3(x_1, x_4, x_3); lean_dec(x_3); return x_5; } } -lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTerm___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__2(x_1, x_2); +x_3 = l_PersistentHashMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__2(x_1, x_2); lean_dec(x_2); return x_3; } } -lean_object* l_AssocList_find___main___at_Lean_Elab_Term_elabTerm___spec__6___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_AssocList_find___main___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__6(x_1, x_2); +x_3 = l_AssocList_find___main___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__5___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__5(x_1, x_2); +x_3 = l_HashMapImp_find_x3f___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___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_Term_elabTerm___spec__1(x_1, x_2); +x_3 = l_Lean_SMap_find_x3f___at_Lean_Elab_Term_elabTermAux___main___spec__1(x_1, x_2); lean_dec(x_2); return x_3; } } +lean_object* l_Lean_Elab_Term_elabTermAux___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; uint8_t x_8; lean_object* x_9; +x_7 = lean_unbox(x_2); +lean_dec(x_2); +x_8 = lean_unbox(x_3); +lean_dec(x_3); +x_9 = l_Lean_Elab_Term_elabTermAux___main(x_1, x_7, x_8, x_4, x_5, x_6); +return x_9; +} +} +lean_object* l_Lean_Elab_Term_elabTermAux(lean_object* x_1, uint8_t 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_Lean_Elab_Term_elabTermAux___main(x_1, x_2, x_3, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_Elab_Term_elabTermAux___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; uint8_t x_8; lean_object* x_9; +x_7 = lean_unbox(x_2); +lean_dec(x_2); +x_8 = lean_unbox(x_3); +lean_dec(x_3); +x_9 = l_Lean_Elab_Term_elabTermAux(x_1, x_7, x_8, x_4, x_5, x_6); +return x_9; +} +} +lean_object* l_Lean_Elab_Term_elabTerm(lean_object* x_1, lean_object* x_2, uint8_t x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_3, x_4, x_1, x_5, x_6); +return x_7; +} +} lean_object* l_Lean_Elab_Term_elabTerm___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: { @@ -13072,7 +13539,7 @@ _start: { uint8_t x_6; lean_object* x_7; x_6 = 0; -x_7 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_6, x_3, x_4, x_5); +x_7 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_6, x_3, x_1, x_4, x_5); return x_7; } } @@ -13111,7 +13578,7 @@ x_11 = lean_ctor_get(x_9, 1); lean_inc(x_11); lean_dec(x_9); x_12 = 1; -x_13 = l_Lean_Elab_Term_elabTerm(x_10, x_3, x_12, x_12, x_4, x_11); +x_13 = l_Lean_Elab_Term_elabTermAux___main(x_3, x_12, x_12, x_10, x_4, x_11); return x_13; } else @@ -13191,7 +13658,7 @@ x_33 = lean_ctor_get(x_31, 1); lean_inc(x_33); lean_dec(x_31); x_34 = 1; -x_35 = l_Lean_Elab_Term_elabTerm(x_32, x_3, x_34, x_34, x_30, x_33); +x_35 = l_Lean_Elab_Term_elabTermAux___main(x_3, x_34, x_34, x_32, x_30, x_33); return x_35; } else @@ -13540,7 +14007,7 @@ lean_ctor_set(x_8, 0, x_7); x_9 = 1; lean_inc(x_2); lean_inc(x_1); -x_10 = l_Lean_Elab_Term_elabTerm(x_1, x_8, x_9, x_9, x_2, x_6); +x_10 = l_Lean_Elab_Term_elabTermAux___main(x_8, x_9, x_9, x_1, x_2, x_6); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; @@ -16213,7 +16680,7 @@ uint8_t x_58; uint8_t x_59; lean_object* x_60; x_58 = 0; x_59 = 1; lean_inc(x_49); -x_60 = l_Lean_Elab_Term_elabTerm(x_4, x_57, x_58, x_59, x_49, x_56); +x_60 = l_Lean_Elab_Term_elabTermAux___main(x_57, x_58, x_59, x_4, x_49, x_56); if (lean_obj_tag(x_60) == 0) { lean_object* x_61; lean_object* x_62; lean_object* x_63; uint8_t x_64; @@ -16269,7 +16736,7 @@ else uint8_t x_72; lean_object* x_73; x_72 = 0; lean_inc(x_49); -x_73 = l_Lean_Elab_Term_elabTerm(x_4, x_57, x_72, x_72, x_49, x_56); +x_73 = l_Lean_Elab_Term_elabTermAux___main(x_57, x_72, x_72, x_4, x_49, x_56); if (lean_obj_tag(x_73) == 0) { lean_object* x_74; lean_object* x_75; lean_object* x_76; uint8_t x_77; @@ -17575,7 +18042,7 @@ lean_object* _init_l___private_Init_Lean_Elab_Term_18__synthesizeSyntheticMVarsS _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +x_1 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; x_2 = l___private_Init_Lean_Elab_Term_18__synthesizeSyntheticMVarsStep___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; @@ -17734,7 +18201,7 @@ x_8 = l_List_lengthAux___main___rarg(x_6, x_7); x_9 = lean_box(0); lean_ctor_set(x_4, 1, x_9); x_10 = l_List_reverse___rarg(x_6); -x_11 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +x_11 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; x_12 = l_List_filterAuxM___main___at___private_Init_Lean_Elab_Term_18__synthesizeSyntheticMVarsStep___spec__2(x_1, x_11, x_10, x_9, x_2, x_4); if (lean_obj_tag(x_12) == 0) { @@ -17949,7 +18416,7 @@ lean_ctor_set(x_72, 3, x_66); lean_ctor_set(x_72, 4, x_67); lean_ctor_set(x_72, 5, x_68); x_73 = l_List_reverse___rarg(x_64); -x_74 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +x_74 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; x_75 = l_List_filterAuxM___main___at___private_Init_Lean_Elab_Term_18__synthesizeSyntheticMVarsStep___spec__2(x_1, x_74, x_73, x_71, x_2, x_72); if (lean_obj_tag(x_75) == 0) { @@ -20088,7 +20555,7 @@ lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_ x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_sub(x_2, x_9); lean_dec(x_2); -x_11 = l_Lean_stxInh; +x_11 = l_Lean_Syntax_inhabited; x_12 = lean_array_get(x_11, x_1, x_10); x_13 = l_Lean_Elab_Term_getCurrMacroScope(x_4, x_5); x_14 = lean_ctor_get(x_13, 0); @@ -20199,7 +20666,7 @@ x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); x_8 = 1; -x_9 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_8, x_8, x_3, x_7); +x_9 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_8, x_8, x_1, x_3, x_7); return x_9; } else @@ -20221,7 +20688,7 @@ lean_ctor_set(x_14, 0, x_1); lean_ctor_set(x_14, 1, x_13); lean_ctor_set(x_3, 8, x_14); x_15 = 1; -x_16 = l_Lean_Elab_Term_elabTerm(x_11, x_2, x_15, x_15, x_3, x_10); +x_16 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_15, x_15, x_11, x_3, x_10); return x_16; } else @@ -20265,7 +20732,7 @@ lean_ctor_set(x_29, 8, x_28); lean_ctor_set(x_29, 9, x_26); lean_ctor_set_uint8(x_29, sizeof(void*)*10, x_27); x_30 = 1; -x_31 = l_Lean_Elab_Term_elabTerm(x_11, x_2, x_30, x_30, x_29, x_10); +x_31 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_30, x_30, x_11, x_29, x_10); return x_31; } } @@ -20601,7 +21068,7 @@ lean_ctor_set(x_51, 0, x_1); lean_ctor_set(x_51, 1, x_50); lean_ctor_set(x_3, 8, x_51); x_52 = 1; -x_53 = l_Lean_Elab_Term_elabTerm(x_47, x_2, x_52, x_52, x_3, x_48); +x_53 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_52, x_52, x_47, x_3, x_48); return x_53; } else @@ -20645,7 +21112,7 @@ lean_ctor_set(x_66, 8, x_65); lean_ctor_set(x_66, 9, x_63); lean_ctor_set_uint8(x_66, sizeof(void*)*10, x_64); x_67 = 1; -x_68 = l_Lean_Elab_Term_elabTerm(x_47, x_2, x_67, x_67, x_66, x_48); +x_68 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_67, x_67, x_47, x_66, x_48); return x_68; } } @@ -20951,7 +21418,7 @@ x_18 = lean_array_get_size(x_17); x_19 = l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Elab_Term_elabListLit___spec__1(x_1, x_12, x_17, x_18, lean_box(0), x_14); lean_dec(x_17); x_20 = 1; -x_21 = l_Lean_Elab_Term_elabTerm(x_19, x_2, x_20, x_20, x_3, x_4); +x_21 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_20, x_20, x_19, x_3, x_4); return x_21; } } @@ -21246,7 +21713,7 @@ lean_ctor_set(x_43, 0, x_1); lean_ctor_set(x_43, 1, x_42); lean_ctor_set(x_3, 8, x_43); x_44 = 1; -x_45 = l_Lean_Elab_Term_elabTerm(x_40, x_2, x_44, x_44, x_3, x_14); +x_45 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_44, x_44, x_40, x_3, x_14); return x_45; } else @@ -21290,7 +21757,7 @@ lean_ctor_set(x_58, 8, x_57); lean_ctor_set(x_58, 9, x_55); lean_ctor_set_uint8(x_58, sizeof(void*)*10, x_56); x_59 = 1; -x_60 = l_Lean_Elab_Term_elabTerm(x_40, x_2, x_59, x_59, x_58, x_14); +x_60 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_59, x_59, x_40, x_58, x_14); return x_60; } } @@ -23208,18 +23675,18 @@ l___private_Init_Lean_Elab_Term_12__elabTermUsing___main___closed__2 = _init_l__ lean_mark_persistent(l___private_Init_Lean_Elab_Term_12__elabTermUsing___main___closed__2); l___private_Init_Lean_Elab_Term_12__elabTermUsing___main___closed__3 = _init_l___private_Init_Lean_Elab_Term_12__elabTermUsing___main___closed__3(); lean_mark_persistent(l___private_Init_Lean_Elab_Term_12__elabTermUsing___main___closed__3); -l_Lean_Elab_Term_elabTerm___closed__1 = _init_l_Lean_Elab_Term_elabTerm___closed__1(); -lean_mark_persistent(l_Lean_Elab_Term_elabTerm___closed__1); -l_Lean_Elab_Term_elabTerm___closed__2 = _init_l_Lean_Elab_Term_elabTerm___closed__2(); -lean_mark_persistent(l_Lean_Elab_Term_elabTerm___closed__2); -l_Lean_Elab_Term_elabTerm___closed__3 = _init_l_Lean_Elab_Term_elabTerm___closed__3(); -lean_mark_persistent(l_Lean_Elab_Term_elabTerm___closed__3); -l_Lean_Elab_Term_elabTerm___closed__4 = _init_l_Lean_Elab_Term_elabTerm___closed__4(); -lean_mark_persistent(l_Lean_Elab_Term_elabTerm___closed__4); -l_Lean_Elab_Term_elabTerm___closed__5 = _init_l_Lean_Elab_Term_elabTerm___closed__5(); -lean_mark_persistent(l_Lean_Elab_Term_elabTerm___closed__5); -l_Lean_Elab_Term_elabTerm___closed__6 = _init_l_Lean_Elab_Term_elabTerm___closed__6(); -lean_mark_persistent(l_Lean_Elab_Term_elabTerm___closed__6); +l_Lean_Elab_Term_elabTermAux___main___closed__1 = _init_l_Lean_Elab_Term_elabTermAux___main___closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_elabTermAux___main___closed__1); +l_Lean_Elab_Term_elabTermAux___main___closed__2 = _init_l_Lean_Elab_Term_elabTermAux___main___closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_elabTermAux___main___closed__2); +l_Lean_Elab_Term_elabTermAux___main___closed__3 = _init_l_Lean_Elab_Term_elabTermAux___main___closed__3(); +lean_mark_persistent(l_Lean_Elab_Term_elabTermAux___main___closed__3); +l_Lean_Elab_Term_elabTermAux___main___closed__4 = _init_l_Lean_Elab_Term_elabTermAux___main___closed__4(); +lean_mark_persistent(l_Lean_Elab_Term_elabTermAux___main___closed__4); +l_Lean_Elab_Term_elabTermAux___main___closed__5 = _init_l_Lean_Elab_Term_elabTermAux___main___closed__5(); +lean_mark_persistent(l_Lean_Elab_Term_elabTermAux___main___closed__5); +l_Lean_Elab_Term_elabTermAux___main___closed__6 = _init_l_Lean_Elab_Term_elabTermAux___main___closed__6(); +lean_mark_persistent(l_Lean_Elab_Term_elabTermAux___main___closed__6); l_Lean_Elab_Term_ensureType___closed__1 = _init_l_Lean_Elab_Term_ensureType___closed__1(); lean_mark_persistent(l_Lean_Elab_Term_ensureType___closed__1); l_Lean_Elab_Term_ensureType___closed__2 = _init_l_Lean_Elab_Term_ensureType___closed__2(); diff --git a/stage0/stdlib/Init/Lean/Elab/TermApp.c b/stage0/stdlib/Init/Lean/Elab/TermApp.c index 084e6b54eb..a507b2f6ba 100644 --- a/stage0/stdlib/Init/Lean/Elab/TermApp.c +++ b/stage0/stdlib/Init/Lean/Elab/TermApp.c @@ -36,7 +36,6 @@ lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_ lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_TermApp_14__elabAppFn___main___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkFreshExprMVar(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_unreachable_x21___rarg(lean_object*); -extern lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Elab_Term_elabExplicitUniv___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_fieldIdxKind___closed__2; extern lean_object* l_Lean_MessageData_ofList___closed__3; @@ -53,7 +52,6 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabId___closed__2; lean_object* lean_array_fswap(lean_object*, lean_object*, lean_object*); extern lean_object* l_Prod_HasRepr___rarg___closed__1; lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__7; -extern lean_object* l_Lean_stxInh; lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabProj___closed__3; extern lean_object* l_Array_empty___closed__1; lean_object* lean_environment_find(lean_object*, lean_object*); @@ -95,6 +93,7 @@ lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__14; extern lean_object* l_Array_iterateMAux___main___at_Lean_mkAppStx___spec__1___closed__1; lean_object* l___private_Init_Lean_Elab_TermApp_16__toMessageData___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_NamedArg_inhabited; +extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabId___closed__3; lean_object* l___private_Init_Lean_Elab_TermApp_17__mergeFailures(lean_object*); lean_object* l___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -143,7 +142,6 @@ lean_object* l___private_Init_Lean_Elab_TermApp_11__addLValArg___main___closed__ extern lean_object* l___private_Init_Lean_Elab_Term_14__resumePostponed___lambda__1___closed__1; lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__26; lean_object* l___private_Init_Lean_Elab_TermApp_17__mergeFailures___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabChoice___closed__1; lean_object* l_Lean_Elab_Term_addNamedArg___closed__3; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); @@ -162,6 +160,7 @@ lean_object* l___private_Init_Lean_Elab_TermApp_11__addLValArg___main___closed__ lean_object* l_Lean_Elab_Term_Arg_hasToString(lean_object*); lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_TermApp_8__resolveLValLoop___main___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_TermApp_14__elabAppFn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabTermAux___main(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_repr(lean_object*); uint8_t l_Lean_LocalDecl_binderInfo(lean_object*); lean_object* l_Lean_Syntax_getId(lean_object*); @@ -222,6 +221,7 @@ extern lean_object* l_Lean_Meta_Exception_mkAppTypeMismatchMessage___closed__8; lean_object* l___private_Init_Lean_Elab_TermApp_7__resolveLValAux___closed__8; uint8_t l_Array_anyRangeMAux___main___at_Lean_Elab_Term_addNamedArg___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabId(lean_object*); +extern lean_object* l_Lean_Syntax_inhabited; lean_object* l___private_Init_Lean_Elab_TermApp_4__elabAppArgsAux___main___closed__5; lean_object* l___private_Init_Lean_Elab_TermApp_11__addLValArg___main___closed__5; lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabSortApp___closed__2; @@ -911,7 +911,7 @@ x_8 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_8, 0, x_4); x_9 = 1; lean_inc(x_5); -x_10 = l_Lean_Elab_Term_elabTerm(x_7, x_8, x_9, x_9, x_5, x_6); +x_10 = l_Lean_Elab_Term_elabTermAux___main(x_8, x_9, x_9, x_7, x_5, x_6); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; @@ -6430,7 +6430,7 @@ lean_dec(x_206); x_213 = lean_box(0); x_214 = 1; lean_inc(x_9); -x_215 = l_Lean_Elab_Term_elabTerm(x_2, x_213, x_214, x_214, x_9, x_10); +x_215 = l_Lean_Elab_Term_elabTermAux___main(x_213, x_214, x_214, x_2, x_9, x_10); if (lean_obj_tag(x_215) == 0) { uint8_t x_216; @@ -6830,7 +6830,7 @@ lean_dec(x_302); x_306 = lean_box(0); x_307 = 1; lean_inc(x_9); -x_308 = l_Lean_Elab_Term_elabTerm(x_2, x_306, x_307, x_307, x_9, x_10); +x_308 = l_Lean_Elab_Term_elabTermAux___main(x_306, x_307, x_307, x_2, x_9, x_10); if (lean_obj_tag(x_308) == 0) { uint8_t x_309; @@ -7158,7 +7158,7 @@ lean_object* x_13; uint8_t x_14; lean_object* x_15; x_13 = lean_box(0); x_14 = 1; lean_inc(x_9); -x_15 = l_Lean_Elab_Term_elabTerm(x_2, x_13, x_14, x_14, x_9, x_10); +x_15 = l_Lean_Elab_Term_elabTermAux___main(x_13, x_14, x_14, x_2, x_9, x_10); if (lean_obj_tag(x_15) == 0) { uint8_t x_16; @@ -7470,7 +7470,7 @@ lean_dec(x_71); x_75 = lean_box(0); x_76 = 1; lean_inc(x_9); -x_77 = l_Lean_Elab_Term_elabTerm(x_2, x_75, x_76, x_76, x_9, x_10); +x_77 = l_Lean_Elab_Term_elabTermAux___main(x_75, x_76, x_76, x_2, x_9, x_10); if (lean_obj_tag(x_77) == 0) { uint8_t x_78; @@ -7784,7 +7784,7 @@ x_137 = l_Array_isEmpty___rarg(x_136); if (x_137 == 0) { lean_object* x_138; lean_object* x_139; lean_object* x_140; -x_138 = l_Lean_stxInh; +x_138 = l_Lean_Syntax_inhabited; x_139 = lean_array_get(x_138, x_136, x_70); lean_dec(x_136); x_140 = l_Lean_Elab_Term_elabExplicitUniv(x_139, x_9, x_10); @@ -9716,7 +9716,7 @@ lean_object* _init_l___private_Init_Lean_Elab_TermApp_20__regTraceClasses___clos _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +x_1 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; x_2 = l_Lean_Parser_Term_app___elambda__1___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; diff --git a/stage0/stdlib/Init/Lean/Elab/TermBinders.c b/stage0/stdlib/Init/Lean/Elab/TermBinders.c index 838f485386..468f465803 100644 --- a/stage0/stdlib/Init/Lean/Elab/TermBinders.c +++ b/stage0/stdlib/Init/Lean/Elab/TermBinders.c @@ -25,7 +25,6 @@ lean_object* l___private_Init_Lean_Elab_TermBinders_10__expandFunBindersAux___bo lean_object* l_Lean_Elab_Term_elabDepArrow___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_nameToExprAux___main___closed__1; -extern lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; lean_object* l___private_Init_Lean_Elab_TermBinders_5__matchBinder___closed__2; lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Elab_TermBinders_5__matchBinder___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabDepArrow(lean_object*, lean_object*, lean_object*, lean_object*); @@ -81,6 +80,7 @@ lean_object* l___private_Init_Lean_Elab_TermBinders_11__expandFunBinders___boxed lean_object* l___private_Init_Lean_Elab_TermBinders_4__expandBinderModifier___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_TermBinders_4__expandBinderModifier___closed__1; lean_object* l_Lean_Elab_Term_withLetDecl___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; extern lean_object* l___private_Init_Lean_Elab_Term_8__expandCDot___closed__4; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_TermBinders_11__expandFunBinders(lean_object*, lean_object*, lean_object*, lean_object*); @@ -109,7 +109,6 @@ lean_object* l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(lean_object*); lean_object* l___private_Init_Lean_Elab_TermBinders_8__getFunBinderIdsAux_x3f___main(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_instBinder___elambda__1___closed__2; lean_object* l___private_Init_Lean_Elab_TermBinders_6__elabBinderViews(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabForall___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Elab_TermBinders_5__matchBinder___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -118,6 +117,7 @@ lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabDepArrow___closed__3; lean_object* l_Lean_Elab_Term_elabFun___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabFun___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabTermAux___main(lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_expandCDot_x3f___closed__3; lean_object* l_Lean_Elab_Term_logTrace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_TermBinders_6__elabBinderViews___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -15998,7 +15998,7 @@ lean_object* x_6; uint8_t x_7; lean_object* x_8; x_6 = lean_box(0); x_7 = 1; lean_inc(x_4); -x_8 = l_Lean_Elab_Term_elabTerm(x_1, x_6, x_7, x_7, x_4, x_5); +x_8 = l_Lean_Elab_Term_elabTermAux___main(x_6, x_7, x_7, x_1, x_4, x_5); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; @@ -16627,7 +16627,7 @@ x_10 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_10, 0, x_8); x_11 = 1; lean_inc(x_5); -x_12 = l_Lean_Elab_Term_elabTerm(x_2, x_10, x_11, x_11, x_5, x_9); +x_12 = l_Lean_Elab_Term_elabTermAux___main(x_10, x_11, x_11, x_2, x_5, x_9); if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; @@ -16788,7 +16788,7 @@ _start: uint8_t x_7; lean_object* x_8; x_7 = 1; lean_inc(x_5); -x_8 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_7, x_7, x_5, x_6); +x_8 = l_Lean_Elab_Term_elabTermAux___main(x_1, x_7, x_7, x_2, x_5, x_6); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; @@ -16837,7 +16837,7 @@ lean_object* _init_l_Lean_Elab_Term_elabLetIdDecl___closed__1() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +x_1 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; x_2 = l_Lean_Parser_Term_let___elambda__1___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; @@ -16912,8 +16912,8 @@ if (x_27 == 0) lean_object* x_28; lean_object* x_29; lean_inc(x_1); x_28 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetIdDecl___lambda__2___boxed), 6, 3); -lean_closure_set(x_28, 0, x_3); -lean_closure_set(x_28, 1, x_4); +lean_closure_set(x_28, 0, x_4); +lean_closure_set(x_28, 1, x_3); lean_closure_set(x_28, 2, x_1); x_29 = l_Lean_Elab_Term_withLetDecl___rarg(x_1, x_8, x_21, x_22, x_28, x_5, x_25); lean_dec(x_1); @@ -16951,8 +16951,8 @@ lean_inc(x_40); lean_dec(x_39); lean_inc(x_1); x_41 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetIdDecl___lambda__2___boxed), 6, 3); -lean_closure_set(x_41, 0, x_3); -lean_closure_set(x_41, 1, x_4); +lean_closure_set(x_41, 0, x_4); +lean_closure_set(x_41, 1, x_3); lean_closure_set(x_41, 2, x_1); x_42 = l_Lean_Elab_Term_withLetDecl___rarg(x_1, x_8, x_21, x_22, x_41, x_5, x_40); lean_dec(x_1); @@ -17570,7 +17570,7 @@ x_99 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_99, 0, x_98); lean_ctor_set(x_99, 1, x_97); x_100 = 1; -x_101 = l_Lean_Elab_Term_elabTerm(x_99, x_2, x_100, x_100, x_3, x_82); +x_101 = l_Lean_Elab_Term_elabTermAux___main(x_2, x_100, x_100, x_99, x_3, x_82); return x_101; } } diff --git a/stage0/stdlib/Init/Lean/Elab/Util.c b/stage0/stdlib/Init/Lean/Elab/Util.c index 87a43c1680..a3734d0ab6 100644 --- a/stage0/stdlib/Init/Lean/Elab/Util.c +++ b/stage0/stdlib/Init/Lean/Elab/Util.c @@ -15,6 +15,7 @@ extern "C" { #endif lean_object* l_List_reverse___rarg(lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; +lean_object* l_OptionT_catch___at___private_Init_Lean_Elab_Util_7__expandMacroFns___main___spec__1___rarg(lean_object*, lean_object*); lean_object* l_PersistentHashMap_empty___at_Lean_Elab_ElabAttribute_inhabited___spec__3(lean_object*); lean_object* l_mkHashMap___at_Lean_Elab_ElabAttributeExtensionState_inhabited___spec__2___rarg(lean_object*); size_t l_USize_add(size_t, size_t); @@ -26,72 +27,81 @@ extern lean_object* l___private_Init_Lean_Environment_8__persistentEnvExtensions lean_object* l_AssocList_contains___main___at_Lean_Elab_ElabFnTable_insert___spec__26___rarg___boxed(lean_object*, lean_object*); lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l_Lean_SMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__20___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkMacroAttribute(lean_object*); +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType(lean_object*); +lean_object* l_Lean_Elab_macroAttribute___closed__2; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_ElabFnTable_insert___spec__24___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_ElabFnTable_insert___spec__22(lean_object*); lean_object* lean_array_uget(lean_object*, size_t); -lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_ElabFnTable_insert___spec__13___rarg(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_ElabFnTable_insert___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__2; +lean_object* l_Lean_Elab_mkElabAttributeAux(lean_object*); +lean_object* l_Lean_Elab_macroAttribute___closed__1; extern size_t l_PersistentHashMap_insertAux___main___rarg___closed__2; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +extern lean_object* l_Lean_nameToExprAux___main___closed__4; lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_ElabFnTable_insert___spec__22___rarg(lean_object*, size_t, size_t, lean_object*, lean_object*); -lean_object* l_Lean_Elab_mkElabAttribute___rarg___closed__4; uint8_t l_AssocList_contains___main___at_Lean_Elab_ElabFnTable_insert___spec__26___rarg(lean_object*, lean_object*); size_t l_USize_sub(size_t, size_t); lean_object* l_HashMapImp_insert___at_Lean_Elab_ElabFnTable_insert___spec__25(lean_object*); lean_object* l___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__1(lean_object*); lean_object* lean_environment_find(lean_object*, lean_object*); lean_object* l_HashMapImp_insert___at_Lean_Elab_ElabFnTable_insert___spec__14___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_ElabFnTable_insert___spec__4(lean_object*); +lean_object* l_Lean_Elab_macroAttribute___closed__4; +lean_object* lean_io_mk_ref(lean_object*, lean_object*); lean_object* l_Lean_Elab_ElabFnTable_insert___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_Lean_Elab_ElabFnTable_insert___spec__17(lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* lean_io_ref_get(lean_object*, lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__2(lean_object*); -lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses(lean_object*); +lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses(lean_object*); lean_object* lean_get_namespaces(lean_object*); lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__7(lean_object*); -lean_object* l_Lean_Elab_mkElabAttribute___rarg___closed__1; +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_expandMacro___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers(lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_expandMacro___spec__2___boxed(lean_object*, lean_object*); lean_object* l_AssocList_find___main___at_Lean_Elab_ElabFnTable_insert___spec__6___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkMacroAttribute___closed__3; lean_object* l___private_Init_Lean_Elab_Util_1__ElabAttribute_mkInitial___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_Elab_ElabAttribute_inhabited___spec__1___closed__2; extern lean_object* l_String_splitAux___main___closed__1; lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__2___rarg___boxed(lean_object*, lean_object*); +lean_object* l_AssocList_find___main___at_Lean_Elab_expandMacro___spec__6___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_ElabFnTable_insert___spec__11(lean_object*); +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_expandMacro___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___closed__3; +lean_object* l_OptionT_catch___at___private_Init_Lean_Elab_Util_7__expandMacroFns___main___spec__1(lean_object*); lean_object* l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___rarg(lean_object*, lean_object*); size_t l_USize_shiftRight(size_t, size_t); -lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3(lean_object*); lean_object* l_Lean_SMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__20(lean_object*); -lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__3; -lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__1; extern lean_object* l_Lean_mkAttributeImplOfConstantUnsafe___closed__3; lean_object* l_AssocList_replace___main___at_Lean_Elab_ElabFnTable_insert___spec__19(lean_object*); -lean_object* l_Lean_Elab_mkElabAttribute___rarg___closed__3; extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; +lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; +lean_object* l_Lean_Elab_macroAttribute___closed__3; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_ElabFnTable_insert___spec__24___rarg(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_AttributeImpl_inhabited___closed__2; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_checkSyntaxNodeKindAtNamespaces___main(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__2; lean_object* l_AssocList_foldlM___main___at_Lean_Elab_ElabFnTable_insert___spec__29___rarg(lean_object*, lean_object*); lean_object* l_HashMapImp_insert___at_Lean_Elab_ElabFnTable_insert___spec__14(lean_object*); +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___lambda__1(lean_object*); +lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__3; lean_object* l_IO_ofExcept___at___private_Init_Lean_Elab_Util_6__ElabAttribute_add___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_Elab_mkElabAttribute___rarg___lambda__2(lean_object*); lean_object* l_Lean_Elab_ElabAttribute_inhabited___closed__6; extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__1; extern lean_object* l_Lean_mkAttributeImplOfConstant___closed__1; -lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__3; +lean_object* l_Lean_Elab_macroAttribute___closed__5; lean_object* l_Lean_Elab_checkSyntaxNodeKind___closed__2; lean_object* l___private_Init_Lean_Elab_Util_3__mkElabFnOfConstantUnsafe___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Util_7__expandMacroFns___main___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_ElabAttribute_inhabited___closed__5; lean_object* l___private_Init_Lean_Elab_Util_5__ElabAttribute_addExtensionEntry(lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); @@ -101,19 +111,19 @@ lean_object* l___private_Init_Lean_Elab_Util_6__ElabAttribute_add(lean_object*); lean_object* l_PersistentHashMap_empty___at_Lean_Elab_ElabAttributeExtensionState_inhabited___spec__3(lean_object*); extern lean_object* l_Lean_EnvExtension_Inhabited___rarg___closed__1; lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__3; +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__1(lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__1; lean_object* l_HashMapImp_expand___at_Lean_Elab_ElabFnTable_insert___spec__16(lean_object*); -lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4; lean_object* l_Lean_Elab_syntaxNodeKindOfAttrParam___closed__2; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___spec__1(lean_object*); lean_object* l_HashMapImp_expand___at_Lean_Elab_ElabFnTable_insert___spec__16___rarg(lean_object*, lean_object*); lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__2; lean_object* l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___rarg___closed__3; +lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__1; lean_object* l_Lean_Elab_ElabAttributeExtensionState_inhabited___closed__1; -lean_object* l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2(lean_object*); lean_object* l_Lean_Elab_checkSyntaxNodeKindAtNamespaces___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_mkElabAttribute___rarg___lambda__2___boxed(lean_object*); +lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3(lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); uint8_t l_AssocList_contains___main___at_Lean_Elab_ElabFnTable_insert___spec__15___rarg(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_ElabFnTable_insert___spec__22___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -122,22 +132,28 @@ lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__1___rarg___boxed(lean_object*, lean_object*); lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__5___rarg(lean_object*, lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__2___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Elab_mkElabAttribute___rarg___closed__2; lean_object* l___private_Init_Lean_Elab_Util_3__mkElabFnOfConstantUnsafe(lean_object*); +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_expandMacro___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_expandMacro___spec__5(lean_object*, lean_object*); size_t l_Lean_Name_hash(lean_object*); lean_object* l_Nat_repr(lean_object*); lean_object* l___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Char_HasRepr___closed__1; -lean_object* l_mkHashMap___at_Lean_Elab_mkElabAttribute___spec__5___rarg(lean_object*); extern lean_object* l_PersistentHashMap_insertAux___main___rarg___closed__3; -uint8_t l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_mkHashMap___at_Lean_Elab_mkBuiltinMacroFnTable___spec__2(lean_object*); lean_object* l_AssocList_find___main___at_Lean_Elab_ElabFnTable_insert___spec__6___rarg___boxed(lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__3; +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___lambda__2(lean_object*); lean_object* lean_eval_const(lean_object*, lean_object*); +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_expandMacro___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__2; +lean_object* l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2(lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_Elab_ElabAttributeExtensionState_inhabited___spec__1___closed__1; -lean_object* l_Lean_Elab_mkElabAttribute___rarg___lambda__1(lean_object*); +lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_ElabAttribute_inhabited___closed__4; lean_object* l_Lean_attrParamSyntaxToIdentifier(lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1; lean_object* l_AssocList_contains___main___at_Lean_Elab_ElabFnTable_insert___spec__15(lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__21(lean_object*); size_t lean_usize_modn(size_t, lean_object*); @@ -145,11 +161,15 @@ extern lean_object* l___private_Init_Lean_Environment_5__envExtensionsRef; lean_object* l_Lean_Elab_mkElabFnOfConstant(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinAttribute(lean_object*, lean_object*); lean_object* l_mkHashMap___at_Lean_Elab_ElabAttribute_inhabited___spec__2(lean_object*); +lean_object* l_AssocList_find___main___at_Lean_Elab_expandMacro___spec__6(lean_object*, lean_object*); +lean_object* l_mkHashMap___at_Lean_Elab_mkElabAttributeAux___spec__5(lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_Lean_Elab_ElabFnTable_insert___spec__28(lean_object*); lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__1; size_t l_USize_mul(size_t, size_t); lean_object* l_List_redLength___main___rarg(lean_object*); lean_object* l_mkHashMapImp___rarg(lean_object*); +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_expandMacro___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_syntaxNodeKindOfAttrParam___closed__3; lean_object* l_mkHashMap___at_Lean_Elab_ElabAttributeExtensionState_inhabited___spec__2(lean_object*); lean_object* l___private_Init_Lean_Elab_Util_5__ElabAttribute_addExtensionEntry___rarg(lean_object*, lean_object*); @@ -157,21 +177,23 @@ lean_object* l_Lean_Elab_ElabFnTable_insert(lean_object*); lean_object* l_AssocList_find___main___at_Lean_Elab_ElabFnTable_insert___spec__8(lean_object*); extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; lean_object* l_Lean_ConstantInfo_type(lean_object*); -lean_object* l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___closed__1; lean_object* l_HashMapImp_moveEntries___main___at_Lean_Elab_ElabFnTable_insert___spec__28___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4(lean_object*); +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_ElabFnTable_insert___spec__3___rarg(lean_object*, size_t, lean_object*); +lean_object* l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_object*, lean_object*); size_t l_USize_land(size_t, size_t); -lean_object* l_mkHashMap___at_Lean_Elab_mkElabAttribute___spec__5(lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_ElabFnTable_insert___spec__3(lean_object*); lean_object* l_Lean_Elab_ElabAttributeExtensionState_inhabited___closed__2; lean_object* l_PersistentHashMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__10(lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_Lean_Elab_ElabFnTable_insert___spec__17___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_expand___at_Lean_Elab_ElabFnTable_insert___spec__27___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___lambda__2___boxed(lean_object*); lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__1___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___closed__2; lean_object* l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___rarg___closed__2; lean_object* l_Lean_Elab_syntaxNodeKindOfAttrParam___closed__1; lean_object* l___private_Init_Lean_Elab_Util_1__ElabAttribute_mkInitial(lean_object*); @@ -180,6 +202,8 @@ lean_object* l_Lean_Elab_syntaxNodeKindOfAttrParam___boxed(lean_object*, lean_ob extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_ElabFnTable_insert___spec__11___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_ElabAttribute_inhabited___closed__3; +lean_object* l_Lean_Elab_macroAttribute; +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_expandMacro___spec__5___boxed(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___spec__2(lean_object*); extern lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__4___closed__2; lean_object* l___private_Init_Lean_Elab_Util_6__ElabAttribute_add___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); @@ -190,14 +214,19 @@ uint8_t l_USize_decLe(size_t, size_t); lean_object* l_HashMapImp_insert___at_Lean_Elab_ElabFnTable_insert___spec__25___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_mkElabAttribute(lean_object*); lean_object* l_AssocList_foldlM___main___at_Lean_Elab_ElabFnTable_insert___spec__18___rarg(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Util_7__expandMacroFns___main(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__2; +lean_object* l_Lean_Syntax_getKind(lean_object*); uint8_t l_Lean_Parser_isValidSyntaxNodeKind(lean_object*, lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4(lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Elab_ElabFnTable_insert___spec__23___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___rarg___closed__1; lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_ElabFnTable_insert___spec__11___rarg(lean_object*, size_t, size_t, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__4; lean_object* l_Lean_SMap_empty___at_Lean_Elab_ElabAttribute_inhabited___spec__1___closed__1; lean_object* l_AssocList_replace___main___at_Lean_Elab_ElabFnTable_insert___spec__30___rarg(lean_object*, lean_object*, lean_object*); +uint8_t l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_ElabAttribute_inhabited(lean_object*); lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__5___rarg___boxed(lean_object*, lean_object*); lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__5(lean_object*); @@ -206,6 +235,7 @@ lean_object* l_Lean_Elab_ElabAttribute_inhabited___closed__1; lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_ElabFnTable_insert___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_ElabAttribute_inhabited___closed__2; lean_object* lean_io_ref_reset(lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkBuiltinMacroFnTable(lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__10___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerEnvExtensionUnsafe___rarg___closed__2; lean_object* l_AssocList_replace___main___at_Lean_Elab_ElabFnTable_insert___spec__19___rarg(lean_object*, lean_object*, lean_object*); @@ -215,18 +245,26 @@ lean_object* l___private_Init_Lean_Elab_Util_1__ElabAttribute_mkInitial___rarg(l lean_object* lean_io_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__9(lean_object*); lean_object* l_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); +lean_object* l_PersistentHashMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__3; +lean_object* l_mkHashMap___at_Lean_Elab_mkElabAttributeAux___spec__5___rarg(lean_object*); +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_expandMacro___spec__3(lean_object*, size_t, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); extern lean_object* l_Lean_registerEnvExtensionUnsafe___rarg___closed__3; +lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__1___rarg(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_macro___elambda__1___closed__1; +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___closed__4; +lean_object* l_Lean_Elab_mkMacroAttribute___closed__4; lean_object* lean_io_initializing(lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2; lean_object* l_Lean_Elab_checkSyntaxNodeKind___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Elab_ElabFnTable_insert___spec__23(lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_ElabFnTable_insert___spec__13(lean_object*); lean_object* l_Lean_SMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__9___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4; lean_object* l_Lean_Elab_checkSyntaxNodeKind(lean_object*, lean_object*); lean_object* l_AssocList_find___main___at_Lean_Elab_ElabFnTable_insert___spec__8___rarg___boxed(lean_object*, lean_object*); lean_object* l_mkHashMap___at_Lean_Elab_ElabAttribute_inhabited___spec__2___rarg(lean_object*); -lean_object* l_PersistentHashMap_empty___at_Lean_Elab_mkElabAttribute___spec__6(lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_ElabFnTable_insert___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_AssocList_contains___main___at_Lean_Elab_ElabFnTable_insert___spec__26(lean_object*); lean_object* l_Lean_Elab_checkSyntaxNodeKindAtNamespaces___main___boxed(lean_object*, lean_object*, lean_object*); @@ -236,27 +274,35 @@ lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__7__ lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_ElabAttributeExtensionState_inhabited(lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1; lean_object* lean_usize_to_nat(size_t); +lean_object* l_Lean_Elab_mkMacroAttribute___closed__2; lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_ElabFnTable_insert___spec__1(lean_object*); +lean_object* l_PersistentHashMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__6(lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_Elab_ElabAttribute_inhabited___spec__1___closed__3; +lean_object* l_Lean_Elab_builtinMacroFnTable; lean_object* l_Lean_SMap_empty___at_Lean_Elab_ElabAttributeExtensionState_inhabited___spec__1___closed__2; +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_expandMacro___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Elab_mkMacroAttribute___closed__1; lean_object* l_IO_ofExcept___at___private_Init_Lean_Elab_Util_6__ElabAttribute_add___spec__1(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_Elab_ElabAttribute_inhabited___spec__1(lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Util_7__expandMacroFns___main___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_ElabFnTable_insert___spec__13___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Util_7__expandMacroFns(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__4; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_ElabFnTable_insert___spec__24(lean_object*); lean_object* l_Lean_Elab_syntaxNodeKindOfAttrParam(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__2; lean_object* l_AssocList_find___main___at_Lean_Elab_ElabFnTable_insert___spec__6(lean_object*); +lean_object* l_Lean_Elab_expandMacro___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_HashMapImp_expand___at_Lean_Elab_ElabFnTable_insert___spec__27(lean_object*); -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_mkElabFnOfConstant___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__1; +lean_object* l_Lean_Elab_expandMacro(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Elab_ElabFnTable_insert___spec__12___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__3; lean_object* l_PersistentHashMap_insert___at_Lean_Elab_ElabFnTable_insert___spec__21___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Elab_ElabFnTable_insert___spec__12(lean_object*); lean_object* _init_l_Lean_Elab_checkSyntaxNodeKind___closed__1() { @@ -3876,7 +3922,7 @@ lean_dec(x_1); return x_10; } } -uint8_t l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +uint8_t l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2___rarg(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; @@ -3915,15 +3961,15 @@ return x_11; } } } -lean_object* l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2(lean_object* x_1) { +lean_object* l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2___rarg___boxed), 5, 0); +x_2 = lean_alloc_closure((void*)(l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2___rarg___boxed), 5, 0); return x_2; } } -lean_object* l_mkHashMap___at_Lean_Elab_mkElabAttribute___spec__5___rarg(lean_object* x_1) { +lean_object* l_mkHashMap___at_Lean_Elab_mkElabAttributeAux___spec__5___rarg(lean_object* x_1) { _start: { lean_object* x_2; @@ -3931,15 +3977,15 @@ x_2 = l_mkHashMapImp___rarg(x_1); return x_2; } } -lean_object* l_mkHashMap___at_Lean_Elab_mkElabAttribute___spec__5(lean_object* x_1) { +lean_object* l_mkHashMap___at_Lean_Elab_mkElabAttributeAux___spec__5(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_mkHashMap___at_Lean_Elab_mkElabAttribute___spec__5___rarg), 1, 0); +x_2 = lean_alloc_closure((void*)(l_mkHashMap___at_Lean_Elab_mkElabAttributeAux___spec__5___rarg), 1, 0); return x_2; } } -lean_object* l_PersistentHashMap_empty___at_Lean_Elab_mkElabAttribute___spec__6(lean_object* x_1) { +lean_object* l_PersistentHashMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__6(lean_object* x_1) { _start: { lean_object* x_2; @@ -3947,7 +3993,7 @@ x_2 = l_Lean_LocalContext_Inhabited___closed__1; return x_2; } } -lean_object* _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__1() { +lean_object* _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -3956,21 +4002,21 @@ x_2 = l_mkHashMapImp___rarg(x_1); return x_2; } } -lean_object* _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__2() { +lean_object* _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__2() { _start: { lean_object* x_1; -x_1 = l_PersistentHashMap_empty___at_Lean_Elab_mkElabAttribute___spec__6(lean_box(0)); +x_1 = l_PersistentHashMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__6(lean_box(0)); return x_1; } } -lean_object* _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__3() { +lean_object* _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__3() { _start: { uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = 1; -x_2 = l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__1; -x_3 = l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__2; +x_2 = l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__1; +x_3 = l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__2; x_4 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_4, 0, x_2); lean_ctor_set(x_4, 1, x_3); @@ -3978,47 +4024,47 @@ lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1); return x_4; } } -lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4(lean_object* x_1) { +lean_object* l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__3; +x_2 = l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__3; return x_2; } } -lean_object* _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__1() { +lean_object* _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__1() { _start: { lean_object* x_1; -x_1 = l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4(lean_box(0)); +x_1 = l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4(lean_box(0)); return x_1; } } -lean_object* _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__2() { +lean_object* _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__1; +x_2 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__1; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__3() { +lean_object* _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Array_empty___closed__1; -x_2 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__2; +x_2 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__2; x_3 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); return x_3; } } -lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; @@ -4076,7 +4122,7 @@ lean_inc(x_16); lean_dec(x_14); x_17 = lean_array_get_size(x_15); lean_dec(x_15); -x_18 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__3; +x_18 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__3; x_19 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_1); @@ -4249,15 +4295,15 @@ return x_52; } } } -lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3(lean_object* x_1) { +lean_object* l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg), 2, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg), 2, 0); return x_2; } } -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__1___rarg(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__1___rarg(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; @@ -4274,7 +4320,7 @@ x_6 = lean_ctor_get(x_4, 0); x_7 = lean_ctor_get(x_4, 1); x_8 = lean_array_get_size(x_6); x_9 = lean_unsigned_to_nat(0u); -x_10 = l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2___rarg(x_1, x_6, x_6, x_8, x_9); +x_10 = l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2___rarg(x_1, x_6, x_6, x_8, x_9); lean_dec(x_8); lean_dec(x_6); if (x_10 == 0) @@ -4298,7 +4344,7 @@ x_17 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; x_18 = lean_alloc_closure((void*)(l_EStateM_bind___rarg), 3, 2); lean_closure_set(x_18, 0, x_12); lean_closure_set(x_18, 1, x_17); -x_19 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg(x_18, x_7); +x_19 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg(x_18, x_7); if (lean_obj_tag(x_19) == 0) { lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; @@ -4490,7 +4536,7 @@ lean_inc(x_60); lean_dec(x_4); x_62 = lean_array_get_size(x_60); x_63 = lean_unsigned_to_nat(0u); -x_64 = l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2___rarg(x_1, x_60, x_60, x_62, x_63); +x_64 = l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2___rarg(x_1, x_60, x_60, x_62, x_63); lean_dec(x_62); lean_dec(x_60); if (x_64 == 0) @@ -4513,7 +4559,7 @@ x_71 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; x_72 = lean_alloc_closure((void*)(l_EStateM_bind___rarg), 3, 2); lean_closure_set(x_72, 0, x_66); lean_closure_set(x_72, 1, x_71); -x_73 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg(x_72, x_61); +x_73 = l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg(x_72, x_61); if (lean_obj_tag(x_73) == 0) { lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; @@ -4728,15 +4774,15 @@ return x_117; } } } -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__1(lean_object* x_1) { +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__1___rarg), 2, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__1___rarg), 2, 0); return x_2; } } -lean_object* l_Lean_Elab_mkElabAttribute___rarg___lambda__1(lean_object* x_1) { +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___lambda__1(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; @@ -4751,7 +4797,7 @@ x_6 = l_List_toArrayAux___main___rarg(x_3, x_5); return x_6; } } -lean_object* l_Lean_Elab_mkElabAttribute___rarg___lambda__2(lean_object* x_1) { +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___lambda__2(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; lean_object* x_9; @@ -4770,7 +4816,7 @@ lean_ctor_set_uint8(x_9, sizeof(void*)*2, x_7); return x_9; } } -lean_object* _init_l_Lean_Elab_mkElabAttribute___rarg___closed__1() { +lean_object* _init_l_Lean_Elab_mkElabAttributeAux___rarg___closed__1() { _start: { lean_object* x_1; @@ -4778,23 +4824,23 @@ x_1 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Util_5__ElabAttribut return x_1; } } -lean_object* _init_l_Lean_Elab_mkElabAttribute___rarg___closed__2() { +lean_object* _init_l_Lean_Elab_mkElabAttributeAux___rarg___closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_mkElabAttribute___rarg___lambda__1), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_mkElabAttributeAux___rarg___lambda__1), 1, 0); return x_1; } } -lean_object* _init_l_Lean_Elab_mkElabAttribute___rarg___closed__3() { +lean_object* _init_l_Lean_Elab_mkElabAttributeAux___rarg___closed__3() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_mkElabAttribute___rarg___lambda__2___boxed), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_mkElabAttributeAux___rarg___lambda__2___boxed), 1, 0); return x_1; } } -lean_object* _init_l_Lean_Elab_mkElabAttribute___rarg___closed__4() { +lean_object* _init_l_Lean_Elab_mkElabAttributeAux___rarg___closed__4() { _start: { lean_object* x_1; @@ -4802,137 +4848,188 @@ x_1 = lean_mk_string(" elaborator"); return x_1; } } -lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -lean_inc(x_5); -x_7 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Util_1__ElabAttribute_mkInitial___rarg___boxed), 2, 1); -lean_closure_set(x_7, 0, x_5); +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_inc(x_6); +x_8 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Util_1__ElabAttribute_mkInitial___rarg___boxed), 2, 1); +lean_closure_set(x_8, 0, x_6); lean_inc(x_3); -x_8 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___rarg___boxed), 5, 2); -lean_closure_set(x_8, 0, x_3); -lean_closure_set(x_8, 1, x_5); -x_9 = l_Lean_Elab_mkElabAttribute___rarg___closed__1; -x_10 = l_Lean_Elab_mkElabAttribute___rarg___closed__2; -x_11 = l_Lean_Elab_mkElabAttribute___rarg___closed__3; +x_9 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Util_4__ElabAttribute_addImportedParsers___rarg___boxed), 5, 2); +lean_closure_set(x_9, 0, x_3); +lean_closure_set(x_9, 1, x_6); +x_10 = l_Lean_Elab_mkElabAttributeAux___rarg___closed__1; +x_11 = l_Lean_Elab_mkElabAttributeAux___rarg___closed__2; +x_12 = l_Lean_Elab_mkElabAttributeAux___rarg___closed__3; lean_inc(x_1); -x_12 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_12, 0, x_1); -lean_ctor_set(x_12, 1, x_7); -lean_ctor_set(x_12, 2, x_8); -lean_ctor_set(x_12, 3, x_9); -lean_ctor_set(x_12, 4, x_10); -lean_ctor_set(x_12, 5, x_11); -x_13 = l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__1___rarg(x_12, x_6); -if (lean_obj_tag(x_13) == 0) +x_13 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_13, 0, x_1); +lean_ctor_set(x_13, 1, x_8); +lean_ctor_set(x_13, 2, x_9); +lean_ctor_set(x_13, 3, x_10); +lean_ctor_set(x_13, 4, x_11); +lean_ctor_set(x_13, 5, x_12); +x_14 = l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__1___rarg(x_13, x_7); +if (lean_obj_tag(x_14) == 0) { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; lean_object* x_21; -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_13, 1); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; +x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); -lean_dec(x_13); -x_16 = l_Lean_Elab_mkElabAttribute___rarg___closed__4; -lean_inc(x_4); -x_17 = lean_string_append(x_4, x_16); -lean_inc(x_14); -x_18 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Util_6__ElabAttribute_add___rarg___boxed), 8, 3); -lean_closure_set(x_18, 0, x_2); -lean_closure_set(x_18, 1, x_3); -lean_closure_set(x_18, 2, x_14); -x_19 = 1; -x_20 = lean_alloc_ctor(0, 3, 1); -lean_ctor_set(x_20, 0, x_1); -lean_ctor_set(x_20, 1, x_17); -lean_ctor_set(x_20, 2, x_18); -lean_ctor_set_uint8(x_20, sizeof(void*)*3, x_19); -lean_inc(x_20); -x_21 = l_Lean_registerBuiltinAttribute(x_20, x_15); -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; -x_23 = lean_ctor_get(x_21, 0); -lean_dec(x_23); -x_24 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_24, 0, x_20); -lean_ctor_set(x_24, 1, x_14); -lean_ctor_set(x_24, 2, x_4); -lean_ctor_set(x_21, 0, x_24); -return x_21; -} -else -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_25 = lean_ctor_get(x_21, 1); -lean_inc(x_25); -lean_dec(x_21); -x_26 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_26, 0, x_20); -lean_ctor_set(x_26, 1, x_14); -lean_ctor_set(x_26, 2, x_4); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_25); -return x_27; -} -} -else -{ -uint8_t x_28; -lean_dec(x_20); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); lean_dec(x_14); -lean_dec(x_4); -x_28 = !lean_is_exclusive(x_21); -if (x_28 == 0) +x_17 = l_Lean_Elab_mkElabAttributeAux___rarg___closed__4; +lean_inc(x_5); +x_18 = lean_string_append(x_5, x_17); +lean_inc(x_15); +x_19 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Util_6__ElabAttribute_add___rarg___boxed), 8, 3); +lean_closure_set(x_19, 0, x_2); +lean_closure_set(x_19, 1, x_3); +lean_closure_set(x_19, 2, x_15); +x_20 = 1; +x_21 = lean_alloc_ctor(0, 3, 1); +lean_ctor_set(x_21, 0, x_1); +lean_ctor_set(x_21, 1, x_18); +lean_ctor_set(x_21, 2, x_19); +lean_ctor_set_uint8(x_21, sizeof(void*)*3, x_20); +lean_inc(x_21); +x_22 = l_Lean_registerBuiltinAttribute(x_21, x_16); +if (lean_obj_tag(x_22) == 0) { -return x_21; +uint8_t x_23; +x_23 = !lean_is_exclusive(x_22); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; +x_24 = lean_ctor_get(x_22, 0); +lean_dec(x_24); +x_25 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_25, 0, x_21); +lean_ctor_set(x_25, 1, x_15); +lean_ctor_set(x_25, 2, x_5); +lean_ctor_set(x_22, 0, x_25); +return x_22; } else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = lean_ctor_get(x_21, 0); -x_30 = lean_ctor_get(x_21, 1); -lean_inc(x_30); -lean_inc(x_29); +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_22, 1); +lean_inc(x_26); +lean_dec(x_22); +x_27 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_27, 0, x_21); +lean_ctor_set(x_27, 1, x_15); +lean_ctor_set(x_27, 2, x_5); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_26); +return x_28; +} +} +else +{ +uint8_t x_29; lean_dec(x_21); -x_31 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -return x_31; +lean_dec(x_15); +lean_dec(x_5); +x_29 = !lean_is_exclusive(x_22); +if (x_29 == 0) +{ +return x_22; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_30 = lean_ctor_get(x_22, 0); +x_31 = lean_ctor_get(x_22, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_22); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_30); +lean_ctor_set(x_32, 1, x_31); +return x_32; } } } else { -uint8_t x_32; +uint8_t x_33; +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_33 = !lean_is_exclusive(x_14); +if (x_33 == 0) +{ +return x_14; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_14, 0); +x_35 = lean_ctor_get(x_14, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_14); +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; +} +} +} +} +lean_object* l_Lean_Elab_mkElabAttributeAux(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_mkElabAttributeAux___rarg___boxed), 7, 0); +return x_2; +} +} +lean_object* l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2___rarg___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 = l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttributeAux___spec__2___rarg(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_32 = !lean_is_exclusive(x_13); -if (x_32 == 0) +x_7 = lean_box(x_6); +return x_7; +} +} +lean_object* l_Lean_Elab_mkElabAttributeAux___rarg___lambda__2___boxed(lean_object* x_1) { +_start: { -return x_13; +lean_object* x_2; +x_2 = l_Lean_Elab_mkElabAttributeAux___rarg___lambda__2(x_1); +lean_dec(x_1); +return x_2; } -else +} +lean_object* l_Lean_Elab_mkElabAttributeAux___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) { +_start: { -lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_33 = lean_ctor_get(x_13, 0); -x_34 = lean_ctor_get(x_13, 1); -lean_inc(x_34); -lean_inc(x_33); -lean_dec(x_13); -x_35 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_35, 0, x_33); -lean_ctor_set(x_35, 1, x_34); -return x_35; +lean_object* x_8; +x_8 = l_Lean_Elab_mkElabAttributeAux___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +lean_dec(x_4); +return x_8; } } +lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = l_Lean_Elab_mkElabAttributeAux___rarg___closed__4; +lean_inc(x_4); +x_8 = lean_string_append(x_4, x_7); +x_9 = l_Lean_Elab_mkElabAttributeAux___rarg(x_1, x_2, x_3, x_8, x_4, x_5, x_6); +lean_dec(x_8); +return x_9; } } lean_object* l_Lean_Elab_mkElabAttribute(lean_object* x_1) { @@ -4943,29 +5040,603 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Elab_mkElabAttribute___rarg), 6, 0); return x_2; } } -lean_object* l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2___rarg___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 = l_Array_anyRangeMAux___main___at_Lean_Elab_mkElabAttribute___spec__2___rarg(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_7 = lean_box(x_6); -return x_7; -} -} -lean_object* l_Lean_Elab_mkElabAttribute___rarg___lambda__2___boxed(lean_object* x_1) { +lean_object* l_mkHashMap___at_Lean_Elab_mkBuiltinMacroFnTable___spec__2(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_Lean_Elab_mkElabAttribute___rarg___lambda__2(x_1); -lean_dec(x_1); +x_2 = l_mkHashMapImp___rarg(x_1); return x_2; } } -lean_object* _init_l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1() { +lean_object* _init_l_PersistentHashMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__3() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_LocalContext_Inhabited___closed__1; +return x_1; +} +} +lean_object* _init_l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___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_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__2() { +_start: +{ +uint8_t x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = 1; +x_2 = l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__1; +x_3 = l_PersistentHashMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__3; +x_4 = lean_alloc_ctor(0, 2, 1); +lean_ctor_set(x_4, 0, x_2); +lean_ctor_set(x_4, 1, x_3); +lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1); +return x_4; +} +} +lean_object* _init_l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__2; +return x_1; +} +} +lean_object* l_Lean_Elab_mkBuiltinMacroFnTable(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1; +x_3 = lean_io_mk_ref(x_2, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_mkMacroAttribute___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Parser_Command_macro___elambda__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_mkMacroAttribute___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("Macro"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_mkMacroAttribute___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_nameToExprAux___main___closed__4; +x_2 = l_Lean_Elab_mkMacroAttribute___closed__2; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_mkMacroAttribute___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("macros"); +return x_1; +} +} +lean_object* l_Lean_Elab_mkMacroAttribute(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; +x_2 = l_Lean_Elab_mkMacroAttribute___closed__1; +x_3 = lean_box(0); +x_4 = l_Lean_Elab_mkMacroAttribute___closed__3; +x_5 = l_Lean_Elab_mkMacroAttribute___closed__4; +x_6 = l_Lean_Parser_Command_macro___elambda__1___closed__1; +x_7 = l_Lean_Elab_builtinMacroFnTable; +x_8 = l_Lean_Elab_mkElabAttributeAux___rarg(x_2, x_3, x_4, x_5, x_6, x_7, x_1); +return x_8; +} +} +lean_object* _init_l_Lean_Elab_macroAttribute___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_macroAttribute___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_macroAttribute___closed__1; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_macroAttribute___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_Lean_EnvExtension_Inhabited___rarg___closed__1; +x_3 = l_Lean_Elab_macroAttribute___closed__2; +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_Elab_macroAttribute___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_1 = l_Lean_Elab_macroAttribute___closed__3; +x_2 = lean_box(0); +x_3 = l_Lean_PersistentEnvExtension_inhabited___rarg___closed__1; +x_4 = l_Lean_PersistentEnvExtension_inhabited___rarg___closed__2; +x_5 = l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; +x_6 = l_Lean_PersistentEnvExtension_inhabited___rarg___closed__4; +x_7 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_7, 0, x_1); +lean_ctor_set(x_7, 1, x_2); +lean_ctor_set(x_7, 2, x_3); +lean_ctor_set(x_7, 3, x_4); +lean_ctor_set(x_7, 4, x_5); +lean_ctor_set(x_7, 5, x_6); +return x_7; +} +} +lean_object* _init_l_Lean_Elab_macroAttribute___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_AttributeImpl_inhabited___closed__2; +x_2 = l_Lean_Elab_macroAttribute___closed__4; +x_3 = l_String_splitAux___main___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_OptionT_catch___at___private_Init_Lean_Elab_Util_7__expandMacroFns___main___spec__1___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_box(0); +x_4 = lean_apply_1(x_2, x_3); +return x_4; +} +else +{ +uint8_t x_5; +lean_dec(x_2); +x_5 = !lean_is_exclusive(x_1); +if (x_5 == 0) +{ +return x_1; +} +else +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_7, 0, x_6); +return x_7; +} +} +} +} +lean_object* l_OptionT_catch___at___private_Init_Lean_Elab_Util_7__expandMacroFns___main___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_OptionT_catch___at___private_Init_Lean_Elab_Util_7__expandMacroFns___main___spec__1___rarg), 2, 0); +return x_2; +} +} +lean_object* l___private_Init_Lean_Elab_Util_7__expandMacroFns___main___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Elab_Util_7__expandMacroFns___main(x_1, x_2, x_3); +return x_5; +} +} +lean_object* l___private_Init_Lean_Elab_Util_7__expandMacroFns___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_4; +lean_dec(x_3); +lean_dec(x_1); +x_4 = lean_box(0); +return x_4; +} +else +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_5 = lean_ctor_get(x_2, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_6); +lean_dec(x_2); +lean_inc(x_3); +lean_inc(x_1); +x_7 = lean_apply_2(x_5, x_1, x_3); +x_8 = lean_alloc_closure((void*)(l___private_Init_Lean_Elab_Util_7__expandMacroFns___main___lambda__1___boxed), 4, 3); +lean_closure_set(x_8, 0, x_1); +lean_closure_set(x_8, 1, x_6); +lean_closure_set(x_8, 2, x_3); +x_9 = l_OptionT_catch___at___private_Init_Lean_Elab_Util_7__expandMacroFns___main___spec__1___rarg(x_7, x_8); +return x_9; +} +} +} +lean_object* l___private_Init_Lean_Elab_Util_7__expandMacroFns___main___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Elab_Util_7__expandMacroFns___main___lambda__1(x_1, x_2, x_3, x_4); +lean_dec(x_4); +return x_5; +} +} +lean_object* l___private_Init_Lean_Elab_Util_7__expandMacroFns(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Init_Lean_Elab_Util_7__expandMacroFns___main(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_expandMacro___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; +x_6 = lean_array_get_size(x_1); +x_7 = lean_nat_dec_lt(x_4, x_6); +lean_dec(x_6); +if (x_7 == 0) +{ +lean_object* x_8; +lean_dec(x_4); +x_8 = lean_box(0); +return x_8; +} +else +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_array_fget(x_1, x_4); +x_10 = lean_name_eq(x_5, x_9); +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_4, x_11); +lean_dec(x_4); +x_3 = lean_box(0); +x_4 = x_12; +goto _start; +} +else +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_array_fget(x_2, x_4); +lean_dec(x_4); +x_15 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_15, 0, x_14); +return x_15; +} +} +} +} +lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_expandMacro___spec__3(lean_object* x_1, size_t x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; size_t x_5; size_t x_6; size_t 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); +lean_dec(x_1); +x_5 = 5; +x_6 = l_PersistentHashMap_insertAux___main___rarg___closed__2; +x_7 = x_2 & x_6; +x_8 = lean_usize_to_nat(x_7); +x_9 = lean_box(2); +x_10 = lean_array_get(x_9, x_4, x_8); +lean_dec(x_8); +lean_dec(x_4); +switch (lean_obj_tag(x_10)) { +case 0: +{ +lean_object* x_11; lean_object* x_12; uint8_t 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 = lean_name_eq(x_3, x_11); +lean_dec(x_11); +if (x_13 == 0) +{ +lean_object* x_14; +lean_dec(x_12); +x_14 = lean_box(0); +return x_14; +} +else +{ +lean_object* x_15; +x_15 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_15, 0, x_12); +return x_15; +} +} +case 1: +{ +lean_object* x_16; size_t x_17; +x_16 = lean_ctor_get(x_10, 0); +lean_inc(x_16); +lean_dec(x_10); +x_17 = x_2 >> x_5; +x_1 = x_16; +x_2 = x_17; +goto _start; +} +default: +{ +lean_object* x_19; +x_19 = lean_box(0); +return x_19; +} +} +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +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_22 = lean_unsigned_to_nat(0u); +x_23 = l_PersistentHashMap_findAtAux___main___at_Lean_Elab_expandMacro___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_expandMacro___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; size_t x_4; lean_object* x_5; +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_expandMacro___spec__3(x_3, x_4, x_2); +return x_5; +} +} +lean_object* l_AssocList_find___main___at_Lean_Elab_expandMacro___spec__6(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_3; +x_3 = lean_box(0); +return x_3; +} +else +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_ctor_get(x_2, 2); +x_7 = lean_name_eq(x_4, x_1); +if (x_7 == 0) +{ +x_2 = x_6; +goto _start; +} +else +{ +lean_object* x_9; +lean_inc(x_5); +x_9 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_9, 0, x_5); +return x_9; +} +} +} +} +lean_object* l_HashMapImp_find_x3f___at_Lean_Elab_expandMacro___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; +x_3 = lean_ctor_get(x_1, 1); +x_4 = lean_array_get_size(x_3); +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_expandMacro___spec__6(x_2, x_7); +lean_dec(x_7); +return x_8; +} +} +lean_object* l_Lean_SMap_find_x3f___at_Lean_Elab_expandMacro___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_1, 0); +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_expandMacro___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_expandMacro___spec__5(x_4, x_2); +lean_dec(x_4); +return x_7; +} +else +{ +lean_dec(x_4); +return x_6; +} +} +else +{ +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_expandMacro___spec__5(x_8, x_2); +lean_dec(x_8); +return x_9; +} +} +} +lean_object* l_Lean_Elab_expandMacro(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_inc(x_2); +x_4 = l_Lean_Syntax_getKind(x_2); +x_5 = l_Lean_Elab_macroAttribute; +x_6 = lean_ctor_get(x_5, 1); +lean_inc(x_6); +x_7 = l_Lean_PersistentEnvExtension_getState___rarg(x_6, x_1); +lean_dec(x_6); +x_8 = lean_ctor_get(x_7, 1); +lean_inc(x_8); +lean_dec(x_7); +x_9 = l_Lean_SMap_find_x3f___at_Lean_Elab_expandMacro___spec__1(x_8, x_4); +lean_dec(x_4); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; +lean_dec(x_3); +lean_dec(x_2); +x_10 = lean_box(0); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_9, 0); +lean_inc(x_11); +lean_dec(x_9); +x_12 = l___private_Init_Lean_Elab_Util_7__expandMacroFns___main(x_2, x_11, x_3); +return x_12; +} +} +} +lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_expandMacro___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_expandMacro___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_expandMacro___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_expandMacro___spec__3(x_1, x_4, x_3); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_expandMacro___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_expandMacro___spec__2(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_AssocList_find___main___at_Lean_Elab_expandMacro___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_expandMacro___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_expandMacro___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_expandMacro___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_expandMacro___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_expandMacro___spec__1(x_1, x_2); +lean_dec(x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_expandMacro___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_expandMacro(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* _init_l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1() { _start: { lean_object* x_1; @@ -4973,17 +5644,17 @@ x_1 = lean_mk_string("Elab"); return x_1; } } -lean_object* _init_l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2() { +lean_object* _init_l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = lean_box(0); -x_2 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1; +x_2 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__3() { +lean_object* _init_l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__3() { _start: { lean_object* x_1; @@ -4991,21 +5662,21 @@ x_1 = lean_mk_string("step"); return x_1; } } -lean_object* _init_l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4() { +lean_object* _init_l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; -x_2 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__3; +x_1 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; +x_2 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__3; x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses(lean_object* x_1) { +lean_object* l___private_Init_Lean_Elab_Util_8__regTraceClasses(lean_object* x_1) { _start: { lean_object* x_2; lean_object* x_3; -x_2 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2; +x_2 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2; x_3 = l_Lean_registerTraceClass(x_2, x_1); if (lean_obj_tag(x_3) == 0) { @@ -5013,7 +5684,7 @@ lean_object* x_4; lean_object* x_5; lean_object* x_6; x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_dec(x_3); -x_5 = l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4; +x_5 = l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4; x_6 = l_Lean_registerTraceClass(x_5, x_4); return x_6; } @@ -5098,35 +5769,71 @@ l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___rarg___closed__2 = lean_mark_persistent(l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___rarg___closed__2); l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___rarg___closed__3 = _init_l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___rarg___closed__3(); lean_mark_persistent(l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___rarg___closed__3); -l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__1 = _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__1(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__1); -l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__2 = _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__2(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__2); -l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__3 = _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__3(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Elab_mkElabAttribute___spec__4___closed__3); -l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__1 = _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__1(); -lean_mark_persistent(l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__1); -l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__2 = _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__2(); -lean_mark_persistent(l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__2); -l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__3 = _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__3(); -lean_mark_persistent(l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttribute___spec__3___rarg___closed__3); -l_Lean_Elab_mkElabAttribute___rarg___closed__1 = _init_l_Lean_Elab_mkElabAttribute___rarg___closed__1(); -lean_mark_persistent(l_Lean_Elab_mkElabAttribute___rarg___closed__1); -l_Lean_Elab_mkElabAttribute___rarg___closed__2 = _init_l_Lean_Elab_mkElabAttribute___rarg___closed__2(); -lean_mark_persistent(l_Lean_Elab_mkElabAttribute___rarg___closed__2); -l_Lean_Elab_mkElabAttribute___rarg___closed__3 = _init_l_Lean_Elab_mkElabAttribute___rarg___closed__3(); -lean_mark_persistent(l_Lean_Elab_mkElabAttribute___rarg___closed__3); -l_Lean_Elab_mkElabAttribute___rarg___closed__4 = _init_l_Lean_Elab_mkElabAttribute___rarg___closed__4(); -lean_mark_persistent(l_Lean_Elab_mkElabAttribute___rarg___closed__4); -l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1 = _init_l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1(); -lean_mark_persistent(l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1); -l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2 = _init_l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2(); -lean_mark_persistent(l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__2); -l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__3 = _init_l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__3(); -lean_mark_persistent(l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__3); -l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4 = _init_l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4(); -lean_mark_persistent(l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__4); -res = l___private_Init_Lean_Elab_Util_7__regTraceClasses(lean_io_mk_world()); +l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__1 = _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__1(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__1); +l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__2 = _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__2(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__2); +l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__3 = _init_l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__3(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Elab_mkElabAttributeAux___spec__4___closed__3); +l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__1 = _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__1(); +lean_mark_persistent(l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__1); +l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__2 = _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__2(); +lean_mark_persistent(l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__2); +l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__3 = _init_l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__3(); +lean_mark_persistent(l_Lean_registerEnvExtensionUnsafe___at_Lean_Elab_mkElabAttributeAux___spec__3___rarg___closed__3); +l_Lean_Elab_mkElabAttributeAux___rarg___closed__1 = _init_l_Lean_Elab_mkElabAttributeAux___rarg___closed__1(); +lean_mark_persistent(l_Lean_Elab_mkElabAttributeAux___rarg___closed__1); +l_Lean_Elab_mkElabAttributeAux___rarg___closed__2 = _init_l_Lean_Elab_mkElabAttributeAux___rarg___closed__2(); +lean_mark_persistent(l_Lean_Elab_mkElabAttributeAux___rarg___closed__2); +l_Lean_Elab_mkElabAttributeAux___rarg___closed__3 = _init_l_Lean_Elab_mkElabAttributeAux___rarg___closed__3(); +lean_mark_persistent(l_Lean_Elab_mkElabAttributeAux___rarg___closed__3); +l_Lean_Elab_mkElabAttributeAux___rarg___closed__4 = _init_l_Lean_Elab_mkElabAttributeAux___rarg___closed__4(); +lean_mark_persistent(l_Lean_Elab_mkElabAttributeAux___rarg___closed__4); +l_PersistentHashMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__3 = _init_l_PersistentHashMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__3(); +lean_mark_persistent(l_PersistentHashMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__3); +l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__1 = _init_l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__1(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__1); +l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__2 = _init_l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__2(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1___closed__2); +l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1 = _init_l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_Elab_mkBuiltinMacroFnTable___spec__1); +res = l_Lean_Elab_mkBuiltinMacroFnTable(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +l_Lean_Elab_builtinMacroFnTable = lean_io_result_get_value(res); +lean_mark_persistent(l_Lean_Elab_builtinMacroFnTable); +lean_dec_ref(res); +l_Lean_Elab_mkMacroAttribute___closed__1 = _init_l_Lean_Elab_mkMacroAttribute___closed__1(); +lean_mark_persistent(l_Lean_Elab_mkMacroAttribute___closed__1); +l_Lean_Elab_mkMacroAttribute___closed__2 = _init_l_Lean_Elab_mkMacroAttribute___closed__2(); +lean_mark_persistent(l_Lean_Elab_mkMacroAttribute___closed__2); +l_Lean_Elab_mkMacroAttribute___closed__3 = _init_l_Lean_Elab_mkMacroAttribute___closed__3(); +lean_mark_persistent(l_Lean_Elab_mkMacroAttribute___closed__3); +l_Lean_Elab_mkMacroAttribute___closed__4 = _init_l_Lean_Elab_mkMacroAttribute___closed__4(); +lean_mark_persistent(l_Lean_Elab_mkMacroAttribute___closed__4); +l_Lean_Elab_macroAttribute___closed__1 = _init_l_Lean_Elab_macroAttribute___closed__1(); +lean_mark_persistent(l_Lean_Elab_macroAttribute___closed__1); +l_Lean_Elab_macroAttribute___closed__2 = _init_l_Lean_Elab_macroAttribute___closed__2(); +lean_mark_persistent(l_Lean_Elab_macroAttribute___closed__2); +l_Lean_Elab_macroAttribute___closed__3 = _init_l_Lean_Elab_macroAttribute___closed__3(); +lean_mark_persistent(l_Lean_Elab_macroAttribute___closed__3); +l_Lean_Elab_macroAttribute___closed__4 = _init_l_Lean_Elab_macroAttribute___closed__4(); +lean_mark_persistent(l_Lean_Elab_macroAttribute___closed__4); +l_Lean_Elab_macroAttribute___closed__5 = _init_l_Lean_Elab_macroAttribute___closed__5(); +lean_mark_persistent(l_Lean_Elab_macroAttribute___closed__5); +res = l_Lean_Elab_mkMacroAttribute(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +l_Lean_Elab_macroAttribute = lean_io_result_get_value(res); +lean_mark_persistent(l_Lean_Elab_macroAttribute); +lean_dec_ref(res); +l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1 = _init_l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1(); +lean_mark_persistent(l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__1); +l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2 = _init_l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2(); +lean_mark_persistent(l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__2); +l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__3 = _init_l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__3(); +lean_mark_persistent(l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__3); +l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4 = _init_l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4(); +lean_mark_persistent(l___private_Init_Lean_Elab_Util_8__regTraceClasses___closed__4); +res = l___private_Init_Lean_Elab_Util_8__regTraceClasses(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); return lean_mk_io_result(lean_box(0)); diff --git a/stage0/stdlib/Init/Lean/Hygiene.c b/stage0/stdlib/Init/Lean/Hygiene.c index 3ae30dbb6e..1768111039 100644 --- a/stage0/stdlib/Init/Lean/Hygiene.c +++ b/stage0/stdlib/Init/Lean/Hygiene.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean.Hygiene -// Imports: Init.Control Init.Lean.Syntax +// Imports: Init.Control Init.LeanInit Init.Lean.Syntax #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -27,99 +27,11 @@ lean_object* l_Lean_monadQuotationTrans(lean_object*, lean_object*); lean_object* l_ReaderT_read___at_Lean_Unhygienic_MonadQuotation___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Unhygienic_MonadQuotation___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_monadQuotationTrans___boxed(lean_object*, lean_object*); -lean_object* l_Lean_addMacroScope(lean_object*, lean_object*); lean_object* l_Lean_Unhygienic_MonadQuotation; lean_object* l_Lean_Unhygienic_MonadQuotation___closed__1; lean_object* l_Lean_monadQuotationTrans___rarg___lambda__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_addMacroScopes(lean_object*, lean_object*); lean_object* l_Lean_Unhygienic_MonadQuotation___closed__2; lean_object* l___private_Init_Lean_Hygiene_1__extractMacroScopesAux___main(lean_object*, lean_object*); -lean_object* l_List_foldl___main___at_Lean_addMacroScopes___spec__1(lean_object*, lean_object*); -lean_object* lean_name_mk_numeral(lean_object*, lean_object*); -lean_object* l_Lean_addMacroScope(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = lean_name_mk_numeral(x_1, x_2); -return x_3; -} -} -lean_object* l_List_foldl___main___at_Lean_addMacroScopes___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -return x_1; -} -else -{ -lean_object* x_3; lean_object* x_4; lean_object* 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_5 = lean_name_mk_numeral(x_1, x_3); -x_1 = x_5; -x_2 = x_4; -goto _start; -} -} -} -lean_object* l_Lean_addMacroScopes(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_List_foldl___main___at_Lean_addMacroScopes___spec__1(x_1, x_2); -return x_3; -} -} -lean_object* l___private_Init_Lean_Hygiene_1__extractMacroScopesAux___main(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_1) == 2) -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; -x_3 = lean_ctor_get(x_1, 0); -lean_inc(x_3); -x_4 = lean_ctor_get(x_1, 1); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_5, 0, x_4); -lean_ctor_set(x_5, 1, x_2); -x_1 = x_3; -x_2 = x_5; -goto _start; -} -else -{ -lean_object* x_7; lean_object* x_8; -x_7 = l_List_reverse___rarg(x_2); -x_8 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_8, 0, x_1); -lean_ctor_set(x_8, 1, x_7); -return x_8; -} -} -} -lean_object* l___private_Init_Lean_Hygiene_1__extractMacroScopesAux(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l___private_Init_Lean_Hygiene_1__extractMacroScopesAux___main(x_1, x_2); -return x_3; -} -} -lean_object* l_Lean_extractMacroScopes(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = lean_box(0); -x_3 = l___private_Init_Lean_Hygiene_1__extractMacroScopesAux___main(x_1, x_2); -return x_3; -} -} lean_object* l_ReaderT_read___at_Lean_Unhygienic_MonadQuotation___spec__1(lean_object* x_1, lean_object* x_2) { _start: { @@ -206,6 +118,52 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Unhygienic_run___rarg), 1, 0); return x_2; } } +lean_object* l___private_Init_Lean_Hygiene_1__extractMacroScopesAux___main(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 2) +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_5, 0, x_4); +lean_ctor_set(x_5, 1, x_2); +x_1 = x_3; +x_2 = x_5; +goto _start; +} +else +{ +lean_object* x_7; lean_object* x_8; +x_7 = l_List_reverse___rarg(x_2); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_1); +lean_ctor_set(x_8, 1, x_7); +return x_8; +} +} +} +lean_object* l___private_Init_Lean_Hygiene_1__extractMacroScopesAux(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l___private_Init_Lean_Hygiene_1__extractMacroScopesAux___main(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_extractMacroScopes(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = lean_box(0); +x_3 = l___private_Init_Lean_Hygiene_1__extractMacroScopesAux___main(x_1, x_2); +return x_3; +} +} lean_object* l_Lean_monadQuotationTrans___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -262,6 +220,7 @@ return x_3; } } lean_object* initialize_Init_Control(lean_object*); +lean_object* initialize_Init_LeanInit(lean_object*); lean_object* initialize_Init_Lean_Syntax(lean_object*); static bool _G_initialized = false; lean_object* initialize_Init_Lean_Hygiene(lean_object* w) { @@ -271,6 +230,9 @@ _G_initialized = true; res = initialize_Init_Control(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_LeanInit(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Init_Lean_Syntax(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); diff --git a/stage0/stdlib/Init/Lean/Parser/Parser.c b/stage0/stdlib/Init/Lean/Parser/Parser.c index 8c35cebad3..8e780c41c1 100644 --- a/stage0/stdlib/Init/Lean/Parser/Parser.c +++ b/stage0/stdlib/Init/Lean/Parser/Parser.c @@ -142,7 +142,6 @@ lean_object* l_Array_extract___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_addParser(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_categoryParserFnRef; lean_object* l_Lean_Parser_optionalFn___boxed(lean_object*); -extern lean_object* l_Lean_stxInh; lean_object* l_Lean_Parser_InputContext_inhabited; lean_object* l_Lean_Parser_parserExtension___elambda__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_Parser_Error_HasToString___closed__1; @@ -752,6 +751,7 @@ lean_object* l_Lean_Parser_checkNoWsBefore___boxed(lean_object*, lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); lean_object* l_PersistentHashMap_containsAux___main___at___private_Init_Lean_Parser_Parser_9__addParserCategoryCore___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Parser_Parser_17__ParserExtension_addImported___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Syntax_inhabited; lean_object* l_Lean_Parser_unquotedSymbolFn(uint8_t, lean_object*); lean_object* l_Lean_Syntax_foldSepRevArgsM___boxed(lean_object*, lean_object*); lean_object* l_String_intercalate(lean_object*, lean_object*); @@ -8966,7 +8966,7 @@ x_2 = lean_array_get_size(x_1); x_3 = lean_unsigned_to_nat(1u); x_4 = lean_nat_sub(x_2, x_3); lean_dec(x_2); -x_5 = l_Lean_stxInh; +x_5 = l_Lean_Syntax_inhabited; x_6 = lean_array_get(x_5, x_1, x_4); lean_dec(x_4); return x_6; @@ -36255,7 +36255,7 @@ return x_10; else { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_11 = l_Lean_stxInh; +x_11 = l_Lean_Syntax_inhabited; x_12 = lean_unsigned_to_nat(0u); x_13 = lean_array_get(x_11, x_3, x_12); x_14 = lean_alloc_ctor(1, 1, 0); diff --git a/stage0/stdlib/Init/Lean/Parser/Term.c b/stage0/stdlib/Init/Lean/Parser/Term.c index b6c8bf426e..adca5dd73f 100644 --- a/stage0/stdlib/Init/Lean/Parser/Term.c +++ b/stage0/stdlib/Init/Lean/Parser/Term.c @@ -238,7 +238,6 @@ lean_object* l_Lean_Parser_sepBy1Fn___at_Lean_Parser_Term_explicitUniv___elambda lean_object* l_Lean_Parser_Term_match___elambda__1___closed__8; lean_object* l_Lean_Parser_Term_explicitUniv___elambda__1___closed__7; lean_object* l_Lean_Parser_Term_show___elambda__1___closed__2; -extern lean_object* l_Lean_stxInh; lean_object* l_Lean_Parser_Term_cdot___elambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Term_andM___closed__2; lean_object* l_Lean_Parser_Term_paren___elambda__1___closed__3; @@ -1291,6 +1290,7 @@ lean_object* l_Lean_Parser_Term_uminus___closed__2; lean_object* l_Lean_Parser_Term_str___elambda__1___closed__2; lean_object* l_Lean_Parser_Term_explicit___elambda__1___closed__3; lean_object* l_Lean_Parser_Term_fromTerm___closed__4; +extern lean_object* l_Lean_Syntax_inhabited; lean_object* l_Lean_Parser_Term_matchAlt___closed__9; lean_object* l_Lean_Parser_Term_arrayLit; lean_object* l_Lean_Parser_Term_mul___closed__2; @@ -36477,7 +36477,7 @@ return x_10; else { 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_11 = l_Lean_stxInh; +x_11 = l_Lean_Syntax_inhabited; x_12 = lean_unsigned_to_nat(0u); x_13 = lean_array_get(x_11, x_3, x_12); x_14 = lean_unsigned_to_nat(1u); @@ -36540,7 +36540,7 @@ return x_10; else { lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; -x_11 = l_Lean_stxInh; +x_11 = l_Lean_Syntax_inhabited; x_12 = lean_unsigned_to_nat(1u); x_13 = lean_array_get(x_11, x_3, x_12); x_14 = l_Lean_Syntax_isNone(x_13); diff --git a/stage0/stdlib/Init/Lean/Parser/Transform.c b/stage0/stdlib/Init/Lean/Parser/Transform.c index 6cff0bc60c..16bd1e8f60 100644 --- a/stage0/stdlib/Init/Lean/Parser/Transform.c +++ b/stage0/stdlib/Init/Lean/Parser/Transform.c @@ -16,7 +16,6 @@ extern "C" { lean_object* lean_array_set(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_declareLeadingBuiltinParser___closed__1; lean_object* l_Array_iterateMAux___main___at_Lean_Syntax_manyToSepBy___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_stxInh; lean_object* l_Lean_Syntax_removeParen___closed__4; uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); @@ -39,6 +38,7 @@ lean_object* l_Lean_Syntax_manyToSepBy(lean_object*, lean_object*); lean_object* l_Array_back___at___private_Init_Lean_Parser_Parser_6__updateCache___spec__1(lean_object*); extern lean_object* l_Array_forMAux___main___at_Lean_Environment_displayStats___spec__9___closed__2; extern lean_object* l_Option_HasRepr___rarg___closed__3; +extern lean_object* l_Lean_Syntax_inhabited; lean_object* l_Lean_Syntax_getNumArgs(lean_object*); lean_object* l_Lean_Syntax_removeParen(lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); @@ -157,7 +157,7 @@ if (x_3 == 0) { 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; x_4 = lean_ctor_get(x_1, 1); -x_5 = l_Lean_stxInh; +x_5 = l_Lean_Syntax_inhabited; x_6 = lean_unsigned_to_nat(0u); x_7 = lean_array_get(x_5, x_4, x_6); x_8 = l_Lean_mkOptionalNode___closed__1; @@ -176,7 +176,7 @@ x_13 = lean_ctor_get(x_1, 1); lean_inc(x_13); lean_inc(x_12); lean_dec(x_1); -x_14 = l_Lean_stxInh; +x_14 = l_Lean_Syntax_inhabited; x_15 = lean_unsigned_to_nat(0u); x_16 = lean_array_get(x_14, x_13, x_15); x_17 = l_Lean_mkOptionalNode___closed__1; @@ -261,7 +261,7 @@ return x_1; else { lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; -x_6 = l_Lean_stxInh; +x_6 = l_Lean_Syntax_inhabited; x_7 = lean_unsigned_to_nat(1u); x_8 = lean_array_get(x_6, x_3, x_7); x_9 = l_Lean_Syntax_getNumArgs(x_8); diff --git a/stage0/stdlib/Init/Lean/Syntax.c b/stage0/stdlib/Init/Lean/Syntax.c index f744ecbd89..a8ab95b67d 100644 --- a/stage0/stdlib/Init/Lean/Syntax.c +++ b/stage0/stdlib/Init/Lean/Syntax.c @@ -47,9 +47,7 @@ lean_object* l_Lean_Syntax_toNat___boxed(lean_object*); lean_object* l___private_Init_Lean_Syntax_5__decodeBinLitAux(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_HasToString; lean_object* l___private_Init_Lean_Syntax_5__decodeBinLitAux___main___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_stxInh; extern lean_object* l_Array_empty___closed__1; -lean_object* l_Lean_Syntax_isOfKind___boxed(lean_object*, lean_object*); lean_object* l_Lean_SyntaxNode_withArgs(lean_object*); lean_object* l___private_Init_Lean_Syntax_5__decodeBinLitAux___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_fieldIdxKind___closed__1; @@ -97,9 +95,7 @@ extern lean_object* l_Lean_Format_sbracket___closed__2; lean_object* l_Lean_SyntaxNode_getKind(lean_object*); lean_object* l_Lean_SyntaxNode_getArgs(lean_object*); lean_object* l_Lean_Syntax_rewriteBottomUp(lean_object*, lean_object*); -lean_object* l_Lean_Syntax_getKind___closed__2; lean_object* l___private_Init_Lean_Syntax_5__decodeBinLitAux___main(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Syntax_getKind___closed__1; lean_object* l___private_Init_Lean_Syntax_11__decodeQuotedChar___boxed__const__3; lean_object* l_Lean_Syntax_formatStxAux___main___closed__8; lean_object* lean_string_utf8_next(lean_object*, lean_object*); @@ -113,7 +109,6 @@ lean_object* l_Lean_Syntax_formatStxAux___main___closed__4; lean_object* l_Array_findRevMAux___main___at_Lean_Syntax_getTailInfo___main___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkStxNumLit(lean_object*, lean_object*); lean_object* l_Lean_SyntaxNode_getIdAt(lean_object*, lean_object*); -lean_object* l_Lean_Syntax_getKind___closed__4; lean_object* l___private_Init_Lean_Syntax_7__decodeHexDigit___boxed(lean_object*, lean_object*); lean_object* l_Lean_Syntax_isCharLit_x3f(lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); @@ -145,7 +140,6 @@ lean_object* l_Lean_strLitKind___closed__1; lean_object* l_Lean_Syntax_isNatLitAux___boxed(lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Syntax_3__updateLast(lean_object*); -lean_object* l_Lean_Syntax_getArgs___boxed(lean_object*); lean_object* l_Lean_Syntax_updateLeading(lean_object*); lean_object* l_Lean_Syntax_formatStxAux___main___closed__3; lean_object* l_Lean_mkNullNode(lean_object*); @@ -217,6 +211,7 @@ lean_object* l_List_map___main___at_Lean_Syntax_formatStxAux___main___spec__3___ lean_object* l_Lean_SyntaxNode_getNumArgs(lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); extern lean_object* l_Lean_Format_paren___closed__1; +extern lean_object* l_Lean_Syntax_inhabited; lean_object* l_List_map___main___at_Lean_Syntax_formatStxAux___main___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getNumArgs(lean_object*); lean_object* l_Lean_Syntax_mrewriteBottomUp___boxed(lean_object*); @@ -229,10 +224,7 @@ uint8_t l_Lean_Syntax_hasArgs(lean_object*); lean_object* l_String_quote(lean_object*); lean_object* l_Lean_Syntax_asNode___closed__1; lean_object* l_Lean_Syntax_HasToString___closed__2; -lean_object* l_Lean_Syntax_getArgs(lean_object*); -lean_object* l_Lean_Syntax_getKind(lean_object*); lean_object* l_Lean_Syntax_mrewriteBottomUp___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Syntax_getArg___boxed(lean_object*, lean_object*); lean_object* l_Lean_SyntaxNode_withArgs___rarg(lean_object*, lean_object*); extern lean_object* l_Lean_Format_sbracket___closed__1; lean_object* l_Lean_Syntax_getHeadInfo___boxed(lean_object*); @@ -261,7 +253,6 @@ lean_object* l_Array_toList___rarg(lean_object*); lean_object* l_Lean_Syntax_mrewriteBottomUp___main___at_Lean_Syntax_rewriteBottomUp___spec__1(lean_object*, lean_object*); lean_object* l_List_map___main___at_Lean_Syntax_formatStxAux___main___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_decodeStrLit(lean_object*); -uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* lean_mk_syntax_list(lean_object*); lean_object* l_Lean_Syntax_getTailInfo___boxed(lean_object*); lean_object* l___private_Init_Lean_Syntax_10__decodeNatLitVal(lean_object*); @@ -269,7 +260,6 @@ lean_object* l___private_Init_Lean_Syntax_11__decodeQuotedChar___boxed__const__5 lean_object* l_Lean_Syntax_mreplace___main___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_length(lean_object*); lean_object* l_Lean_Syntax_mreplace___boxed(lean_object*); -lean_object* l_Lean_Syntax_getKind___closed__3; lean_object* lean_mk_syntax_str_lit(lean_object*); lean_object* l_Lean_mkStxLit(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Syntax_9__decodeDecimalLitAux(lean_object*, lean_object*, lean_object*); @@ -745,14 +735,6 @@ x_1 = l_Lean_fieldIdxKind___closed__2; return x_1; } } -lean_object* _init_l_Lean_stxInh() { -_start: -{ -lean_object* x_1; -x_1 = lean_box(0); -return x_1; -} -} uint8_t l_Lean_Syntax_isMissing(lean_object* x_1) { _start: { @@ -880,7 +862,7 @@ _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; x_3 = lean_ctor_get(x_1, 1); -x_4 = l_Lean_stxInh; +x_4 = l_Lean_Syntax_inhabited; x_5 = lean_array_get(x_4, x_3, x_2); return x_5; } @@ -1200,50 +1182,6 @@ lean_dec(x_1); return x_2; } } -lean_object* l_Lean_Syntax_getArgs(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = l_Lean_Syntax_asNode(x_1); -x_3 = lean_ctor_get(x_2, 1); -lean_inc(x_3); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_Lean_Syntax_getArgs___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_Syntax_getArgs(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_Syntax_getArg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_3 = l_Lean_Syntax_asNode(x_1); -x_4 = lean_ctor_get(x_3, 1); -lean_inc(x_4); -lean_dec(x_3); -x_5 = l_Lean_stxInh; -x_6 = lean_array_get(x_5, x_4, x_2); -lean_dec(x_4); -return x_6; -} -} -lean_object* l_Lean_Syntax_getArg___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_Syntax_getArg(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} lean_object* l_Lean_Syntax_setArgs(lean_object* x_1, lean_object* x_2) { _start: { @@ -1463,80 +1401,6 @@ lean_dec(x_1); return x_3; } } -lean_object* _init_l_Lean_Syntax_getKind___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("missing"); -return x_1; -} -} -lean_object* _init_l_Lean_Syntax_getKind___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Syntax_getKind___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Syntax_getKind___closed__3() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("ident"); -return x_1; -} -} -lean_object* _init_l_Lean_Syntax_getKind___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Syntax_getKind___closed__3; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* l_Lean_Syntax_getKind(lean_object* x_1) { -_start: -{ -switch (lean_obj_tag(x_1)) { -case 0: -{ -lean_object* x_2; -x_2 = l_Lean_Syntax_getKind___closed__2; -return x_2; -} -case 1: -{ -lean_object* x_3; -x_3 = lean_ctor_get(x_1, 0); -lean_inc(x_3); -lean_dec(x_1); -return x_3; -} -case 2: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = lean_ctor_get(x_1, 1); -lean_inc(x_4); -lean_dec(x_1); -x_5 = lean_box(0); -x_6 = lean_name_mk_string(x_5, x_4); -return x_6; -} -default: -{ -lean_object* x_7; -lean_dec(x_1); -x_7 = l_Lean_Syntax_getKind___closed__4; -return x_7; -} -} -} -} lean_object* l_Lean_Syntax_mreplace___main___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -1734,26 +1598,6 @@ lean_dec(x_1); return x_2; } } -uint8_t l_Lean_Syntax_isOfKind(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; uint8_t x_4; -x_3 = l_Lean_Syntax_getKind(x_1); -x_4 = lean_name_eq(x_3, x_2); -lean_dec(x_3); -return x_4; -} -} -lean_object* l_Lean_Syntax_isOfKind___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = l_Lean_Syntax_isOfKind(x_1, x_2); -lean_dec(x_2); -x_4 = lean_box(x_3); -return x_4; -} -} lean_object* l_Lean_Syntax_mrewriteBottomUp___main___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -2645,7 +2489,7 @@ lean_dec(x_10); x_11 = lean_unsigned_to_nat(1u); x_12 = lean_nat_sub(x_5, x_11); lean_dec(x_5); -x_13 = l_Lean_stxInh; +x_13 = l_Lean_Syntax_inhabited; x_14 = lean_array_get(x_13, x_4, x_12); x_15 = l_Lean_Syntax_updateTrailing___main(x_1, x_14); x_16 = lean_array_set(x_4, x_12, x_15); @@ -2660,7 +2504,7 @@ lean_dec(x_2); x_17 = lean_unsigned_to_nat(1u); x_18 = lean_nat_sub(x_5, x_17); lean_dec(x_5); -x_19 = l_Lean_stxInh; +x_19 = l_Lean_Syntax_inhabited; x_20 = lean_array_get(x_19, x_4, x_18); x_21 = l_Lean_Syntax_updateTrailing___main(x_1, x_20); x_22 = lean_array_set(x_4, x_18, x_21); @@ -3184,7 +3028,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj x_6 = lean_unsigned_to_nat(1u); x_7 = lean_nat_sub(x_3, x_6); lean_dec(x_3); -x_8 = l_Lean_stxInh; +x_8 = l_Lean_Syntax_inhabited; x_9 = lean_array_get(x_8, x_2, x_7); lean_inc(x_1); x_10 = l_Lean_Syntax_setTailInfoAux___main(x_1, x_9); @@ -3615,7 +3459,7 @@ lean_dec(x_10); if (x_12 == 0) { lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = l_Lean_stxInh; +x_13 = l_Lean_Syntax_inhabited; x_14 = lean_array_get(x_13, x_4, x_11); x_15 = l_Lean_Syntax_reprint___main(x_14); lean_dec(x_14); @@ -4534,7 +4378,7 @@ _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; x_3 = lean_ctor_get(x_1, 1); -x_4 = l_Lean_stxInh; +x_4 = l_Lean_Syntax_inhabited; x_5 = lean_array_get(x_4, x_3, x_2); x_6 = l_Lean_Syntax_getId(x_5); lean_dec(x_5); @@ -5445,7 +5289,7 @@ return x_10; else { lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = l_Lean_stxInh; +x_11 = l_Lean_Syntax_inhabited; x_12 = lean_unsigned_to_nat(0u); x_13 = lean_array_get(x_11, x_4, x_12); if (lean_obj_tag(x_13) == 2) @@ -6217,7 +6061,7 @@ return x_10; else { lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = l_Lean_stxInh; +x_11 = l_Lean_Syntax_inhabited; x_12 = lean_unsigned_to_nat(0u); x_13 = lean_array_get(x_11, x_3, x_12); if (lean_obj_tag(x_13) == 2) @@ -6357,7 +6201,7 @@ return x_10; else { lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = l_Lean_stxInh; +x_11 = l_Lean_Syntax_inhabited; x_12 = lean_unsigned_to_nat(0u); x_13 = lean_array_get(x_11, x_3, x_12); if (lean_obj_tag(x_13) == 2) @@ -6533,18 +6377,8 @@ l_Lean_fieldIdxKind___closed__2 = _init_l_Lean_fieldIdxKind___closed__2(); lean_mark_persistent(l_Lean_fieldIdxKind___closed__2); l_Lean_fieldIdxKind = _init_l_Lean_fieldIdxKind(); lean_mark_persistent(l_Lean_fieldIdxKind); -l_Lean_stxInh = _init_l_Lean_stxInh(); -lean_mark_persistent(l_Lean_stxInh); l_Lean_Syntax_asNode___closed__1 = _init_l_Lean_Syntax_asNode___closed__1(); lean_mark_persistent(l_Lean_Syntax_asNode___closed__1); -l_Lean_Syntax_getKind___closed__1 = _init_l_Lean_Syntax_getKind___closed__1(); -lean_mark_persistent(l_Lean_Syntax_getKind___closed__1); -l_Lean_Syntax_getKind___closed__2 = _init_l_Lean_Syntax_getKind___closed__2(); -lean_mark_persistent(l_Lean_Syntax_getKind___closed__2); -l_Lean_Syntax_getKind___closed__3 = _init_l_Lean_Syntax_getKind___closed__3(); -lean_mark_persistent(l_Lean_Syntax_getKind___closed__3); -l_Lean_Syntax_getKind___closed__4 = _init_l_Lean_Syntax_getKind___closed__4(); -lean_mark_persistent(l_Lean_Syntax_getKind___closed__4); l_Lean_Syntax_reprint___main___closed__1 = _init_l_Lean_Syntax_reprint___main___closed__1(); lean_mark_persistent(l_Lean_Syntax_reprint___main___closed__1); l_Lean_Syntax_formatStxAux___main___closed__1 = _init_l_Lean_Syntax_formatStxAux___main___closed__1(); diff --git a/stage0/stdlib/Init/LeanInit.c b/stage0/stdlib/Init/LeanInit.c index 4aef20c87f..28f313baea 100644 --- a/stage0/stdlib/Init/LeanInit.c +++ b/stage0/stdlib/Init/LeanInit.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.LeanInit -// Imports: Init.Data.String.Basic Init.Data.UInt Init.Data.Hashable +// Imports: Init.Data.String.Basic Init.Data.Array.Basic Init.Data.UInt Init.Data.Hashable Init.Control.Reader Init.Control.Option #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -14,10 +14,15 @@ extern "C" { #endif lean_object* l_Lean_ParserDescr_pushLeading; +lean_object* l_Lean_MacroM_monadQuotation; lean_object* l_Lean_ParserDescr_orelse(uint8_t, lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_optional(uint8_t, lean_object*); lean_object* l_Lean_ParserDescr_lookahead(uint8_t, lean_object*); +extern lean_object* l_Array_empty___closed__1; +lean_object* l_Lean_Syntax_isOfKind___boxed(lean_object*, lean_object*); +uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_many(uint8_t, lean_object*); +lean_object* l_Lean_HasBeq___closed__1; lean_object* l_Lean_ParserDescr_ident(uint8_t); lean_object* l_Lean_mkNameSimple(lean_object*); lean_object* l_Lean_ParserDescr_andthen___boxed(lean_object*, lean_object*, lean_object*); @@ -26,15 +31,21 @@ lean_object* l_Lean_Name_inhabited; extern lean_object* l_String_splitAux___main___closed__1; lean_object* l_Lean_Name_hashable___closed__1; lean_object* l_Lean_ParserDescr_try(uint8_t, lean_object*); +lean_object* l_Lean_Syntax_getKind___closed__2; +lean_object* l_Lean_Syntax_getKind___closed__1; lean_object* l_Lean_Name_hashable; lean_object* l_Lean_ParserDescr_str(uint8_t); lean_object* l_Lean_ParserDescrCore_inhabited(uint8_t); +lean_object* l_Lean_Syntax_getKind___closed__4; lean_object* l_Lean_ParserDescr_many1(uint8_t, lean_object*); +extern lean_object* l_optional___rarg___closed__1; lean_object* l_Lean_ParserDescr_many___boxed(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_num___boxed(lean_object*); lean_object* l_Lean_ParserDescr_many1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Name_hashEx___boxed(lean_object*); +lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); size_t lean_name_hash(lean_object*); +lean_object* l_Lean_Syntax_getArgs___boxed(lean_object*); size_t l_Lean_Name_hash(lean_object*); lean_object* l_Lean_ParserDescr_parser(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_lookahead___boxed(lean_object*, lean_object*); @@ -48,18 +59,33 @@ lean_object* l_Lean_ParserDescr_ident___boxed(lean_object*); lean_object* l_Lean_ParserDescr_str___boxed(lean_object*); lean_object* l_Lean_ParserDescr_node___boxed(lean_object*, lean_object*, lean_object*); size_t lean_usize_of_nat(lean_object*); +lean_object* l_Lean_addMacroScope(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_nonReservedSymbol___boxed(lean_object*, lean_object*); lean_object* l_Lean_ParserDescrCore_inhabited___boxed(lean_object*); lean_object* l_Lean_ParserDescr_sepBy1(uint8_t, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_inhabited; lean_object* l_Lean_ParserDescr_char___boxed(lean_object*); +lean_object* l_Lean_HasBeq; +lean_object* l_Lean_Syntax_getArgs(lean_object*); +lean_object* l_Lean_Syntax_getKind(lean_object*); +lean_object* l_Lean_Name_beq___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArg___boxed(lean_object*, lean_object*); +lean_object* l_Lean_addMacroScopes(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_orelse___boxed(lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); size_t lean_usize_mix_hash(size_t, size_t); +lean_object* l_Lean_MacroM_monadQuotation___closed__1; +lean_object* l_Lean_Syntax_getKind___closed__3; lean_object* l_Lean_ParserDescr_sepBy___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_Lean_addMacroScopes___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_num(uint8_t); lean_object* l_Lean_ParserDescr_symbol(uint8_t, lean_object*, lean_object*); +lean_object* l_Lean_MacroM_monadQuotation___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_optional___boxed(lean_object*, lean_object*); lean_object* l_Lean_ParserDescr_nonReservedSymbol(lean_object*, uint8_t); lean_object* l_Lean_Name_hash___boxed(lean_object*); +lean_object* l_Lean_MacroM_monadQuotation___closed__2; lean_object* lean_name_mk_numeral(lean_object*, lean_object*); size_t lean_string_hash(lean_object*); lean_object* l_Lean_ParserDescr_sepBy1___boxed(lean_object*, lean_object*, lean_object*); @@ -169,6 +195,33 @@ x_3 = lean_name_mk_string(x_2, x_1); return x_3; } } +lean_object* l_Lean_Name_beq___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = lean_name_eq(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* _init_l_Lean_HasBeq___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Name_beq___boxed), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_HasBeq() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_HasBeq___closed__1; +return x_1; +} +} lean_object* l_Lean_ParserDescrCore_inhabited(uint8_t x_1) { _start: { @@ -532,9 +585,244 @@ lean_ctor_set(x_3, 1, x_2); return x_3; } } +lean_object* _init_l_Lean_Syntax_inhabited() { +_start: +{ +lean_object* x_1; +x_1 = lean_box(0); +return x_1; +} +} +lean_object* _init_l_Lean_Syntax_getKind___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("missing"); +return x_1; +} +} +lean_object* _init_l_Lean_Syntax_getKind___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Syntax_getKind___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Syntax_getKind___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("ident"); +return x_1; +} +} +lean_object* _init_l_Lean_Syntax_getKind___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Syntax_getKind___closed__3; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Syntax_getKind(lean_object* x_1) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 0: +{ +lean_object* x_2; +x_2 = l_Lean_Syntax_getKind___closed__2; +return x_2; +} +case 1: +{ +lean_object* x_3; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +return x_3; +} +case 2: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_1, 1); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_box(0); +x_6 = lean_name_mk_string(x_5, x_4); +return x_6; +} +default: +{ +lean_object* x_7; +lean_dec(x_1); +x_7 = l_Lean_Syntax_getKind___closed__4; +return x_7; +} +} +} +} +uint8_t l_Lean_Syntax_isOfKind(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; uint8_t x_4; +x_3 = l_Lean_Syntax_getKind(x_1); +x_4 = lean_name_eq(x_3, x_2); +lean_dec(x_3); +return x_4; +} +} +lean_object* l_Lean_Syntax_isOfKind___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_Lean_Syntax_isOfKind(x_1, x_2); +lean_dec(x_2); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Lean_Syntax_getArg(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_3 = lean_ctor_get(x_1, 1); +x_4 = l_Lean_Syntax_inhabited; +x_5 = lean_array_get(x_4, x_3, x_2); +return x_5; +} +else +{ +lean_object* x_6; +x_6 = lean_box(0); +return x_6; +} +} +} +lean_object* l_Lean_Syntax_getArg___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Syntax_getArg(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l_Lean_Syntax_getArgs(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_2; +x_2 = lean_ctor_get(x_1, 1); +lean_inc(x_2); +return x_2; +} +else +{ +lean_object* x_3; +x_3 = l_Array_empty___closed__1; +return x_3; +} +} +} +lean_object* l_Lean_Syntax_getArgs___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Syntax_getArgs(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_addMacroScope(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_name_mk_numeral(x_1, x_2); +return x_3; +} +} +lean_object* l_List_foldl___main___at_Lean_addMacroScopes___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +lean_object* x_3; lean_object* x_4; lean_object* 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_5 = lean_name_mk_numeral(x_1, x_3); +x_1 = x_5; +x_2 = x_4; +goto _start; +} +} +} +lean_object* l_Lean_addMacroScopes(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_List_foldl___main___at_Lean_addMacroScopes___spec__1(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_MacroM_monadQuotation___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_apply_1(x_2, x_3); +return x_4; +} +} +lean_object* _init_l_Lean_MacroM_monadQuotation___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_MacroM_monadQuotation___lambda__1), 3, 0); +return x_1; +} +} +lean_object* _init_l_Lean_MacroM_monadQuotation___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_optional___rarg___closed__1; +x_2 = l_Lean_MacroM_monadQuotation___closed__1; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_MacroM_monadQuotation() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_MacroM_monadQuotation___closed__2; +return x_1; +} +} lean_object* initialize_Init_Data_String_Basic(lean_object*); +lean_object* initialize_Init_Data_Array_Basic(lean_object*); lean_object* initialize_Init_Data_UInt(lean_object*); lean_object* initialize_Init_Data_Hashable(lean_object*); +lean_object* initialize_Init_Control_Reader(lean_object*); +lean_object* initialize_Init_Control_Option(lean_object*); static bool _G_initialized = false; lean_object* initialize_Init_LeanInit(lean_object* w) { lean_object * res; @@ -543,20 +831,49 @@ _G_initialized = true; res = initialize_Init_Data_String_Basic(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Data_Array_Basic(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Init_Data_UInt(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Init_Data_Hashable(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Control_Reader(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Init_Control_Option(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_Name_inhabited = _init_l_Lean_Name_inhabited(); lean_mark_persistent(l_Lean_Name_inhabited); l_Lean_Name_hashable___closed__1 = _init_l_Lean_Name_hashable___closed__1(); lean_mark_persistent(l_Lean_Name_hashable___closed__1); l_Lean_Name_hashable = _init_l_Lean_Name_hashable(); lean_mark_persistent(l_Lean_Name_hashable); +l_Lean_HasBeq___closed__1 = _init_l_Lean_HasBeq___closed__1(); +lean_mark_persistent(l_Lean_HasBeq___closed__1); +l_Lean_HasBeq = _init_l_Lean_HasBeq(); +lean_mark_persistent(l_Lean_HasBeq); l_Lean_ParserDescr_pushLeading = _init_l_Lean_ParserDescr_pushLeading(); lean_mark_persistent(l_Lean_ParserDescr_pushLeading); +l_Lean_Syntax_inhabited = _init_l_Lean_Syntax_inhabited(); +lean_mark_persistent(l_Lean_Syntax_inhabited); +l_Lean_Syntax_getKind___closed__1 = _init_l_Lean_Syntax_getKind___closed__1(); +lean_mark_persistent(l_Lean_Syntax_getKind___closed__1); +l_Lean_Syntax_getKind___closed__2 = _init_l_Lean_Syntax_getKind___closed__2(); +lean_mark_persistent(l_Lean_Syntax_getKind___closed__2); +l_Lean_Syntax_getKind___closed__3 = _init_l_Lean_Syntax_getKind___closed__3(); +lean_mark_persistent(l_Lean_Syntax_getKind___closed__3); +l_Lean_Syntax_getKind___closed__4 = _init_l_Lean_Syntax_getKind___closed__4(); +lean_mark_persistent(l_Lean_Syntax_getKind___closed__4); +l_Lean_MacroM_monadQuotation___closed__1 = _init_l_Lean_MacroM_monadQuotation___closed__1(); +lean_mark_persistent(l_Lean_MacroM_monadQuotation___closed__1); +l_Lean_MacroM_monadQuotation___closed__2 = _init_l_Lean_MacroM_monadQuotation___closed__2(); +lean_mark_persistent(l_Lean_MacroM_monadQuotation___closed__2); +l_Lean_MacroM_monadQuotation = _init_l_Lean_MacroM_monadQuotation(); +lean_mark_persistent(l_Lean_MacroM_monadQuotation); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus