From 55043c48035ce09fd3cbeda6e78ef7404f8eb103 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sat, 10 Oct 2020 11:42:06 -0700 Subject: [PATCH] chore: update stage0 --- stage0/src/Lean.lean | 1 + stage0/src/Lean/Attributes.lean | 5 + .../src/Lean/Compiler/ImplementedByAttr.lean | 1 + stage0/src/Lean/Compiler/InitAttr.lean | 1 + stage0/src/Lean/Elab/Alias.lean | 46 - stage0/src/Lean/Elab/Command.lean | 19 +- stage0/src/Lean/Elab/Declaration.lean | 2 +- stage0/src/Lean/Elab/Print.lean | 7 +- stage0/src/Lean/Elab/Quotation.lean | 2 +- stage0/src/Lean/Elab/Syntax.lean | 2 +- stage0/src/Lean/Elab/Tactic/Induction.lean | 2 +- stage0/src/Lean/Elab/Term.lean | 50 +- stage0/src/Lean/Exception.lean | 3 + stage0/src/Lean/Meta/Basic.lean | 3 - stage0/src/Lean/{Elab => }/ResolveName.lean | 112 +- stage0/stdlib/CMakeLists.txt | 2 +- stage0/stdlib/Lean.c | 6 +- stage0/stdlib/Lean/Attributes.c | 226 ++- stage0/stdlib/Lean/Class.c | 1481 +------------- stage0/stdlib/Lean/Compiler/ExternAttr.c | 12 +- stage0/stdlib/Lean/Compiler/IR/UnboxResult.c | 12 +- .../stdlib/Lean/Compiler/ImplementedByAttr.c | 756 +++++-- stage0/stdlib/Lean/Compiler/InitAttr.c | 1170 +++++++---- stage0/stdlib/Lean/Delaborator.c | 4 +- stage0/stdlib/Lean/Elab/App.c | 1538 ++++++--------- stage0/stdlib/Lean/Elab/Binders.c | 4 +- stage0/stdlib/Lean/Elab/Command.c | 1667 ++++++++-------- stage0/stdlib/Lean/Elab/DeclModifiers.c | 6 +- stage0/stdlib/Lean/Elab/DeclUtil.c | 8 +- stage0/stdlib/Lean/Elab/Declaration.c | 389 +++- stage0/stdlib/Lean/Elab/Do.c | 6 +- stage0/stdlib/Lean/Elab/LetRec.c | 6 +- stage0/stdlib/Lean/Elab/Match.c | 12 +- stage0/stdlib/Lean/Elab/MutualDef.c | 223 ++- stage0/stdlib/Lean/Elab/Print.c | 264 ++- stage0/stdlib/Lean/Elab/Quotation.c | 14 +- stage0/stdlib/Lean/Elab/ResolveName.c | 1017 ---------- stage0/stdlib/Lean/Elab/StructInst.c | 6 +- stage0/stdlib/Lean/Elab/Structure.c | 6 +- stage0/stdlib/Lean/Elab/Syntax.c | 317 ++- stage0/stdlib/Lean/Elab/Tactic/Basic.c | 10 +- stage0/stdlib/Lean/Elab/Tactic/Induction.c | 717 +++++-- stage0/stdlib/Lean/Elab/Tactic/Rewrite.c | 4 +- stage0/stdlib/Lean/Elab/Term.c | 815 ++------ stage0/stdlib/Lean/Elab/Util.c | 4 +- stage0/stdlib/Lean/Exception.c | 95 + stage0/stdlib/Lean/Meta/Basic.c | 107 +- stage0/stdlib/Lean/Meta/Closure.c | 6 +- stage0/stdlib/Lean/Meta/ExprDefEq.c | 6 +- stage0/stdlib/Lean/Meta/InferType.c | 4 +- stage0/stdlib/Lean/Meta/LevelDefEq.c | 10 +- stage0/stdlib/Lean/Meta/RecursorInfo.c | 14 +- stage0/stdlib/Lean/Meta/Tactic/Clear.c | 10 +- stage0/stdlib/Lean/Meta/Tactic/Induction.c | 8 +- stage0/stdlib/Lean/Meta/Tactic/Subst.c | 6 +- stage0/stdlib/Lean/MonadEnv.c | 76 +- stage0/stdlib/Lean/Parser/Command.c | 114 +- stage0/stdlib/Lean/Parser/Extension.c | 94 +- stage0/stdlib/Lean/ParserCompiler.c | 68 +- stage0/stdlib/Lean/PrettyPrinter/Formatter.c | 10 +- .../stdlib/Lean/PrettyPrinter/Parenthesizer.c | 12 +- .../Lean/{Elab/Alias.c => ResolveName.c} | 1730 ++++++++++++++++- 62 files changed, 7167 insertions(+), 6161 deletions(-) delete mode 100644 stage0/src/Lean/Elab/Alias.lean rename stage0/src/Lean/{Elab => }/ResolveName.lean (55%) delete mode 100644 stage0/stdlib/Lean/Elab/ResolveName.c rename stage0/stdlib/Lean/{Elab/Alias.c => ResolveName.c} (59%) diff --git a/stage0/src/Lean.lean b/stage0/src/Lean.lean index 8ef1524375..653156c4a6 100644 --- a/stage0/src/Lean.lean +++ b/stage0/src/Lean.lean @@ -8,6 +8,7 @@ import Lean.Environment import Lean.Modifiers import Lean.ProjFns import Lean.Runtime +import Lean.ResolveName import Lean.Attributes import Lean.Parser import Lean.ReducibilityAttrs diff --git a/stage0/src/Lean/Attributes.lean b/stage0/src/Lean/Attributes.lean index 8573d31aaa..f33f2565ed 100644 --- a/stage0/src/Lean/Attributes.lean +++ b/stage0/src/Lean/Attributes.lean @@ -6,6 +6,7 @@ Authors: Leonardo de Moura import Lean.Scopes import Lean.Syntax import Lean.CoreM +import Lean.ResolveName namespace Lean @@ -26,6 +27,10 @@ structure Attr.Context := abbrev AttrM := ReaderT Attr.Context CoreM +instance attrResolveName : MonadResolveName AttrM := +{ getCurrNamespace := do ctx ← read; pure ctx.currNamespace, + getOpenDecls := do ctx ← read; pure ctx.openDecls } + -- TODO: after we delete the old frontend, we should use `EIO` with a richer exception kind at AttributeImpl. -- We must perform a similar modification at `PersistentEnvExtension` diff --git a/stage0/src/Lean/Compiler/ImplementedByAttr.lean b/stage0/src/Lean/Compiler/ImplementedByAttr.lean index 2426393286..27258d7942 100644 --- a/stage0/src/Lean/Compiler/ImplementedByAttr.lean +++ b/stage0/src/Lean/Compiler/ImplementedByAttr.lean @@ -14,6 +14,7 @@ registerParametricAttribute `implementedBy "name of the Lean (probably unsafe) f decl ← getConstInfo declName; match attrParamSyntaxToIdentifier stx with | some fnName => do + fnName ← resolveGlobalConstNoOverload fnName; fnDecl ← getConstInfo fnName; if decl.type == fnDecl.type then pure fnName else throwError ("invalid function '" ++ fnName ++ "' type mismatch") diff --git a/stage0/src/Lean/Compiler/InitAttr.lean b/stage0/src/Lean/Compiler/InitAttr.lean index c19ae21b86..4afd5cb05b 100644 --- a/stage0/src/Lean/Compiler/InitAttr.lean +++ b/stage0/src/Lean/Compiler/InitAttr.lean @@ -26,6 +26,7 @@ registerParametricAttribute `init "initialization procedure for global reference decl ← getConstInfo declName; match attrParamSyntaxToIdentifier stx with | some initFnName => do + initFnName ← resolveGlobalConstNoOverload initFnName; initDecl ← getConstInfo initFnName; match getIOTypeArg initDecl.type with | none => throwError ("initialization function '" ++ initFnName ++ "' must have type of the form `IO `") diff --git a/stage0/src/Lean/Elab/Alias.lean b/stage0/src/Lean/Elab/Alias.lean deleted file mode 100644 index 3a682f5741..0000000000 --- a/stage0/src/Lean/Elab/Alias.lean +++ /dev/null @@ -1,46 +0,0 @@ -/- -Copyright (c) 2019 Microsoft Corporation. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Leonardo de Moura --/ -import Lean.Environment - -namespace Lean - -/-! - We use aliases to implement the `export (+)` command. - An `export A (x)` in the namespace `B` produces an alias `B.x ~> A.x`. -/ - -abbrev AliasState := SMap Name (List Name) -abbrev AliasEntry := Name × Name - -def addAliasEntry (s : AliasState) (e : AliasEntry) : AliasState := -match s.find? e.1 with -| none => s.insert e.1 [e.2] -| some es => if es.elem e.2 then s else s.insert e.1 (e.2 :: es) - -def mkAliasExtension : IO (SimplePersistentEnvExtension AliasEntry AliasState) := -registerSimplePersistentEnvExtension { - name := `aliasesExt, - addEntryFn := addAliasEntry, - addImportedFn := fun es => (mkStateFromImportedEntries addAliasEntry {} es).switch -} - -@[init mkAliasExtension] -constant aliasExtension : SimplePersistentEnvExtension AliasEntry AliasState := arbitrary _ - -/- Add alias `a` for `e` -/ -@[export lean_add_alias] -def addAlias (env : Environment) (a : Name) (e : Name) : Environment := -aliasExtension.addEntry env (a, e) - -def getAliases (env : Environment) (a : Name) : List Name := -match (aliasExtension.getState env).find? a with -| none => [] -| some es => es - --- slower, but only used in the pretty printer -def getRevAliases (env : Environment) (e : Name) : List Name := -(aliasExtension.getState env).fold (fun as a es => if List.contains es e then a :: as else as) [] - -end Lean diff --git a/stage0/src/Lean/Elab/Command.lean b/stage0/src/Lean/Elab/Command.lean index 98b68a46d0..2046967f9a 100644 --- a/stage0/src/Lean/Elab/Command.lean +++ b/stage0/src/Lean/Elab/Command.lean @@ -3,9 +3,8 @@ Copyright (c) 2019 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura -/ -import Lean.Elab.Alias +import Lean.ResolveName import Lean.Elab.Log -import Lean.Elab.ResolveName import Lean.Elab.Term import Lean.Elab.Binders import Lean.Elab.SyntheticMVars @@ -116,11 +115,9 @@ instance : MonadIO CommandElabM := def getScope : CommandElabM Scope := do s ← get; pure s.scopes.head! -def getCurrNamespace : CommandElabM Name := do -scope ← getScope; pure scope.currNamespace - -def getOpenDecls : CommandElabM (List OpenDecl) := do -scope ← getScope; pure scope.openDecls +instance : MonadResolveName CommandElabM := +{ getCurrNamespace := do scope ← getScope; pure scope.currNamespace, + getOpenDecls := do scope ← getScope; pure scope.openDecls } instance CommandElabM.monadLog : MonadLog CommandElabM := { getRef := getRef, @@ -393,14 +390,6 @@ fun stx => do def logUnknownDecl (declName : Name) : CommandElabM Unit := logError ("unknown declaration '" ++ toString declName ++ "'") -def resolveNamespace (id : Name) : CommandElabM Name := do -env ← getEnv; -currNamespace ← getCurrNamespace; -openDecls ← getOpenDecls; -match Elab.resolveNamespace env currNamespace openDecls id with -| some ns => pure ns -| none => throwError ("unknown namespace '" ++ id ++ "'") - @[builtinCommandElab «export»] def elabExport : CommandElab := fun stx => do -- `stx` is of the form (Command.export "export" "(" (null *) ")") diff --git a/stage0/src/Lean/Elab/Declaration.lean b/stage0/src/Lean/Elab/Declaration.lean index 18992c622d..9de9f9bd52 100644 --- a/stage0/src/Lean/Elab/Declaration.lean +++ b/stage0/src/Lean/Elab/Declaration.lean @@ -270,7 +270,7 @@ fun stx => do attrs ← elabAttrs (stx.getArg 3); let idents := (stx.getArg 5).getArgs; idents.forM fun ident => withRef ident $ liftTermElabM none do - declName ← Term.resolveGlobalConstNoOverload ident.getId; + declName ← resolveGlobalConstNoOverload ident.getId; Term.applyAttributes declName attrs persistent @[builtinMacro Lean.Parser.Command.«initialize»] def expandInitialize : Macro := diff --git a/stage0/src/Lean/Elab/Print.lean b/stage0/src/Lean/Elab/Print.lean index ebfff26fe3..61942d1d15 100644 --- a/stage0/src/Lean/Elab/Print.lean +++ b/stage0/src/Lean/Elab/Print.lean @@ -69,11 +69,8 @@ match env.find? id with printInduct id us nparams nindices t ctors u | none => throwUnknownId id -def resolveId (id : Name) : CommandElabM (List Name) := do -liftTermElabM none $ Term.resolveGlobalConst id - private def printId (id : Name) : CommandElabM Unit := do -cs ← resolveId id; +cs ← resolveGlobalConst id; cs.forM printIdCore @[builtinCommandElab «print»] def elabPrint : CommandElab := @@ -128,7 +125,7 @@ else @[builtinCommandElab «printAxioms»] def elabPrintAxioms : CommandElab := fun stx => do let id := (stx.getArg 2).getId; - cs ← resolveId id; + cs ← resolveGlobalConst id; cs.forM printAxiomsOf end Command diff --git a/stage0/src/Lean/Elab/Quotation.lean b/stage0/src/Lean/Elab/Quotation.lean index 7640386a13..7774554b47 100644 --- a/stage0/src/Lean/Elab/Quotation.lean +++ b/stage0/src/Lean/Elab/Quotation.lean @@ -7,7 +7,7 @@ Elaboration of syntax quotations as terms and patterns (in `match_syntax`). See hygiene workings and data types. -/ import Lean.Syntax -import Lean.Elab.ResolveName +import Lean.ResolveName import Lean.Elab.Term /- TODO diff --git a/stage0/src/Lean/Elab/Syntax.lean b/stage0/src/Lean/Elab/Syntax.lean index 72a73ab1b6..80210aa0aa 100644 --- a/stage0/src/Lean/Elab/Syntax.lean +++ b/stage0/src/Lean/Elab/Syntax.lean @@ -95,7 +95,7 @@ partial def toParserDescrAux : Syntax → ToParserDescrM Syntax `(ParserDescr.cat $(quote cat) $(quote prec)) else do -- `cat` is not a valid category name. Thus, we test whether it is a valid constant - candidates ← liftM $ resolveGlobalConst cat; + candidates ← resolveGlobalConst cat; let candidates := candidates.filter fun c => match env.find? c with | none => false diff --git a/stage0/src/Lean/Elab/Tactic/Induction.lean b/stage0/src/Lean/Elab/Tactic/Induction.lean index 6c8763ac78..a730c1a52b 100644 --- a/stage0/src/Lean/Elab/Tactic/Induction.lean +++ b/stage0/src/Lean/Elab/Tactic/Induction.lean @@ -140,7 +140,7 @@ recInfo? ← getRecFromUsingLoop baseRecName majorType; match recInfo? with | some recInfo => pure recInfo | none => do - recName ← liftM $ Term.resolveGlobalConstNoOverload baseRecName; + recName ← resolveGlobalConstNoOverload baseRecName; catch (liftMetaMAtMain fun _ => Meta.mkRecursorInfo recName) (fun _ => throwError ("invalid recursor name '" ++ baseRecName ++ "'")) diff --git a/stage0/src/Lean/Elab/Term.lean b/stage0/src/Lean/Elab/Term.lean index 1b4d5ff153..8bbba0b91f 100644 --- a/stage0/src/Lean/Elab/Term.lean +++ b/stage0/src/Lean/Elab/Term.lean @@ -3,6 +3,7 @@ Copyright (c) 2019 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura -/ +import Lean.ResolveName import Lean.Util.Sorry import Lean.Structure import Lean.Meta.ExprDefEq @@ -13,8 +14,6 @@ import Lean.Meta.Tactic.Util import Lean.Hygiene import Lean.Util.RecDepth import Lean.Elab.Log -import Lean.Elab.Alias -import Lean.Elab.ResolveName import Lean.Elab.Level import Lean.Elab.Attributes @@ -289,9 +288,11 @@ inductive LVal instance LVal.hasToString : HasToString LVal := ⟨fun p => match p with | LVal.fieldIdx i => toString i | LVal.fieldName n => n | LVal.getOp idx => "[" ++ toString idx ++ "]"⟩ +instance : MonadResolveName TermElabM := +{ getCurrNamespace := do ctx ← read; pure ctx.currNamespace, + getOpenDecls := do ctx ← read; pure ctx.openDecls } + def getDeclName? : TermElabM (Option Name) := do ctx ← read; pure ctx.declName? -def getCurrNamespace : TermElabM Name := do ctx ← read; pure ctx.currNamespace -def getOpenDecls : TermElabM (List OpenDecl) := do ctx ← read; pure ctx.openDecls def getLetRecsToLift : TermElabM (List LetRecToLift) := do s ← get; pure s.letRecsToLift def isExprMVarAssigned (mvarId : MVarId) : TermElabM Bool := do mctx ← getMCtx; pure $ mctx.isExprAssigned mvarId def getMVarDecl (mvarId : MVarId) : TermElabM MetavarDecl := do mctx ← getMCtx; pure $ mctx.getDecl mvarId @@ -1242,47 +1243,6 @@ candidates.foldlM pure $ (const, projs) :: result) [] -/- - Given a name `n`, return a list of possible interpretations. - Each interpretation is a pair `(declName, fieldList)`, where `declName` - is the name of a declaration in the current environment, and `fieldList` are - (potential) field names. - The pair is needed because in Lean `.` may be part of a qualified name or - a field (aka dot-notation). - As an example, consider the following definitions - ``` - def Boo.x := 1 - def Foo.x := 2 - def Foo.x.y := 3 - ``` - After `open Foo`, we have - - `resolveGlobalName x` => `[(Foo.x, [])]` - - `resolveGlobalName x.y` => `[(Foo.x.y, [])]` - - `resolveGlobalName x.z.w` => `[(Foo.x, [z, w])]` - After `open Foo open Boo`, we have - - `resolveGlobalName x` => `[(Foo.x, []), (Boo.x, [])]` - - `resolveGlobalName x.y` => `[(Foo.x.y, [])]` - - `resolveGlobalName x.z.w` => `[(Foo.x, [z, w]), (Boo.x, [z, w])]` --/ -def resolveGlobalName (n : Name) : TermElabM (List (Name × List String)) := do -env ← getEnv; -currNamespace ← getCurrNamespace; -openDecls ← getOpenDecls; -pure (Lean.Elab.resolveGlobalName env currNamespace openDecls n) - -/- Similar to `resolveGlobalName`, but discard any candidate whose `fieldList` is not empty. -/ -def resolveGlobalConst (n : Name) : TermElabM (List Name) := do -cs ← resolveGlobalName n; -let cs := cs.filter fun ⟨_, fieldList⟩ => fieldList.isEmpty; -when cs.isEmpty $ liftMetaM $ throwUnknownConstant n; -pure $ cs.map Prod.fst - -def resolveGlobalConstNoOverload (n : Name) : TermElabM Name := do -cs ← resolveGlobalConst n; -match cs with -| [c] => pure c -| _ => throwError ("ambiguous identifier '" ++ n ++ "', possible interpretations: " ++ toString cs) - def resolveName (n : Name) (preresolved : List (Name × List String)) (explicitLevels : List Level) : TermElabM (List (Expr × List String)) := do result? ← resolveLocalName n; match result? with diff --git a/stage0/src/Lean/Exception.lean b/stage0/src/Lean/Exception.lean index 21b8de3437..ef8941fbf0 100644 --- a/stage0/src/Lean/Exception.lean +++ b/stage0/src/Lean/Exception.lean @@ -65,6 +65,9 @@ ref ← getRef; (ref, msg) ← AddErrorMessageContext.add ref msg; throw $ Exception.error ref msg +def throwUnknownConstant {α} (constName : Name) : m α := +throwError ("unknown constant '" ++ mkConst constName ++ "'") + def throwErrorAt {α} (ref : Syntax) (msg : MessageData) : m α := do withRef ref $ throwError msg diff --git a/stage0/src/Lean/Meta/Basic.lean b/stage0/src/Lean/Meta/Basic.lean index d22dfc30be..5e7c4739b8 100644 --- a/stage0/src/Lean/Meta/Basic.lean +++ b/stage0/src/Lean/Meta/Basic.lean @@ -432,9 +432,6 @@ withConfig { config with transparency := mode }) x -def throwUnknownConstant {α} (constName : Name) : MetaM α := -throwError ("unknown constant '" ++ constName ++ "'") - def getConst? (constName : Name) : MetaM (Option ConstantInfo) := do env ← getEnv; match env.find? constName with diff --git a/stage0/src/Lean/Elab/ResolveName.lean b/stage0/src/Lean/ResolveName.lean similarity index 55% rename from stage0/src/Lean/Elab/ResolveName.lean rename to stage0/src/Lean/ResolveName.lean index 856d935fcb..b91f22cf3e 100644 --- a/stage0/src/Lean/Elab/ResolveName.lean +++ b/stage0/src/Lean/ResolveName.lean @@ -6,12 +6,47 @@ Authors: Leonardo de Moura, Sebastian Ullrich import Lean.Data.OpenDecl import Lean.Hygiene import Lean.Modifiers -import Lean.Elab.Alias +import Lean.Exception namespace Lean -namespace Elab +/-! + We use aliases to implement the `export (+)` command. + An `export A (x)` in the namespace `B` produces an alias `B.x ~> A.x`. -/ + +abbrev AliasState := SMap Name (List Name) +abbrev AliasEntry := Name × Name + +def addAliasEntry (s : AliasState) (e : AliasEntry) : AliasState := +match s.find? e.1 with +| none => s.insert e.1 [e.2] +| some es => if es.elem e.2 then s else s.insert e.1 (e.2 :: es) + +def mkAliasExtension : IO (SimplePersistentEnvExtension AliasEntry AliasState) := +registerSimplePersistentEnvExtension { + name := `aliasesExt, + addEntryFn := addAliasEntry, + addImportedFn := fun es => (mkStateFromImportedEntries addAliasEntry {} es).switch +} + +@[init mkAliasExtension] +constant aliasExtension : SimplePersistentEnvExtension AliasEntry AliasState := arbitrary _ + +/- Add alias `a` for `e` -/ +@[export lean_add_alias] +def addAlias (env : Environment) (a : Name) (e : Name) : Environment := +aliasExtension.addEntry env (a, e) + +def getAliases (env : Environment) (a : Name) : List Name := +match (aliasExtension.getState env).find? a with +| none => [] +| some es => es + +-- slower, but only used in the pretty printer +def getRevAliases (env : Environment) (e : Name) : List Name := +(aliasExtension.getState env).fold (fun as a es => if List.contains es e then a :: as else as) [] /- Global name resolution -/ +namespace ResolveName /- Check whether `ns ++ id` is a valid namepace name and/or there are aliases names `ns ++ id`. -/ private def resolveQualifiedName (env : Environment) (ns : Name) (id : Name) : List Name := @@ -103,9 +138,8 @@ Given a name `id` try to find namespace it refers to. The resolution procedure w then return `s_1 . ... . s_i ++ n` if it is the name of an existing namespace. We search "backwards". 3- Finally, for each command `open N`, return `N ++ n` if it is the name of an existing namespace. We search "backwards" again. That is, we try the most recent `open` command first. - We only consider simple `open` commands. --/ -def resolveNamespace (env : Environment) (ns : Name) (openDecls : List OpenDecl) (id : Name) : Option Name := + We only consider simple `open` commands. -/ +def resolveNamespace? (env : Environment) (ns : Name) (openDecls : List OpenDecl) (id : Name) : Option Name := if env.isNamespace id then some id else match resolveNamespaceUsingScope env id ns with | some n => some n @@ -113,6 +147,72 @@ else match resolveNamespaceUsingScope env id ns with match resolveNamespaceUsingOpenDecls env id openDecls with | some n => some n | none => none +end ResolveName -end Elab +class MonadResolveName (m : Type → Type) := +(getCurrNamespace : m Name) +(getOpenDecls : m (List OpenDecl)) + +export MonadResolveName (getCurrNamespace getOpenDecls) + +instance monadResolveNameFromLift (m n) [MonadResolveName m] [MonadLift m n] : MonadResolveName n := +{ getCurrNamespace := liftM (getCurrNamespace : m _), + getOpenDecls := liftM (getOpenDecls : m _) } + +section Methods + +variables {m : Type → Type} [Monad m] [MonadResolveName m] [MonadEnv m] + +/- + Given a name `n`, return a list of possible interpretations. + Each interpretation is a pair `(declName, fieldList)`, where `declName` + is the name of a declaration in the current environment, and `fieldList` are + (potential) field names. + The pair is needed because in Lean `.` may be part of a qualified name or + a field (aka dot-notation). + As an example, consider the following definitions + ``` + def Boo.x := 1 + def Foo.x := 2 + def Foo.x.y := 3 + ``` + After `open Foo`, we have + - `resolveGlobalName x` => `[(Foo.x, [])]` + - `resolveGlobalName x.y` => `[(Foo.x.y, [])]` + - `resolveGlobalName x.z.w` => `[(Foo.x, [z, w])]` + After `open Foo open Boo`, we have + - `resolveGlobalName x` => `[(Foo.x, []), (Boo.x, [])]` + - `resolveGlobalName x.y` => `[(Foo.x.y, [])]` + - `resolveGlobalName x.z.w` => `[(Foo.x, [z, w]), (Boo.x, [z, w])]` +-/ +def resolveGlobalName (id : Name) : m (List (Name × List String)) := do +env ← getEnv; +ns ← getCurrNamespace; +openDecls ← getOpenDecls; +pure (ResolveName.resolveGlobalName env ns openDecls id) + +variables [MonadExceptOf Exception m] [Ref m] [AddErrorMessageContext m] + +def resolveNamespace (id : Name) : m Name := do +env ← getEnv; +ns ← getCurrNamespace; +openDecls ← getOpenDecls; +match ResolveName.resolveNamespace? env ns openDecls id with +| some ns => pure ns +| none => throwError ("unknown namespace '" ++ id ++ "'") + +/- Similar to `resolveGlobalName`, but discard any candidate whose `fieldList` is not empty. -/ +def resolveGlobalConst (n : Name) : m (List Name) := do +cs ← resolveGlobalName n; +let cs := cs.filter fun ⟨_, fieldList⟩ => fieldList.isEmpty; +when cs.isEmpty $ throwUnknownConstant n; +pure $ cs.map Prod.fst + +def resolveGlobalConstNoOverload (n : Name) : m Name := do +cs ← resolveGlobalConst n; +match cs with +| [c] => pure c +| _ => throwError ("ambiguous identifier '" ++ mkConst n ++ "', possible interpretations: " ++ cs.map mkConst) + +end Methods end Lean diff --git a/stage0/stdlib/CMakeLists.txt b/stage0/stdlib/CMakeLists.txt index 459bb5ef4a..8586cf2094 100644 --- a/stage0/stdlib/CMakeLists.txt +++ b/stage0/stdlib/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT ./Init.c ./Init/Coe.c ./Init/Control.c ./Init/Control/Alternative.c ./Init/Control/Applicative.c ./Init/Control/Conditional.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Functor.c ./Init/Control/Id.c ./Init/Control/Monad.c ./Init/Control/MonadControl.c ./Init/Control/MonadFunctor.c ./Init/Control/MonadLift.c ./Init/Control/MonadRun.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Control/StateRef.c ./Init/Core.c ./Init/Data.c ./Init/Data/Array.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/ForIn.c ./Init/Data/Array/Macros.c ./Init/Data/Array/QSort.c ./Init/Data/Array/Subarray.c ./Init/Data/Basic.c ./Init/Data/ByteArray.c ./Init/Data/ByteArray/Basic.c ./Init/Data/Char.c ./Init/Data/Char/Basic.c ./Init/Data/Fin.c ./Init/Data/Fin/Basic.c ./Init/Data/Float.c ./Init/Data/FloatArray.c ./Init/Data/FloatArray/Basic.c ./Init/Data/Hashable.c ./Init/Data/Int.c ./Init/Data/Int/Basic.c ./Init/Data/List.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Control.c ./Init/Data/Nat.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Control.c ./Init/Data/Nat/Div.c ./Init/Data/Option.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Instances.c ./Init/Data/Random.c ./Init/Data/Repr.c ./Init/Data/String.c ./Init/Data/String/Basic.c ./Init/Data/String/Extra.c ./Init/Data/ToString.c ./Init/Data/ToString/Basic.c ./Init/Data/ToString/Macro.c ./Init/Data/UInt.c ./Init/Fix.c ./Init/HasCoe.c ./Init/LeanInit.c ./Init/System.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/IOError.c ./Init/System/Platform.c ./Init/System/ST.c ./Init/Util.c ./Init/WF.c ./Lean.c ./Lean/Attributes.c ./Lean/AuxRecursor.c ./Lean/Class.c ./Lean/Compiler.c ./Lean/Compiler/ClosedTermCache.c ./Lean/Compiler/ConstFolding.c ./Lean/Compiler/ExportAttr.c ./Lean/Compiler/ExternAttr.c ./Lean/Compiler/IR.c ./Lean/Compiler/IR/Basic.c ./Lean/Compiler/IR/Borrow.c ./Lean/Compiler/IR/Boxing.c ./Lean/Compiler/IR/Checker.c ./Lean/Compiler/IR/CompilerM.c ./Lean/Compiler/IR/CtorLayout.c ./Lean/Compiler/IR/ElimDeadBranches.c ./Lean/Compiler/IR/ElimDeadVars.c ./Lean/Compiler/IR/EmitC.c ./Lean/Compiler/IR/EmitUtil.c ./Lean/Compiler/IR/ExpandResetReuse.c ./Lean/Compiler/IR/Format.c ./Lean/Compiler/IR/FreeVars.c ./Lean/Compiler/IR/LiveVars.c ./Lean/Compiler/IR/NormIds.c ./Lean/Compiler/IR/PushProj.c ./Lean/Compiler/IR/RC.c ./Lean/Compiler/IR/ResetReuse.c ./Lean/Compiler/IR/SimpCase.c ./Lean/Compiler/IR/UnboxResult.c ./Lean/Compiler/ImplementedByAttr.c ./Lean/Compiler/InitAttr.c ./Lean/Compiler/InlineAttrs.c ./Lean/Compiler/NameMangling.c ./Lean/Compiler/NeverExtractAttr.c ./Lean/Compiler/Specialize.c ./Lean/Compiler/Util.c ./Lean/CoreM.c ./Lean/Data/Format.c ./Lean/Data/Json.c ./Lean/Data/Json/Basic.c ./Lean/Data/Json/FromToJson.c ./Lean/Data/Json/Parser.c ./Lean/Data/Json/Printer.c ./Lean/Data/Json/Stream.c ./Lean/Data/JsonRpc.c ./Lean/Data/KVMap.c ./Lean/Data/LBool.c ./Lean/Data/LOption.c ./Lean/Data/Lsp.c ./Lean/Data/Lsp/Basic.c ./Lean/Data/Lsp/Capabilities.c ./Lean/Data/Lsp/Communication.c ./Lean/Data/Lsp/Diagnostics.c ./Lean/Data/Lsp/Hover.c ./Lean/Data/Lsp/InitShutdown.c ./Lean/Data/Lsp/TextSync.c ./Lean/Data/Lsp/Utf16.c ./Lean/Data/Lsp/Workspace.c ./Lean/Data/Name.c ./Lean/Data/Occurrences.c ./Lean/Data/OpenDecl.c ./Lean/Data/Options.c ./Lean/Data/Position.c ./Lean/Data/SMap.c ./Lean/Data/Trie.c ./Lean/Declaration.c ./Lean/Delaborator.c ./Lean/Elab.c ./Lean/Elab/Alias.c ./Lean/Elab/App.c ./Lean/Elab/Attributes.c ./Lean/Elab/Binders.c ./Lean/Elab/BuiltinNotation.c ./Lean/Elab/CollectFVars.c ./Lean/Elab/Command.c ./Lean/Elab/DeclModifiers.c ./Lean/Elab/DeclUtil.c ./Lean/Elab/Declaration.c ./Lean/Elab/DefView.c ./Lean/Elab/Do.c ./Lean/Elab/Exception.c ./Lean/Elab/Frontend.c ./Lean/Elab/Import.c ./Lean/Elab/Inductive.c ./Lean/Elab/LetRec.c ./Lean/Elab/Level.c ./Lean/Elab/Log.c ./Lean/Elab/Match.c ./Lean/Elab/MutualDef.c ./Lean/Elab/PreDefinition.c ./Lean/Elab/PreDefinition/Basic.c ./Lean/Elab/PreDefinition/Main.c ./Lean/Elab/PreDefinition/MkInhabitant.c ./Lean/Elab/PreDefinition/Structural.c ./Lean/Elab/PreDefinition/WF.c ./Lean/Elab/Print.c ./Lean/Elab/Quotation.c ./Lean/Elab/ResolveName.c ./Lean/Elab/StrategyAttrs.c ./Lean/Elab/StructInst.c ./Lean/Elab/Structure.c ./Lean/Elab/Syntax.c ./Lean/Elab/SyntheticMVars.c ./Lean/Elab/Tactic.c ./Lean/Elab/Tactic/Basic.c ./Lean/Elab/Tactic/Binders.c ./Lean/Elab/Tactic/ElabTerm.c ./Lean/Elab/Tactic/Generalize.c ./Lean/Elab/Tactic/Induction.c ./Lean/Elab/Tactic/Injection.c ./Lean/Elab/Tactic/Location.c ./Lean/Elab/Tactic/Match.c ./Lean/Elab/Tactic/Rewrite.c ./Lean/Elab/Term.c ./Lean/Elab/Util.c ./Lean/Environment.c ./Lean/Eval.c ./Lean/Exception.c ./Lean/Expr.c ./Lean/HeadIndex.c ./Lean/Hygiene.c ./Lean/InternalExceptionId.c ./Lean/KeyedDeclsAttribute.c ./Lean/Level.c ./Lean/Linter.c ./Lean/LocalContext.c ./Lean/Message.c ./Lean/Meta.c ./Lean/Meta/AbstractMVars.c ./Lean/Meta/AbstractNestedProofs.c ./Lean/Meta/AppBuilder.c ./Lean/Meta/Basic.c ./Lean/Meta/Check.c ./Lean/Meta/Closure.c ./Lean/Meta/CollectMVars.c ./Lean/Meta/DiscrTree.c ./Lean/Meta/DiscrTreeTypes.c ./Lean/Meta/Exception.c ./Lean/Meta/ExprDefEq.c ./Lean/Meta/ForEachExpr.c ./Lean/Meta/FunInfo.c ./Lean/Meta/GeneralizeTelescope.c ./Lean/Meta/InferType.c ./Lean/Meta/Instances.c ./Lean/Meta/KAbstract.c ./Lean/Meta/LevelDefEq.c ./Lean/Meta/Match.c ./Lean/Meta/Match/CaseArraySizes.c ./Lean/Meta/Match/CaseValues.c ./Lean/Meta/Match/MVarRenaming.c ./Lean/Meta/Match/Match.c ./Lean/Meta/Match/MatchPatternAttr.c ./Lean/Meta/MatchUtil.c ./Lean/Meta/Offset.c ./Lean/Meta/RecursorInfo.c ./Lean/Meta/Reduce.c ./Lean/Meta/ReduceEval.c ./Lean/Meta/SynthInstance.c ./Lean/Meta/Tactic.c ./Lean/Meta/Tactic/Apply.c ./Lean/Meta/Tactic/Assert.c ./Lean/Meta/Tactic/Assumption.c ./Lean/Meta/Tactic/Cases.c ./Lean/Meta/Tactic/Clear.c ./Lean/Meta/Tactic/FVarSubst.c ./Lean/Meta/Tactic/Generalize.c ./Lean/Meta/Tactic/Induction.c ./Lean/Meta/Tactic/Injection.c ./Lean/Meta/Tactic/Intro.c ./Lean/Meta/Tactic/Replace.c ./Lean/Meta/Tactic/Revert.c ./Lean/Meta/Tactic/Rewrite.c ./Lean/Meta/Tactic/Subst.c ./Lean/Meta/Tactic/Util.c ./Lean/Meta/TransparencyMode.c ./Lean/Meta/WHNF.c ./Lean/MetavarContext.c ./Lean/Modifiers.c ./Lean/MonadEnv.c ./Lean/Parser.c ./Lean/Parser/Basic.c ./Lean/Parser/Command.c ./Lean/Parser/Do.c ./Lean/Parser/Extension.c ./Lean/Parser/Level.c ./Lean/Parser/Module.c ./Lean/Parser/StrInterpolation.c ./Lean/Parser/Syntax.c ./Lean/Parser/Tactic.c ./Lean/Parser/Term.c ./Lean/Parser/Transform.c ./Lean/ParserCompiler.c ./Lean/ParserCompiler/Attribute.c ./Lean/PrettyPrinter.c ./Lean/PrettyPrinter/Backtrack.c ./Lean/PrettyPrinter/Formatter.c ./Lean/PrettyPrinter/Meta.c ./Lean/PrettyPrinter/Parenthesizer.c ./Lean/ProjFns.c ./Lean/ReducibilityAttrs.c ./Lean/Runtime.c ./Lean/Scopes.c ./Lean/Server.c ./Lean/Server/ServerBin.c ./Lean/Server/Snapshots.c ./Lean/Structure.c ./Lean/Syntax.c ./Lean/ToExpr.c ./Lean/Util.c ./Lean/Util/CollectFVars.c ./Lean/Util/CollectLevelParams.c ./Lean/Util/CollectMVars.c ./Lean/Util/Constructions.c ./Lean/Util/FindExpr.c ./Lean/Util/FindMVar.c ./Lean/Util/FoldConsts.c ./Lean/Util/ForEachExpr.c ./Lean/Util/MonadCache.c ./Lean/Util/PPExt.c ./Lean/Util/PPGoal.c ./Lean/Util/Path.c ./Lean/Util/Profile.c ./Lean/Util/RecDepth.c ./Lean/Util/Recognizers.c ./Lean/Util/ReplaceExpr.c ./Lean/Util/ReplaceLevel.c ./Lean/Util/SCC.c ./Lean/Util/Sorry.c ./Lean/Util/Trace.c ./Std.c ./Std/Data.c ./Std/Data/AssocList.c ./Std/Data/BinomialHeap.c ./Std/Data/DList.c ./Std/Data/HashMap.c ./Std/Data/HashSet.c ./Std/Data/PersistentArray.c ./Std/Data/PersistentHashMap.c ./Std/Data/PersistentHashSet.c ./Std/Data/Queue.c ./Std/Data/RBMap.c ./Std/Data/RBTree.c ./Std/Data/Stack.c ./Std/ShareCommon.c ) +add_library (stage0 OBJECT ./Init.c ./Init/Coe.c ./Init/Control.c ./Init/Control/Alternative.c ./Init/Control/Applicative.c ./Init/Control/Conditional.c ./Init/Control/EState.c ./Init/Control/Except.c ./Init/Control/Functor.c ./Init/Control/Id.c ./Init/Control/Monad.c ./Init/Control/MonadControl.c ./Init/Control/MonadFunctor.c ./Init/Control/MonadLift.c ./Init/Control/MonadRun.c ./Init/Control/Option.c ./Init/Control/Reader.c ./Init/Control/State.c ./Init/Control/StateRef.c ./Init/Core.c ./Init/Data.c ./Init/Data/Array.c ./Init/Data/Array/Basic.c ./Init/Data/Array/BinSearch.c ./Init/Data/Array/ForIn.c ./Init/Data/Array/Macros.c ./Init/Data/Array/QSort.c ./Init/Data/Array/Subarray.c ./Init/Data/Basic.c ./Init/Data/ByteArray.c ./Init/Data/ByteArray/Basic.c ./Init/Data/Char.c ./Init/Data/Char/Basic.c ./Init/Data/Fin.c ./Init/Data/Fin/Basic.c ./Init/Data/Float.c ./Init/Data/FloatArray.c ./Init/Data/FloatArray/Basic.c ./Init/Data/Hashable.c ./Init/Data/Int.c ./Init/Data/Int/Basic.c ./Init/Data/List.c ./Init/Data/List/Basic.c ./Init/Data/List/BasicAux.c ./Init/Data/List/Control.c ./Init/Data/Nat.c ./Init/Data/Nat/Basic.c ./Init/Data/Nat/Bitwise.c ./Init/Data/Nat/Control.c ./Init/Data/Nat/Div.c ./Init/Data/Option.c ./Init/Data/Option/Basic.c ./Init/Data/Option/BasicAux.c ./Init/Data/Option/Instances.c ./Init/Data/Random.c ./Init/Data/Repr.c ./Init/Data/String.c ./Init/Data/String/Basic.c ./Init/Data/String/Extra.c ./Init/Data/ToString.c ./Init/Data/ToString/Basic.c ./Init/Data/ToString/Macro.c ./Init/Data/UInt.c ./Init/Fix.c ./Init/HasCoe.c ./Init/LeanInit.c ./Init/System.c ./Init/System/FilePath.c ./Init/System/IO.c ./Init/System/IOError.c ./Init/System/Platform.c ./Init/System/ST.c ./Init/Util.c ./Init/WF.c ./Lean.c ./Lean/Attributes.c ./Lean/AuxRecursor.c ./Lean/Class.c ./Lean/Compiler.c ./Lean/Compiler/ClosedTermCache.c ./Lean/Compiler/ConstFolding.c ./Lean/Compiler/ExportAttr.c ./Lean/Compiler/ExternAttr.c ./Lean/Compiler/IR.c ./Lean/Compiler/IR/Basic.c ./Lean/Compiler/IR/Borrow.c ./Lean/Compiler/IR/Boxing.c ./Lean/Compiler/IR/Checker.c ./Lean/Compiler/IR/CompilerM.c ./Lean/Compiler/IR/CtorLayout.c ./Lean/Compiler/IR/ElimDeadBranches.c ./Lean/Compiler/IR/ElimDeadVars.c ./Lean/Compiler/IR/EmitC.c ./Lean/Compiler/IR/EmitUtil.c ./Lean/Compiler/IR/ExpandResetReuse.c ./Lean/Compiler/IR/Format.c ./Lean/Compiler/IR/FreeVars.c ./Lean/Compiler/IR/LiveVars.c ./Lean/Compiler/IR/NormIds.c ./Lean/Compiler/IR/PushProj.c ./Lean/Compiler/IR/RC.c ./Lean/Compiler/IR/ResetReuse.c ./Lean/Compiler/IR/SimpCase.c ./Lean/Compiler/IR/UnboxResult.c ./Lean/Compiler/ImplementedByAttr.c ./Lean/Compiler/InitAttr.c ./Lean/Compiler/InlineAttrs.c ./Lean/Compiler/NameMangling.c ./Lean/Compiler/NeverExtractAttr.c ./Lean/Compiler/Specialize.c ./Lean/Compiler/Util.c ./Lean/CoreM.c ./Lean/Data/Format.c ./Lean/Data/Json.c ./Lean/Data/Json/Basic.c ./Lean/Data/Json/FromToJson.c ./Lean/Data/Json/Parser.c ./Lean/Data/Json/Printer.c ./Lean/Data/Json/Stream.c ./Lean/Data/JsonRpc.c ./Lean/Data/KVMap.c ./Lean/Data/LBool.c ./Lean/Data/LOption.c ./Lean/Data/Lsp.c ./Lean/Data/Lsp/Basic.c ./Lean/Data/Lsp/Capabilities.c ./Lean/Data/Lsp/Communication.c ./Lean/Data/Lsp/Diagnostics.c ./Lean/Data/Lsp/Hover.c ./Lean/Data/Lsp/InitShutdown.c ./Lean/Data/Lsp/TextSync.c ./Lean/Data/Lsp/Utf16.c ./Lean/Data/Lsp/Workspace.c ./Lean/Data/Name.c ./Lean/Data/Occurrences.c ./Lean/Data/OpenDecl.c ./Lean/Data/Options.c ./Lean/Data/Position.c ./Lean/Data/SMap.c ./Lean/Data/Trie.c ./Lean/Declaration.c ./Lean/Delaborator.c ./Lean/Elab.c ./Lean/Elab/App.c ./Lean/Elab/Attributes.c ./Lean/Elab/Binders.c ./Lean/Elab/BuiltinNotation.c ./Lean/Elab/CollectFVars.c ./Lean/Elab/Command.c ./Lean/Elab/DeclModifiers.c ./Lean/Elab/DeclUtil.c ./Lean/Elab/Declaration.c ./Lean/Elab/DefView.c ./Lean/Elab/Do.c ./Lean/Elab/Exception.c ./Lean/Elab/Frontend.c ./Lean/Elab/Import.c ./Lean/Elab/Inductive.c ./Lean/Elab/LetRec.c ./Lean/Elab/Level.c ./Lean/Elab/Log.c ./Lean/Elab/Match.c ./Lean/Elab/MutualDef.c ./Lean/Elab/PreDefinition.c ./Lean/Elab/PreDefinition/Basic.c ./Lean/Elab/PreDefinition/Main.c ./Lean/Elab/PreDefinition/MkInhabitant.c ./Lean/Elab/PreDefinition/Structural.c ./Lean/Elab/PreDefinition/WF.c ./Lean/Elab/Print.c ./Lean/Elab/Quotation.c ./Lean/Elab/StrategyAttrs.c ./Lean/Elab/StructInst.c ./Lean/Elab/Structure.c ./Lean/Elab/Syntax.c ./Lean/Elab/SyntheticMVars.c ./Lean/Elab/Tactic.c ./Lean/Elab/Tactic/Basic.c ./Lean/Elab/Tactic/Binders.c ./Lean/Elab/Tactic/ElabTerm.c ./Lean/Elab/Tactic/Generalize.c ./Lean/Elab/Tactic/Induction.c ./Lean/Elab/Tactic/Injection.c ./Lean/Elab/Tactic/Location.c ./Lean/Elab/Tactic/Match.c ./Lean/Elab/Tactic/Rewrite.c ./Lean/Elab/Term.c ./Lean/Elab/Util.c ./Lean/Environment.c ./Lean/Eval.c ./Lean/Exception.c ./Lean/Expr.c ./Lean/HeadIndex.c ./Lean/Hygiene.c ./Lean/InternalExceptionId.c ./Lean/KeyedDeclsAttribute.c ./Lean/Level.c ./Lean/Linter.c ./Lean/LocalContext.c ./Lean/Message.c ./Lean/Meta.c ./Lean/Meta/AbstractMVars.c ./Lean/Meta/AbstractNestedProofs.c ./Lean/Meta/AppBuilder.c ./Lean/Meta/Basic.c ./Lean/Meta/Check.c ./Lean/Meta/Closure.c ./Lean/Meta/CollectMVars.c ./Lean/Meta/DiscrTree.c ./Lean/Meta/DiscrTreeTypes.c ./Lean/Meta/Exception.c ./Lean/Meta/ExprDefEq.c ./Lean/Meta/ForEachExpr.c ./Lean/Meta/FunInfo.c ./Lean/Meta/GeneralizeTelescope.c ./Lean/Meta/InferType.c ./Lean/Meta/Instances.c ./Lean/Meta/KAbstract.c ./Lean/Meta/LevelDefEq.c ./Lean/Meta/Match.c ./Lean/Meta/Match/CaseArraySizes.c ./Lean/Meta/Match/CaseValues.c ./Lean/Meta/Match/MVarRenaming.c ./Lean/Meta/Match/Match.c ./Lean/Meta/Match/MatchPatternAttr.c ./Lean/Meta/MatchUtil.c ./Lean/Meta/Offset.c ./Lean/Meta/RecursorInfo.c ./Lean/Meta/Reduce.c ./Lean/Meta/ReduceEval.c ./Lean/Meta/SynthInstance.c ./Lean/Meta/Tactic.c ./Lean/Meta/Tactic/Apply.c ./Lean/Meta/Tactic/Assert.c ./Lean/Meta/Tactic/Assumption.c ./Lean/Meta/Tactic/Cases.c ./Lean/Meta/Tactic/Clear.c ./Lean/Meta/Tactic/FVarSubst.c ./Lean/Meta/Tactic/Generalize.c ./Lean/Meta/Tactic/Induction.c ./Lean/Meta/Tactic/Injection.c ./Lean/Meta/Tactic/Intro.c ./Lean/Meta/Tactic/Replace.c ./Lean/Meta/Tactic/Revert.c ./Lean/Meta/Tactic/Rewrite.c ./Lean/Meta/Tactic/Subst.c ./Lean/Meta/Tactic/Util.c ./Lean/Meta/TransparencyMode.c ./Lean/Meta/WHNF.c ./Lean/MetavarContext.c ./Lean/Modifiers.c ./Lean/MonadEnv.c ./Lean/Parser.c ./Lean/Parser/Basic.c ./Lean/Parser/Command.c ./Lean/Parser/Do.c ./Lean/Parser/Extension.c ./Lean/Parser/Level.c ./Lean/Parser/Module.c ./Lean/Parser/StrInterpolation.c ./Lean/Parser/Syntax.c ./Lean/Parser/Tactic.c ./Lean/Parser/Term.c ./Lean/Parser/Transform.c ./Lean/ParserCompiler.c ./Lean/ParserCompiler/Attribute.c ./Lean/PrettyPrinter.c ./Lean/PrettyPrinter/Backtrack.c ./Lean/PrettyPrinter/Formatter.c ./Lean/PrettyPrinter/Meta.c ./Lean/PrettyPrinter/Parenthesizer.c ./Lean/ProjFns.c ./Lean/ReducibilityAttrs.c ./Lean/ResolveName.c ./Lean/Runtime.c ./Lean/Scopes.c ./Lean/Server.c ./Lean/Server/ServerBin.c ./Lean/Server/Snapshots.c ./Lean/Structure.c ./Lean/Syntax.c ./Lean/ToExpr.c ./Lean/Util.c ./Lean/Util/CollectFVars.c ./Lean/Util/CollectLevelParams.c ./Lean/Util/CollectMVars.c ./Lean/Util/Constructions.c ./Lean/Util/FindExpr.c ./Lean/Util/FindMVar.c ./Lean/Util/FoldConsts.c ./Lean/Util/ForEachExpr.c ./Lean/Util/MonadCache.c ./Lean/Util/PPExt.c ./Lean/Util/PPGoal.c ./Lean/Util/Path.c ./Lean/Util/Profile.c ./Lean/Util/RecDepth.c ./Lean/Util/Recognizers.c ./Lean/Util/ReplaceExpr.c ./Lean/Util/ReplaceLevel.c ./Lean/Util/SCC.c ./Lean/Util/Sorry.c ./Lean/Util/Trace.c ./Std.c ./Std/Data.c ./Std/Data/AssocList.c ./Std/Data/BinomialHeap.c ./Std/Data/DList.c ./Std/Data/HashMap.c ./Std/Data/HashSet.c ./Std/Data/PersistentArray.c ./Std/Data/PersistentHashMap.c ./Std/Data/PersistentHashSet.c ./Std/Data/Queue.c ./Std/Data/RBMap.c ./Std/Data/RBTree.c ./Std/Data/Stack.c ./Std/ShareCommon.c ) diff --git a/stage0/stdlib/Lean.c b/stage0/stdlib/Lean.c index ab6f94d00d..d498cbc0c2 100644 --- a/stage0/stdlib/Lean.c +++ b/stage0/stdlib/Lean.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean -// Imports: Init Lean.Compiler Lean.Environment Lean.Modifiers Lean.ProjFns Lean.Runtime Lean.Attributes Lean.Parser Lean.ReducibilityAttrs Lean.Elab Lean.Class Lean.LocalContext Lean.MetavarContext Lean.AuxRecursor Lean.Linter Lean.Meta Lean.Util Lean.Eval Lean.Structure Lean.Delaborator Lean.PrettyPrinter Lean.CoreM Lean.InternalExceptionId Lean.PrettyPrinter.Meta +// Imports: Init Lean.Compiler Lean.Environment Lean.Modifiers Lean.ProjFns Lean.Runtime Lean.ResolveName Lean.Attributes Lean.Parser Lean.ReducibilityAttrs Lean.Elab Lean.Class Lean.LocalContext Lean.MetavarContext Lean.AuxRecursor Lean.Linter Lean.Meta Lean.Util Lean.Eval Lean.Structure Lean.Delaborator Lean.PrettyPrinter Lean.CoreM Lean.InternalExceptionId Lean.PrettyPrinter.Meta #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -19,6 +19,7 @@ lean_object* initialize_Lean_Environment(lean_object*); lean_object* initialize_Lean_Modifiers(lean_object*); lean_object* initialize_Lean_ProjFns(lean_object*); lean_object* initialize_Lean_Runtime(lean_object*); +lean_object* initialize_Lean_ResolveName(lean_object*); lean_object* initialize_Lean_Attributes(lean_object*); lean_object* initialize_Lean_Parser(lean_object*); lean_object* initialize_Lean_ReducibilityAttrs(lean_object*); @@ -60,6 +61,9 @@ lean_dec_ref(res); res = initialize_Lean_Runtime(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_ResolveName(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Lean_Attributes(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); diff --git a/stage0/stdlib/Lean/Attributes.c b/stage0/stdlib/Lean/Attributes.c index 4f9cced76b..2b8bd26010 100644 --- a/stage0/stdlib/Lean/Attributes.c +++ b/stage0/stdlib/Lean/Attributes.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Attributes -// Imports: Init Lean.Scopes Lean.Syntax Lean.CoreM +// Imports: Init Lean.Scopes Lean.Syntax Lean.CoreM Lean.ResolveName #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -109,6 +109,7 @@ size_t l_USize_shiftRight(size_t, size_t); lean_object* l_Lean_attributeExtension___elambda__2___boxed(lean_object*); lean_object* l_Array_binSearchAux___main___at_Lean_EnumAttributes_getValue___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_registerParametricAttribute___spec__5___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_read___at_Lean_attrResolveName___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_map___main___at_Lean_registerEnumAttributes___spec__9(lean_object*); lean_object* l_Lean_Environment_addAttributeOld___closed__2; uint8_t l_Std_AssocList_contains___main___at_Lean_registerAttributeImplBuilder___spec__2(lean_object*, lean_object*); @@ -119,6 +120,7 @@ lean_object* l_Lean_TODELETE_popScopeCore(lean_object*); extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; lean_object* l_Std_RBNode_find___main___at_Lean_EnumAttributes_setValue___spec__1(lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux___main___at_Lean_getBuiltinAttributeNames___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_attrResolveName___closed__3; lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_getBuiltinAttributeImpl___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_AttributeImpl_inhabited___closed__2; lean_object* lean_nat_add(lean_object*, lean_object*); @@ -127,11 +129,13 @@ lean_object* l_Lean_attributeExtension___elambda__2(lean_object*); lean_object* l_Lean_addAttribute(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Environment_8__persistentEnvExtensionsRef; lean_object* l_Lean_registerTagAttribute___lambda__4___closed__7; +lean_object* l_Lean_attrResolveName___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAttributeImplOfConstant___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkAttributeImplOfConstant___closed__1; lean_object* l_Std_RBNode_find___main___at_Lean_EnumAttributes_getValue___spec__1___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__4___closed__3; lean_object* l_Lean_attributeExtension___elambda__4(lean_object*, lean_object*); +lean_object* l_Lean_attrResolveName; lean_object* l_List_forM___main___at_Lean_registerEnumAttributes___spec__10(lean_object*, lean_object*); uint8_t l_Lean_AttributeApplicationTime_beq(uint8_t, uint8_t); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_mkAttributeImplOfBuilder___spec__1(lean_object*, lean_object*); @@ -252,6 +256,7 @@ lean_object* l_Lean_ParametricAttribute_setParam___rarg(lean_object*, lean_objec lean_object* l_Std_RBNode_fold___main___at_Lean_registerEnumAttributes___spec__1(lean_object*); lean_object* l_Std_PersistentHashMap_contains___at_Lean_registerBuiltinAttribute___spec__1___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_registerParametricAttribute___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_attrResolveName___closed__4; lean_object* l_IO_ofExcept___at_Lean_mkAttributeImplOfBuilder___spec__3___boxed(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_getBuiltinAttributeNames___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getAttributeImpl___boxed(lean_object*, lean_object*); @@ -280,6 +285,7 @@ lean_object* l_Lean_registerTagAttribute___lambda__4(lean_object*, lean_object*, uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); lean_object* l_Lean_registerTagAttribute___lambda__4___closed__5; +lean_object* l_Lean_attrResolveName___closed__1; lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_registerEnumAttributes___spec__6___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_EnumAttributes_setValue___rarg___closed__1; lean_object* l_Lean_registerParametricAttribute(lean_object*); @@ -322,9 +328,11 @@ lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean extern lean_object* l_Lean_TraceState_Inhabited___closed__1; lean_object* l_Lean_registerParametricAttribute___rarg___lambda__3___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_registerEnumAttributes___spec__6(lean_object*); +lean_object* l_Lean_attrResolveName___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Attributes_1__AttributeExtension_mkInitial(lean_object*); lean_object* l_Std_AssocList_find_x3f___main___at_Lean_mkAttributeImplOfBuilder___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_AttributeImpl_inhabited; +lean_object* l_Lean_attrResolveName___closed__2; extern lean_object* l_Lean_PersistentEnvExtension_inhabited___closed__5; lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_registerParametricAttribute___spec__7(lean_object*); lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_getBuiltinAttributeNames___spec__1(lean_object*, lean_object*); @@ -342,6 +350,7 @@ lean_object* l_Lean_mkAttributeImplOfConstantUnsafe___closed__2; lean_object* l_Lean_registerTagAttribute(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Std_PersistentHashMap_contains___at_Lean_registerBuiltinAttribute___spec__1(lean_object*, lean_object*); lean_object* l_Lean_registerParametricAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); +lean_object* l_Lean_attrResolveName___closed__5; lean_object* l_Lean_registerTagAttribute___lambda__4___closed__11; lean_object* l_Lean_EnumAttributes_setValue___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerParametricAttribute___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); @@ -354,8 +363,10 @@ lean_object* l_Array_iterateMAux___main___at_Lean_registerBuiltinAttribute___spe extern lean_object* l_Lean_Unhygienic_run___rarg___closed__1; lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_registerEnumAttributes___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParametricAttribute_Inhabited___closed__1; +lean_object* l_Lean_attrResolveName___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_registerEnumAttributes___spec__7___rarg(lean_object*, lean_object*); lean_object* l_List_toArrayAux___main___rarg(lean_object*, lean_object*); +lean_object* l_ReaderT_read___at_Lean_attrResolveName___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_System_FilePath_dirName___closed__1; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_find___main___at_Lean_ParametricAttribute_setParam___spec__1___rarg___boxed(lean_object*, lean_object*); @@ -366,6 +377,8 @@ lean_object* l_Lean_attributeExtension___elambda__3___boxed(lean_object*, lean_o lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_registerEnumAttributes___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_usize_to_nat(size_t); lean_object* l_Lean_getBuiltinAttributeImpl___closed__1; +lean_object* l_ReaderT_bind___at_Lean_attrResolveName___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_ReaderT_bind___at_Lean_attrResolveName___spec__2(lean_object*, lean_object*); lean_object* l_Lean_registerAttributeImplBuilder(lean_object*, lean_object*, lean_object*); lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*); lean_object* l_Lean_mkAttributeExtension___closed__5; @@ -383,6 +396,7 @@ lean_object* l_Lean_registerParametricAttribute___rarg___lambda__1(lean_object*, lean_object* l_Lean_registerTagAttribute___lambda__3___closed__1; lean_object* l_Lean_getAttributeNames(lean_object*); lean_object* l_Lean_attributeExtension___elambda__4___boxed(lean_object*, lean_object*); +lean_object* l_Lean_attrResolveName___closed__6; lean_object* l_Lean_EnumAttributes_setValue(lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_registerEnumAttributes___spec__8___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -393,6 +407,7 @@ extern lean_object* l_Lean_mkAppStx___closed__1; lean_object* l___private_Lean_Attributes_2__AttributeExtension_addImported___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAttributeExtension___closed__3; lean_object* l_Lean_registerTagAttribute___lambda__3___closed__2; +lean_object* l_Lean_attrResolveName___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAttributeImplOfBuilder(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerEnumAttributes(lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__3___boxed(lean_object*); @@ -497,6 +512,197 @@ x_1 = l_Lean_AttributeApplicationTime_hasBeq___closed__1; return x_1; } } +lean_object* l_ReaderT_read___at_Lean_attrResolveName___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_5, 0, x_1); +lean_ctor_set(x_5, 1, x_4); +return x_5; +} +} +lean_object* l_ReaderT_bind___at_Lean_attrResolveName___spec__2___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_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +x_7 = lean_apply_4(x_1, x_3, x_4, x_5, x_6); +if (lean_obj_tag(x_7) == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_7, 0); +lean_inc(x_8); +x_9 = lean_ctor_get(x_7, 1); +lean_inc(x_9); +lean_dec(x_7); +x_10 = lean_apply_5(x_2, x_8, x_3, x_4, x_5, x_9); +return x_10; +} +else +{ +uint8_t x_11; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_11 = !lean_is_exclusive(x_7); +if (x_11 == 0) +{ +return x_7; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_7, 0); +x_13 = lean_ctor_get(x_7, 1); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_7); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_12); +lean_ctor_set(x_14, 1, x_13); +return x_14; +} +} +} +} +lean_object* l_ReaderT_bind___at_Lean_attrResolveName___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_attrResolveName___spec__2___rarg), 6, 0); +return x_3; +} +} +lean_object* l_Lean_attrResolveName___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_5); +return x_7; +} +} +lean_object* l_Lean_attrResolveName___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_ctor_get(x_1, 1); +lean_inc(x_6); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_5); +return x_7; +} +} +lean_object* _init_l_Lean_attrResolveName___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_ReaderT_read___at_Lean_attrResolveName___spec__1___boxed), 4, 0); +return x_1; +} +} +lean_object* _init_l_Lean_attrResolveName___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_attrResolveName___lambda__1___boxed), 5, 0); +return x_1; +} +} +lean_object* _init_l_Lean_attrResolveName___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_attrResolveName___closed__1; +x_2 = l_Lean_attrResolveName___closed__2; +x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_attrResolveName___spec__2___rarg), 6, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_attrResolveName___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_attrResolveName___lambda__2___boxed), 5, 0); +return x_1; +} +} +lean_object* _init_l_Lean_attrResolveName___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_attrResolveName___closed__1; +x_2 = l_Lean_attrResolveName___closed__4; +x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_attrResolveName___spec__2___rarg), 6, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_attrResolveName___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_attrResolveName___closed__3; +x_2 = l_Lean_attrResolveName___closed__5; +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_attrResolveName() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_attrResolveName___closed__6; +return x_1; +} +} +lean_object* l_ReaderT_read___at_Lean_attrResolveName___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_ReaderT_read___at_Lean_attrResolveName___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_5; +} +} +lean_object* l_Lean_attrResolveName___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_attrResolveName___lambda__1(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); +return x_6; +} +} +lean_object* l_Lean_attrResolveName___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_attrResolveName___lambda__2(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); +return x_6; +} +} lean_object* l_Lean_AttributeImpl_inhabited___lambda__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { @@ -9574,6 +9780,7 @@ lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Scopes(lean_object*); lean_object* initialize_Lean_Syntax(lean_object*); lean_object* initialize_Lean_CoreM(lean_object*); +lean_object* initialize_Lean_ResolveName(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Attributes(lean_object* w) { lean_object * res; @@ -9591,10 +9798,27 @@ lean_dec_ref(res); res = initialize_Lean_CoreM(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_ResolveName(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); l_Lean_AttributeApplicationTime_hasBeq___closed__1 = _init_l_Lean_AttributeApplicationTime_hasBeq___closed__1(); lean_mark_persistent(l_Lean_AttributeApplicationTime_hasBeq___closed__1); l_Lean_AttributeApplicationTime_hasBeq = _init_l_Lean_AttributeApplicationTime_hasBeq(); lean_mark_persistent(l_Lean_AttributeApplicationTime_hasBeq); +l_Lean_attrResolveName___closed__1 = _init_l_Lean_attrResolveName___closed__1(); +lean_mark_persistent(l_Lean_attrResolveName___closed__1); +l_Lean_attrResolveName___closed__2 = _init_l_Lean_attrResolveName___closed__2(); +lean_mark_persistent(l_Lean_attrResolveName___closed__2); +l_Lean_attrResolveName___closed__3 = _init_l_Lean_attrResolveName___closed__3(); +lean_mark_persistent(l_Lean_attrResolveName___closed__3); +l_Lean_attrResolveName___closed__4 = _init_l_Lean_attrResolveName___closed__4(); +lean_mark_persistent(l_Lean_attrResolveName___closed__4); +l_Lean_attrResolveName___closed__5 = _init_l_Lean_attrResolveName___closed__5(); +lean_mark_persistent(l_Lean_attrResolveName___closed__5); +l_Lean_attrResolveName___closed__6 = _init_l_Lean_attrResolveName___closed__6(); +lean_mark_persistent(l_Lean_attrResolveName___closed__6); +l_Lean_attrResolveName = _init_l_Lean_attrResolveName(); +lean_mark_persistent(l_Lean_attrResolveName); l_Lean_AttributeImpl_inhabited___closed__1 = _init_l_Lean_AttributeImpl_inhabited___closed__1(); lean_mark_persistent(l_Lean_AttributeImpl_inhabited___closed__1); l_Lean_AttributeImpl_inhabited___closed__2 = _init_l_Lean_AttributeImpl_inhabited___closed__2(); diff --git a/stage0/stdlib/Lean/Class.c b/stage0/stdlib/Lean/Class.c index bd86f8403e..ddfa0622c0 100644 --- a/stage0/stdlib/Lean/Class.c +++ b/stage0/stdlib/Lean/Class.c @@ -17,13 +17,9 @@ lean_object* l_Std_AssocList_find_x3f___main___at_Lean_hasOutParams___spec__6(le lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_mkClassExtension___spec__4(lean_object*, lean_object*); lean_object* l___private_Lean_Expr_10__hasAnyFVarAux___main___at___private_Lean_Class_1__checkOutParam___main___spec__3(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__6___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__22___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); -lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__1; uint8_t lean_is_out_param(lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Lean_Class_1__checkOutParam___main___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__2; -lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_ClassState_addEntry___spec__13___boxed(lean_object*, lean_object*); lean_object* l_unreachable_x21___rarg(lean_object*); lean_object* l___private_Lean_Class_1__checkOutParam(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ClassState_switch(lean_object*); @@ -32,7 +28,6 @@ lean_object* l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Array_iterateMAux___main___at_Lean_mkClassExtension___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__1(lean_object*, lean_object*); -lean_object* l_Std_PersistentHashMap_findAux___main___at_Lean_ClassState_addEntry___spec__14___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addClass___closed__4; lean_object* l_Lean_ClassState_addEntry(lean_object*, lean_object*); uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*); @@ -41,19 +36,17 @@ uint8_t l_Std_PersistentHashMap_containsAtAux___main___at_Lean_Environment_conta lean_object* l_Lean_SMap_contains___at_Lean_isClass___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_isOutParam___closed__2; lean_object* l_Lean_registerClassAttr___lambda__1___closed__6; -lean_object* l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__19(lean_object*, lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__33(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__11(lean_object*, uint8_t, lean_object*); extern lean_object* l_Lean_registerInternalExceptionId___closed__2; lean_object* l_Lean_classExtension; lean_object* l_Std_HashMapImp_find_x3f___at_Lean_hasOutParams___spec__5(lean_object*, lean_object*); lean_object* l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(lean_object*, lean_object*); +lean_object* l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__19(lean_object*, lean_object*); size_t l_USize_sub(size_t, size_t); extern lean_object* l_Array_empty___closed__1; lean_object* lean_environment_find(lean_object*, lean_object*); -lean_object* l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__18(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__2; +lean_object* l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__13(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l___private_Lean_Class_2__consumeNLambdas___main(lean_object*, lean_object*); @@ -66,21 +59,19 @@ lean_object* lean_expr_instantiate1(lean_object*, lean_object*); uint8_t l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__7(lean_object*, lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); -lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__32(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); lean_object* l_Lean_isOutParam___boxed(lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_isOutParam___closed__1; lean_object* l_Lean_Expr_getAppFn___main(lean_object*); uint8_t l_Std_HashMapImp_contains___at_Lean_isInstance___spec__2(lean_object*, lean_object*); -lean_object* l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__38(lean_object*, lean_object*); lean_object* l_Lean_setEnv___at_Lean_registerTagAttribute___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__5(lean_object*); size_t l_USize_shiftRight(size_t, size_t); lean_object* l_Std_PersistentHashMap_contains___at_Lean_isClass___spec__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_classExtension___elambda__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_SMap_contains___at_Lean_isInstance___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_classExtension___elambda__2(lean_object*); -lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__1; extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; lean_object* l_Lean_classExtension___elambda__1___boxed(lean_object*); lean_object* lean_get_class_instances(lean_object*, lean_object*); @@ -88,21 +79,17 @@ lean_object* l_Lean_ClassEntry_getName(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__9(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ClassEntry_lt___boxed(lean_object*, lean_object*); -lean_object* l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__34(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_AssocList_find_x3f___main___at_Lean_ClassState_addEntry___spec__17(lean_object*, lean_object*); extern lean_object* l___private_Lean_Environment_8__persistentEnvExtensionsRef; -lean_object* l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__25(lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__16(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_contains___at_Lean_isInstance___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_registerClassAttr___closed__4; -lean_object* l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__27(lean_object*, lean_object*); lean_object* l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__11___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__2(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SMap_find_x3f___at_Lean_ClassState_addEntry___spec__12(lean_object*, lean_object*); lean_object* l_Lean_registerClassAttr___lambda__1___closed__1; lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__17(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_classExtension___closed__2; lean_object* l_Lean_ClassState_Inhabited___closed__1; lean_object* l_Lean_getClassName___main(lean_object*, lean_object*); @@ -113,14 +100,14 @@ lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_hasOutParams___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); extern lean_object* l_Std_PersistentHashMap_insertAux___main___rarg___closed__3; +lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__3(lean_object*); lean_object* l_Lean_registerClassAttr___lambda__1___closed__4; -lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__2; -lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20(lean_object*, size_t, size_t, lean_object*, lean_object*); -lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_ClassState_addEntry___spec__15(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_mkEmptyEnvironment___closed__1; lean_object* l_Std_PersistentHashMap_containsAux___main___at_Lean_isClass___spec__4___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__3(lean_object*, lean_object*); lean_object* l_Lean_registerClassAttr___lambda__1___closed__2; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18___boxed(lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Std_mkHashMapImp___rarg(lean_object*); lean_object* l_Lean_mkClassExtension(lean_object*); @@ -129,30 +116,27 @@ lean_object* l_Lean_isClass___boxed(lean_object*, lean_object*); lean_object* l_Lean_registerClassAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_classExtension___closed__5; size_t l_Lean_Name_hash(lean_object*); -lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__6(lean_object*); lean_object* l_Nat_repr(lean_object*); extern lean_object* l_Char_HasRepr___closed__1; +lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_hasOutParams___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__4(lean_object*, lean_object*, lean_object*, uint8_t); lean_object* lean_name_mk_string(lean_object*, lean_object*); -uint8_t l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__35(lean_object*, lean_object*); lean_object* l_Lean_ClassState_Inhabited; lean_object* l_Lean_addClass(lean_object*, lean_object*); -lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__1; extern size_t l_Std_PersistentHashMap_insertAux___main___rarg___closed__2; -lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__33___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_mkClassExtension___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_classExtension___elambda__4___boxed(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAux___main___at_Lean_hasOutParams___spec__3(lean_object*, size_t, lean_object*); extern lean_object* l_IO_Error_Inhabited___closed__1; lean_object* l_Std_PersistentHashMap_contains___at_Lean_isInstance___spec__3___boxed(lean_object*, lean_object*); +lean_object* l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__12(lean_object*, lean_object*, lean_object*); size_t lean_usize_modn(size_t, lean_object*); lean_object* l_Lean_classExtension___closed__1; +lean_object* l_Lean_SMap_insert___at_Lean_addAliasEntry___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerBuiltinAttribute(lean_object*, lean_object*); -lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_ClassState_addEntry___spec__13(lean_object*, lean_object*); lean_object* l_Lean_ofExcept___at_Lean_registerClassAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_mul(size_t, size_t); -lean_object* l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__26(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__5(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_contains___at___private_Lean_Class_1__checkOutParam___main___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); @@ -169,21 +153,23 @@ lean_object* l_Lean_ConstantInfo_value_x3f(lean_object*); lean_object* lean_add_instance_old(lean_object*, lean_object*); uint8_t lean_is_instance(lean_object*, lean_object*); lean_object* l_Lean_classExtension___elambda__4(lean_object*, lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4; 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_Std_AssocList_find_x3f___main___at_Lean_hasOutParams___spec__6___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkClassExtension___closed__4; extern lean_object* l_Lean_EnvExtensionInterfaceUnsafe_Ext_inhabitedExt___closed__2; +lean_object* l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__21(lean_object*, lean_object*); lean_object* l_Lean_SimplePersistentEnvExtension_getState___rarg(lean_object*, lean_object*); -lean_object* l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__23(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Class_1__checkOutParam___main___closed__1; lean_object* l_Lean_registerClassAttr___closed__1; -lean_object* l_Std_HashMapImp_find_x3f___at_Lean_ClassState_addEntry___spec__16(lean_object*, lean_object*); lean_object* l_Lean_mkClassExtension___closed__2; lean_object* l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__10(lean_object*, lean_object*); lean_object* l___private_Lean_Class_1__checkOutParam___main___closed__3; uint8_t l_Array_contains___at___private_Lean_Class_1__checkOutParam___main___spec__1(lean_object*, lean_object*); +uint8_t l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(lean_object*, lean_object*); lean_object* l___private_Lean_Class_1__checkOutParam___main(lean_object*, lean_object*, lean_object*); +lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14(lean_object*, size_t, size_t, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; lean_object* l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__8(lean_object*, lean_object*); lean_object* l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__7___boxed(lean_object*, lean_object*); @@ -191,93 +177,81 @@ lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__1___bo lean_object* l_Std_HashMapImp_contains___at_Lean_isClass___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_classExtension___closed__4; uint8_t l_Lean_Syntax_hasArgs(lean_object*); -lean_object* l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__28(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__24___boxed(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_hasOutParams___spec__2___boxed(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); lean_object* l_Lean_registerClassAttr___closed__3; +lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2; uint8_t l_Std_PersistentHashMap_containsAux___main___at_Lean_isInstance___spec__4(lean_object*, size_t, lean_object*); lean_object* l_Lean_classExtension___elambda__4___rarg(lean_object*); extern lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___closed__1; lean_object* l_Lean_registerClassAttr___lambda__1___closed__3; lean_object* l_Lean_mkClassExtension___closed__5; extern uint8_t l_Bool_Inhabited; -lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_mkClassExtension___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at_Lean_mkClassExtension___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkClassExtension___closed__3; lean_object* l_Lean_registerClassAttr___lambda__1___closed__5; +lean_object* l_Lean_SMap_switch___at_Lean_mkAliasExtension___spec__5(lean_object*); lean_object* l_Lean_registerClassAttr(lean_object*); lean_object* lean_nat_mul(lean_object*, lean_object*); -lean_object* l_Std_AssocList_find_x3f___main___at_Lean_ClassState_addEntry___spec__17___boxed(lean_object*, lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__1; lean_object* l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_classExtension___elambda__2___boxed(lean_object*); -lean_object* l_Std_PersistentHashMap_findAux___main___at_Lean_ClassState_addEntry___spec__14(lean_object*, size_t, lean_object*); uint8_t l_Std_PersistentHashMap_contains___at_Lean_isClass___spec__3(lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); -uint8_t l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__24(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAux___main___at_Lean_hasOutParams___spec__3___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__3(lean_object*); lean_object* l_Lean_classExtension___elambda__3(lean_object*, lean_object*); lean_object* l___private_Lean_Class_1__checkOutParam___main___closed__2; lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__1___boxed(lean_object*, lean_object*); -lean_object* l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__39(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__2(lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Lean_Class_1__checkOutParam___main___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__2; lean_object* l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__1___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__35___boxed(lean_object*, lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1; lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_mkClassExtension___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__36(lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2; -lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5; lean_object* l_Lean_registerClassAttr___closed__5; uint8_t l_Std_PersistentHashMap_contains___at_Lean_isInstance___spec__3(lean_object*, lean_object*); +lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__2; +lean_object* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__1; lean_object* l_Lean_SMap_find_x3f___at_Lean_hasOutParams___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_SMap_find_x3f___at_Lean_addAliasEntry___spec__1(lean_object*, lean_object*); lean_object* l_Lean_addGlobalInstanceOld___closed__2; -lean_object* l_Std_HashMapImp_find_x3f___at_Lean_ClassState_addEntry___spec__16___boxed(lean_object*, lean_object*); +lean_object* l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__20(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Class_1__checkOutParam___main___closed__4; -lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_Lean_isInstance___boxed(lean_object*, lean_object*); lean_object* l_Lean_SMap_find_x3f___at_Lean_hasOutParams___spec__1(lean_object*, lean_object*); lean_object* l_Lean_addClass___closed__2; -lean_object* l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__30(lean_object*, lean_object*, lean_object*); extern lean_object* l_System_FilePath_dirName___closed__1; -lean_object* l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__37(lean_object*, lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); lean_object* lean_usize_to_nat(size_t); -lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_ClassState_addEntry___spec__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_regNamespacesExtension___closed__4; +lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__15(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkClassExtension___closed__1; lean_object* l_Lean_addClass___closed__1; lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*); uint8_t l_Lean_Expr_hasFVar(lean_object*); lean_object* l___private_Lean_Expr_10__hasAnyFVarAux___main___at___private_Lean_Class_1__checkOutParam___main___spec__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__2(lean_object*); -lean_object* l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__29(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkClassExtension___spec__5(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_hasOutParams___spec__5___boxed(lean_object*, lean_object*); -lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__4(lean_object*); -lean_object* l_Lean_SMap_find_x3f___at_Lean_ClassState_addEntry___spec__12___boxed(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_containsAux___main___at_Lean_isInstance___spec__4___boxed(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_SMap_contains___at_Lean_isClass___spec__1(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__6(lean_object*, lean_object*, uint8_t); lean_object* l_Lean_addClass___closed__3; +lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__16___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_has_out_params(lean_object*, lean_object*); lean_object* lean_name_mk_numeral(lean_object*, lean_object*); lean_object* l_Lean_hasOutParams___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkClassExtension___lambda__1(lean_object*); uint8_t lean_is_class(lean_object*, lean_object*); -lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__21(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(lean_object*, lean_object*, lean_object*); uint8_t l_Std_HashMapImp_contains___at_Lean_isClass___spec__2(lean_object*, lean_object*); lean_object* l_Lean_classExtension___elambda__1(lean_object*); lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_hasOutParams___spec__2(lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__22(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__3(lean_object*, size_t, size_t, lean_object*, uint8_t); lean_object* l___private_Lean_Class_2__consumeNLambdas(lean_object*, lean_object*); @@ -321,46 +295,15 @@ x_4 = lean_box(x_3); return x_4; } } -lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Std_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = lean_unsigned_to_nat(8u); -x_2 = l_Std_mkHashMapImp___rarg(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___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_ClassState_Inhabited___spec__1___closed__1; -x_3 = l_Lean_LocalContext_Inhabited___closed__1; -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_ClassState_Inhabited___spec__1() { _start: { lean_object* x_1; -x_1 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__2; +x_1 = l_Lean_mkEmptyEnvironment___closed__1; return x_1; } } -lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__4(lean_object* x_1) { +lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__3(lean_object* x_1) { _start: { lean_object* x_2; @@ -368,7 +311,7 @@ x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } -lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__1() { +lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -377,12 +320,12 @@ x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } -lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__2() { +lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___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_ClassState_Inhabited___spec__3___closed__1; +x_2 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__1; x_3 = l_Lean_LocalContext_Inhabited___closed__1; x_4 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_4, 0, x_2); @@ -391,15 +334,15 @@ lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1); return x_4; } } -lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3() { +lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2() { _start: { lean_object* x_1; -x_1 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__2; +x_1 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__2; return x_1; } } -lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__6(lean_object* x_1) { +lean_object* l_Std_mkHashMap___at_Lean_ClassState_Inhabited___spec__5(lean_object* x_1) { _start: { lean_object* x_2; @@ -407,7 +350,7 @@ x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } -lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__1() { +lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -416,12 +359,12 @@ x_2 = l_Std_mkHashMapImp___rarg(x_1); return x_2; } } -lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__2() { +lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___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_ClassState_Inhabited___spec__5___closed__1; +x_2 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__1; x_3 = l_Lean_LocalContext_Inhabited___closed__1; x_4 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_4, 0, x_2); @@ -430,11 +373,11 @@ lean_ctor_set_uint8(x_4, sizeof(void*)*2, x_1); return x_4; } } -lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5() { +lean_object* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4() { _start: { lean_object* x_1; -x_1 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__2; +x_1 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__2; return x_1; } } @@ -443,8 +386,8 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; x_1 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1; -x_2 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3; -x_3 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5; +x_2 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2; +x_3 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__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); @@ -1328,225 +1271,7 @@ return x_18; } } } -lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_ClassState_addEntry___spec__15(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_Std_PersistentHashMap_findAux___main___at_Lean_ClassState_addEntry___spec__14(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_Std_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_Std_PersistentHashMap_findAtAux___main___at_Lean_ClassState_addEntry___spec__15(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_Std_PersistentHashMap_find_x3f___at_Lean_ClassState_addEntry___spec__13(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_Std_PersistentHashMap_findAux___main___at_Lean_ClassState_addEntry___spec__14(x_3, x_4, x_2); -return x_5; -} -} -lean_object* l_Std_AssocList_find_x3f___main___at_Lean_ClassState_addEntry___spec__17(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_Std_HashMapImp_find_x3f___at_Lean_ClassState_addEntry___spec__16(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_Std_AssocList_find_x3f___main___at_Lean_ClassState_addEntry___spec__17(x_2, x_7); -lean_dec(x_7); -return x_8; -} -} -lean_object* l_Lean_SMap_find_x3f___at_Lean_ClassState_addEntry___spec__12(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_Std_PersistentHashMap_find_x3f___at_Lean_ClassState_addEntry___spec__13(x_5, x_2); -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; -x_7 = l_Std_HashMapImp_find_x3f___at_Lean_ClassState_addEntry___spec__16(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_Std_HashMapImp_find_x3f___at_Lean_ClassState_addEntry___spec__16(x_8, x_2); -lean_dec(x_8); -return x_9; -} -} -} -lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__21(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__15(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; uint8_t x_8; @@ -1638,7 +1363,7 @@ return x_29; } } } -lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__22(size_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__16(size_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; uint8_t x_8; @@ -1661,7 +1386,7 @@ x_13 = x_1 - x_12; x_14 = 5; x_15 = x_14 * x_13; x_16 = x_11 >> x_15; -x_17 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20(x_6, x_16, x_1, x_9, x_10); +x_17 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14(x_6, x_16, x_1, x_9, x_10); x_18 = lean_unsigned_to_nat(1u); x_19 = lean_nat_add(x_5, x_18); lean_dec(x_5); @@ -1671,7 +1396,7 @@ goto _start; } } } -lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5) { _start: { if (lean_obj_tag(x_1) == 0) @@ -1784,7 +1509,7 @@ lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_3 x_35 = lean_ctor_get(x_15, 0); x_36 = x_2 >> x_9; x_37 = x_3 + x_8; -x_38 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20(x_35, x_36, x_37, x_4, x_5); +x_38 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14(x_35, x_36, x_37, x_4, x_5); lean_ctor_set(x_15, 0, x_38); x_39 = lean_array_fset(x_17, x_12, x_15); lean_dec(x_12); @@ -1799,7 +1524,7 @@ lean_inc(x_40); lean_dec(x_15); x_41 = x_2 >> x_9; x_42 = x_3 + x_8; -x_43 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20(x_40, x_41, x_42, x_4, x_5); +x_43 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14(x_40, x_41, x_42, x_4, x_5); x_44 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_44, 0, x_43); x_45 = lean_array_fset(x_17, x_12, x_44); @@ -1915,7 +1640,7 @@ if (lean_is_exclusive(x_57)) { } x_73 = x_2 >> x_50; x_74 = x_3 + x_49; -x_75 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20(x_71, x_73, x_74, x_4, x_5); +x_75 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14(x_71, x_73, x_74, x_4, x_5); if (lean_is_scalar(x_72)) { x_76 = lean_alloc_ctor(1, 1, 0); } else { @@ -1948,7 +1673,7 @@ else { lean_object* x_82; lean_object* x_83; size_t x_84; uint8_t x_85; x_82 = lean_unsigned_to_nat(0u); -x_83 = l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__21(x_1, x_82, x_4, x_5); +x_83 = l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__15(x_1, x_82, x_4, x_5); x_84 = 7; x_85 = x_84 <= x_3; if (x_85 == 0) @@ -1967,7 +1692,7 @@ x_90 = lean_ctor_get(x_83, 1); lean_inc(x_90); lean_dec(x_83); x_91 = l_Std_PersistentHashMap_insertAux___main___rarg___closed__3; -x_92 = l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__22(x_3, x_89, x_90, x_89, x_82, x_91); +x_92 = l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__16(x_3, x_89, x_90, x_89, x_82, x_91); lean_dec(x_90); lean_dec(x_89); return x_92; @@ -1984,7 +1709,7 @@ return x_83; } } } -lean_object* l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__19(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__13(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; @@ -1996,7 +1721,7 @@ x_5 = lean_ctor_get(x_1, 0); x_6 = lean_ctor_get(x_1, 1); x_7 = l_Lean_Name_hash(x_2); x_8 = 1; -x_9 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20(x_5, x_7, x_8, x_2, x_3); +x_9 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14(x_5, x_7, x_8, x_2, x_3); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_6, x_10); lean_dec(x_6); @@ -2014,7 +1739,7 @@ lean_inc(x_12); lean_dec(x_1); x_14 = l_Lean_Name_hash(x_2); x_15 = 1; -x_16 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20(x_12, x_14, x_15, x_2, x_3); +x_16 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14(x_12, x_14, x_15, x_2, x_3); x_17 = lean_unsigned_to_nat(1u); x_18 = lean_nat_add(x_13, x_17); lean_dec(x_13); @@ -2025,7 +1750,7 @@ return x_19; } } } -uint8_t l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__24(lean_object* x_1, lean_object* x_2) { +uint8_t l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -2054,7 +1779,7 @@ return x_8; } } } -lean_object* l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__27(lean_object* x_1, lean_object* x_2) { +lean_object* l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__21(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -2108,7 +1833,7 @@ goto _start; } } } -lean_object* l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__26(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__20(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_5; @@ -2127,7 +1852,7 @@ lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_obj x_6 = lean_array_fget(x_2, x_1); x_7 = lean_box(0); x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__27(x_3, x_6); +x_9 = l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__21(x_3, x_6); x_10 = lean_unsigned_to_nat(1u); x_11 = lean_nat_add(x_1, x_10); lean_dec(x_1); @@ -2138,7 +1863,7 @@ goto _start; } } } -lean_object* l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__25(lean_object* x_1, lean_object* x_2) { +lean_object* l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__19(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; @@ -2149,14 +1874,14 @@ lean_dec(x_3); x_6 = lean_box(0); x_7 = lean_mk_array(x_5, x_6); x_8 = lean_unsigned_to_nat(0u); -x_9 = l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__26(x_8, x_2, x_7); +x_9 = l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__20(x_8, x_2, x_7); x_10 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_10, 0, x_1); lean_ctor_set(x_10, 1, x_9); return x_10; } } -lean_object* l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__28(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_3) == 0) @@ -2179,7 +1904,7 @@ x_8 = lean_name_eq(x_5, x_1); if (x_8 == 0) { lean_object* x_9; -x_9 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__28(x_1, x_2, x_7); +x_9 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(x_1, x_2, x_7); lean_ctor_set(x_3, 2, x_9); return x_3; } @@ -2206,7 +1931,7 @@ x_13 = lean_name_eq(x_10, x_1); if (x_13 == 0) { lean_object* x_14; lean_object* x_15; -x_14 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__28(x_1, x_2, x_12); +x_14 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(x_1, x_2, x_12); x_15 = lean_alloc_ctor(1, 3, 0); lean_ctor_set(x_15, 0, x_10); lean_ctor_set(x_15, 1, x_11); @@ -2228,7 +1953,7 @@ return x_16; } } } -lean_object* l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__23(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__17(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; @@ -2242,7 +1967,7 @@ x_7 = lean_array_get_size(x_6); x_8 = l_Lean_Name_hash(x_2); x_9 = lean_usize_modn(x_8, x_7); x_10 = lean_array_uget(x_6, x_9); -x_11 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__24(x_2, x_10); +x_11 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(x_2, x_10); if (x_11 == 0) { lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; @@ -2260,7 +1985,7 @@ if (x_16 == 0) { lean_object* x_17; lean_free_object(x_1); -x_17 = l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__25(x_13, x_15); +x_17 = l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__19(x_13, x_15); return x_17; } else @@ -2274,7 +1999,7 @@ else { lean_object* x_18; lean_object* x_19; lean_dec(x_7); -x_18 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__28(x_2, x_3, x_10); +x_18 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(x_2, x_3, x_10); x_19 = lean_array_uset(x_6, x_9, x_18); lean_ctor_set(x_1, 1, x_19); return x_1; @@ -2292,7 +2017,7 @@ x_22 = lean_array_get_size(x_21); x_23 = l_Lean_Name_hash(x_2); x_24 = lean_usize_modn(x_23, x_22); x_25 = lean_array_uget(x_21, x_24); -x_26 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__24(x_2, x_25); +x_26 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(x_2, x_25); if (x_26 == 0) { lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; @@ -2309,7 +2034,7 @@ lean_dec(x_22); if (x_31 == 0) { lean_object* x_32; -x_32 = l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__25(x_28, x_30); +x_32 = l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__19(x_28, x_30); return x_32; } else @@ -2325,7 +2050,7 @@ else { lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_dec(x_22); -x_34 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__28(x_2, x_3, x_25); +x_34 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(x_2, x_3, x_25); x_35 = lean_array_uset(x_21, x_24, x_34); x_36 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_36, 0, x_20); @@ -2335,7 +2060,7 @@ return x_36; } } } -lean_object* l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__18(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__12(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { uint8_t x_4; @@ -2348,7 +2073,7 @@ if (x_5 == 0) { lean_object* x_6; lean_object* x_7; x_6 = lean_ctor_get(x_1, 1); -x_7 = l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__19(x_6, x_2, x_3); +x_7 = l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__13(x_6, x_2, x_3); lean_ctor_set(x_1, 1, x_7); return x_1; } @@ -2360,7 +2085,7 @@ x_9 = lean_ctor_get(x_1, 1); lean_inc(x_9); lean_inc(x_8); lean_dec(x_1); -x_10 = l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__19(x_9, x_2, x_3); +x_10 = l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__13(x_9, x_2, x_3); x_11 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_11, 0, x_8); lean_ctor_set(x_11, 1, x_10); @@ -2376,7 +2101,7 @@ if (x_12 == 0) { lean_object* x_13; lean_object* x_14; x_13 = lean_ctor_get(x_1, 0); -x_14 = l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__23(x_13, x_2, x_3); +x_14 = l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__17(x_13, x_2, x_3); lean_ctor_set(x_1, 0, x_14); return x_1; } @@ -2388,859 +2113,7 @@ x_16 = lean_ctor_get(x_1, 1); lean_inc(x_16); lean_inc(x_15); lean_dec(x_1); -x_17 = l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__23(x_15, x_2, x_3); -x_18 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_16); -lean_ctor_set_uint8(x_18, sizeof(void*)*2, x_4); -return x_18; -} -} -} -} -lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__32(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; uint8_t x_8; -x_5 = lean_ctor_get(x_1, 0); -lean_inc(x_5); -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -x_7 = lean_array_get_size(x_5); -x_8 = lean_nat_dec_lt(x_2, x_7); -lean_dec(x_7); -if (x_8 == 0) -{ -uint8_t x_9; -lean_dec(x_2); -x_9 = !lean_is_exclusive(x_1); -if (x_9 == 0) -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_10 = lean_ctor_get(x_1, 1); -lean_dec(x_10); -x_11 = lean_ctor_get(x_1, 0); -lean_dec(x_11); -x_12 = lean_array_push(x_5, x_3); -x_13 = lean_array_push(x_6, x_4); -lean_ctor_set(x_1, 1, x_13); -lean_ctor_set(x_1, 0, x_12); -return x_1; -} -else -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; -lean_dec(x_1); -x_14 = lean_array_push(x_5, x_3); -x_15 = lean_array_push(x_6, x_4); -x_16 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_16, 0, x_14); -lean_ctor_set(x_16, 1, x_15); -return x_16; -} -} -else -{ -lean_object* x_17; uint8_t x_18; -x_17 = lean_array_fget(x_5, x_2); -x_18 = lean_name_eq(x_3, x_17); -lean_dec(x_17); -if (x_18 == 0) -{ -lean_object* x_19; lean_object* x_20; -lean_dec(x_6); -lean_dec(x_5); -x_19 = lean_unsigned_to_nat(1u); -x_20 = lean_nat_add(x_2, x_19); -lean_dec(x_2); -x_2 = x_20; -goto _start; -} -else -{ -uint8_t x_22; -x_22 = !lean_is_exclusive(x_1); -if (x_22 == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_23 = lean_ctor_get(x_1, 1); -lean_dec(x_23); -x_24 = lean_ctor_get(x_1, 0); -lean_dec(x_24); -x_25 = lean_array_fset(x_5, x_2, x_3); -x_26 = lean_array_fset(x_6, x_2, x_4); -lean_dec(x_2); -lean_ctor_set(x_1, 1, x_26); -lean_ctor_set(x_1, 0, x_25); -return x_1; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -lean_dec(x_1); -x_27 = lean_array_fset(x_5, x_2, x_3); -x_28 = lean_array_fset(x_6, x_2, x_4); -lean_dec(x_2); -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -return x_29; -} -} -} -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__33(size_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; uint8_t x_8; -x_7 = lean_array_get_size(x_4); -x_8 = lean_nat_dec_lt(x_5, x_7); -lean_dec(x_7); -if (x_8 == 0) -{ -lean_dec(x_5); -return x_6; -} -else -{ -lean_object* x_9; lean_object* x_10; size_t x_11; size_t x_12; size_t x_13; size_t x_14; size_t x_15; size_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_9 = lean_array_fget(x_4, x_5); -x_10 = lean_array_fget(x_3, x_5); -x_11 = l_Lean_Name_hash(x_9); -x_12 = 1; -x_13 = x_1 - x_12; -x_14 = 5; -x_15 = x_14 * x_13; -x_16 = x_11 >> x_15; -x_17 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31(x_6, x_16, x_1, x_9, x_10); -x_18 = lean_unsigned_to_nat(1u); -x_19 = lean_nat_add(x_5, x_18); -lean_dec(x_5); -x_5 = x_19; -x_6 = x_17; -goto _start; -} -} -} -lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -uint8_t x_6; -x_6 = !lean_is_exclusive(x_1); -if (x_6 == 0) -{ -lean_object* x_7; size_t x_8; size_t x_9; size_t x_10; size_t x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; -x_7 = lean_ctor_get(x_1, 0); -x_8 = 1; -x_9 = 5; -x_10 = l_Std_PersistentHashMap_insertAux___main___rarg___closed__2; -x_11 = x_2 & x_10; -x_12 = lean_usize_to_nat(x_11); -x_13 = lean_array_get_size(x_7); -x_14 = lean_nat_dec_lt(x_12, x_13); -lean_dec(x_13); -if (x_14 == 0) -{ -lean_dec(x_12); -lean_dec(x_5); -lean_dec(x_4); -return x_1; -} -else -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_array_fget(x_7, x_12); -x_16 = lean_box(2); -x_17 = lean_array_fset(x_7, x_12, x_16); -switch (lean_obj_tag(x_15)) { -case 0: -{ -uint8_t x_18; -x_18 = !lean_is_exclusive(x_15); -if (x_18 == 0) -{ -lean_object* x_19; lean_object* x_20; uint8_t x_21; -x_19 = lean_ctor_get(x_15, 0); -x_20 = lean_ctor_get(x_15, 1); -x_21 = lean_name_eq(x_4, x_19); -if (x_21 == 0) -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; -lean_free_object(x_15); -x_22 = l_Std_PersistentHashMap_mkCollisionNode___rarg(x_19, x_20, x_4, x_5); -x_23 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_23, 0, x_22); -x_24 = lean_array_fset(x_17, x_12, x_23); -lean_dec(x_12); -lean_ctor_set(x_1, 0, x_24); -return x_1; -} -else -{ -lean_object* x_25; -lean_dec(x_20); -lean_dec(x_19); -lean_ctor_set(x_15, 1, x_5); -lean_ctor_set(x_15, 0, x_4); -x_25 = lean_array_fset(x_17, x_12, x_15); -lean_dec(x_12); -lean_ctor_set(x_1, 0, x_25); -return x_1; -} -} -else -{ -lean_object* x_26; lean_object* x_27; uint8_t x_28; -x_26 = lean_ctor_get(x_15, 0); -x_27 = lean_ctor_get(x_15, 1); -lean_inc(x_27); -lean_inc(x_26); -lean_dec(x_15); -x_28 = lean_name_eq(x_4, x_26); -if (x_28 == 0) -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = l_Std_PersistentHashMap_mkCollisionNode___rarg(x_26, x_27, x_4, x_5); -x_30 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_30, 0, x_29); -x_31 = lean_array_fset(x_17, x_12, x_30); -lean_dec(x_12); -lean_ctor_set(x_1, 0, x_31); -return x_1; -} -else -{ -lean_object* x_32; lean_object* x_33; -lean_dec(x_27); -lean_dec(x_26); -x_32 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_32, 0, x_4); -lean_ctor_set(x_32, 1, x_5); -x_33 = lean_array_fset(x_17, x_12, x_32); -lean_dec(x_12); -lean_ctor_set(x_1, 0, x_33); -return x_1; -} -} -} -case 1: -{ -uint8_t x_34; -x_34 = !lean_is_exclusive(x_15); -if (x_34 == 0) -{ -lean_object* x_35; size_t x_36; size_t x_37; lean_object* x_38; lean_object* x_39; -x_35 = lean_ctor_get(x_15, 0); -x_36 = x_2 >> x_9; -x_37 = x_3 + x_8; -x_38 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31(x_35, x_36, x_37, x_4, x_5); -lean_ctor_set(x_15, 0, x_38); -x_39 = lean_array_fset(x_17, x_12, x_15); -lean_dec(x_12); -lean_ctor_set(x_1, 0, x_39); -return x_1; -} -else -{ -lean_object* x_40; size_t x_41; size_t x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_40 = lean_ctor_get(x_15, 0); -lean_inc(x_40); -lean_dec(x_15); -x_41 = x_2 >> x_9; -x_42 = x_3 + x_8; -x_43 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31(x_40, x_41, x_42, x_4, x_5); -x_44 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_44, 0, x_43); -x_45 = lean_array_fset(x_17, x_12, x_44); -lean_dec(x_12); -lean_ctor_set(x_1, 0, x_45); -return x_1; -} -} -default: -{ -lean_object* x_46; lean_object* x_47; -x_46 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_46, 0, x_4); -lean_ctor_set(x_46, 1, x_5); -x_47 = lean_array_fset(x_17, x_12, x_46); -lean_dec(x_12); -lean_ctor_set(x_1, 0, x_47); -return x_1; -} -} -} -} -else -{ -lean_object* x_48; size_t x_49; size_t x_50; size_t x_51; size_t x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; -x_48 = lean_ctor_get(x_1, 0); -lean_inc(x_48); -lean_dec(x_1); -x_49 = 1; -x_50 = 5; -x_51 = l_Std_PersistentHashMap_insertAux___main___rarg___closed__2; -x_52 = x_2 & x_51; -x_53 = lean_usize_to_nat(x_52); -x_54 = lean_array_get_size(x_48); -x_55 = lean_nat_dec_lt(x_53, x_54); -lean_dec(x_54); -if (x_55 == 0) -{ -lean_object* x_56; -lean_dec(x_53); -lean_dec(x_5); -lean_dec(x_4); -x_56 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_56, 0, x_48); -return x_56; -} -else -{ -lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_57 = lean_array_fget(x_48, x_53); -x_58 = lean_box(2); -x_59 = lean_array_fset(x_48, x_53, x_58); -switch (lean_obj_tag(x_57)) { -case 0: -{ -lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; -x_60 = lean_ctor_get(x_57, 0); -lean_inc(x_60); -x_61 = lean_ctor_get(x_57, 1); -lean_inc(x_61); -if (lean_is_exclusive(x_57)) { - lean_ctor_release(x_57, 0); - lean_ctor_release(x_57, 1); - x_62 = x_57; -} else { - lean_dec_ref(x_57); - x_62 = lean_box(0); -} -x_63 = lean_name_eq(x_4, x_60); -if (x_63 == 0) -{ -lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -lean_dec(x_62); -x_64 = l_Std_PersistentHashMap_mkCollisionNode___rarg(x_60, x_61, x_4, x_5); -x_65 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_65, 0, x_64); -x_66 = lean_array_fset(x_59, x_53, x_65); -lean_dec(x_53); -x_67 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_67, 0, x_66); -return x_67; -} -else -{ -lean_object* x_68; lean_object* x_69; lean_object* x_70; -lean_dec(x_61); -lean_dec(x_60); -if (lean_is_scalar(x_62)) { - x_68 = lean_alloc_ctor(0, 2, 0); -} else { - x_68 = x_62; -} -lean_ctor_set(x_68, 0, x_4); -lean_ctor_set(x_68, 1, x_5); -x_69 = lean_array_fset(x_59, x_53, x_68); -lean_dec(x_53); -x_70 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_70, 0, x_69); -return x_70; -} -} -case 1: -{ -lean_object* x_71; lean_object* x_72; size_t x_73; size_t x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_71 = lean_ctor_get(x_57, 0); -lean_inc(x_71); -if (lean_is_exclusive(x_57)) { - lean_ctor_release(x_57, 0); - x_72 = x_57; -} else { - lean_dec_ref(x_57); - x_72 = lean_box(0); -} -x_73 = x_2 >> x_50; -x_74 = x_3 + x_49; -x_75 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31(x_71, x_73, x_74, x_4, x_5); -if (lean_is_scalar(x_72)) { - x_76 = lean_alloc_ctor(1, 1, 0); -} else { - x_76 = x_72; -} -lean_ctor_set(x_76, 0, x_75); -x_77 = lean_array_fset(x_59, x_53, x_76); -lean_dec(x_53); -x_78 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_78, 0, x_77); -return x_78; -} -default: -{ -lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_79 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_79, 0, x_4); -lean_ctor_set(x_79, 1, x_5); -x_80 = lean_array_fset(x_59, x_53, x_79); -lean_dec(x_53); -x_81 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_81, 0, x_80); -return x_81; -} -} -} -} -} -else -{ -lean_object* x_82; lean_object* x_83; size_t x_84; uint8_t x_85; -x_82 = lean_unsigned_to_nat(0u); -x_83 = l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_ClassState_addEntry___spec__32(x_1, x_82, x_4, x_5); -x_84 = 7; -x_85 = x_84 <= x_3; -if (x_85 == 0) -{ -lean_object* x_86; lean_object* x_87; uint8_t x_88; -x_86 = l_Std_PersistentHashMap_getCollisionNodeSize___rarg(x_83); -x_87 = lean_unsigned_to_nat(4u); -x_88 = lean_nat_dec_lt(x_86, x_87); -lean_dec(x_86); -if (x_88 == 0) -{ -lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_89 = lean_ctor_get(x_83, 0); -lean_inc(x_89); -x_90 = lean_ctor_get(x_83, 1); -lean_inc(x_90); -lean_dec(x_83); -x_91 = l_Std_PersistentHashMap_insertAux___main___rarg___closed__3; -x_92 = l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__33(x_3, x_89, x_90, x_89, x_82, x_91); -lean_dec(x_90); -lean_dec(x_89); -return x_92; -} -else -{ -return x_83; -} -} -else -{ -return x_83; -} -} -} -} -lean_object* l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__30(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_1); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_5 = lean_ctor_get(x_1, 0); -x_6 = lean_ctor_get(x_1, 1); -x_7 = l_Lean_Name_hash(x_2); -x_8 = 1; -x_9 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31(x_5, x_7, x_8, x_2, x_3); -x_10 = lean_unsigned_to_nat(1u); -x_11 = lean_nat_add(x_6, x_10); -lean_dec(x_6); -lean_ctor_set(x_1, 1, x_11); -lean_ctor_set(x_1, 0, x_9); -return x_1; -} -else -{ -lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_12 = lean_ctor_get(x_1, 0); -x_13 = lean_ctor_get(x_1, 1); -lean_inc(x_13); -lean_inc(x_12); -lean_dec(x_1); -x_14 = l_Lean_Name_hash(x_2); -x_15 = 1; -x_16 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31(x_12, x_14, x_15, x_2, x_3); -x_17 = lean_unsigned_to_nat(1u); -x_18 = lean_nat_add(x_13, x_17); -lean_dec(x_13); -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_16); -lean_ctor_set(x_19, 1, x_18); -return x_19; -} -} -} -uint8_t l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__35(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -uint8_t x_3; -x_3 = 0; -return x_3; -} -else -{ -lean_object* x_4; lean_object* x_5; uint8_t x_6; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_name_eq(x_4, x_1); -if (x_6 == 0) -{ -x_2 = x_5; -goto _start; -} -else -{ -uint8_t x_8; -x_8 = 1; -return x_8; -} -} -} -} -lean_object* l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__38(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -return x_1; -} -else -{ -uint8_t x_3; -x_3 = !lean_is_exclusive(x_2); -if (x_3 == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; -x_4 = lean_ctor_get(x_2, 0); -x_5 = lean_ctor_get(x_2, 2); -x_6 = lean_array_get_size(x_1); -x_7 = l_Lean_Name_hash(x_4); -x_8 = lean_usize_modn(x_7, x_6); -lean_dec(x_6); -x_9 = lean_array_uget(x_1, x_8); -lean_ctor_set(x_2, 2, x_9); -x_10 = lean_array_uset(x_1, x_8, x_2); -x_1 = x_10; -x_2 = x_5; -goto _start; -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_12 = lean_ctor_get(x_2, 0); -x_13 = lean_ctor_get(x_2, 1); -x_14 = lean_ctor_get(x_2, 2); -lean_inc(x_14); -lean_inc(x_13); -lean_inc(x_12); -lean_dec(x_2); -x_15 = lean_array_get_size(x_1); -x_16 = l_Lean_Name_hash(x_12); -x_17 = lean_usize_modn(x_16, x_15); -lean_dec(x_15); -x_18 = lean_array_uget(x_1, x_17); -x_19 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_19, 0, x_12); -lean_ctor_set(x_19, 1, x_13); -lean_ctor_set(x_19, 2, x_18); -x_20 = lean_array_uset(x_1, x_17, x_19); -x_1 = x_20; -x_2 = x_14; -goto _start; -} -} -} -} -lean_object* l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__37(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; uint8_t x_5; -x_4 = lean_array_get_size(x_2); -x_5 = lean_nat_dec_lt(x_1, x_4); -lean_dec(x_4); -if (x_5 == 0) -{ -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_6 = lean_array_fget(x_2, x_1); -x_7 = lean_box(0); -x_8 = lean_array_fset(x_2, x_1, x_7); -x_9 = l_Std_AssocList_foldlM___main___at_Lean_ClassState_addEntry___spec__38(x_3, x_6); -x_10 = lean_unsigned_to_nat(1u); -x_11 = lean_nat_add(x_1, x_10); -lean_dec(x_1); -x_1 = x_11; -x_2 = x_8; -x_3 = x_9; -goto _start; -} -} -} -lean_object* l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__36(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_3 = lean_array_get_size(x_2); -x_4 = lean_unsigned_to_nat(2u); -x_5 = lean_nat_mul(x_3, x_4); -lean_dec(x_3); -x_6 = lean_box(0); -x_7 = lean_mk_array(x_5, x_6); -x_8 = lean_unsigned_to_nat(0u); -x_9 = l_Std_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__37(x_8, x_2, x_7); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_1); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -lean_object* l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__39(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_3) == 0) -{ -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_3); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_5 = lean_ctor_get(x_3, 0); -x_6 = lean_ctor_get(x_3, 1); -x_7 = lean_ctor_get(x_3, 2); -x_8 = lean_name_eq(x_5, x_1); -if (x_8 == 0) -{ -lean_object* x_9; -x_9 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__39(x_1, x_2, x_7); -lean_ctor_set(x_3, 2, x_9); -return x_3; -} -else -{ -lean_dec(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 1, x_2); -lean_ctor_set(x_3, 0, x_1); -return x_3; -} -} -else -{ -lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_10 = lean_ctor_get(x_3, 0); -x_11 = lean_ctor_get(x_3, 1); -x_12 = lean_ctor_get(x_3, 2); -lean_inc(x_12); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_3); -x_13 = lean_name_eq(x_10, x_1); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; -x_14 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__39(x_1, x_2, x_12); -x_15 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_15, 0, x_10); -lean_ctor_set(x_15, 1, x_11); -lean_ctor_set(x_15, 2, x_14); -return x_15; -} -else -{ -lean_object* x_16; -lean_dec(x_11); -lean_dec(x_10); -x_16 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_16, 0, x_1); -lean_ctor_set(x_16, 1, x_2); -lean_ctor_set(x_16, 2, x_12); -return x_16; -} -} -} -} -} -lean_object* l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__34(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_1); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; -x_5 = lean_ctor_get(x_1, 0); -x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_array_get_size(x_6); -x_8 = l_Lean_Name_hash(x_2); -x_9 = lean_usize_modn(x_8, x_7); -x_10 = lean_array_uget(x_6, x_9); -x_11 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__35(x_2, x_10); -if (x_11 == 0) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; -x_12 = lean_unsigned_to_nat(1u); -x_13 = lean_nat_add(x_5, x_12); -lean_dec(x_5); -x_14 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_14, 0, x_2); -lean_ctor_set(x_14, 1, x_3); -lean_ctor_set(x_14, 2, x_10); -x_15 = lean_array_uset(x_6, x_9, x_14); -x_16 = lean_nat_dec_le(x_13, x_7); -lean_dec(x_7); -if (x_16 == 0) -{ -lean_object* x_17; -lean_free_object(x_1); -x_17 = l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__36(x_13, x_15); -return x_17; -} -else -{ -lean_ctor_set(x_1, 1, x_15); -lean_ctor_set(x_1, 0, x_13); -return x_1; -} -} -else -{ -lean_object* x_18; lean_object* x_19; -lean_dec(x_7); -x_18 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__39(x_2, x_3, x_10); -x_19 = lean_array_uset(x_6, x_9, x_18); -lean_ctor_set(x_1, 1, x_19); -return x_1; -} -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; -x_20 = lean_ctor_get(x_1, 0); -x_21 = lean_ctor_get(x_1, 1); -lean_inc(x_21); -lean_inc(x_20); -lean_dec(x_1); -x_22 = lean_array_get_size(x_21); -x_23 = l_Lean_Name_hash(x_2); -x_24 = lean_usize_modn(x_23, x_22); -x_25 = lean_array_uget(x_21, x_24); -x_26 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__35(x_2, x_25); -if (x_26 == 0) -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_unsigned_to_nat(1u); -x_28 = lean_nat_add(x_20, x_27); -lean_dec(x_20); -x_29 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_29, 0, x_2); -lean_ctor_set(x_29, 1, x_3); -lean_ctor_set(x_29, 2, x_25); -x_30 = lean_array_uset(x_21, x_24, x_29); -x_31 = lean_nat_dec_le(x_28, x_22); -lean_dec(x_22); -if (x_31 == 0) -{ -lean_object* x_32; -x_32 = l_Std_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__36(x_28, x_30); -return x_32; -} -else -{ -lean_object* x_33; -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_28); -lean_ctor_set(x_33, 1, x_30); -return x_33; -} -} -else -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_22); -x_34 = l_Std_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__39(x_2, x_3, x_25); -x_35 = lean_array_uset(x_21, x_24, x_34); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_20); -lean_ctor_set(x_36, 1, x_35); -return x_36; -} -} -} -} -lean_object* l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__29(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -uint8_t x_4; -x_4 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); -if (x_4 == 0) -{ -uint8_t x_5; -x_5 = !lean_is_exclusive(x_1); -if (x_5 == 0) -{ -lean_object* x_6; lean_object* x_7; -x_6 = lean_ctor_get(x_1, 1); -x_7 = l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__30(x_6, x_2, x_3); -lean_ctor_set(x_1, 1, x_7); -return x_1; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; -x_8 = lean_ctor_get(x_1, 0); -x_9 = lean_ctor_get(x_1, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_1); -x_10 = l_Std_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__30(x_9, x_2, x_3); -x_11 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_11, 0, x_8); -lean_ctor_set(x_11, 1, x_10); -lean_ctor_set_uint8(x_11, sizeof(void*)*2, x_4); -return x_11; -} -} -else -{ -uint8_t x_12; -x_12 = !lean_is_exclusive(x_1); -if (x_12 == 0) -{ -lean_object* x_13; lean_object* x_14; -x_13 = lean_ctor_get(x_1, 0); -x_14 = l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__34(x_13, x_2, x_3); -lean_ctor_set(x_1, 0, x_14); -return x_1; -} -else -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_15 = lean_ctor_get(x_1, 0); -x_16 = lean_ctor_get(x_1, 1); -lean_inc(x_16); -lean_inc(x_15); -lean_dec(x_1); -x_17 = l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__34(x_15, x_2, x_3); +x_17 = l_Std_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__17(x_15, x_2, x_3); x_18 = lean_alloc_ctor(0, 2, 1); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); @@ -3302,10 +2175,10 @@ lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean x_16 = lean_ctor_get(x_1, 0); x_17 = lean_ctor_get(x_1, 2); lean_inc(x_16); -x_18 = l_Lean_SMap_find_x3f___at_Lean_ClassState_addEntry___spec__12(x_16, x_14); +x_18 = l_Lean_SMap_find_x3f___at_Lean_addAliasEntry___spec__1(x_16, x_14); x_19 = lean_box(0); lean_inc(x_13); -x_20 = l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__18(x_17, x_13, x_19); +x_20 = l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__12(x_17, x_13, x_19); if (lean_obj_tag(x_18) == 0) { lean_object* x_21; lean_object* x_22; lean_object* x_23; @@ -3313,7 +2186,7 @@ x_21 = lean_box(0); x_22 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_22, 0, x_13); lean_ctor_set(x_22, 1, x_21); -x_23 = l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__29(x_16, x_14, x_22); +x_23 = l_Lean_SMap_insert___at_Lean_addAliasEntry___spec__7(x_16, x_14, x_22); lean_ctor_set(x_1, 2, x_20); lean_ctor_set(x_1, 0, x_23); return x_1; @@ -3327,7 +2200,7 @@ lean_dec(x_18); x_25 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_25, 0, x_13); lean_ctor_set(x_25, 1, x_24); -x_26 = l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__29(x_16, x_14, x_25); +x_26 = l_Lean_SMap_insert___at_Lean_addAliasEntry___spec__7(x_16, x_14, x_25); lean_ctor_set(x_1, 2, x_20); lean_ctor_set(x_1, 0, x_26); return x_1; @@ -3344,10 +2217,10 @@ lean_inc(x_28); lean_inc(x_27); lean_dec(x_1); lean_inc(x_27); -x_30 = l_Lean_SMap_find_x3f___at_Lean_ClassState_addEntry___spec__12(x_27, x_14); +x_30 = l_Lean_SMap_find_x3f___at_Lean_addAliasEntry___spec__1(x_27, x_14); x_31 = lean_box(0); lean_inc(x_13); -x_32 = l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__18(x_29, x_13, x_31); +x_32 = l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__12(x_29, x_13, x_31); if (lean_obj_tag(x_30) == 0) { lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; @@ -3355,7 +2228,7 @@ x_33 = lean_box(0); x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_13); lean_ctor_set(x_34, 1, x_33); -x_35 = l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__29(x_27, x_14, x_34); +x_35 = l_Lean_SMap_insert___at_Lean_addAliasEntry___spec__7(x_27, x_14, x_34); x_36 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_28); @@ -3371,7 +2244,7 @@ lean_dec(x_30); x_38 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_38, 0, x_13); lean_ctor_set(x_38, 1, x_37); -x_39 = l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__29(x_27, x_14, x_38); +x_39 = l_Lean_SMap_insert___at_Lean_addAliasEntry___spec__7(x_27, x_14, x_38); x_40 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_40, 0, x_39); lean_ctor_set(x_40, 1, x_28); @@ -3470,80 +2343,20 @@ x_5 = l_Lean_SMap_insert___at_Lean_ClassState_addEntry___spec__1(x_1, x_2, x_4); return x_5; } } -lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_ClassState_addEntry___spec__15___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_Std_PersistentHashMap_findAtAux___main___at_Lean_ClassState_addEntry___spec__15(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_Std_PersistentHashMap_findAux___main___at_Lean_ClassState_addEntry___spec__14___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_Std_PersistentHashMap_findAux___main___at_Lean_ClassState_addEntry___spec__14(x_1, x_4, x_3); -lean_dec(x_3); -return x_5; -} -} -lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_ClassState_addEntry___spec__13___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Std_PersistentHashMap_find_x3f___at_Lean_ClassState_addEntry___spec__13(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_Std_AssocList_find_x3f___main___at_Lean_ClassState_addEntry___spec__17___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Std_AssocList_find_x3f___main___at_Lean_ClassState_addEntry___spec__17(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_Std_HashMapImp_find_x3f___at_Lean_ClassState_addEntry___spec__16___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Std_HashMapImp_find_x3f___at_Lean_ClassState_addEntry___spec__16(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_Lean_SMap_find_x3f___at_Lean_ClassState_addEntry___spec__12___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_SMap_find_x3f___at_Lean_ClassState_addEntry___spec__12(x_1, x_2); -lean_dec(x_2); -return x_3; -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__22___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__16___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: { size_t x_7; lean_object* x_8; x_7 = lean_unbox_usize(x_1); lean_dec(x_1); -x_8 = l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__22(x_7, x_2, x_3, x_4, x_5, x_6); +x_8 = l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__16(x_7, x_2, x_3, x_4, x_5, x_6); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); return x_8; } } -lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { size_t x_6; size_t x_7; lean_object* x_8; @@ -3551,51 +2364,15 @@ x_6 = lean_unbox_usize(x_2); lean_dec(x_2); x_7 = lean_unbox_usize(x_3); lean_dec(x_3); -x_8 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__20(x_1, x_6, x_7, x_4, x_5); +x_8 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__14(x_1, x_6, x_7, x_4, x_5); return x_8; } } -lean_object* l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__24___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__24(x_1, x_2); -lean_dec(x_2); -lean_dec(x_1); -x_4 = lean_box(x_3); -return x_4; -} -} -lean_object* l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__33___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: -{ -size_t x_7; lean_object* x_8; -x_7 = lean_unbox_usize(x_1); -lean_dec(x_1); -x_8 = l_Array_iterateMAux___main___at_Lean_ClassState_addEntry___spec__33(x_7, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -return x_8; -} -} -lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -size_t x_6; size_t x_7; lean_object* x_8; -x_6 = lean_unbox_usize(x_2); -lean_dec(x_2); -x_7 = lean_unbox_usize(x_3); -lean_dec(x_3); -x_8 = l_Std_PersistentHashMap_insertAux___main___at_Lean_ClassState_addEntry___spec__31(x_1, x_6, x_7, x_4, x_5); -return x_8; -} -} -lean_object* l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__35___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; lean_object* x_4; -x_3 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__35(x_1, x_2); +x_3 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); @@ -3678,44 +2455,6 @@ return x_8; } } } -lean_object* l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__3(lean_object* x_1) { -_start: -{ -uint8_t x_2; -x_2 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); -if (x_2 == 0) -{ -return x_1; -} -else -{ -uint8_t x_3; -x_3 = !lean_is_exclusive(x_1); -if (x_3 == 0) -{ -uint8_t x_4; -x_4 = 0; -lean_ctor_set_uint8(x_1, sizeof(void*)*2, x_4); -return x_1; -} -else -{ -lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; -x_5 = lean_ctor_get(x_1, 0); -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -lean_inc(x_5); -lean_dec(x_1); -x_7 = 0; -x_8 = lean_alloc_ctor(0, 2, 1); -lean_ctor_set(x_8, 0, x_5); -lean_ctor_set(x_8, 1, x_6); -lean_ctor_set_uint8(x_8, sizeof(void*)*2, x_7); -return x_8; -} -} -} -} lean_object* l_Lean_ClassState_switch(lean_object* x_1) { _start: { @@ -3727,9 +2466,9 @@ lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_obj x_3 = lean_ctor_get(x_1, 0); x_4 = lean_ctor_get(x_1, 1); x_5 = lean_ctor_get(x_1, 2); -x_6 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__1(x_3); -x_7 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__2(x_4); -x_8 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__3(x_5); +x_6 = l_Lean_SMap_switch___at_Lean_mkAliasExtension___spec__5(x_3); +x_7 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__1(x_4); +x_8 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__2(x_5); lean_ctor_set(x_1, 2, x_8); lean_ctor_set(x_1, 1, x_7); lean_ctor_set(x_1, 0, x_6); @@ -3745,9 +2484,9 @@ lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); lean_dec(x_1); -x_12 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__1(x_9); -x_13 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__2(x_10); -x_14 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__3(x_11); +x_12 = l_Lean_SMap_switch___at_Lean_mkAliasExtension___spec__5(x_9); +x_13 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__1(x_10); +x_14 = l_Lean_SMap_switch___at_Lean_ClassState_switch___spec__2(x_11); x_15 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_15, 0, x_12); lean_ctor_set(x_15, 1, x_13); @@ -4617,7 +3356,7 @@ 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_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__24(x_2, x_7); +x_8 = l_Std_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(x_2, x_7); lean_dec(x_7); return x_8; } @@ -4812,7 +3551,7 @@ lean_dec(x_1); x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); lean_dec(x_4); -x_6 = l_Lean_SMap_find_x3f___at_Lean_ClassState_addEntry___spec__12(x_5, x_2); +x_6 = l_Lean_SMap_find_x3f___at_Lean_addAliasEntry___spec__1(x_5, x_2); lean_dec(x_2); if (lean_obj_tag(x_6) == 0) { @@ -6326,24 +5065,20 @@ lean_dec_ref(res); res = initialize_Lean_Attributes(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__1 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__1(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__1); -l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__2 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__2(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1___closed__2); l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1(); lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1); -l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__1 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__1(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__1); -l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__2 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__2(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3___closed__2); -l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3); -l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__1 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__1(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__1); -l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__2 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__2(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5___closed__2); -l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5(); -lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5); +l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__1 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__1(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__1); +l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__2 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__2(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2___closed__2); +l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__2); +l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__1 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__1(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__1); +l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__2 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__2(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4___closed__2); +l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4(); +lean_mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__4); l_Lean_ClassState_Inhabited___closed__1 = _init_l_Lean_ClassState_Inhabited___closed__1(); lean_mark_persistent(l_Lean_ClassState_Inhabited___closed__1); l_Lean_ClassState_Inhabited = _init_l_Lean_ClassState_Inhabited(); diff --git a/stage0/stdlib/Lean/Compiler/ExternAttr.c b/stage0/stdlib/Lean/Compiler/ExternAttr.c index a4ffe0a290..7cc1af3009 100644 --- a/stage0/stdlib/Lean/Compiler/ExternAttr.c +++ b/stage0/stdlib/Lean/Compiler/ExternAttr.c @@ -58,7 +58,6 @@ extern lean_object* l_Lean_Compiler_mkInlineAttrs___closed__3; extern lean_object* l_Lean_Meta_State_inhabited___closed__7; uint8_t l_Lean_Environment_isProjectionFn(lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__3; extern lean_object* l___private_Lean_Environment_8__persistentEnvExtensionsRef; uint8_t l_Lean_Environment_isConstructor(lean_object*, lean_object*); uint8_t l_Not_Decidable___rarg(uint8_t); @@ -90,7 +89,6 @@ lean_object* l___private_Lean_Compiler_ExternAttr_2__syntaxToExternAttrData___cl lean_object* l___private_Lean_Compiler_ExternAttr_1__syntaxToExternEntries___main___closed__3; lean_object* l_Lean_registerParametricAttribute___rarg___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_expandExternPatternAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_mkExternAttr___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getExternConstArity___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_ExternAttr_3__parseOptNum___main(lean_object*, lean_object*, lean_object*); @@ -99,6 +97,7 @@ lean_object* lean_st_mk_ref(lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); extern lean_object* l_List_reprAux___main___rarg___closed__1; lean_object* l_Lean_mkExternAttr___closed__1; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_getExternConstArity___closed__1; extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__1; lean_object* l_Lean_isExtern___boxed(lean_object*, lean_object*); @@ -113,6 +112,7 @@ lean_object* l_Lean_mkExternAttr___lambda__2___boxed(lean_object*, lean_object*, lean_object* l_Lean_ofExcept___at_Lean_registerClassAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_ExternAttr_1__syntaxToExternEntries___main(lean_object*, lean_object*, lean_object*); lean_object* l_String_Iterator_next(lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkExternAttr___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__4; lean_object* l_List_foldl___main___at_Lean_mkSimpleFnCall___spec__1___boxed(lean_object*, lean_object*); @@ -2856,11 +2856,11 @@ lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean lean_free_object(x_5); x_11 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_11, 0, x_1); -x_12 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_12 = l_Lean_throwUnknownConstant___rarg___closed__3; x_13 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_11); -x_14 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_14 = l_Lean_throwUnknownConstant___rarg___closed__5; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_14); @@ -2896,11 +2896,11 @@ if (lean_obj_tag(x_21) == 0) lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_22 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_22, 0, x_1); -x_23 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_23 = l_Lean_throwUnknownConstant___rarg___closed__3; x_24 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_22); -x_25 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_25 = l_Lean_throwUnknownConstant___rarg___closed__5; x_26 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_25); diff --git a/stage0/stdlib/Lean/Compiler/IR/UnboxResult.c b/stage0/stdlib/Lean/Compiler/IR/UnboxResult.c index 044c88cda3..347aa8f22b 100644 --- a/stage0/stdlib/Lean/Compiler/IR/UnboxResult.c +++ b/stage0/stdlib/Lean/Compiler/IR/UnboxResult.c @@ -19,18 +19,18 @@ lean_object* l_Lean_IR_UnboxResult_mkUnboxAttr___lambda__1___closed__4; lean_object* l_Lean_IR_UnboxResult_mkUnboxAttr___lambda__1___closed__6; lean_object* lean_environment_find(lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__3; lean_object* l_Lean_IR_UnboxResult_mkUnboxAttr___lambda__1___closed__5; extern lean_object* l_Lean_TagAttribute_Inhabited___closed__1; lean_object* l_Lean_getConstInfo___at_Lean_IR_UnboxResult_mkUnboxAttr___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_unboxAttr; -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_IR_UnboxResult_mkUnboxAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_mkUnboxAttr___lambda__1___closed__2; lean_object* l_Lean_IR_UnboxResult_mkUnboxAttr___lambda__1___closed__1; lean_object* l_Lean_IR_UnboxResult_mkUnboxAttr___closed__4; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_mkUnboxAttr___lambda__1___closed__3; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l_Lean_getConstInfo___at_Lean_IR_UnboxResult_mkUnboxAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_UnboxResult_hasUnboxAttr___boxed(lean_object*, lean_object*); uint8_t l_Lean_IR_UnboxResult_hasUnboxAttr(lean_object*, lean_object*); @@ -62,11 +62,11 @@ lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean lean_free_object(x_6); x_12 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_12, 0, x_1); -x_13 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_13 = l_Lean_throwUnknownConstant___rarg___closed__3; x_14 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); -x_15 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_15 = l_Lean_throwUnknownConstant___rarg___closed__5; x_16 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); @@ -102,11 +102,11 @@ 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; x_23 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_23, 0, x_1); -x_24 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_24 = l_Lean_throwUnknownConstant___rarg___closed__3; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); -x_26 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_26 = l_Lean_throwUnknownConstant___rarg___closed__5; x_27 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); diff --git a/stage0/stdlib/Lean/Compiler/ImplementedByAttr.c b/stage0/stdlib/Lean/Compiler/ImplementedByAttr.c index 15667b8b85..8a6b5309ec 100644 --- a/stage0/stdlib/Lean/Compiler/ImplementedByAttr.c +++ b/stage0/stdlib/Lean/Compiler/ImplementedByAttr.c @@ -13,100 +13,119 @@ #ifdef __cplusplus extern "C" { #endif -lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___lambda__1___boxed(lean_object*); +extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___closed__1; +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Compiler_mkImplementedByAttr___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__8; lean_object* lean_nat_div(lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_getModuleEntries___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__1; +uint8_t l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_setEnv___rarg(lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__9; +lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___lambda__1___boxed(lean_object*); uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__7(lean_object*, lean_object*); extern lean_object* l_Lean_registerInternalExceptionId___closed__2; lean_object* l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__4; +lean_object* l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* lean_environment_find(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalName___at_Lean_Compiler_mkImplementedByAttr___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); -lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___lambda__1(lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_Lean_MessageData_ofList(lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Name_inhabited; lean_object* l_Lean_Compiler_implementedByAttr; lean_object* lean_nat_add(lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__3; extern lean_object* l___private_Lean_Environment_8__persistentEnvExtensionsRef; -lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); +lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Compiler_mkImplementedByAttr___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__8___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_setImplementedBy(lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___closed__1; lean_object* lean_nat_sub(lean_object*, lean_object*); -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_setImplementedBy(lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerParametricAttribute___rarg___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; -lean_object* l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__3___boxed(lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); -lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___closed__1; -lean_object* l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__4(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; +lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_attrParamSyntaxToIdentifier(lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__1; extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__2; lean_object* l_Lean_registerBuiltinAttribute(lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; +lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___closed__1; extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__4; lean_object* l_Lean_ConstantInfo_type(lean_object*); lean_object* l_Lean_ParametricAttribute_setParam___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___lambda__1(lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___closed__3; lean_object* l_Lean_Compiler_mkImplementedByAttr___closed__5; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; +lean_object* l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__7; +lean_object* l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__7___boxed(lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__3; uint8_t lean_expr_eqv(lean_object*, lean_object*); +lean_object* l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__8(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_setImplementedBy___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__5; lean_object* l_Array_binSearchAux___main___at_Lean_Compiler_getImplementedBy___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___at_Lean_Compiler_mkImplementedByAttr___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParametricAttribute_getParam___at_Lean_Compiler_getImplementedBy___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___closed__1; extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__3; lean_object* l_Lean_Compiler_mkImplementedByAttr___closed__2; lean_object* lean_get_implemented_by(lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5(lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___closed__4; +lean_object* l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_find___main___at___private_Lean_Hygiene_4__sanitizeSyntaxAux___main___spec__2(lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Environment_getModuleIdxFor_x3f(lean_object*, lean_object*); -lean_object* l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_Lean_getConstInfo___at_Lean_Compiler_mkImplementedByAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2; +extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; lean_object* l_Array_binSearchAux___main___at_Lean_Compiler_getImplementedBy___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Compiler_mkImplementedByAttr___spec__6(lean_object*, lean_object*); +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Compiler_mkImplementedByAttr___spec__10(lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_resolveGlobalConst___spec__2(lean_object*); lean_object* l_Lean_setImplementedBy___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__4___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(lean_object*); extern lean_object* l_Lean_ParametricAttribute_Inhabited___closed__1; extern lean_object* l_System_FilePath_dirName___closed__1; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); +uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__6; +lean_object* l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParametricAttribute_getParam___at_Lean_Compiler_getImplementedBy___spec__1(lean_object*, lean_object*, lean_object*); -lean_object* l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__3(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___at_Lean_Compiler_mkImplementedByAttr___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr(lean_object*); lean_object* l_Lean_getConstInfo___at_Lean_Compiler_mkImplementedByAttr___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalName___at_Lean_Compiler_mkImplementedByAttr___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__2; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_getConstInfo___at_Lean_Compiler_mkImplementedByAttr___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { @@ -131,11 +150,11 @@ lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean lean_free_object(x_6); x_12 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_12, 0, x_1); -x_13 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_13 = l_Lean_throwUnknownConstant___rarg___closed__3; x_14 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); -x_15 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_15 = l_Lean_throwUnknownConstant___rarg___closed__5; x_16 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); @@ -171,11 +190,11 @@ 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; x_23 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_23, 0, x_1); -x_24 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_24 = l_Lean_throwUnknownConstant___rarg___closed__3; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); -x_26 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_26 = l_Lean_throwUnknownConstant___rarg___closed__5; x_27 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); @@ -197,7 +216,362 @@ return x_30; } } } -lean_object* l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__3(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_resolveGlobalName___at_Lean_Compiler_mkImplementedByAttr___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_st_ref_get(x_4, x_5); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +lean_dec(x_8); +x_10 = lean_ctor_get(x_2, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_2, 1); +lean_inc(x_11); +lean_dec(x_2); +x_12 = l_Lean_ResolveName_resolveGlobalName(x_9, x_10, x_11, x_1); +lean_dec(x_10); +lean_ctor_set(x_6, 0, x_12); +return x_6; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_13 = lean_ctor_get(x_6, 0); +x_14 = lean_ctor_get(x_6, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_6); +x_15 = lean_ctor_get(x_13, 0); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_ctor_get(x_2, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_2, 1); +lean_inc(x_17); +lean_dec(x_2); +x_18 = l_Lean_ResolveName_resolveGlobalName(x_15, x_16, x_17, x_1); +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_14); +return x_19; +} +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_6 = lean_box(0); +x_7 = l_Lean_mkConst(x_1, x_6); +x_8 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_8, 0, x_7); +x_9 = l_Lean_throwUnknownConstant___rarg___closed__3; +x_10 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +x_11 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_12 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_12, 0, x_10); +lean_ctor_set(x_12, 1, x_11); +x_13 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_12, x_2, x_3, x_4, x_5); +return x_13; +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5___rarg___boxed), 5, 0); +return x_2; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_Compiler_mkImplementedByAttr___spec__3(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; +lean_inc(x_2); +lean_inc(x_1); +x_6 = l_Lean_resolveGlobalName___at_Lean_Compiler_mkImplementedByAttr___spec__4(x_1, x_2, x_3, x_4, x_5); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +x_10 = lean_box(0); +x_11 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_8, x_10); +x_12 = l_List_isEmpty___rarg(x_11); +if (x_12 == 0) +{ +lean_object* x_13; +lean_dec(x_2); +lean_dec(x_1); +x_13 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_11); +lean_ctor_set(x_6, 0, x_13); +return x_6; +} +else +{ +lean_object* x_14; uint8_t x_15; +lean_dec(x_11); +lean_free_object(x_6); +x_14 = l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5___rarg(x_1, x_2, x_3, x_4, x_9); +lean_dec(x_2); +x_15 = !lean_is_exclusive(x_14); +if (x_15 == 0) +{ +return x_14; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_14, 0); +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_14); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; +x_19 = lean_ctor_get(x_6, 0); +x_20 = lean_ctor_get(x_6, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_6); +x_21 = lean_box(0); +x_22 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_19, x_21); +x_23 = l_List_isEmpty___rarg(x_22); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_2); +lean_dec(x_1); +x_24 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_22); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_20); +return x_25; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +lean_dec(x_22); +x_26 = l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5___rarg(x_1, x_2, x_3, x_4, x_20); +lean_dec(x_2); +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +x_28 = lean_ctor_get(x_26, 1); +lean_inc(x_28); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + x_29 = x_26; +} else { + lean_dec_ref(x_26); + x_29 = lean_box(0); +} +if (lean_is_scalar(x_29)) { + x_30 = lean_alloc_ctor(1, 2, 0); +} else { + x_30 = x_29; +} +lean_ctor_set(x_30, 0, x_27); +lean_ctor_set(x_30, 1, x_28); +return x_30; +} +} +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Compiler_mkImplementedByAttr___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +lean_inc(x_2); +lean_inc(x_1); +x_6 = l_Lean_resolveGlobalConst___at_Lean_Compiler_mkImplementedByAttr___spec__3(x_1, x_2, x_3, x_4, x_5); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_24; +lean_free_object(x_6); +x_24 = lean_box(0); +x_10 = x_24; +goto block_23; +} +else +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_8, 1); +lean_inc(x_25); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; +lean_dec(x_2); +lean_dec(x_1); +x_26 = lean_ctor_get(x_8, 0); +lean_inc(x_26); +lean_dec(x_8); +lean_ctor_set(x_6, 0, x_26); +return x_6; +} +else +{ +lean_object* x_27; +lean_dec(x_25); +lean_free_object(x_6); +x_27 = lean_box(0); +x_10 = x_27; +goto block_23; +} +} +block_23: +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_dec(x_10); +x_11 = lean_box(0); +x_12 = l_Lean_mkConst(x_1, x_11); +x_13 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_13, 0, x_12); +x_14 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; +x_15 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +x_16 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +x_17 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_11, x_8); +x_19 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_18); +x_20 = l_Lean_MessageData_ofList(x_19); +lean_dec(x_19); +x_21 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_21, 0, x_17); +lean_ctor_set(x_21, 1, x_20); +x_22 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_21, x_2, x_3, x_4, x_9); +lean_dec(x_2); +return x_22; +} +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_6, 0); +x_29 = lean_ctor_get(x_6, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_6); +if (lean_obj_tag(x_28) == 0) +{ +lean_object* x_44; +x_44 = lean_box(0); +x_30 = x_44; +goto block_43; +} +else +{ +lean_object* x_45; +x_45 = lean_ctor_get(x_28, 1); +lean_inc(x_45); +if (lean_obj_tag(x_45) == 0) +{ +lean_object* x_46; lean_object* x_47; +lean_dec(x_2); +lean_dec(x_1); +x_46 = lean_ctor_get(x_28, 0); +lean_inc(x_46); +lean_dec(x_28); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_29); +return x_47; +} +else +{ +lean_object* x_48; +lean_dec(x_45); +x_48 = lean_box(0); +x_30 = x_48; +goto block_43; +} +} +block_43: +{ +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_dec(x_30); +x_31 = lean_box(0); +x_32 = l_Lean_mkConst(x_1, x_31); +x_33 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_33, 0, x_32); +x_34 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; +x_35 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +x_36 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +x_37 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_37, 0, x_35); +lean_ctor_set(x_37, 1, x_36); +x_38 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_31, x_28); +x_39 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_38); +x_40 = l_Lean_MessageData_ofList(x_39); +lean_dec(x_39); +x_41 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_41, 0, x_37); +lean_ctor_set(x_41, 1, x_40); +x_42 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_41, x_2, x_3, x_4, x_29); +lean_dec(x_2); +return x_42; +} +} +} +else +{ +uint8_t x_49; +lean_dec(x_2); +lean_dec(x_1); +x_49 = !lean_is_exclusive(x_6); +if (x_49 == 0) +{ +return x_6; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_6, 0); +x_51 = lean_ctor_get(x_6, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_6); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +} +lean_object* l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__7(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -211,7 +585,7 @@ x_3 = lean_ctor_get(x_2, 0); x_4 = lean_ctor_get(x_2, 1); x_5 = lean_ctor_get(x_2, 2); x_6 = lean_ctor_get(x_2, 3); -x_7 = l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__3(x_1, x_3); +x_7 = l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__7(x_1, x_3); lean_inc(x_5); lean_inc(x_4); x_8 = lean_alloc_ctor(0, 2, 0); @@ -224,7 +598,7 @@ goto _start; } } } -lean_object* _init_l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___closed__1() { +lean_object* _init_l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -235,7 +609,7 @@ lean_ctor_set(x_2, 1, x_1); return x_2; } } -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9(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; @@ -253,7 +627,7 @@ return x_8; else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_9 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___closed__1; +x_9 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___closed__1; x_10 = lean_array_get(x_9, x_3, x_5); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); @@ -287,7 +661,7 @@ goto _start; } } } -lean_object* l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_13; @@ -304,7 +678,7 @@ x_14 = lean_nat_add(x_2, x_3); x_15 = lean_unsigned_to_nat(2u); x_16 = lean_nat_div(x_14, x_15); lean_dec(x_14); -x_42 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___closed__1; +x_42 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___closed__1; x_43 = lean_array_get(x_42, x_1, x_16); x_44 = lean_array_get(x_42, x_1, x_2); x_45 = lean_ctor_get(x_43, 0); @@ -331,7 +705,7 @@ goto block_41; block_41: { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; -x_18 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___closed__1; +x_18 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___closed__1; x_19 = lean_array_get(x_18, x_17, x_3); x_20 = lean_array_get(x_18, x_17, x_2); x_21 = lean_ctor_get(x_19, 0); @@ -356,7 +730,7 @@ if (x_26 == 0) lean_object* x_27; lean_dec(x_16); lean_inc_n(x_2, 2); -x_27 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5(x_3, x_19, x_17, x_2, x_2); +x_27 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9(x_3, x_19, x_17, x_2, x_2); lean_dec(x_19); x_4 = x_27; goto block_12; @@ -369,7 +743,7 @@ x_28 = lean_array_swap(x_17, x_16, x_3); lean_dec(x_16); x_29 = lean_array_get(x_18, x_28, x_3); lean_inc_n(x_2, 2); -x_30 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5(x_3, x_29, x_28, x_2, x_2); +x_30 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9(x_3, x_29, x_28, x_2, x_2); lean_dec(x_29); x_4 = x_30; goto block_12; @@ -396,7 +770,7 @@ if (x_36 == 0) lean_object* x_37; lean_dec(x_16); lean_inc_n(x_2, 2); -x_37 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5(x_3, x_33, x_31, x_2, x_2); +x_37 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9(x_3, x_33, x_31, x_2, x_2); lean_dec(x_33); x_4 = x_37; goto block_12; @@ -409,7 +783,7 @@ x_38 = lean_array_swap(x_31, x_16, x_3); lean_dec(x_16); x_39 = lean_array_get(x_18, x_38, x_3); lean_inc_n(x_2, 2); -x_40 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5(x_3, x_39, x_38, x_2, x_2); +x_40 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9(x_3, x_39, x_38, x_2, x_2); lean_dec(x_39); x_4 = x_40; goto block_12; @@ -429,7 +803,7 @@ x_7 = lean_nat_dec_le(x_3, x_5); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__4(x_6, x_2, x_5); +x_8 = l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__8(x_6, x_2, x_5); x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_add(x_5, x_9); lean_dec(x_5); @@ -446,7 +820,7 @@ return x_6; } } } -uint8_t l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__7(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_Compiler_mkImplementedByAttr___spec__11(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; @@ -485,7 +859,7 @@ return x_11; } } } -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Compiler_mkImplementedByAttr___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Compiler_mkImplementedByAttr___spec__10(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; @@ -499,7 +873,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_Compiler_mkImplementedByAttr___spec__7(x_1, x_6, x_6, x_8, x_9); +x_10 = l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__11(x_1, x_6, x_6, x_8, x_9); lean_dec(x_8); lean_dec(x_6); if (x_10 == 0) @@ -628,7 +1002,7 @@ lean_inc(x_45); lean_dec(x_4); x_47 = lean_array_get_size(x_45); x_48 = lean_unsigned_to_nat(0u); -x_49 = l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__7(x_1, x_45, x_45, x_47, x_48); +x_49 = l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__11(x_1, x_45, x_45, x_47, x_48); lean_dec(x_47); lean_dec(x_45); if (x_49 == 0) @@ -749,38 +1123,38 @@ return x_83; } } } -lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___lambda__1(lean_object* x_1) { +lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___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; lean_object* x_7; lean_object* x_8; x_2 = l_Array_empty___closed__1; -x_3 = l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__3(x_2, x_1); +x_3 = l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__7(x_2, x_1); x_4 = lean_array_get_size(x_3); x_5 = lean_unsigned_to_nat(1u); x_6 = lean_nat_sub(x_4, x_5); lean_dec(x_4); x_7 = lean_unsigned_to_nat(0u); -x_8 = l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__4(x_3, x_7, x_6); +x_8 = l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__8(x_3, x_7, x_6); lean_dec(x_6); return x_8; } } -lean_object* _init_l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___closed__1() { +lean_object* _init_l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___lambda__1___boxed), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___lambda__1___boxed), 1, 0); return x_1; } } -lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6) { +lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_7 = l_Lean_registerParametricAttribute___rarg___closed__1; x_8 = l_Lean_registerParametricAttribute___rarg___closed__2; x_9 = l_Lean_registerParametricAttribute___rarg___closed__3; -x_10 = l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___closed__1; +x_10 = l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___closed__1; x_11 = l_Lean_registerParametricAttribute___rarg___closed__4; lean_inc(x_1); x_12 = lean_alloc_ctor(0, 6, 0); @@ -790,7 +1164,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_Compiler_mkImplementedByAttr___spec__6(x_12, x_6); +x_13 = l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_Compiler_mkImplementedByAttr___spec__10(x_12, x_6); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; @@ -1000,6 +1374,7 @@ lean_object* x_11; lean_object* x_12; lean_dec(x_8); x_11 = l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__3; x_12 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_11, x_3, x_4, x_5, x_9); +lean_dec(x_3); return x_12; } else @@ -1008,134 +1383,175 @@ lean_object* x_13; lean_object* x_14; x_13 = lean_ctor_get(x_10, 0); lean_inc(x_13); lean_dec(x_10); -lean_inc(x_13); -x_14 = l_Lean_getConstInfo___at_Lean_Compiler_mkImplementedByAttr___spec__1(x_13, x_3, x_4, x_5, x_9); +lean_inc(x_3); +x_14 = l_Lean_resolveGlobalConstNoOverload___at_Lean_Compiler_mkImplementedByAttr___spec__2(x_13, x_3, x_4, x_5, x_9); if (lean_obj_tag(x_14) == 0) { -uint8_t x_15; -x_15 = !lean_is_exclusive(x_14); -if (x_15 == 0) +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +lean_inc(x_15); +x_17 = l_Lean_getConstInfo___at_Lean_Compiler_mkImplementedByAttr___spec__1(x_15, x_3, x_4, x_5, x_16); +if (lean_obj_tag(x_17) == 0) { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; -x_16 = lean_ctor_get(x_14, 0); -x_17 = lean_ctor_get(x_14, 1); -x_18 = l_Lean_ConstantInfo_type(x_8); +uint8_t x_18; +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_ctor_get(x_17, 1); +x_21 = l_Lean_ConstantInfo_type(x_8); lean_dec(x_8); -x_19 = l_Lean_ConstantInfo_type(x_16); -lean_dec(x_16); -x_20 = lean_expr_eqv(x_18, x_19); +x_22 = l_Lean_ConstantInfo_type(x_19); lean_dec(x_19); -lean_dec(x_18); -if (x_20 == 0) +x_23 = lean_expr_eqv(x_21, x_22); +lean_dec(x_22); +lean_dec(x_21); +if (x_23 == 0) { -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_free_object(x_14); -x_21 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_21, 0, x_13); -x_22 = l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__6; -x_23 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_21); -x_24 = l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__9; -x_25 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); -x_26 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_25, x_3, x_4, x_5, x_17); -return x_26; +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_free_object(x_17); +x_24 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_24, 0, x_15); +x_25 = l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__6; +x_26 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_24); +x_27 = l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__9; +x_28 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +x_29 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_28, x_3, x_4, x_5, x_20); +lean_dec(x_3); +return x_29; } else { -lean_ctor_set(x_14, 0, x_13); -return x_14; +lean_dec(x_3); +lean_ctor_set(x_17, 0, x_15); +return x_17; } } else { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; -x_27 = lean_ctor_get(x_14, 0); -x_28 = lean_ctor_get(x_14, 1); -lean_inc(x_28); -lean_inc(x_27); -lean_dec(x_14); -x_29 = l_Lean_ConstantInfo_type(x_8); +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; +x_30 = lean_ctor_get(x_17, 0); +x_31 = lean_ctor_get(x_17, 1); +lean_inc(x_31); +lean_inc(x_30); +lean_dec(x_17); +x_32 = l_Lean_ConstantInfo_type(x_8); lean_dec(x_8); -x_30 = l_Lean_ConstantInfo_type(x_27); -lean_dec(x_27); -x_31 = lean_expr_eqv(x_29, x_30); +x_33 = l_Lean_ConstantInfo_type(x_30); lean_dec(x_30); -lean_dec(x_29); -if (x_31 == 0) +x_34 = lean_expr_eqv(x_32, x_33); +lean_dec(x_33); +lean_dec(x_32); +if (x_34 == 0) { -lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_32 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_32, 0, x_13); -x_33 = l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__6; -x_34 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_32); -x_35 = l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__9; -x_36 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_36, 0, x_34); -lean_ctor_set(x_36, 1, x_35); -x_37 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_36, x_3, x_4, x_5, x_28); -return x_37; +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_35 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_35, 0, x_15); +x_36 = l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__6; +x_37 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_35); +x_38 = l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__9; +x_39 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +x_40 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_39, x_3, x_4, x_5, x_31); +lean_dec(x_3); +return x_40; } else { -lean_object* x_38; -x_38 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_38, 0, x_13); -lean_ctor_set(x_38, 1, x_28); -return x_38; +lean_object* x_41; +lean_dec(x_3); +x_41 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_41, 0, x_15); +lean_ctor_set(x_41, 1, x_31); +return x_41; } } } else { -uint8_t x_39; -lean_dec(x_13); +uint8_t x_42; +lean_dec(x_15); lean_dec(x_8); -x_39 = !lean_is_exclusive(x_14); -if (x_39 == 0) +lean_dec(x_3); +x_42 = !lean_is_exclusive(x_17); +if (x_42 == 0) +{ +return x_17; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_17, 0); +x_44 = lean_ctor_get(x_17, 1); +lean_inc(x_44); +lean_inc(x_43); +lean_dec(x_17); +x_45 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_45, 0, x_43); +lean_ctor_set(x_45, 1, x_44); +return x_45; +} +} +} +else +{ +uint8_t x_46; +lean_dec(x_8); +lean_dec(x_3); +x_46 = !lean_is_exclusive(x_14); +if (x_46 == 0) { return x_14; } else { -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_14, 0); -x_41 = lean_ctor_get(x_14, 1); -lean_inc(x_41); -lean_inc(x_40); +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_14, 0); +x_48 = lean_ctor_get(x_14, 1); +lean_inc(x_48); +lean_inc(x_47); lean_dec(x_14); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_40); -lean_ctor_set(x_42, 1, x_41); -return x_42; +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; } } } } else { -uint8_t x_43; -x_43 = !lean_is_exclusive(x_7); -if (x_43 == 0) +uint8_t x_50; +lean_dec(x_3); +x_50 = !lean_is_exclusive(x_7); +if (x_50 == 0) { return x_7; } else { -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_7, 0); -x_45 = lean_ctor_get(x_7, 1); -lean_inc(x_45); -lean_inc(x_44); +lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_51 = lean_ctor_get(x_7, 0); +x_52 = lean_ctor_get(x_7, 1); +lean_inc(x_52); +lean_inc(x_51); lean_dec(x_7); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_44); -lean_ctor_set(x_46, 1, x_45); -return x_46; +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_51); +lean_ctor_set(x_53, 1, x_52); +return x_53; } } } @@ -1202,7 +1618,7 @@ x_3 = l_Lean_Compiler_mkImplementedByAttr___closed__3; x_4 = l_Lean_Compiler_mkImplementedByAttr___closed__4; x_5 = l_Lean_Compiler_mkImplementedByAttr___closed__5; x_6 = 0; -x_7 = l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2(x_2, x_3, x_4, x_5, x_6, x_1); +x_7 = l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6(x_2, x_3, x_4, x_5, x_6, x_1); return x_7; } } @@ -1217,39 +1633,80 @@ lean_dec(x_2); return x_6; } } -lean_object* l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__3___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_resolveGlobalName___at_Lean_Compiler_mkImplementedByAttr___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_Lean_resolveGlobalName___at_Lean_Compiler_mkImplementedByAttr___spec__4(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_6; +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_throwUnknownConstant___at_Lean_Compiler_mkImplementedByAttr___spec__5___rarg(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_6; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_Compiler_mkImplementedByAttr___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_resolveGlobalConst___at_Lean_Compiler_mkImplementedByAttr___spec__3(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_6; +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Compiler_mkImplementedByAttr___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_resolveGlobalConstNoOverload___at_Lean_Compiler_mkImplementedByAttr___spec__2(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_6; +} +} +lean_object* l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__7___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__3(x_1, x_2); +x_3 = l_Std_RBNode_fold___main___at_Lean_Compiler_mkImplementedByAttr___spec__7(x_1, x_2); lean_dec(x_2); return x_3; } } -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___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___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5(x_1, x_2, x_3, x_4, x_5); +x_6 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); lean_dec(x_1); return x_6; } } -lean_object* l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__4(x_1, x_2, x_3); +x_4 = l_Array_qsortAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__8(x_1, x_2, x_3); lean_dec(x_3); return x_4; } } -lean_object* l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__11___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_Compiler_mkImplementedByAttr___spec__7(x_1, x_2, x_3, x_4, x_5); +x_6 = l_Array_anyRangeMAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__11(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); @@ -1258,22 +1715,22 @@ x_7 = lean_box(x_6); return x_7; } } -lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___lambda__1___boxed(lean_object* x_1) { +lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___lambda__1___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___lambda__1(x_1); +x_2 = l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___lambda__1(x_1); lean_dec(x_1); return x_2; } } -lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_5); lean_dec(x_5); -x_8 = l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2(x_1, x_2, x_3, x_4, x_7, x_6); +x_8 = l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6(x_1, x_2, x_3, x_4, x_7, x_6); return x_8; } } @@ -1284,7 +1741,6 @@ lean_object* x_7; x_7 = l_Lean_Compiler_mkImplementedByAttr___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); lean_dec(x_2); return x_7; } @@ -1322,7 +1778,7 @@ x_7 = lean_nat_add(x_3, x_4); x_8 = lean_unsigned_to_nat(2u); x_9 = lean_nat_div(x_7, x_8); lean_dec(x_7); -x_10 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___closed__1; +x_10 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___closed__1; x_11 = lean_array_get(x_10, x_1, x_9); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); @@ -1575,10 +2031,10 @@ lean_dec_ref(res); res = initialize_Lean_MonadEnv(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___closed__1 = _init_l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___closed__1(); -lean_mark_persistent(l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__5___closed__1); -l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___closed__1 = _init_l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___closed__1(); -lean_mark_persistent(l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__2___closed__1); +l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___closed__1 = _init_l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___closed__1(); +lean_mark_persistent(l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_Compiler_mkImplementedByAttr___spec__9___closed__1); +l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___closed__1 = _init_l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___closed__1(); +lean_mark_persistent(l_Lean_registerParametricAttribute___at_Lean_Compiler_mkImplementedByAttr___spec__6___closed__1); l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__1 = _init_l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__1(); lean_mark_persistent(l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__1); l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__2 = _init_l_Lean_Compiler_mkImplementedByAttr___lambda__1___closed__2(); diff --git a/stage0/stdlib/Lean/Compiler/InitAttr.c b/stage0/stdlib/Lean/Compiler/InitAttr.c index a90120c927..389a76c16e 100644 --- a/stage0/stdlib/Lean/Compiler/InitAttr.c +++ b/stage0/stdlib/Lean/Compiler/InitAttr.c @@ -14,76 +14,84 @@ extern "C" { #endif lean_object* l_Lean_mkInitAttr___lambda__1___closed__7; +lean_object* l_Lean_resolveGlobalName___at_Lean_mkInitAttr___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; lean_object* lean_nat_div(lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_getModuleEntries___rarg(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___closed__1; -lean_object* l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__4(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__8(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_mkInitAttr___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerInternalExceptionId___closed__2; lean_object* l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* lean_environment_find(lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1___closed__11; lean_object* lean_st_ref_get(lean_object*, lean_object*); -lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___closed__1; extern lean_object* l_Lean_mkSimpleThunkType___closed__1; -lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___boxed(lean_object*, 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* lean_string_append(lean_object*, lean_object*); +lean_object* l_Lean_MessageData_ofList(lean_object*); extern lean_object* l_Lean_Name_inhabited; -lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___lambda__1(lean_object*); +lean_object* l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__8___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_binSearchAux___main___at_Lean_isIOUnitInitFn___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___closed__5; -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__3; extern lean_object* l___private_Lean_Environment_8__persistentEnvExtensionsRef; lean_object* l_Lean_mkInitAttr___lambda__1___closed__8; -lean_object* l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___lambda__1___boxed(lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); -lean_object* l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__3___boxed(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___at_Lean_mkInitAttr___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getConstInfo___at_Lean_mkInitAttr___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___at_Lean_mkInitAttr___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1___closed__2; lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerParametricAttribute___rarg___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___private_Lean_Compiler_InitAttr_2__isUnitType___boxed(lean_object*); -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr(lean_object*); -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkInitAttr___spec__6(lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); uint8_t l___private_Lean_Compiler_InitAttr_2__isUnitType(lean_object*); lean_object* l_Lean_ParametricAttribute_getParam___at_Lean_isIOUnitInitFn___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_hasInitAttr___boxed(lean_object*, lean_object*); -lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___lambda__1___boxed(lean_object*); -lean_object* l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__4___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; uint8_t l___private_Lean_Compiler_InitAttr_3__isIOUnit(lean_object*); lean_object* l_Lean_attrParamSyntaxToIdentifier(lean_object*); extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__1; extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__2; lean_object* l_Lean_registerBuiltinAttribute(lean_object*, lean_object*); +lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1___closed__4; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; +lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___closed__1; +lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__4; lean_object* l___private_Lean_Compiler_InitAttr_3__isIOUnit___boxed(lean_object*); lean_object* l_Lean_ConstantInfo_type(lean_object*); -lean_object* l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__3(lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_InitAttr_1__getIOTypeArg___boxed(lean_object*); uint8_t l_Lean_hasInitAttr(lean_object*, lean_object*); lean_object* l_Lean_ParametricAttribute_setParam___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__7___boxed(lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1___closed__9; +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_InitAttr_1__getIOTypeArg___closed__1; lean_object* l_Lean_mkInitAttr___lambda__1___closed__14; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; +lean_object* l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(lean_object*, lean_object*); +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___closed__1; lean_object* l_Lean_mkInitAttr___lambda__1___closed__5; +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkInitAttr___spec__10(lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1___closed__13; +uint8_t l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__11(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_expr_eqv(lean_object*, lean_object*); lean_object* l_Lean_setInitAttr(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1___closed__3; @@ -91,8 +99,10 @@ lean_object* l_Lean_mkInitAttr___lambda__1___closed__1; uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParametricAttribute_getParam___at_Lean_isIOUnitInitFn___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__7(lean_object*, lean_object*); extern lean_object* l_Lean_registerParametricAttribute___rarg___closed__3; lean_object* l_Lean_mkInitAttr___lambda__1___closed__6; +lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___lambda__1(lean_object*); lean_object* l_Lean_mkInitAttr___closed__3; uint8_t l_Lean_isIOUnitInitFn(lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1___closed__15; @@ -100,26 +110,35 @@ lean_object* l_Std_RBNode_find___main___at___private_Lean_Hygiene_4__sanitizeSyn lean_object* l_Lean_getConstInfo___at_Lean_mkInitAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Environment_getModuleIdxFor_x3f(lean_object*, lean_object*); lean_object* lean_get_init_fn_name_for(lean_object*, lean_object*); lean_object* l_Lean_isIOUnitInitFn___boxed(lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5(lean_object*); lean_object* l_Lean_mkInitAttr___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___closed__4; lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); +lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2; lean_object* l_Lean_mkInitAttr___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; lean_object* l_Lean_mkInitAttr___lambda__1___closed__10; +lean_object* l_List_map___main___at_Lean_resolveGlobalConst___spec__2(lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1___closed__12; +lean_object* l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(lean_object*); extern lean_object* l_Lean_ParametricAttribute_Inhabited___closed__1; extern lean_object* l_System_FilePath_dirName___closed__1; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); +uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_mkInitAttr___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___closed__2; lean_object* l_Lean_mkInitAttr___closed__1; -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_mkInitAttr___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_binSearchAux___main___at_Lean_isIOUnitInitFn___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_initAttr; +lean_object* l_Lean_resolveGlobalName___at_Lean_mkInitAttr___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Compiler_InitAttr_1__getIOTypeArg(lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); @@ -312,11 +331,11 @@ lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean lean_free_object(x_6); x_12 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_12, 0, x_1); -x_13 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_13 = l_Lean_throwUnknownConstant___rarg___closed__3; x_14 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); -x_15 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_15 = l_Lean_throwUnknownConstant___rarg___closed__5; x_16 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_16, 0, x_14); lean_ctor_set(x_16, 1, x_15); @@ -352,11 +371,11 @@ 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; x_23 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_23, 0, x_1); -x_24 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_24 = l_Lean_throwUnknownConstant___rarg___closed__3; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); -x_26 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_26 = l_Lean_throwUnknownConstant___rarg___closed__5; x_27 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); @@ -378,7 +397,362 @@ return x_30; } } } -lean_object* l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__3(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_resolveGlobalName___at_Lean_mkInitAttr___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_st_ref_get(x_4, x_5); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +lean_dec(x_8); +x_10 = lean_ctor_get(x_2, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_2, 1); +lean_inc(x_11); +lean_dec(x_2); +x_12 = l_Lean_ResolveName_resolveGlobalName(x_9, x_10, x_11, x_1); +lean_dec(x_10); +lean_ctor_set(x_6, 0, x_12); +return x_6; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_13 = lean_ctor_get(x_6, 0); +x_14 = lean_ctor_get(x_6, 1); +lean_inc(x_14); +lean_inc(x_13); +lean_dec(x_6); +x_15 = lean_ctor_get(x_13, 0); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_ctor_get(x_2, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_2, 1); +lean_inc(x_17); +lean_dec(x_2); +x_18 = l_Lean_ResolveName_resolveGlobalName(x_15, x_16, x_17, x_1); +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_14); +return x_19; +} +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_6 = lean_box(0); +x_7 = l_Lean_mkConst(x_1, x_6); +x_8 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_8, 0, x_7); +x_9 = l_Lean_throwUnknownConstant___rarg___closed__3; +x_10 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +x_11 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_12 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_12, 0, x_10); +lean_ctor_set(x_12, 1, x_11); +x_13 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_12, x_2, x_3, x_4, x_5); +return x_13; +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5___rarg___boxed), 5, 0); +return x_2; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_mkInitAttr___spec__3(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; +lean_inc(x_2); +lean_inc(x_1); +x_6 = l_Lean_resolveGlobalName___at_Lean_mkInitAttr___spec__4(x_1, x_2, x_3, x_4, x_5); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +x_10 = lean_box(0); +x_11 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_8, x_10); +x_12 = l_List_isEmpty___rarg(x_11); +if (x_12 == 0) +{ +lean_object* x_13; +lean_dec(x_2); +lean_dec(x_1); +x_13 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_11); +lean_ctor_set(x_6, 0, x_13); +return x_6; +} +else +{ +lean_object* x_14; uint8_t x_15; +lean_dec(x_11); +lean_free_object(x_6); +x_14 = l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5___rarg(x_1, x_2, x_3, x_4, x_9); +lean_dec(x_2); +x_15 = !lean_is_exclusive(x_14); +if (x_15 == 0) +{ +return x_14; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_14, 0); +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_14); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; +x_19 = lean_ctor_get(x_6, 0); +x_20 = lean_ctor_get(x_6, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_6); +x_21 = lean_box(0); +x_22 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_19, x_21); +x_23 = l_List_isEmpty___rarg(x_22); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_2); +lean_dec(x_1); +x_24 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_22); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_20); +return x_25; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +lean_dec(x_22); +x_26 = l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5___rarg(x_1, x_2, x_3, x_4, x_20); +lean_dec(x_2); +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +x_28 = lean_ctor_get(x_26, 1); +lean_inc(x_28); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + x_29 = x_26; +} else { + lean_dec_ref(x_26); + x_29 = lean_box(0); +} +if (lean_is_scalar(x_29)) { + x_30 = lean_alloc_ctor(1, 2, 0); +} else { + x_30 = x_29; +} +lean_ctor_set(x_30, 0, x_27); +lean_ctor_set(x_30, 1, x_28); +return x_30; +} +} +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_mkInitAttr___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +lean_inc(x_2); +lean_inc(x_1); +x_6 = l_Lean_resolveGlobalConst___at_Lean_mkInitAttr___spec__3(x_1, x_2, x_3, x_4, x_5); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_24; +lean_free_object(x_6); +x_24 = lean_box(0); +x_10 = x_24; +goto block_23; +} +else +{ +lean_object* x_25; +x_25 = lean_ctor_get(x_8, 1); +lean_inc(x_25); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; +lean_dec(x_2); +lean_dec(x_1); +x_26 = lean_ctor_get(x_8, 0); +lean_inc(x_26); +lean_dec(x_8); +lean_ctor_set(x_6, 0, x_26); +return x_6; +} +else +{ +lean_object* x_27; +lean_dec(x_25); +lean_free_object(x_6); +x_27 = lean_box(0); +x_10 = x_27; +goto block_23; +} +} +block_23: +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +lean_dec(x_10); +x_11 = lean_box(0); +x_12 = l_Lean_mkConst(x_1, x_11); +x_13 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_13, 0, x_12); +x_14 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; +x_15 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +x_16 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +x_17 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_11, x_8); +x_19 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_18); +x_20 = l_Lean_MessageData_ofList(x_19); +lean_dec(x_19); +x_21 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_21, 0, x_17); +lean_ctor_set(x_21, 1, x_20); +x_22 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_21, x_2, x_3, x_4, x_9); +lean_dec(x_2); +return x_22; +} +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_6, 0); +x_29 = lean_ctor_get(x_6, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_6); +if (lean_obj_tag(x_28) == 0) +{ +lean_object* x_44; +x_44 = lean_box(0); +x_30 = x_44; +goto block_43; +} +else +{ +lean_object* x_45; +x_45 = lean_ctor_get(x_28, 1); +lean_inc(x_45); +if (lean_obj_tag(x_45) == 0) +{ +lean_object* x_46; lean_object* x_47; +lean_dec(x_2); +lean_dec(x_1); +x_46 = lean_ctor_get(x_28, 0); +lean_inc(x_46); +lean_dec(x_28); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_29); +return x_47; +} +else +{ +lean_object* x_48; +lean_dec(x_45); +x_48 = lean_box(0); +x_30 = x_48; +goto block_43; +} +} +block_43: +{ +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_dec(x_30); +x_31 = lean_box(0); +x_32 = l_Lean_mkConst(x_1, x_31); +x_33 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_33, 0, x_32); +x_34 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; +x_35 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +x_36 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +x_37 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_37, 0, x_35); +lean_ctor_set(x_37, 1, x_36); +x_38 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_31, x_28); +x_39 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_38); +x_40 = l_Lean_MessageData_ofList(x_39); +lean_dec(x_39); +x_41 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_41, 0, x_37); +lean_ctor_set(x_41, 1, x_40); +x_42 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_41, x_2, x_3, x_4, x_29); +lean_dec(x_2); +return x_42; +} +} +} +else +{ +uint8_t x_49; +lean_dec(x_2); +lean_dec(x_1); +x_49 = !lean_is_exclusive(x_6); +if (x_49 == 0) +{ +return x_6; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_6, 0); +x_51 = lean_ctor_get(x_6, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_6); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +} +lean_object* l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__7(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -392,7 +766,7 @@ x_3 = lean_ctor_get(x_2, 0); x_4 = lean_ctor_get(x_2, 1); x_5 = lean_ctor_get(x_2, 2); x_6 = lean_ctor_get(x_2, 3); -x_7 = l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__3(x_1, x_3); +x_7 = l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__7(x_1, x_3); lean_inc(x_5); lean_inc(x_4); x_8 = lean_alloc_ctor(0, 2, 0); @@ -405,7 +779,7 @@ goto _start; } } } -lean_object* _init_l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___closed__1() { +lean_object* _init_l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___closed__1() { _start: { lean_object* x_1; lean_object* x_2; @@ -416,7 +790,7 @@ lean_ctor_set(x_2, 1, x_1); return x_2; } } -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9(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; @@ -434,7 +808,7 @@ return x_8; else { lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; -x_9 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___closed__1; +x_9 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___closed__1; x_10 = lean_array_get(x_9, x_3, x_5); x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); @@ -468,7 +842,7 @@ goto _start; } } } -lean_object* l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__8(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; uint8_t x_13; @@ -485,7 +859,7 @@ x_14 = lean_nat_add(x_2, x_3); x_15 = lean_unsigned_to_nat(2u); x_16 = lean_nat_div(x_14, x_15); lean_dec(x_14); -x_42 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___closed__1; +x_42 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___closed__1; x_43 = lean_array_get(x_42, x_1, x_16); x_44 = lean_array_get(x_42, x_1, x_2); x_45 = lean_ctor_get(x_43, 0); @@ -512,7 +886,7 @@ goto block_41; block_41: { lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; -x_18 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___closed__1; +x_18 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___closed__1; x_19 = lean_array_get(x_18, x_17, x_3); x_20 = lean_array_get(x_18, x_17, x_2); x_21 = lean_ctor_get(x_19, 0); @@ -537,7 +911,7 @@ if (x_26 == 0) lean_object* x_27; lean_dec(x_16); lean_inc_n(x_2, 2); -x_27 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5(x_3, x_19, x_17, x_2, x_2); +x_27 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9(x_3, x_19, x_17, x_2, x_2); lean_dec(x_19); x_4 = x_27; goto block_12; @@ -550,7 +924,7 @@ x_28 = lean_array_swap(x_17, x_16, x_3); lean_dec(x_16); x_29 = lean_array_get(x_18, x_28, x_3); lean_inc_n(x_2, 2); -x_30 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5(x_3, x_29, x_28, x_2, x_2); +x_30 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9(x_3, x_29, x_28, x_2, x_2); lean_dec(x_29); x_4 = x_30; goto block_12; @@ -577,7 +951,7 @@ if (x_36 == 0) lean_object* x_37; lean_dec(x_16); lean_inc_n(x_2, 2); -x_37 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5(x_3, x_33, x_31, x_2, x_2); +x_37 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9(x_3, x_33, x_31, x_2, x_2); lean_dec(x_33); x_4 = x_37; goto block_12; @@ -590,7 +964,7 @@ x_38 = lean_array_swap(x_31, x_16, x_3); lean_dec(x_16); x_39 = lean_array_get(x_18, x_38, x_3); lean_inc_n(x_2, 2); -x_40 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5(x_3, x_39, x_38, x_2, x_2); +x_40 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9(x_3, x_39, x_38, x_2, x_2); lean_dec(x_39); x_4 = x_40; goto block_12; @@ -610,7 +984,7 @@ x_7 = lean_nat_dec_le(x_3, x_5); if (x_7 == 0) { lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__4(x_6, x_2, x_5); +x_8 = l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__8(x_6, x_2, x_5); x_9 = lean_unsigned_to_nat(1u); x_10 = lean_nat_add(x_5, x_9); lean_dec(x_5); @@ -627,7 +1001,7 @@ return x_6; } } } -uint8_t l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__7(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_mkInitAttr___spec__11(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; @@ -666,7 +1040,7 @@ return x_11; } } } -lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkInitAttr___spec__6(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkInitAttr___spec__10(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; @@ -680,7 +1054,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_mkInitAttr___spec__7(x_1, x_6, x_6, x_8, x_9); +x_10 = l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__11(x_1, x_6, x_6, x_8, x_9); lean_dec(x_8); lean_dec(x_6); if (x_10 == 0) @@ -809,7 +1183,7 @@ lean_inc(x_45); lean_dec(x_4); x_47 = lean_array_get_size(x_45); x_48 = lean_unsigned_to_nat(0u); -x_49 = l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__7(x_1, x_45, x_45, x_47, x_48); +x_49 = l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__11(x_1, x_45, x_45, x_47, x_48); lean_dec(x_47); lean_dec(x_45); if (x_49 == 0) @@ -930,38 +1304,38 @@ return x_83; } } } -lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___lambda__1(lean_object* x_1) { +lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___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; lean_object* x_7; lean_object* x_8; x_2 = l_Array_empty___closed__1; -x_3 = l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__3(x_2, x_1); +x_3 = l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__7(x_2, x_1); x_4 = lean_array_get_size(x_3); x_5 = lean_unsigned_to_nat(1u); x_6 = lean_nat_sub(x_4, x_5); lean_dec(x_4); x_7 = lean_unsigned_to_nat(0u); -x_8 = l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__4(x_3, x_7, x_6); +x_8 = l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__8(x_3, x_7, x_6); lean_dec(x_6); return x_8; } } -lean_object* _init_l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___closed__1() { +lean_object* _init_l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___closed__1() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___lambda__1___boxed), 1, 0); +x_1 = lean_alloc_closure((void*)(l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___lambda__1___boxed), 1, 0); return x_1; } } -lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6) { +lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6) { _start: { lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_7 = l_Lean_registerParametricAttribute___rarg___closed__1; x_8 = l_Lean_registerParametricAttribute___rarg___closed__2; x_9 = l_Lean_registerParametricAttribute___rarg___closed__3; -x_10 = l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___closed__1; +x_10 = l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___closed__1; x_11 = l_Lean_registerParametricAttribute___rarg___closed__4; lean_inc(x_1); x_12 = lean_alloc_ctor(0, 6, 0); @@ -971,7 +1345,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_mkInitAttr___spec__6(x_12, x_6); +x_13 = l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkInitAttr___spec__10(x_12, x_6); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; @@ -1247,11 +1621,13 @@ lean_object* x_14; lean_object* x_15; lean_free_object(x_7); x_14 = l_Lean_mkInitAttr___lambda__1___closed__6; x_15 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_14, x_3, x_4, x_5, x_10); +lean_dec(x_3); return x_15; } else { lean_object* x_16; +lean_dec(x_3); x_16 = lean_box(0); lean_ctor_set(x_7, 0, x_16); return x_7; @@ -1264,6 +1640,7 @@ lean_free_object(x_7); lean_dec(x_9); x_17 = l_Lean_mkInitAttr___lambda__1___closed__3; x_18 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_17, x_3, x_4, x_5, x_10); +lean_dec(x_3); return x_18; } } @@ -1274,347 +1651,434 @@ lean_free_object(x_7); x_19 = lean_ctor_get(x_11, 0); lean_inc(x_19); lean_dec(x_11); -lean_inc(x_19); -x_20 = l_Lean_getConstInfo___at_Lean_mkInitAttr___spec__1(x_19, x_3, x_4, x_5, x_10); +lean_inc(x_3); +x_20 = l_Lean_resolveGlobalConstNoOverload___at_Lean_mkInitAttr___spec__2(x_19, x_3, x_4, x_5, x_10); if (lean_obj_tag(x_20) == 0) { -uint8_t x_21; -x_21 = !lean_is_exclusive(x_20); -if (x_21 == 0) +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +lean_inc(x_21); +x_23 = l_Lean_getConstInfo___at_Lean_mkInitAttr___spec__1(x_21, x_3, x_4, x_5, x_22); +if (lean_obj_tag(x_23) == 0) { -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_22 = lean_ctor_get(x_20, 0); -x_23 = lean_ctor_get(x_20, 1); -x_24 = l_Lean_ConstantInfo_type(x_22); -lean_dec(x_22); -x_25 = l___private_Lean_Compiler_InitAttr_1__getIOTypeArg(x_24); -lean_dec(x_24); -if (lean_obj_tag(x_25) == 0) +uint8_t x_24; +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) { -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_free_object(x_20); -lean_dec(x_9); -x_26 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_26, 0, x_19); -x_27 = l_Lean_mkInitAttr___lambda__1___closed__9; -x_28 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_28, 0, x_27); -lean_ctor_set(x_28, 1, x_26); -x_29 = l_Lean_mkInitAttr___lambda__1___closed__12; -x_30 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); -x_31 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_30, x_3, x_4, x_5, x_23); -return x_31; -} -else -{ -lean_object* x_32; lean_object* x_33; uint8_t x_34; -x_32 = lean_ctor_get(x_25, 0); -lean_inc(x_32); +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_25 = lean_ctor_get(x_23, 0); +x_26 = lean_ctor_get(x_23, 1); +x_27 = l_Lean_ConstantInfo_type(x_25); lean_dec(x_25); -x_33 = l_Lean_ConstantInfo_type(x_9); +x_28 = l___private_Lean_Compiler_InitAttr_1__getIOTypeArg(x_27); +lean_dec(x_27); +if (lean_obj_tag(x_28) == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +lean_free_object(x_23); lean_dec(x_9); -x_34 = lean_expr_eqv(x_33, x_32); -lean_dec(x_32); -lean_dec(x_33); -if (x_34 == 0) -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -lean_free_object(x_20); -x_35 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_35, 0, x_19); -x_36 = l_Lean_mkInitAttr___lambda__1___closed__9; -x_37 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_37, 0, x_36); -lean_ctor_set(x_37, 1, x_35); -x_38 = l_Lean_mkInitAttr___lambda__1___closed__15; -x_39 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_39, 0, x_37); -lean_ctor_set(x_39, 1, x_38); -x_40 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_39, x_3, x_4, x_5, x_23); -return x_40; +x_29 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_29, 0, x_21); +x_30 = l_Lean_mkInitAttr___lambda__1___closed__9; +x_31 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +x_32 = l_Lean_mkInitAttr___lambda__1___closed__12; +x_33 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +x_34 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_33, x_3, x_4, x_5, x_26); +lean_dec(x_3); +return x_34; } else { -lean_ctor_set(x_20, 0, x_19); -return x_20; -} -} -} -else -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_41 = lean_ctor_get(x_20, 0); -x_42 = lean_ctor_get(x_20, 1); -lean_inc(x_42); -lean_inc(x_41); -lean_dec(x_20); -x_43 = l_Lean_ConstantInfo_type(x_41); -lean_dec(x_41); -x_44 = l___private_Lean_Compiler_InitAttr_1__getIOTypeArg(x_43); -lean_dec(x_43); -if (lean_obj_tag(x_44) == 0) -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +lean_object* x_35; lean_object* x_36; uint8_t x_37; +x_35 = lean_ctor_get(x_28, 0); +lean_inc(x_35); +lean_dec(x_28); +x_36 = l_Lean_ConstantInfo_type(x_9); lean_dec(x_9); -x_45 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_45, 0, x_19); -x_46 = l_Lean_mkInitAttr___lambda__1___closed__9; -x_47 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_47, 0, x_46); -lean_ctor_set(x_47, 1, x_45); -x_48 = l_Lean_mkInitAttr___lambda__1___closed__12; -x_49 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -x_50 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_49, x_3, x_4, x_5, x_42); -return x_50; +x_37 = lean_expr_eqv(x_36, x_35); +lean_dec(x_35); +lean_dec(x_36); +if (x_37 == 0) +{ +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_free_object(x_23); +x_38 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_38, 0, x_21); +x_39 = l_Lean_mkInitAttr___lambda__1___closed__9; +x_40 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); +x_41 = l_Lean_mkInitAttr___lambda__1___closed__15; +x_42 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_42, 0, x_40); +lean_ctor_set(x_42, 1, x_41); +x_43 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_42, x_3, x_4, x_5, x_26); +lean_dec(x_3); +return x_43; } else { -lean_object* x_51; lean_object* x_52; uint8_t x_53; -x_51 = lean_ctor_get(x_44, 0); -lean_inc(x_51); +lean_dec(x_3); +lean_ctor_set(x_23, 0, x_21); +return x_23; +} +} +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_44 = lean_ctor_get(x_23, 0); +x_45 = lean_ctor_get(x_23, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_23); +x_46 = l_Lean_ConstantInfo_type(x_44); lean_dec(x_44); -x_52 = l_Lean_ConstantInfo_type(x_9); +x_47 = l___private_Lean_Compiler_InitAttr_1__getIOTypeArg(x_46); +lean_dec(x_46); +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_dec(x_9); -x_53 = lean_expr_eqv(x_52, x_51); -lean_dec(x_51); -lean_dec(x_52); -if (x_53 == 0) -{ -lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_54 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_54, 0, x_19); -x_55 = l_Lean_mkInitAttr___lambda__1___closed__9; -x_56 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_56, 0, x_55); -lean_ctor_set(x_56, 1, x_54); -x_57 = l_Lean_mkInitAttr___lambda__1___closed__15; -x_58 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_58, 0, x_56); -lean_ctor_set(x_58, 1, x_57); -x_59 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_58, x_3, x_4, x_5, x_42); -return x_59; +x_48 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_48, 0, x_21); +x_49 = l_Lean_mkInitAttr___lambda__1___closed__9; +x_50 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_48); +x_51 = l_Lean_mkInitAttr___lambda__1___closed__12; +x_52 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +x_53 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_52, x_3, x_4, x_5, x_45); +lean_dec(x_3); +return x_53; } else { -lean_object* x_60; -x_60 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_60, 0, x_19); -lean_ctor_set(x_60, 1, x_42); -return x_60; -} -} -} -} -else -{ -uint8_t x_61; -lean_dec(x_19); +lean_object* x_54; lean_object* x_55; uint8_t x_56; +x_54 = lean_ctor_get(x_47, 0); +lean_inc(x_54); +lean_dec(x_47); +x_55 = l_Lean_ConstantInfo_type(x_9); lean_dec(x_9); -x_61 = !lean_is_exclusive(x_20); -if (x_61 == 0) +x_56 = lean_expr_eqv(x_55, x_54); +lean_dec(x_54); +lean_dec(x_55); +if (x_56 == 0) { -return x_20; +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_57 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_57, 0, x_21); +x_58 = l_Lean_mkInitAttr___lambda__1___closed__9; +x_59 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_59, 0, x_58); +lean_ctor_set(x_59, 1, x_57); +x_60 = l_Lean_mkInitAttr___lambda__1___closed__15; +x_61 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_61, 0, x_59); +lean_ctor_set(x_61, 1, x_60); +x_62 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_61, x_3, x_4, x_5, x_45); +lean_dec(x_3); +return x_62; } else { -lean_object* x_62; lean_object* x_63; lean_object* x_64; -x_62 = lean_ctor_get(x_20, 0); -x_63 = lean_ctor_get(x_20, 1); -lean_inc(x_63); -lean_inc(x_62); -lean_dec(x_20); -x_64 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_64, 0, x_62); -lean_ctor_set(x_64, 1, x_63); -return x_64; +lean_object* x_63; +lean_dec(x_3); +x_63 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_63, 0, x_21); +lean_ctor_set(x_63, 1, x_45); +return x_63; } } } } else { +uint8_t x_64; +lean_dec(x_21); +lean_dec(x_9); +lean_dec(x_3); +x_64 = !lean_is_exclusive(x_23); +if (x_64 == 0) +{ +return x_23; +} +else +{ lean_object* x_65; lean_object* x_66; lean_object* x_67; -x_65 = lean_ctor_get(x_7, 0); -x_66 = lean_ctor_get(x_7, 1); +x_65 = lean_ctor_get(x_23, 0); +x_66 = lean_ctor_get(x_23, 1); lean_inc(x_66); lean_inc(x_65); +lean_dec(x_23); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_65); +lean_ctor_set(x_67, 1, x_66); +return x_67; +} +} +} +else +{ +uint8_t x_68; +lean_dec(x_9); +lean_dec(x_3); +x_68 = !lean_is_exclusive(x_20); +if (x_68 == 0) +{ +return x_20; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_69 = lean_ctor_get(x_20, 0); +x_70 = lean_ctor_get(x_20, 1); +lean_inc(x_70); +lean_inc(x_69); +lean_dec(x_20); +x_71 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_71, 0, x_69); +lean_ctor_set(x_71, 1, x_70); +return x_71; +} +} +} +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_7, 0); +x_73 = lean_ctor_get(x_7, 1); +lean_inc(x_73); +lean_inc(x_72); lean_dec(x_7); -x_67 = l_Lean_attrParamSyntaxToIdentifier(x_2); -if (lean_obj_tag(x_67) == 0) +x_74 = l_Lean_attrParamSyntaxToIdentifier(x_2); +if (lean_obj_tag(x_74) == 0) { if (lean_obj_tag(x_2) == 0) { -lean_object* x_68; uint8_t x_69; -x_68 = l_Lean_ConstantInfo_type(x_65); -lean_dec(x_65); -x_69 = l___private_Lean_Compiler_InitAttr_3__isIOUnit(x_68); -lean_dec(x_68); -if (x_69 == 0) +lean_object* x_75; uint8_t x_76; +x_75 = l_Lean_ConstantInfo_type(x_72); +lean_dec(x_72); +x_76 = l___private_Lean_Compiler_InitAttr_3__isIOUnit(x_75); +lean_dec(x_75); +if (x_76 == 0) { -lean_object* x_70; lean_object* x_71; -x_70 = l_Lean_mkInitAttr___lambda__1___closed__6; -x_71 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_70, x_3, x_4, x_5, x_66); -return x_71; +lean_object* x_77; lean_object* x_78; +x_77 = l_Lean_mkInitAttr___lambda__1___closed__6; +x_78 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_77, x_3, x_4, x_5, x_73); +lean_dec(x_3); +return x_78; } else { -lean_object* x_72; lean_object* x_73; -x_72 = lean_box(0); -x_73 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_73, 0, x_72); -lean_ctor_set(x_73, 1, x_66); -return x_73; +lean_object* x_79; lean_object* x_80; +lean_dec(x_3); +x_79 = lean_box(0); +x_80 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_80, 0, x_79); +lean_ctor_set(x_80, 1, x_73); +return x_80; } } else { -lean_object* x_74; lean_object* x_75; -lean_dec(x_65); -x_74 = l_Lean_mkInitAttr___lambda__1___closed__3; -x_75 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_74, x_3, x_4, x_5, x_66); -return x_75; +lean_object* x_81; lean_object* x_82; +lean_dec(x_72); +x_81 = l_Lean_mkInitAttr___lambda__1___closed__3; +x_82 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_81, x_3, x_4, x_5, x_73); +lean_dec(x_3); +return x_82; } } else { -lean_object* x_76; lean_object* x_77; -x_76 = lean_ctor_get(x_67, 0); -lean_inc(x_76); -lean_dec(x_67); -lean_inc(x_76); -x_77 = l_Lean_getConstInfo___at_Lean_mkInitAttr___spec__1(x_76, x_3, x_4, x_5, x_66); -if (lean_obj_tag(x_77) == 0) +lean_object* x_83; lean_object* x_84; +x_83 = lean_ctor_get(x_74, 0); +lean_inc(x_83); +lean_dec(x_74); +lean_inc(x_3); +x_84 = l_Lean_resolveGlobalConstNoOverload___at_Lean_mkInitAttr___spec__2(x_83, x_3, x_4, x_5, x_73); +if (lean_obj_tag(x_84) == 0) { -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_78 = lean_ctor_get(x_77, 0); -lean_inc(x_78); -x_79 = lean_ctor_get(x_77, 1); -lean_inc(x_79); -if (lean_is_exclusive(x_77)) { - lean_ctor_release(x_77, 0); - lean_ctor_release(x_77, 1); - x_80 = x_77; -} else { - lean_dec_ref(x_77); - x_80 = lean_box(0); -} -x_81 = l_Lean_ConstantInfo_type(x_78); -lean_dec(x_78); -x_82 = l___private_Lean_Compiler_InitAttr_1__getIOTypeArg(x_81); -lean_dec(x_81); -if (lean_obj_tag(x_82) == 0) +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_84, 0); +lean_inc(x_85); +x_86 = lean_ctor_get(x_84, 1); +lean_inc(x_86); +lean_dec(x_84); +lean_inc(x_85); +x_87 = l_Lean_getConstInfo___at_Lean_mkInitAttr___spec__1(x_85, x_3, x_4, x_5, x_86); +if (lean_obj_tag(x_87) == 0) { -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_dec(x_80); -lean_dec(x_65); -x_83 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_83, 0, x_76); -x_84 = l_Lean_mkInitAttr___lambda__1___closed__9; -x_85 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_85, 0, x_84); -lean_ctor_set(x_85, 1, x_83); -x_86 = l_Lean_mkInitAttr___lambda__1___closed__12; -x_87 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_87, 0, x_85); -lean_ctor_set(x_87, 1, x_86); -x_88 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_87, x_3, x_4, x_5, x_79); -return x_88; -} -else -{ -lean_object* x_89; lean_object* x_90; uint8_t x_91; -x_89 = lean_ctor_get(x_82, 0); +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_88 = lean_ctor_get(x_87, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_87, 1); lean_inc(x_89); -lean_dec(x_82); -x_90 = l_Lean_ConstantInfo_type(x_65); -lean_dec(x_65); -x_91 = lean_expr_eqv(x_90, x_89); -lean_dec(x_89); -lean_dec(x_90); -if (x_91 == 0) -{ -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_dec(x_80); -x_92 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_92, 0, x_76); -x_93 = l_Lean_mkInitAttr___lambda__1___closed__9; -x_94 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_94, 0, x_93); -lean_ctor_set(x_94, 1, x_92); -x_95 = l_Lean_mkInitAttr___lambda__1___closed__15; -x_96 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_96, 0, x_94); -lean_ctor_set(x_96, 1, x_95); -x_97 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_96, x_3, x_4, x_5, x_79); -return x_97; -} -else -{ -lean_object* x_98; -if (lean_is_scalar(x_80)) { - x_98 = lean_alloc_ctor(0, 2, 0); +if (lean_is_exclusive(x_87)) { + lean_ctor_release(x_87, 0); + lean_ctor_release(x_87, 1); + x_90 = x_87; } else { - x_98 = x_80; + lean_dec_ref(x_87); + x_90 = lean_box(0); } -lean_ctor_set(x_98, 0, x_76); -lean_ctor_set(x_98, 1, x_79); +x_91 = l_Lean_ConstantInfo_type(x_88); +lean_dec(x_88); +x_92 = l___private_Lean_Compiler_InitAttr_1__getIOTypeArg(x_91); +lean_dec(x_91); +if (lean_obj_tag(x_92) == 0) +{ +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_dec(x_90); +lean_dec(x_72); +x_93 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_93, 0, x_85); +x_94 = l_Lean_mkInitAttr___lambda__1___closed__9; +x_95 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_95, 0, x_94); +lean_ctor_set(x_95, 1, x_93); +x_96 = l_Lean_mkInitAttr___lambda__1___closed__12; +x_97 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_97, 0, x_95); +lean_ctor_set(x_97, 1, x_96); +x_98 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_97, x_3, x_4, x_5, x_89); +lean_dec(x_3); return x_98; } -} -} else { -lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; -lean_dec(x_76); -lean_dec(x_65); -x_99 = lean_ctor_get(x_77, 0); +lean_object* x_99; lean_object* x_100; uint8_t x_101; +x_99 = lean_ctor_get(x_92, 0); lean_inc(x_99); -x_100 = lean_ctor_get(x_77, 1); -lean_inc(x_100); -if (lean_is_exclusive(x_77)) { - lean_ctor_release(x_77, 0); - lean_ctor_release(x_77, 1); - x_101 = x_77; -} else { - lean_dec_ref(x_77); - x_101 = lean_box(0); +lean_dec(x_92); +x_100 = l_Lean_ConstantInfo_type(x_72); +lean_dec(x_72); +x_101 = lean_expr_eqv(x_100, x_99); +lean_dec(x_99); +lean_dec(x_100); +if (x_101 == 0) +{ +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_dec(x_90); +x_102 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_102, 0, x_85); +x_103 = l_Lean_mkInitAttr___lambda__1___closed__9; +x_104 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_104, 0, x_103); +lean_ctor_set(x_104, 1, x_102); +x_105 = l_Lean_mkInitAttr___lambda__1___closed__15; +x_106 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_106, 0, x_104); +lean_ctor_set(x_106, 1, x_105); +x_107 = l_Lean_throwError___at_Lean_addAttribute___spec__2___rarg(x_106, x_3, x_4, x_5, x_89); +lean_dec(x_3); +return x_107; } -if (lean_is_scalar(x_101)) { - x_102 = lean_alloc_ctor(1, 2, 0); +else +{ +lean_object* x_108; +lean_dec(x_3); +if (lean_is_scalar(x_90)) { + x_108 = lean_alloc_ctor(0, 2, 0); } else { - x_102 = x_101; + x_108 = x_90; } -lean_ctor_set(x_102, 0, x_99); -lean_ctor_set(x_102, 1, x_100); -return x_102; +lean_ctor_set(x_108, 0, x_85); +lean_ctor_set(x_108, 1, x_89); +return x_108; +} +} +} +else +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +lean_dec(x_85); +lean_dec(x_72); +lean_dec(x_3); +x_109 = lean_ctor_get(x_87, 0); +lean_inc(x_109); +x_110 = lean_ctor_get(x_87, 1); +lean_inc(x_110); +if (lean_is_exclusive(x_87)) { + lean_ctor_release(x_87, 0); + lean_ctor_release(x_87, 1); + x_111 = x_87; +} else { + lean_dec_ref(x_87); + x_111 = lean_box(0); +} +if (lean_is_scalar(x_111)) { + x_112 = lean_alloc_ctor(1, 2, 0); +} else { + x_112 = x_111; +} +lean_ctor_set(x_112, 0, x_109); +lean_ctor_set(x_112, 1, x_110); +return x_112; +} +} +else +{ +lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; +lean_dec(x_72); +lean_dec(x_3); +x_113 = lean_ctor_get(x_84, 0); +lean_inc(x_113); +x_114 = lean_ctor_get(x_84, 1); +lean_inc(x_114); +if (lean_is_exclusive(x_84)) { + lean_ctor_release(x_84, 0); + lean_ctor_release(x_84, 1); + x_115 = x_84; +} else { + lean_dec_ref(x_84); + x_115 = lean_box(0); +} +if (lean_is_scalar(x_115)) { + x_116 = lean_alloc_ctor(1, 2, 0); +} else { + x_116 = x_115; +} +lean_ctor_set(x_116, 0, x_113); +lean_ctor_set(x_116, 1, x_114); +return x_116; } } } } else { -uint8_t x_103; -x_103 = !lean_is_exclusive(x_7); -if (x_103 == 0) +uint8_t x_117; +lean_dec(x_3); +x_117 = !lean_is_exclusive(x_7); +if (x_117 == 0) { return x_7; } else { -lean_object* x_104; lean_object* x_105; lean_object* x_106; -x_104 = lean_ctor_get(x_7, 0); -x_105 = lean_ctor_get(x_7, 1); -lean_inc(x_105); -lean_inc(x_104); +lean_object* x_118; lean_object* x_119; lean_object* x_120; +x_118 = lean_ctor_get(x_7, 0); +x_119 = lean_ctor_get(x_7, 1); +lean_inc(x_119); +lean_inc(x_118); lean_dec(x_7); -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_120 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_120, 0, x_118); +lean_ctor_set(x_120, 1, x_119); +return x_120; } } } @@ -1681,7 +2145,7 @@ x_3 = l_Lean_mkInitAttr___closed__3; x_4 = l_Lean_mkInitAttr___closed__4; x_5 = l_Lean_mkInitAttr___closed__5; x_6 = 0; -x_7 = l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2(x_2, x_3, x_4, x_5, x_6, x_1); +x_7 = l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6(x_2, x_3, x_4, x_5, x_6, x_1); return x_7; } } @@ -1696,39 +2160,80 @@ lean_dec(x_2); return x_6; } } -lean_object* l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__3___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_resolveGlobalName___at_Lean_mkInitAttr___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_Lean_resolveGlobalName___at_Lean_mkInitAttr___spec__4(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_6; +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_throwUnknownConstant___at_Lean_mkInitAttr___spec__5___rarg(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_6; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_mkInitAttr___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_resolveGlobalConst___at_Lean_mkInitAttr___spec__3(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_6; +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_mkInitAttr___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_resolveGlobalConstNoOverload___at_Lean_mkInitAttr___spec__2(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_6; +} +} +lean_object* l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__7___boxed(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; -x_3 = l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__3(x_1, x_2); +x_3 = l_Std_RBNode_fold___main___at_Lean_mkInitAttr___spec__7(x_1, x_2); lean_dec(x_2); return x_3; } } -lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___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___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5(x_1, x_2, x_3, x_4, x_5); +x_6 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9(x_1, x_2, x_3, x_4, x_5); lean_dec(x_2); lean_dec(x_1); return x_6; } } -lean_object* l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__8___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__4(x_1, x_2, x_3); +x_4 = l_Array_qsortAux___main___at_Lean_mkInitAttr___spec__8(x_1, x_2, x_3); lean_dec(x_3); return x_4; } } -lean_object* l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__7___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__11___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_mkInitAttr___spec__7(x_1, x_2, x_3, x_4, x_5); +x_6 = l_Array_anyRangeMAux___main___at_Lean_mkInitAttr___spec__11(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); @@ -1737,22 +2242,22 @@ x_7 = lean_box(x_6); return x_7; } } -lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___lambda__1___boxed(lean_object* x_1) { +lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___lambda__1___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___lambda__1(x_1); +x_2 = l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___lambda__1(x_1); lean_dec(x_1); return x_2; } } -lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { uint8_t x_7; lean_object* x_8; x_7 = lean_unbox(x_5); lean_dec(x_5); -x_8 = l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2(x_1, x_2, x_3, x_4, x_7, x_6); +x_8 = l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6(x_1, x_2, x_3, x_4, x_7, x_6); return x_8; } } @@ -1763,7 +2268,6 @@ lean_object* x_7; x_7 = l_Lean_mkInitAttr___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); lean_dec(x_2); return x_7; } @@ -1801,7 +2305,7 @@ x_7 = lean_nat_add(x_3, x_4); x_8 = lean_unsigned_to_nat(2u); x_9 = lean_nat_div(x_7, x_8); lean_dec(x_7); -x_10 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___closed__1; +x_10 = l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___closed__1; x_11 = lean_array_get(x_10, x_1, x_9); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); @@ -2087,10 +2591,10 @@ if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l___private_Lean_Compiler_InitAttr_1__getIOTypeArg___closed__1 = _init_l___private_Lean_Compiler_InitAttr_1__getIOTypeArg___closed__1(); lean_mark_persistent(l___private_Lean_Compiler_InitAttr_1__getIOTypeArg___closed__1); -l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___closed__1 = _init_l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___closed__1(); -lean_mark_persistent(l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__5___closed__1); -l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___closed__1 = _init_l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___closed__1(); -lean_mark_persistent(l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__2___closed__1); +l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___closed__1 = _init_l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___closed__1(); +lean_mark_persistent(l___private_Init_Data_Array_QSort_1__qpartitionAux___main___at_Lean_mkInitAttr___spec__9___closed__1); +l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___closed__1 = _init_l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___closed__1(); +lean_mark_persistent(l_Lean_registerParametricAttribute___at_Lean_mkInitAttr___spec__6___closed__1); l_Lean_mkInitAttr___lambda__1___closed__1 = _init_l_Lean_mkInitAttr___lambda__1___closed__1(); lean_mark_persistent(l_Lean_mkInitAttr___lambda__1___closed__1); l_Lean_mkInitAttr___lambda__1___closed__2 = _init_l_Lean_mkInitAttr___lambda__1___closed__2(); diff --git a/stage0/stdlib/Lean/Delaborator.c b/stage0/stdlib/Lean/Delaborator.c index 23ff0608d8..7812ae4e87 100644 --- a/stage0/stdlib/Lean/Delaborator.c +++ b/stage0/stdlib/Lean/Delaborator.c @@ -470,7 +470,6 @@ lean_object* l_Lean_Delaborator_delabSort___closed__5; lean_object* l_Lean_Delaborator_delabDiv___closed__1; lean_object* l___regBuiltin_Lean_Delaborator_delabProjectionApp___closed__1; lean_object* l___regBuiltin_Lean_Delaborator_delabMod___closed__2; -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___regBuiltin_Lean_Delaborator_delabSub___closed__2; lean_object* l___regBuiltin_Lean_Delaborator_delabBNe(lean_object*); extern lean_object* l_Array_myMacro____x40_Init_Data_Array_Macros___hyg_464____closed__6; @@ -566,6 +565,7 @@ lean_object* l_Lean_Delaborator_delabGT___lambda__1___closed__4; lean_object* l_Lean_Delaborator_delabProd___lambda__1___closed__3; lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at_Lean_Delaborator_delabForall___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Delaborator_failure___rarg___closed__1; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Delaborator_registerDelabFailureId___closed__2; lean_object* l_Std_RBNode_find___main___at_Lean_Delaborator_getPPOption___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Level_getOffsetAux___main(lean_object*, lean_object*); @@ -8217,7 +8217,7 @@ x_14 = l_Lean_Delaborator_delab___closed__3; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); -x_16 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_16 = l_Lean_throwUnknownConstant___rarg___closed__5; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); diff --git a/stage0/stdlib/Lean/Elab/App.c b/stage0/stdlib/Lean/Elab/App.c index f60223fc45..eaa334bc8b 100644 --- a/stage0/stdlib/Lean/Elab/App.c +++ b/stage0/stdlib/Lean/Elab/App.c @@ -39,7 +39,6 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Term_expandApp___spec__1_ lean_object* l_Lean_mkSort(lean_object*); lean_object* l___private_Lean_Elab_App_18__addLValArg___main___closed__11; lean_object* l_unreachable_x21___rarg(lean_object*); -lean_object* l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__16; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Term_expandApp___spec__1___closed__5; lean_object* l___private_Lean_Elab_App_22__elabAppFn___main___closed__7; extern lean_object* l_Lean_fieldIdxKind___closed__2; @@ -185,11 +184,11 @@ lean_object* l___private_Lean_Meta_Basic_4__mkFreshExprMVarImpl(lean_object*, ui lean_object* l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__1; lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabExplicit(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_getCurrNamespace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_App_13__resolveLValAux___closed__7; extern lean_object* l_Lean_choiceKind___closed__2; lean_object* l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__2; extern lean_object* l_Lean_MessageData_Inhabited; +extern lean_object* l_Lean_Elab_Term_quoteAutoTactic___main___closed__9; extern lean_object* l___private_Lean_Syntax_6__formatInfo___closed__1; lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Array_shrink___main___rarg(lean_object*, lean_object*); @@ -209,13 +208,11 @@ lean_object* l___private_Lean_Elab_App_22__elabAppFn___main___closed__3; lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); lean_object* l_Array_findSomeMAux___main___at___private_Lean_Elab_App_12__findMethod_x3f___main___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___private_Lean_Elab_App_11__throwLValError(lean_object*); lean_object* l_Lean_Elab_Term_NamedArg_inhabited___closed__1; lean_object* l___private_Lean_Elab_App_10__elabAppArgs___closed__4; lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_App_21__elabAppFnId___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_Arg_hasToString(lean_object*); -extern lean_object* l_Std_PersistentArray_Stats_toString___closed__4; lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Term_21__elabTermAux___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_repr(lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabExplicitUniv___closed__1; @@ -240,6 +237,7 @@ lean_object* l___regBuiltin_Lean_Elab_Term_elabChoice(lean_object*); lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_addNamedArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l___private_Lean_Elab_App_5__hasTypeMVar(lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l___private_Lean_Elab_App_18__addLValArg___main___closed__8; lean_object* l___private_Lean_Elab_App_19__elabAppLValsAux___main___closed__1; lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_App_4__getForallBody___main___spec__1___boxed(lean_object*, lean_object*, lean_object*); @@ -3354,18 +3352,6 @@ x_3 = lean_array_push(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__16() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_SourceInfo_inhabited___closed__1; -x_2 = l_Std_PersistentArray_Stats_toString___closed__4; -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* l___private_Lean_Elab_App_9__elabAppArgsAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { @@ -4946,7 +4932,7 @@ lean_ctor_set(x_478, 0, x_475); lean_ctor_set(x_478, 1, x_477); x_479 = l_Lean_Elab_Term_quoteAutoTactic___main___closed__4; x_480 = lean_array_push(x_479, x_478); -x_481 = l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__16; +x_481 = l_Lean_Elab_Term_quoteAutoTactic___main___closed__9; x_482 = lean_array_push(x_480, x_481); x_483 = l___regBuiltin_Lean_Elab_Tactic_evalTacticSeqBracketed___closed__2; x_484 = lean_alloc_ctor(1, 2, 0); @@ -5500,7 +5486,7 @@ lean_ctor_set(x_608, 0, x_605); lean_ctor_set(x_608, 1, x_607); x_609 = l_Lean_Elab_Term_quoteAutoTactic___main___closed__4; x_610 = lean_array_push(x_609, x_608); -x_611 = l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__16; +x_611 = l_Lean_Elab_Term_quoteAutoTactic___main___closed__9; x_612 = lean_array_push(x_610, x_611); x_613 = l___regBuiltin_Lean_Elab_Tactic_evalTacticSeqBracketed___closed__2; x_614 = lean_alloc_ctor(1, 2, 0); @@ -7769,7 +7755,7 @@ lean_ctor_set(x_1040, 0, x_1037); lean_ctor_set(x_1040, 1, x_1039); x_1041 = l_Lean_Elab_Term_quoteAutoTactic___main___closed__4; x_1042 = lean_array_push(x_1041, x_1040); -x_1043 = l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__16; +x_1043 = l_Lean_Elab_Term_quoteAutoTactic___main___closed__9; x_1044 = lean_array_push(x_1042, x_1043); x_1045 = l___regBuiltin_Lean_Elab_Tactic_evalTacticSeqBracketed___closed__2; x_1046 = lean_alloc_ctor(1, 2, 0); @@ -10041,159 +10027,153 @@ lean_inc(x_67); x_68 = l_Lean_isStructure(x_67, x_61); if (x_68 == 0) { -lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; -lean_free_object(x_63); +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; x_69 = lean_box(0); lean_inc(x_62); x_70 = lean_name_mk_string(x_69, x_62); lean_inc(x_70); x_71 = l_Lean_Name_append___main(x_61, x_70); -x_72 = l_Lean_Elab_Term_getCurrNamespace(x_4, x_5, x_6, x_7, x_8, x_9, x_66); -x_73 = !lean_is_exclusive(x_72); -if (x_73 == 0) -{ -lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_74 = lean_ctor_get(x_72, 0); -x_75 = lean_ctor_get(x_72, 1); +x_72 = lean_ctor_get(x_4, 2); +lean_inc(x_72); lean_inc(x_71); -x_76 = l_Lean_Name_replacePrefix___main(x_71, x_74, x_69); -lean_dec(x_74); -x_77 = lean_ctor_get(x_6, 1); -lean_inc(x_77); -x_78 = lean_local_ctx_find_from_user_name(x_77, x_76); -if (lean_obj_tag(x_78) == 0) +x_73 = l_Lean_Name_replacePrefix___main(x_71, x_72, x_69); +lean_dec(x_72); +x_74 = lean_ctor_get(x_6, 1); +lean_inc(x_74); +x_75 = lean_local_ctx_find_from_user_name(x_74, x_73); +if (lean_obj_tag(x_75) == 0) { -lean_object* x_79; +lean_object* x_76; lean_inc(x_61); -x_79 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_70); -if (lean_obj_tag(x_79) == 0) +x_76 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_70); +if (lean_obj_tag(x_76) == 0) { -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_free_object(x_72); +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_free_object(x_63); lean_dec(x_61); -x_80 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_80, 0, x_62); -x_81 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_81, 0, x_80); -x_82 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_83 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_83, 0, x_82); -lean_ctor_set(x_83, 1, x_81); -x_84 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_85 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_85, 0, x_83); -lean_ctor_set(x_85, 1, x_84); -x_86 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_86, 0, x_71); -x_87 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_87, 0, x_85); -lean_ctor_set(x_87, 1, x_86); -x_88 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_89 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_89, 0, x_87); -lean_ctor_set(x_89, 1, x_88); -x_90 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_89, x_4, x_5, x_6, x_7, x_8, x_9, x_75); +x_77 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_77, 0, x_62); +x_78 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_78, 0, x_77); +x_79 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; +x_80 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_80, 0, x_79); +lean_ctor_set(x_80, 1, x_78); +x_81 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; +x_82 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_82, 0, x_80); +lean_ctor_set(x_82, 1, x_81); +x_83 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_83, 0, x_71); +x_84 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +x_85 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_86 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_86, 0, x_84); +lean_ctor_set(x_86, 1, x_85); +x_87 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_86, x_4, x_5, x_6, x_7, x_8, x_9, x_66); lean_dec(x_6); -return x_90; +return x_87; } else { -lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_dec(x_71); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_91 = lean_ctor_get(x_79, 0); -lean_inc(x_91); -lean_dec(x_79); -x_92 = lean_ctor_get(x_91, 0); +x_88 = lean_ctor_get(x_76, 0); +lean_inc(x_88); +lean_dec(x_76); +x_89 = lean_ctor_get(x_88, 0); +lean_inc(x_89); +x_90 = lean_ctor_get(x_88, 1); +lean_inc(x_90); +lean_dec(x_88); +x_91 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_91, 0, x_89); +lean_ctor_set(x_91, 1, x_61); +lean_ctor_set(x_91, 2, x_90); +lean_ctor_set(x_63, 0, x_91); +return x_63; +} +} +else +{ +lean_object* x_92; uint8_t x_93; uint8_t x_94; uint8_t x_95; +x_92 = lean_ctor_get(x_75, 0); lean_inc(x_92); -x_93 = lean_ctor_get(x_91, 1); -lean_inc(x_93); -lean_dec(x_91); -x_94 = lean_alloc_ctor(2, 3, 0); -lean_ctor_set(x_94, 0, x_92); -lean_ctor_set(x_94, 1, x_61); -lean_ctor_set(x_94, 2, x_93); -lean_ctor_set(x_72, 0, x_94); -return x_72; -} -} -else +lean_dec(x_75); +x_93 = l_Lean_LocalDecl_binderInfo(x_92); +x_94 = 4; +x_95 = l_Lean_BinderInfo_beq(x_93, x_94); +if (x_95 == 0) { -lean_object* x_95; uint8_t x_96; uint8_t x_97; uint8_t x_98; -x_95 = lean_ctor_get(x_78, 0); -lean_inc(x_95); -lean_dec(x_78); -x_96 = l_Lean_LocalDecl_binderInfo(x_95); -x_97 = 4; -x_98 = l_Lean_BinderInfo_beq(x_96, x_97); -if (x_98 == 0) -{ -lean_object* x_99; -lean_dec(x_95); +lean_object* x_96; +lean_dec(x_92); lean_inc(x_61); -x_99 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_70); -if (lean_obj_tag(x_99) == 0) +x_96 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_70); +if (lean_obj_tag(x_96) == 0) { -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_free_object(x_72); +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_free_object(x_63); lean_dec(x_61); -x_100 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_100, 0, x_62); -x_101 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_101, 0, x_100); -x_102 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_103 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_103, 0, x_102); -lean_ctor_set(x_103, 1, x_101); -x_104 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_105 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_105, 0, x_103); -lean_ctor_set(x_105, 1, x_104); -x_106 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_106, 0, x_71); -x_107 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_107, 0, x_105); -lean_ctor_set(x_107, 1, x_106); -x_108 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_109 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_109, 0, x_107); -lean_ctor_set(x_109, 1, x_108); -x_110 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_109, x_4, x_5, x_6, x_7, x_8, x_9, x_75); +x_97 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_97, 0, x_62); +x_98 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_98, 0, x_97); +x_99 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; +x_100 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_100, 0, x_99); +lean_ctor_set(x_100, 1, x_98); +x_101 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; +x_102 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_102, 0, x_100); +lean_ctor_set(x_102, 1, x_101); +x_103 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_103, 0, x_71); +x_104 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_104, 0, x_102); +lean_ctor_set(x_104, 1, x_103); +x_105 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_106 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_106, 0, x_104); +lean_ctor_set(x_106, 1, x_105); +x_107 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_106, x_4, x_5, x_6, x_7, x_8, x_9, x_66); lean_dec(x_6); -return x_110; +return x_107; } else { -lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_dec(x_71); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_111 = lean_ctor_get(x_99, 0); -lean_inc(x_111); -lean_dec(x_99); -x_112 = lean_ctor_get(x_111, 0); -lean_inc(x_112); -x_113 = lean_ctor_get(x_111, 1); -lean_inc(x_113); -lean_dec(x_111); -x_114 = lean_alloc_ctor(2, 3, 0); -lean_ctor_set(x_114, 0, x_112); -lean_ctor_set(x_114, 1, x_61); -lean_ctor_set(x_114, 2, x_113); -lean_ctor_set(x_72, 0, x_114); -return x_72; +x_108 = lean_ctor_get(x_96, 0); +lean_inc(x_108); +lean_dec(x_96); +x_109 = lean_ctor_get(x_108, 0); +lean_inc(x_109); +x_110 = lean_ctor_get(x_108, 1); +lean_inc(x_110); +lean_dec(x_108); +x_111 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_111, 0, x_109); +lean_ctor_set(x_111, 1, x_61); +lean_ctor_set(x_111, 2, x_110); +lean_ctor_set(x_63, 0, x_111); +return x_63; } } else { -lean_object* x_115; lean_object* x_116; +lean_object* x_112; lean_object* x_113; lean_dec(x_70); lean_dec(x_67); lean_dec(x_62); @@ -10201,28 +10181,36 @@ lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_115 = l_Lean_LocalDecl_toExpr(x_95); -lean_dec(x_95); -x_116 = lean_alloc_ctor(3, 3, 0); -lean_ctor_set(x_116, 0, x_61); -lean_ctor_set(x_116, 1, x_71); -lean_ctor_set(x_116, 2, x_115); -lean_ctor_set(x_72, 0, x_116); -return x_72; +x_112 = l_Lean_LocalDecl_toExpr(x_92); +lean_dec(x_92); +x_113 = lean_alloc_ctor(3, 3, 0); +lean_ctor_set(x_113, 0, x_61); +lean_ctor_set(x_113, 1, x_71); +lean_ctor_set(x_113, 2, x_112); +lean_ctor_set(x_63, 0, x_113); +return x_63; } } } else { +lean_object* x_114; lean_object* x_115; lean_object* x_116; +x_114 = lean_box(0); +lean_inc(x_62); +x_115 = lean_name_mk_string(x_114, x_62); +lean_inc(x_61); +lean_inc(x_67); +x_116 = l_Lean_findField_x3f___main(x_67, x_61, x_115); +if (lean_obj_tag(x_116) == 0) +{ lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; -x_117 = lean_ctor_get(x_72, 0); -x_118 = lean_ctor_get(x_72, 1); +lean_inc(x_115); +x_117 = l_Lean_Name_append___main(x_61, x_115); +x_118 = lean_ctor_get(x_4, 2); lean_inc(x_118); lean_inc(x_117); -lean_dec(x_72); -lean_inc(x_71); -x_119 = l_Lean_Name_replacePrefix___main(x_71, x_117, x_69); -lean_dec(x_117); +x_119 = l_Lean_Name_replacePrefix___main(x_117, x_118, x_114); +lean_dec(x_118); x_120 = lean_ctor_get(x_6, 1); lean_inc(x_120); x_121 = lean_local_ctx_find_from_user_name(x_120, x_119); @@ -10230,10 +10218,11 @@ if (lean_obj_tag(x_121) == 0) { lean_object* x_122; lean_inc(x_61); -x_122 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_70); +x_122 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_115); if (lean_obj_tag(x_122) == 0) { 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_free_object(x_63); lean_dec(x_61); x_123 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_123, 0, x_62); @@ -10248,22 +10237,22 @@ x_128 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_128, 0, x_126); lean_ctor_set(x_128, 1, x_127); x_129 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_129, 0, x_71); +lean_ctor_set(x_129, 0, x_117); x_130 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_130, 0, x_128); lean_ctor_set(x_130, 1, x_129); -x_131 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_131 = l_Lean_throwUnknownConstant___rarg___closed__5; x_132 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_132, 0, x_130); lean_ctor_set(x_132, 1, x_131); -x_133 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_132, x_4, x_5, x_6, x_7, x_8, x_9, x_118); +x_133 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_132, x_4, x_5, x_6, x_7, x_8, x_9, x_66); lean_dec(x_6); return x_133; } else { -lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; -lean_dec(x_71); +lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +lean_dec(x_117); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); @@ -10281,201 +10270,219 @@ x_137 = lean_alloc_ctor(2, 3, 0); lean_ctor_set(x_137, 0, x_135); lean_ctor_set(x_137, 1, x_61); lean_ctor_set(x_137, 2, x_136); -x_138 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_138, 0, x_137); -lean_ctor_set(x_138, 1, x_118); -return x_138; +lean_ctor_set(x_63, 0, x_137); +return x_63; } } else { -lean_object* x_139; uint8_t x_140; uint8_t x_141; uint8_t x_142; -x_139 = lean_ctor_get(x_121, 0); -lean_inc(x_139); +lean_object* x_138; uint8_t x_139; uint8_t x_140; uint8_t x_141; +x_138 = lean_ctor_get(x_121, 0); +lean_inc(x_138); lean_dec(x_121); -x_140 = l_Lean_LocalDecl_binderInfo(x_139); -x_141 = 4; -x_142 = l_Lean_BinderInfo_beq(x_140, x_141); -if (x_142 == 0) +x_139 = l_Lean_LocalDecl_binderInfo(x_138); +x_140 = 4; +x_141 = l_Lean_BinderInfo_beq(x_139, x_140); +if (x_141 == 0) { -lean_object* x_143; -lean_dec(x_139); +lean_object* x_142; +lean_dec(x_138); lean_inc(x_61); -x_143 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_70); -if (lean_obj_tag(x_143) == 0) +x_142 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_115); +if (lean_obj_tag(x_142) == 0) { -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_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_free_object(x_63); lean_dec(x_61); -x_144 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_144, 0, x_62); -x_145 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_145, 0, x_144); -x_146 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_147 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_147, 0, x_146); -lean_ctor_set(x_147, 1, x_145); -x_148 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_149 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_149, 0, x_147); -lean_ctor_set(x_149, 1, x_148); -x_150 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_150, 0, x_71); -x_151 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_151, 0, x_149); -lean_ctor_set(x_151, 1, x_150); -x_152 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_153 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_153, 0, x_151); -lean_ctor_set(x_153, 1, x_152); -x_154 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_153, x_4, x_5, x_6, x_7, x_8, x_9, x_118); +x_143 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_143, 0, x_62); +x_144 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_144, 0, x_143); +x_145 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; +x_146 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_146, 0, x_145); +lean_ctor_set(x_146, 1, x_144); +x_147 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; +x_148 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_148, 0, x_146); +lean_ctor_set(x_148, 1, x_147); +x_149 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_149, 0, x_117); +x_150 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_150, 0, x_148); +lean_ctor_set(x_150, 1, x_149); +x_151 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_152 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_152, 0, x_150); +lean_ctor_set(x_152, 1, x_151); +x_153 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_152, x_4, x_5, x_6, x_7, x_8, x_9, x_66); lean_dec(x_6); -return x_154; +return x_153; } else { -lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; -lean_dec(x_71); +lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; +lean_dec(x_117); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_155 = lean_ctor_get(x_143, 0); +x_154 = lean_ctor_get(x_142, 0); +lean_inc(x_154); +lean_dec(x_142); +x_155 = lean_ctor_get(x_154, 0); lean_inc(x_155); -lean_dec(x_143); -x_156 = lean_ctor_get(x_155, 0); +x_156 = lean_ctor_get(x_154, 1); lean_inc(x_156); -x_157 = lean_ctor_get(x_155, 1); -lean_inc(x_157); -lean_dec(x_155); -x_158 = lean_alloc_ctor(2, 3, 0); -lean_ctor_set(x_158, 0, x_156); -lean_ctor_set(x_158, 1, x_61); -lean_ctor_set(x_158, 2, x_157); -x_159 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_159, 0, x_158); -lean_ctor_set(x_159, 1, x_118); -return x_159; +lean_dec(x_154); +x_157 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_157, 0, x_155); +lean_ctor_set(x_157, 1, x_61); +lean_ctor_set(x_157, 2, x_156); +lean_ctor_set(x_63, 0, x_157); +return x_63; } } else { -lean_object* x_160; lean_object* x_161; lean_object* x_162; -lean_dec(x_70); +lean_object* x_158; lean_object* x_159; +lean_dec(x_115); lean_dec(x_67); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_160 = l_Lean_LocalDecl_toExpr(x_139); -lean_dec(x_139); -x_161 = lean_alloc_ctor(3, 3, 0); -lean_ctor_set(x_161, 0, x_61); -lean_ctor_set(x_161, 1, x_71); -lean_ctor_set(x_161, 2, x_160); -x_162 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_162, 0, x_161); -lean_ctor_set(x_162, 1, x_118); -return x_162; -} +x_158 = l_Lean_LocalDecl_toExpr(x_138); +lean_dec(x_138); +x_159 = lean_alloc_ctor(3, 3, 0); +lean_ctor_set(x_159, 0, x_61); +lean_ctor_set(x_159, 1, x_117); +lean_ctor_set(x_159, 2, x_158); +lean_ctor_set(x_63, 0, x_159); +return x_63; } } } else { -lean_object* x_163; lean_object* x_164; lean_object* x_165; -x_163 = lean_box(0); -lean_inc(x_62); -x_164 = lean_name_mk_string(x_163, x_62); -lean_inc(x_61); -lean_inc(x_67); -x_165 = l_Lean_findField_x3f___main(x_67, x_61, x_164); -if (lean_obj_tag(x_165) == 0) -{ -lean_object* x_166; lean_object* x_167; uint8_t x_168; -lean_free_object(x_63); -lean_inc(x_164); -x_166 = l_Lean_Name_append___main(x_61, x_164); -x_167 = l_Lean_Elab_Term_getCurrNamespace(x_4, x_5, x_6, x_7, x_8, x_9, x_66); -x_168 = !lean_is_exclusive(x_167); -if (x_168 == 0) -{ -lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; -x_169 = lean_ctor_get(x_167, 0); -x_170 = lean_ctor_get(x_167, 1); -lean_inc(x_166); -x_171 = l_Lean_Name_replacePrefix___main(x_166, x_169, x_163); -lean_dec(x_169); -x_172 = lean_ctor_get(x_6, 1); -lean_inc(x_172); -x_173 = lean_local_ctx_find_from_user_name(x_172, x_171); -if (lean_obj_tag(x_173) == 0) -{ -lean_object* x_174; -lean_inc(x_61); -x_174 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_164); -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; lean_object* x_184; lean_object* x_185; -lean_free_object(x_167); -lean_dec(x_61); -x_175 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_175, 0, x_62); -x_176 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_176, 0, x_175); -x_177 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_178 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_178, 0, x_177); -lean_ctor_set(x_178, 1, x_176); -x_179 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_180 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_180, 0, x_178); -lean_ctor_set(x_180, 1, x_179); -x_181 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_181, 0, x_166); -x_182 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_182, 0, x_180); -lean_ctor_set(x_182, 1, x_181); -x_183 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_184 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_184, 0, x_182); -lean_ctor_set(x_184, 1, x_183); -x_185 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_184, x_4, x_5, x_6, x_7, x_8, x_9, x_170); -lean_dec(x_6); -return x_185; -} -else -{ -lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; -lean_dec(x_166); +lean_object* x_160; lean_object* x_161; +lean_dec(x_67); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_186 = lean_ctor_get(x_174, 0); +x_160 = lean_ctor_get(x_116, 0); +lean_inc(x_160); +lean_dec(x_116); +x_161 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_161, 0, x_160); +lean_ctor_set(x_161, 1, x_61); +lean_ctor_set(x_161, 2, x_115); +lean_ctor_set(x_63, 0, x_161); +return x_63; +} +} +} +else +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; uint8_t x_165; +x_162 = lean_ctor_get(x_63, 0); +x_163 = lean_ctor_get(x_63, 1); +lean_inc(x_163); +lean_inc(x_162); +lean_dec(x_63); +x_164 = lean_ctor_get(x_162, 0); +lean_inc(x_164); +lean_dec(x_162); +lean_inc(x_61); +lean_inc(x_164); +x_165 = l_Lean_isStructure(x_164, x_61); +if (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; +x_166 = lean_box(0); +lean_inc(x_62); +x_167 = lean_name_mk_string(x_166, x_62); +lean_inc(x_167); +x_168 = l_Lean_Name_append___main(x_61, x_167); +x_169 = lean_ctor_get(x_4, 2); +lean_inc(x_169); +lean_inc(x_168); +x_170 = l_Lean_Name_replacePrefix___main(x_168, x_169, x_166); +lean_dec(x_169); +x_171 = lean_ctor_get(x_6, 1); +lean_inc(x_171); +x_172 = lean_local_ctx_find_from_user_name(x_171, x_170); +if (lean_obj_tag(x_172) == 0) +{ +lean_object* x_173; +lean_inc(x_61); +x_173 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_164, x_61, x_167); +if (lean_obj_tag(x_173) == 0) +{ +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_dec(x_61); +x_174 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_174, 0, x_62); +x_175 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_175, 0, x_174); +x_176 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; +x_177 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_177, 0, x_176); +lean_ctor_set(x_177, 1, x_175); +x_178 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; +x_179 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_179, 0, x_177); +lean_ctor_set(x_179, 1, x_178); +x_180 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_180, 0, x_168); +x_181 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_181, 0, x_179); +lean_ctor_set(x_181, 1, x_180); +x_182 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_183 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_183, 0, x_181); +lean_ctor_set(x_183, 1, x_182); +x_184 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_183, x_4, x_5, x_6, x_7, x_8, x_9, x_163); +lean_dec(x_6); +return x_184; +} +else +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; +lean_dec(x_168); +lean_dec(x_62); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_185 = lean_ctor_get(x_173, 0); +lean_inc(x_185); +lean_dec(x_173); +x_186 = lean_ctor_get(x_185, 0); lean_inc(x_186); -lean_dec(x_174); -x_187 = lean_ctor_get(x_186, 0); +x_187 = lean_ctor_get(x_185, 1); lean_inc(x_187); -x_188 = lean_ctor_get(x_186, 1); -lean_inc(x_188); -lean_dec(x_186); -x_189 = lean_alloc_ctor(2, 3, 0); -lean_ctor_set(x_189, 0, x_187); -lean_ctor_set(x_189, 1, x_61); -lean_ctor_set(x_189, 2, x_188); -lean_ctor_set(x_167, 0, x_189); -return x_167; +lean_dec(x_185); +x_188 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_188, 0, x_186); +lean_ctor_set(x_188, 1, x_61); +lean_ctor_set(x_188, 2, x_187); +x_189 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_189, 0, x_188); +lean_ctor_set(x_189, 1, x_163); +return x_189; } } else { lean_object* x_190; uint8_t x_191; uint8_t x_192; uint8_t x_193; -x_190 = lean_ctor_get(x_173, 0); +x_190 = lean_ctor_get(x_172, 0); lean_inc(x_190); -lean_dec(x_173); +lean_dec(x_172); x_191 = l_Lean_LocalDecl_binderInfo(x_190); x_192 = 4; x_193 = l_Lean_BinderInfo_beq(x_191, x_192); @@ -10484,11 +10491,10 @@ if (x_193 == 0) lean_object* x_194; lean_dec(x_190); lean_inc(x_61); -x_194 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_164); +x_194 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_164, x_61, x_167); if (lean_obj_tag(x_194) == 0) { 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_free_object(x_167); lean_dec(x_61); x_195 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_195, 0, x_62); @@ -10503,22 +10509,22 @@ x_200 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_200, 0, x_198); lean_ctor_set(x_200, 1, x_199); x_201 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_201, 0, x_166); +lean_ctor_set(x_201, 0, x_168); x_202 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_202, 0, x_200); lean_ctor_set(x_202, 1, x_201); -x_203 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_203 = l_Lean_throwUnknownConstant___rarg___closed__5; x_204 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_204, 0, x_202); lean_ctor_set(x_204, 1, x_203); -x_205 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_204, x_4, x_5, x_6, x_7, x_8, x_9, x_170); +x_205 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_204, x_4, x_5, x_6, x_7, x_8, x_9, x_163); lean_dec(x_6); return x_205; } else { -lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; -lean_dec(x_166); +lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; +lean_dec(x_168); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); @@ -10536,763 +10542,341 @@ x_209 = lean_alloc_ctor(2, 3, 0); lean_ctor_set(x_209, 0, x_207); lean_ctor_set(x_209, 1, x_61); lean_ctor_set(x_209, 2, x_208); -lean_ctor_set(x_167, 0, x_209); -return x_167; +x_210 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_210, 0, x_209); +lean_ctor_set(x_210, 1, x_163); +return x_210; } } else { -lean_object* x_210; lean_object* x_211; +lean_object* x_211; lean_object* x_212; lean_object* x_213; +lean_dec(x_167); lean_dec(x_164); -lean_dec(x_67); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_210 = l_Lean_LocalDecl_toExpr(x_190); +x_211 = l_Lean_LocalDecl_toExpr(x_190); lean_dec(x_190); -x_211 = lean_alloc_ctor(3, 3, 0); -lean_ctor_set(x_211, 0, x_61); -lean_ctor_set(x_211, 1, x_166); -lean_ctor_set(x_211, 2, x_210); -lean_ctor_set(x_167, 0, x_211); -return x_167; +x_212 = lean_alloc_ctor(3, 3, 0); +lean_ctor_set(x_212, 0, x_61); +lean_ctor_set(x_212, 1, x_168); +lean_ctor_set(x_212, 2, x_211); +x_213 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_213, 0, x_212); +lean_ctor_set(x_213, 1, x_163); +return x_213; } } } else { -lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; -x_212 = lean_ctor_get(x_167, 0); -x_213 = lean_ctor_get(x_167, 1); -lean_inc(x_213); -lean_inc(x_212); -lean_dec(x_167); -lean_inc(x_166); -x_214 = l_Lean_Name_replacePrefix___main(x_166, x_212, x_163); -lean_dec(x_212); -x_215 = lean_ctor_get(x_6, 1); -lean_inc(x_215); -x_216 = lean_local_ctx_find_from_user_name(x_215, x_214); +lean_object* x_214; lean_object* x_215; lean_object* x_216; +x_214 = lean_box(0); +lean_inc(x_62); +x_215 = lean_name_mk_string(x_214, x_62); +lean_inc(x_61); +lean_inc(x_164); +x_216 = l_Lean_findField_x3f___main(x_164, x_61, x_215); if (lean_obj_tag(x_216) == 0) { -lean_object* x_217; +lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; +lean_inc(x_215); +x_217 = l_Lean_Name_append___main(x_61, x_215); +x_218 = lean_ctor_get(x_4, 2); +lean_inc(x_218); +lean_inc(x_217); +x_219 = l_Lean_Name_replacePrefix___main(x_217, x_218, x_214); +lean_dec(x_218); +x_220 = lean_ctor_get(x_6, 1); +lean_inc(x_220); +x_221 = lean_local_ctx_find_from_user_name(x_220, x_219); +if (lean_obj_tag(x_221) == 0) +{ +lean_object* x_222; lean_inc(x_61); -x_217 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_164); -if (lean_obj_tag(x_217) == 0) +x_222 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_164, x_61, x_215); +if (lean_obj_tag(x_222) == 0) { -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_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_dec(x_61); -x_218 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_218, 0, x_62); -x_219 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_219, 0, x_218); -x_220 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_221 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_221, 0, x_220); -lean_ctor_set(x_221, 1, x_219); -x_222 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_223 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_223, 0, x_221); -lean_ctor_set(x_223, 1, x_222); -x_224 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_224, 0, x_166); -x_225 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_225, 0, x_223); -lean_ctor_set(x_225, 1, x_224); -x_226 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_227 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_227, 0, x_225); -lean_ctor_set(x_227, 1, x_226); -x_228 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_227, x_4, x_5, x_6, x_7, x_8, x_9, x_213); -lean_dec(x_6); -return x_228; -} -else -{ -lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; -lean_dec(x_166); -lean_dec(x_62); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_229 = lean_ctor_get(x_217, 0); -lean_inc(x_229); -lean_dec(x_217); -x_230 = lean_ctor_get(x_229, 0); -lean_inc(x_230); -x_231 = lean_ctor_get(x_229, 1); -lean_inc(x_231); -lean_dec(x_229); -x_232 = lean_alloc_ctor(2, 3, 0); +x_223 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_223, 0, x_62); +x_224 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_224, 0, x_223); +x_225 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; +x_226 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_226, 0, x_225); +lean_ctor_set(x_226, 1, x_224); +x_227 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; +x_228 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_228, 0, x_226); +lean_ctor_set(x_228, 1, x_227); +x_229 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_229, 0, x_217); +x_230 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_230, 0, x_228); +lean_ctor_set(x_230, 1, x_229); +x_231 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_232 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_232, 0, x_230); -lean_ctor_set(x_232, 1, x_61); -lean_ctor_set(x_232, 2, x_231); -x_233 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_233, 0, x_232); -lean_ctor_set(x_233, 1, x_213); +lean_ctor_set(x_232, 1, x_231); +x_233 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_232, x_4, x_5, x_6, x_7, x_8, x_9, x_163); +lean_dec(x_6); return x_233; } -} else { -lean_object* x_234; uint8_t x_235; uint8_t x_236; uint8_t x_237; -x_234 = lean_ctor_get(x_216, 0); -lean_inc(x_234); -lean_dec(x_216); -x_235 = l_Lean_LocalDecl_binderInfo(x_234); -x_236 = 4; -x_237 = l_Lean_BinderInfo_beq(x_235, x_236); -if (x_237 == 0) -{ -lean_object* x_238; -lean_dec(x_234); -lean_inc(x_61); -x_238 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_67, x_61, x_164); -if (lean_obj_tag(x_238) == 0) -{ -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_dec(x_61); -x_239 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_239, 0, x_62); -x_240 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_240, 0, x_239); -x_241 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_242 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_242, 0, x_241); -lean_ctor_set(x_242, 1, x_240); -x_243 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_244 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_244, 0, x_242); -lean_ctor_set(x_244, 1, x_243); -x_245 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_245, 0, x_166); -x_246 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_246, 0, x_244); -lean_ctor_set(x_246, 1, x_245); -x_247 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_248 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_248, 0, x_246); -lean_ctor_set(x_248, 1, x_247); -x_249 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_248, x_4, x_5, x_6, x_7, x_8, x_9, x_213); -lean_dec(x_6); -return x_249; -} -else -{ -lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; -lean_dec(x_166); +lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; +lean_dec(x_217); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_250 = lean_ctor_get(x_238, 0); -lean_inc(x_250); -lean_dec(x_238); -x_251 = lean_ctor_get(x_250, 0); -lean_inc(x_251); -x_252 = lean_ctor_get(x_250, 1); -lean_inc(x_252); -lean_dec(x_250); -x_253 = lean_alloc_ctor(2, 3, 0); +x_234 = lean_ctor_get(x_222, 0); +lean_inc(x_234); +lean_dec(x_222); +x_235 = lean_ctor_get(x_234, 0); +lean_inc(x_235); +x_236 = lean_ctor_get(x_234, 1); +lean_inc(x_236); +lean_dec(x_234); +x_237 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_237, 0, x_235); +lean_ctor_set(x_237, 1, x_61); +lean_ctor_set(x_237, 2, x_236); +x_238 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_238, 0, x_237); +lean_ctor_set(x_238, 1, x_163); +return x_238; +} +} +else +{ +lean_object* x_239; uint8_t x_240; uint8_t x_241; uint8_t x_242; +x_239 = lean_ctor_get(x_221, 0); +lean_inc(x_239); +lean_dec(x_221); +x_240 = l_Lean_LocalDecl_binderInfo(x_239); +x_241 = 4; +x_242 = l_Lean_BinderInfo_beq(x_240, x_241); +if (x_242 == 0) +{ +lean_object* x_243; +lean_dec(x_239); +lean_inc(x_61); +x_243 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_164, x_61, x_215); +if (lean_obj_tag(x_243) == 0) +{ +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_dec(x_61); +x_244 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_244, 0, x_62); +x_245 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_245, 0, x_244); +x_246 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; +x_247 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_247, 0, x_246); +lean_ctor_set(x_247, 1, x_245); +x_248 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; +x_249 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_249, 0, x_247); +lean_ctor_set(x_249, 1, x_248); +x_250 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_250, 0, x_217); +x_251 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_251, 0, x_249); +lean_ctor_set(x_251, 1, x_250); +x_252 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_253 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_253, 0, x_251); -lean_ctor_set(x_253, 1, x_61); -lean_ctor_set(x_253, 2, x_252); -x_254 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_254, 0, x_253); -lean_ctor_set(x_254, 1, x_213); +lean_ctor_set(x_253, 1, x_252); +x_254 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_253, x_4, x_5, x_6, x_7, x_8, x_9, x_163); +lean_dec(x_6); return x_254; } -} else { -lean_object* x_255; lean_object* x_256; lean_object* x_257; -lean_dec(x_164); -lean_dec(x_67); +lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; +lean_dec(x_217); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_255 = l_Lean_LocalDecl_toExpr(x_234); -lean_dec(x_234); -x_256 = lean_alloc_ctor(3, 3, 0); -lean_ctor_set(x_256, 0, x_61); -lean_ctor_set(x_256, 1, x_166); -lean_ctor_set(x_256, 2, x_255); -x_257 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_257, 0, x_256); -lean_ctor_set(x_257, 1, x_213); -return x_257; -} -} -} -} -else -{ -lean_object* x_258; lean_object* x_259; -lean_dec(x_67); -lean_dec(x_62); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_258 = lean_ctor_get(x_165, 0); -lean_inc(x_258); -lean_dec(x_165); -x_259 = lean_alloc_ctor(0, 3, 0); +x_255 = lean_ctor_get(x_243, 0); +lean_inc(x_255); +lean_dec(x_243); +x_256 = lean_ctor_get(x_255, 0); +lean_inc(x_256); +x_257 = lean_ctor_get(x_255, 1); +lean_inc(x_257); +lean_dec(x_255); +x_258 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_258, 0, x_256); +lean_ctor_set(x_258, 1, x_61); +lean_ctor_set(x_258, 2, x_257); +x_259 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_259, 0, x_258); -lean_ctor_set(x_259, 1, x_61); -lean_ctor_set(x_259, 2, x_164); -lean_ctor_set(x_63, 0, x_259); -return x_63; -} +lean_ctor_set(x_259, 1, x_163); +return x_259; } } else { -lean_object* x_260; lean_object* x_261; lean_object* x_262; uint8_t x_263; -x_260 = lean_ctor_get(x_63, 0); -x_261 = lean_ctor_get(x_63, 1); -lean_inc(x_261); -lean_inc(x_260); -lean_dec(x_63); -x_262 = lean_ctor_get(x_260, 0); -lean_inc(x_262); -lean_dec(x_260); -lean_inc(x_61); -lean_inc(x_262); -x_263 = l_Lean_isStructure(x_262, x_61); -if (x_263 == 0) -{ -lean_object* x_264; lean_object* x_265; lean_object* x_266; lean_object* x_267; lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; -x_264 = lean_box(0); -lean_inc(x_62); -x_265 = lean_name_mk_string(x_264, x_62); -lean_inc(x_265); -x_266 = l_Lean_Name_append___main(x_61, x_265); -x_267 = l_Lean_Elab_Term_getCurrNamespace(x_4, x_5, x_6, x_7, x_8, x_9, x_261); -x_268 = lean_ctor_get(x_267, 0); -lean_inc(x_268); -x_269 = lean_ctor_get(x_267, 1); -lean_inc(x_269); -if (lean_is_exclusive(x_267)) { - lean_ctor_release(x_267, 0); - lean_ctor_release(x_267, 1); - x_270 = x_267; -} else { - lean_dec_ref(x_267); - x_270 = lean_box(0); -} -lean_inc(x_266); -x_271 = l_Lean_Name_replacePrefix___main(x_266, x_268, x_264); -lean_dec(x_268); -x_272 = lean_ctor_get(x_6, 1); -lean_inc(x_272); -x_273 = lean_local_ctx_find_from_user_name(x_272, x_271); -if (lean_obj_tag(x_273) == 0) -{ -lean_object* x_274; -lean_inc(x_61); -x_274 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_262, x_61, x_265); -if (lean_obj_tag(x_274) == 0) -{ -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_dec(x_270); -lean_dec(x_61); -x_275 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_275, 0, x_62); -x_276 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_276, 0, x_275); -x_277 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_278 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_278, 0, x_277); -lean_ctor_set(x_278, 1, x_276); -x_279 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_280 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_280, 0, x_278); -lean_ctor_set(x_280, 1, x_279); -x_281 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_281, 0, x_266); -x_282 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_282, 0, x_280); -lean_ctor_set(x_282, 1, x_281); -x_283 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_284 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_284, 0, x_282); -lean_ctor_set(x_284, 1, x_283); -x_285 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_284, x_4, x_5, x_6, x_7, x_8, x_9, x_269); -lean_dec(x_6); -return x_285; -} -else -{ -lean_object* x_286; lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; -lean_dec(x_266); +lean_object* x_260; lean_object* x_261; lean_object* x_262; +lean_dec(x_215); +lean_dec(x_164); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_286 = lean_ctor_get(x_274, 0); -lean_inc(x_286); -lean_dec(x_274); -x_287 = lean_ctor_get(x_286, 0); -lean_inc(x_287); -x_288 = lean_ctor_get(x_286, 1); -lean_inc(x_288); -lean_dec(x_286); -x_289 = lean_alloc_ctor(2, 3, 0); -lean_ctor_set(x_289, 0, x_287); -lean_ctor_set(x_289, 1, x_61); -lean_ctor_set(x_289, 2, x_288); -if (lean_is_scalar(x_270)) { - x_290 = lean_alloc_ctor(0, 2, 0); -} else { - x_290 = x_270; +x_260 = l_Lean_LocalDecl_toExpr(x_239); +lean_dec(x_239); +x_261 = lean_alloc_ctor(3, 3, 0); +lean_ctor_set(x_261, 0, x_61); +lean_ctor_set(x_261, 1, x_217); +lean_ctor_set(x_261, 2, x_260); +x_262 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_262, 0, x_261); +lean_ctor_set(x_262, 1, x_163); +return x_262; } -lean_ctor_set(x_290, 0, x_289); -lean_ctor_set(x_290, 1, x_269); -return x_290; } } else { -lean_object* x_291; uint8_t x_292; uint8_t x_293; uint8_t x_294; -x_291 = lean_ctor_get(x_273, 0); -lean_inc(x_291); -lean_dec(x_273); -x_292 = l_Lean_LocalDecl_binderInfo(x_291); -x_293 = 4; -x_294 = l_Lean_BinderInfo_beq(x_292, x_293); -if (x_294 == 0) -{ -lean_object* x_295; -lean_dec(x_291); -lean_inc(x_61); -x_295 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_262, x_61, x_265); -if (lean_obj_tag(x_295) == 0) -{ -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_dec(x_270); -lean_dec(x_61); -x_296 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_296, 0, x_62); -x_297 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_297, 0, x_296); -x_298 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_299 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_299, 0, x_298); -lean_ctor_set(x_299, 1, x_297); -x_300 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_301 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_301, 0, x_299); -lean_ctor_set(x_301, 1, x_300); -x_302 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_302, 0, x_266); -x_303 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_303, 0, x_301); -lean_ctor_set(x_303, 1, x_302); -x_304 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_305 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_305, 0, x_303); -lean_ctor_set(x_305, 1, x_304); -x_306 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_305, x_4, x_5, x_6, x_7, x_8, x_9, x_269); -lean_dec(x_6); -return x_306; -} -else -{ -lean_object* x_307; lean_object* x_308; lean_object* x_309; lean_object* x_310; lean_object* x_311; -lean_dec(x_266); +lean_object* x_263; lean_object* x_264; lean_object* x_265; +lean_dec(x_164); lean_dec(x_62); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_307 = lean_ctor_get(x_295, 0); -lean_inc(x_307); -lean_dec(x_295); -x_308 = lean_ctor_get(x_307, 0); -lean_inc(x_308); -x_309 = lean_ctor_get(x_307, 1); -lean_inc(x_309); -lean_dec(x_307); -x_310 = lean_alloc_ctor(2, 3, 0); -lean_ctor_set(x_310, 0, x_308); -lean_ctor_set(x_310, 1, x_61); -lean_ctor_set(x_310, 2, x_309); -if (lean_is_scalar(x_270)) { - x_311 = lean_alloc_ctor(0, 2, 0); -} else { - x_311 = x_270; -} -lean_ctor_set(x_311, 0, x_310); -lean_ctor_set(x_311, 1, x_269); -return x_311; -} -} -else -{ -lean_object* x_312; lean_object* x_313; lean_object* x_314; -lean_dec(x_265); -lean_dec(x_262); -lean_dec(x_62); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_312 = l_Lean_LocalDecl_toExpr(x_291); -lean_dec(x_291); -x_313 = lean_alloc_ctor(3, 3, 0); -lean_ctor_set(x_313, 0, x_61); -lean_ctor_set(x_313, 1, x_266); -lean_ctor_set(x_313, 2, x_312); -if (lean_is_scalar(x_270)) { - x_314 = lean_alloc_ctor(0, 2, 0); -} else { - x_314 = x_270; -} -lean_ctor_set(x_314, 0, x_313); -lean_ctor_set(x_314, 1, x_269); -return x_314; -} -} -} -else -{ -lean_object* x_315; lean_object* x_316; lean_object* x_317; -x_315 = lean_box(0); -lean_inc(x_62); -x_316 = lean_name_mk_string(x_315, x_62); -lean_inc(x_61); -lean_inc(x_262); -x_317 = l_Lean_findField_x3f___main(x_262, x_61, x_316); -if (lean_obj_tag(x_317) == 0) -{ -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_inc(x_316); -x_318 = l_Lean_Name_append___main(x_61, x_316); -x_319 = l_Lean_Elab_Term_getCurrNamespace(x_4, x_5, x_6, x_7, x_8, x_9, x_261); -x_320 = lean_ctor_get(x_319, 0); -lean_inc(x_320); -x_321 = lean_ctor_get(x_319, 1); -lean_inc(x_321); -if (lean_is_exclusive(x_319)) { - lean_ctor_release(x_319, 0); - lean_ctor_release(x_319, 1); - x_322 = x_319; -} else { - lean_dec_ref(x_319); - x_322 = lean_box(0); -} -lean_inc(x_318); -x_323 = l_Lean_Name_replacePrefix___main(x_318, x_320, x_315); -lean_dec(x_320); -x_324 = lean_ctor_get(x_6, 1); -lean_inc(x_324); -x_325 = lean_local_ctx_find_from_user_name(x_324, x_323); -if (lean_obj_tag(x_325) == 0) -{ -lean_object* x_326; -lean_inc(x_61); -x_326 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_262, x_61, x_316); -if (lean_obj_tag(x_326) == 0) -{ -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_dec(x_322); -lean_dec(x_61); -x_327 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_327, 0, x_62); -x_328 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_328, 0, x_327); -x_329 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_330 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_330, 0, x_329); -lean_ctor_set(x_330, 1, x_328); -x_331 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_332 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_332, 0, x_330); -lean_ctor_set(x_332, 1, x_331); -x_333 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_333, 0, x_318); -x_334 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_334, 0, x_332); -lean_ctor_set(x_334, 1, x_333); -x_335 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_336 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_336, 0, x_334); -lean_ctor_set(x_336, 1, x_335); -x_337 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_336, x_4, x_5, x_6, x_7, x_8, x_9, x_321); -lean_dec(x_6); -return x_337; -} -else -{ -lean_object* x_338; lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; -lean_dec(x_318); -lean_dec(x_62); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_338 = lean_ctor_get(x_326, 0); -lean_inc(x_338); -lean_dec(x_326); -x_339 = lean_ctor_get(x_338, 0); -lean_inc(x_339); -x_340 = lean_ctor_get(x_338, 1); -lean_inc(x_340); -lean_dec(x_338); -x_341 = lean_alloc_ctor(2, 3, 0); -lean_ctor_set(x_341, 0, x_339); -lean_ctor_set(x_341, 1, x_61); -lean_ctor_set(x_341, 2, x_340); -if (lean_is_scalar(x_322)) { - x_342 = lean_alloc_ctor(0, 2, 0); -} else { - x_342 = x_322; -} -lean_ctor_set(x_342, 0, x_341); -lean_ctor_set(x_342, 1, x_321); -return x_342; -} -} -else -{ -lean_object* x_343; uint8_t x_344; uint8_t x_345; uint8_t x_346; -x_343 = lean_ctor_get(x_325, 0); -lean_inc(x_343); -lean_dec(x_325); -x_344 = l_Lean_LocalDecl_binderInfo(x_343); -x_345 = 4; -x_346 = l_Lean_BinderInfo_beq(x_344, x_345); -if (x_346 == 0) -{ -lean_object* x_347; -lean_dec(x_343); -lean_inc(x_61); -x_347 = l___private_Lean_Elab_App_12__findMethod_x3f___main(x_262, x_61, x_316); -if (lean_obj_tag(x_347) == 0) -{ -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_dec(x_322); -lean_dec(x_61); -x_348 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_348, 0, x_62); -x_349 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_349, 0, x_348); -x_350 = l___private_Lean_Elab_App_13__resolveLValAux___closed__21; -x_351 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_351, 0, x_350); -lean_ctor_set(x_351, 1, x_349); -x_352 = l___private_Lean_Elab_App_13__resolveLValAux___closed__24; -x_353 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_353, 0, x_351); -lean_ctor_set(x_353, 1, x_352); -x_354 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_354, 0, x_318); -x_355 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_355, 0, x_353); -lean_ctor_set(x_355, 1, x_354); -x_356 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_357 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_357, 0, x_355); -lean_ctor_set(x_357, 1, x_356); -x_358 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_357, x_4, x_5, x_6, x_7, x_8, x_9, x_321); -lean_dec(x_6); -return x_358; -} -else -{ -lean_object* x_359; lean_object* x_360; lean_object* x_361; lean_object* x_362; lean_object* x_363; -lean_dec(x_318); -lean_dec(x_62); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_359 = lean_ctor_get(x_347, 0); -lean_inc(x_359); -lean_dec(x_347); -x_360 = lean_ctor_get(x_359, 0); -lean_inc(x_360); -x_361 = lean_ctor_get(x_359, 1); -lean_inc(x_361); -lean_dec(x_359); -x_362 = lean_alloc_ctor(2, 3, 0); -lean_ctor_set(x_362, 0, x_360); -lean_ctor_set(x_362, 1, x_61); -lean_ctor_set(x_362, 2, x_361); -if (lean_is_scalar(x_322)) { - x_363 = lean_alloc_ctor(0, 2, 0); -} else { - x_363 = x_322; -} -lean_ctor_set(x_363, 0, x_362); -lean_ctor_set(x_363, 1, x_321); -return x_363; -} -} -else -{ -lean_object* x_364; lean_object* x_365; lean_object* x_366; -lean_dec(x_316); -lean_dec(x_262); -lean_dec(x_62); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_364 = l_Lean_LocalDecl_toExpr(x_343); -lean_dec(x_343); -x_365 = lean_alloc_ctor(3, 3, 0); -lean_ctor_set(x_365, 0, x_61); -lean_ctor_set(x_365, 1, x_318); -lean_ctor_set(x_365, 2, x_364); -if (lean_is_scalar(x_322)) { - x_366 = lean_alloc_ctor(0, 2, 0); -} else { - x_366 = x_322; -} -lean_ctor_set(x_366, 0, x_365); -lean_ctor_set(x_366, 1, x_321); -return x_366; -} -} -} -else -{ -lean_object* x_367; lean_object* x_368; lean_object* x_369; -lean_dec(x_262); -lean_dec(x_62); -lean_dec(x_6); -lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_367 = lean_ctor_get(x_317, 0); -lean_inc(x_367); -lean_dec(x_317); -x_368 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_368, 0, x_367); -lean_ctor_set(x_368, 1, x_61); -lean_ctor_set(x_368, 2, x_316); -x_369 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_369, 0, x_368); -lean_ctor_set(x_369, 1, x_261); -return x_369; +x_263 = lean_ctor_get(x_216, 0); +lean_inc(x_263); +lean_dec(x_216); +x_264 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_264, 0, x_263); +lean_ctor_set(x_264, 1, x_61); +lean_ctor_set(x_264, 2, x_215); +x_265 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_265, 0, x_264); +lean_ctor_set(x_265, 1, x_163); +return x_265; } } } } default: { -lean_object* x_370; lean_object* x_371; lean_object* x_372; uint8_t x_373; -x_370 = lean_ctor_get(x_17, 0); -lean_inc(x_370); +lean_object* x_266; lean_object* x_267; lean_object* x_268; uint8_t x_269; +x_266 = lean_ctor_get(x_17, 0); +lean_inc(x_266); lean_dec(x_17); -x_371 = lean_ctor_get(x_3, 0); -lean_inc(x_371); +x_267 = lean_ctor_get(x_3, 0); +lean_inc(x_267); lean_dec(x_3); -x_372 = lean_st_ref_get(x_9, x_10); -x_373 = !lean_is_exclusive(x_372); -if (x_373 == 0) +x_268 = lean_st_ref_get(x_9, x_10); +x_269 = !lean_is_exclusive(x_268); +if (x_269 == 0) { -lean_object* x_374; lean_object* x_375; lean_object* x_376; lean_object* x_377; lean_object* x_378; lean_object* x_379; -x_374 = lean_ctor_get(x_372, 0); -x_375 = lean_ctor_get(x_372, 1); -x_376 = lean_ctor_get(x_374, 0); -lean_inc(x_376); -lean_dec(x_374); -x_377 = l___private_Lean_Elab_App_13__resolveLValAux___closed__25; -x_378 = lean_name_mk_string(x_370, x_377); -lean_inc(x_378); -x_379 = lean_environment_find(x_376, x_378); -if (lean_obj_tag(x_379) == 0) +lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; +x_270 = lean_ctor_get(x_268, 0); +x_271 = lean_ctor_get(x_268, 1); +x_272 = lean_ctor_get(x_270, 0); +lean_inc(x_272); +lean_dec(x_270); +x_273 = l___private_Lean_Elab_App_13__resolveLValAux___closed__25; +x_274 = lean_name_mk_string(x_266, x_273); +lean_inc(x_274); +x_275 = lean_environment_find(x_272, x_274); +if (lean_obj_tag(x_275) == 0) { -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_free_object(x_372); -lean_dec(x_371); -x_380 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_380, 0, x_378); -x_381 = l___private_Lean_Elab_App_13__resolveLValAux___closed__28; -x_382 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_382, 0, x_381); -lean_ctor_set(x_382, 1, x_380); -x_383 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_384 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_384, 0, x_382); -lean_ctor_set(x_384, 1, x_383); -x_385 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_384, x_4, x_5, x_6, x_7, x_8, x_9, x_375); +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_free_object(x_268); +lean_dec(x_267); +x_276 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_276, 0, x_274); +x_277 = l___private_Lean_Elab_App_13__resolveLValAux___closed__28; +x_278 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_278, 0, x_277); +lean_ctor_set(x_278, 1, x_276); +x_279 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_280 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_280, 0, x_278); +lean_ctor_set(x_280, 1, x_279); +x_281 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_280, x_4, x_5, x_6, x_7, x_8, x_9, x_271); lean_dec(x_6); -return x_385; +return x_281; } else { -lean_object* x_386; -lean_dec(x_379); +lean_object* x_282; +lean_dec(x_275); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_386 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_386, 0, x_378); -lean_ctor_set(x_386, 1, x_371); -lean_ctor_set(x_372, 0, x_386); -return x_372; +x_282 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_282, 0, x_274); +lean_ctor_set(x_282, 1, x_267); +lean_ctor_set(x_268, 0, x_282); +return x_268; } } else { -lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; lean_object* x_392; -x_387 = lean_ctor_get(x_372, 0); -x_388 = lean_ctor_get(x_372, 1); -lean_inc(x_388); -lean_inc(x_387); -lean_dec(x_372); -x_389 = lean_ctor_get(x_387, 0); -lean_inc(x_389); -lean_dec(x_387); -x_390 = l___private_Lean_Elab_App_13__resolveLValAux___closed__25; -x_391 = lean_name_mk_string(x_370, x_390); -lean_inc(x_391); -x_392 = lean_environment_find(x_389, x_391); -if (lean_obj_tag(x_392) == 0) +lean_object* x_283; lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; +x_283 = lean_ctor_get(x_268, 0); +x_284 = lean_ctor_get(x_268, 1); +lean_inc(x_284); +lean_inc(x_283); +lean_dec(x_268); +x_285 = lean_ctor_get(x_283, 0); +lean_inc(x_285); +lean_dec(x_283); +x_286 = l___private_Lean_Elab_App_13__resolveLValAux___closed__25; +x_287 = lean_name_mk_string(x_266, x_286); +lean_inc(x_287); +x_288 = lean_environment_find(x_285, x_287); +if (lean_obj_tag(x_288) == 0) { -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_dec(x_371); -x_393 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_393, 0, x_391); -x_394 = l___private_Lean_Elab_App_13__resolveLValAux___closed__28; -x_395 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_395, 0, x_394); -lean_ctor_set(x_395, 1, x_393); -x_396 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_397 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_397, 0, x_395); -lean_ctor_set(x_397, 1, x_396); -x_398 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_397, x_4, x_5, x_6, x_7, x_8, x_9, x_388); +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_267); +x_289 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_289, 0, x_287); +x_290 = l___private_Lean_Elab_App_13__resolveLValAux___closed__28; +x_291 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_291, 0, x_290); +lean_ctor_set(x_291, 1, x_289); +x_292 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_293 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_293, 0, x_291); +lean_ctor_set(x_293, 1, x_292); +x_294 = l___private_Lean_Elab_App_11__throwLValError___rarg(x_1, x_2, x_293, x_4, x_5, x_6, x_7, x_8, x_9, x_284); lean_dec(x_6); -return x_398; +return x_294; } else { -lean_object* x_399; lean_object* x_400; -lean_dec(x_392); +lean_object* x_295; lean_object* x_296; +lean_dec(x_288); lean_dec(x_6); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_399 = lean_alloc_ctor(4, 2, 0); -lean_ctor_set(x_399, 0, x_391); -lean_ctor_set(x_399, 1, x_371); -x_400 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_400, 0, x_399); -lean_ctor_set(x_400, 1, x_388); -return x_400; +x_295 = lean_alloc_ctor(4, 2, 0); +lean_ctor_set(x_295, 0, x_287); +lean_ctor_set(x_295, 1, x_267); +x_296 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_296, 0, x_295); +lean_ctor_set(x_296, 1, x_284); +return x_296; } } } @@ -11300,10 +10884,10 @@ return x_400; } else { -lean_object* x_401; +lean_object* x_297; lean_dec(x_17); -x_401 = lean_box(0); -x_11 = x_401; +x_297 = lean_box(0); +x_11 = x_297; goto block_16; } block_16: @@ -12651,7 +12235,7 @@ x_41 = l___private_Lean_Elab_App_18__addLValArg___main___closed__12; x_42 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_42, 0, x_41); lean_ctor_set(x_42, 1, x_40); -x_43 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_43 = l_Lean_throwUnknownConstant___rarg___closed__5; x_44 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_44, 0, x_42); lean_ctor_set(x_44, 1, x_43); @@ -25811,8 +25395,6 @@ l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__14 = _init_l___priv lean_mark_persistent(l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__14); l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__15 = _init_l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__15(); lean_mark_persistent(l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__15); -l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__16 = _init_l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__16(); -lean_mark_persistent(l___private_Lean_Elab_App_9__elabAppArgsAux___main___closed__16); l___private_Lean_Elab_App_10__elabAppArgs___closed__1 = _init_l___private_Lean_Elab_App_10__elabAppArgs___closed__1(); lean_mark_persistent(l___private_Lean_Elab_App_10__elabAppArgs___closed__1); l___private_Lean_Elab_App_10__elabAppArgs___closed__2 = _init_l___private_Lean_Elab_App_10__elabAppArgs___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Binders.c b/stage0/stdlib/Lean/Elab/Binders.c index df78e90689..acdcb5a2a7 100644 --- a/stage0/stdlib/Lean/Elab/Binders.c +++ b/stage0/stdlib/Lean/Elab/Binders.c @@ -204,6 +204,7 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Term_quoteAutoTactic___ma lean_object* l___regBuiltin_Lean_Elab_Term_elabLetBangDecl(lean_object*); lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Binders_6__matchBinder___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Binders_12__expandFunBindersAux___main___closed__8; +extern lean_object* l_Std_PersistentArray_Stats_toString___closed__4; lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Term_21__elabTermAux___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabLetDeclCore___closed__1; extern lean_object* l_myMacro____x40_Init_Data_ToString_Macro___hyg_39____closed__15; @@ -366,7 +367,6 @@ lean_object* l___private_Lean_Elab_Binders_17__expandMatchAltsIntoMatchAux___mai lean_object* l___private_Lean_Meta_Basic_17__isClassImp_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkOptionalNode___closed__1; lean_object* l___private_Lean_Elab_Binders_17__expandMatchAltsIntoMatchAux___main___closed__11; -extern lean_object* l_Std_PersistentHashMap_Stats_toString___closed__5; extern lean_object* l___private_Lean_Elab_Util_2__evalSyntaxConstantUnsafe___closed__2; extern lean_object* l_Lean_myMacro____x40_Lean_Util_Trace___hyg_45____closed__9; lean_object* l_Lean_MetavarContext_MkBinding_mkBinding(uint8_t, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*); @@ -914,7 +914,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; x_1 = l_Lean_SourceInfo_inhabited___closed__1; -x_2 = l_Std_PersistentHashMap_Stats_toString___closed__5; +x_2 = l_Std_PersistentArray_Stats_toString___closed__4; x_3 = lean_alloc_ctor(2, 2, 0); lean_ctor_set(x_3, 0, x_1); lean_ctor_set(x_3, 1, x_2); diff --git a/stage0/stdlib/Lean/Elab/Command.c b/stage0/stdlib/Lean/Elab/Command.c index ed334370ca..2a0534345e 100644 --- a/stage0/stdlib/Lean/Elab/Command.c +++ b/stage0/stdlib/Lean/Elab/Command.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Elab.Command -// Imports: Init Lean.Elab.Alias Lean.Elab.Log Lean.Elab.ResolveName Lean.Elab.Term Lean.Elab.Binders Lean.Elab.SyntheticMVars Lean.Elab.DeclModifiers +// Imports: Init Lean.ResolveName Lean.Elab.Log Lean.Elab.Term Lean.Elab.Binders Lean.Elab.SyntheticMVars Lean.Elab.DeclModifiers #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -19,6 +19,7 @@ lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__1(lean_object*, lean_object* l_Lean_Elab_Command_elabVariable(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_AddErrorMessageContext___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_withLogging___closed__1; lean_object* l_Lean_Elab_Command_Lean_Ref___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSection(lean_object*, lean_object*, lean_object*, lean_object*); @@ -32,6 +33,7 @@ lean_object* l_Lean_Elab_Command_catchExceptions(lean_object*, lean_object*, lea extern lean_object* l_Lean_Meta_check___closed__1; lean_object* l_Lean_Syntax_isNatLitAux(lean_object*, lean_object*); extern lean_object* l___private_Lean_Meta_ExprDefEq_8__checkTypesAndAssign___closed__7; +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Tactic_evalTactic___main___closed__3; lean_object* l_Lean_Elab_Command_Lean_MonadEnv___closed__6; lean_object* l_Lean_Elab_logAt___at_Lean_Elab_Command_withLogging___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -44,6 +46,7 @@ lean_object* l_Lean_addDecl___at_Lean_Elab_Term_declareTacticSyntax___spec__1(le extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Elab_Command_withNamespace(lean_object*); lean_object* l_Lean_Elab_Command_getScope___rarg___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftTermElabM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_13__checkEndHeader___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_MessageData_ofList___closed__3; @@ -52,6 +55,7 @@ lean_object* l___private_Lean_Elab_Command_11__addNamespace___boxed(lean_object* lean_object* lean_array_uget(lean_object*, size_t); lean_object* lean_io_error_to_string(lean_object*); lean_object* l_Lean_Elab_Command_elabSection___closed__2; +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabNamespace___closed__1; lean_object* l___private_Lean_Elab_Command_12__checkAnonymousScope___boxed(lean_object*); lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); @@ -64,7 +68,6 @@ lean_object* l_Lean_Elab_Command_liftIO(lean_object*); lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute; lean_object* l_Lean_Elab_Command_getScope___boxed(lean_object*); -lean_object* l_Lean_Elab_Command_getOpenDecls___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabUniverse(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_identKind___closed__2; uint8_t l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(lean_object*, lean_object*); @@ -73,6 +76,7 @@ lean_object* l___private_Lean_Elab_Command_3__elabCommandUsing(lean_object*, lea lean_object* l_Lean_Elab_Command_expandInCmd___closed__5; lean_object* l_Lean_Elab_Command_elabCheck___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__2___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___closed__5; lean_object* l_Lean_Elab_Command_logUnknownDecl(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_mapM___at_Lean_MessageLog_errorsToWarnings___spec__1(lean_object*); lean_object* l_Lean_Elab_Command_elabSection___closed__1; @@ -96,6 +100,7 @@ lean_object* l___regBuiltin_Lean_Elab_Command_elabExport___closed__2; lean_object* l_Lean_Meta_synthInstance___at_Lean_Elab_Command_elabSynth___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_6__mkTermContext(lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___closed__2; lean_object* l_Lean_Elab_Command_Lean_MonadEnv___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__3___closed__1; lean_object* l_StateRefT_x27_get___at_Lean_Elab_Command_Lean_MonadEnv___spec__1___boxed(lean_object*, lean_object*); @@ -107,6 +112,7 @@ lean_object* l_Lean_Elab_Command_elabOpen___closed__1; lean_object* lean_private_to_user_name(lean_object*); lean_object* l_Lean_Elab_Command_Lean_MonadRecDepth___closed__3; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabOpenSimple___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___closed__1; lean_object* l___regBuiltin_Lean_Elab_Command_elabSynth___closed__3; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_expandDeclId___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_MonadRecDepth___closed__5; @@ -145,6 +151,7 @@ lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__2___closed__1; lean_object* l_Lean_Elab_Command_elabUniverse___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSynth___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_5__mkMetaContext___closed__2; +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___closed__4; lean_object* l___regBuiltin_Lean_Elab_Command_elabVariables___closed__3; lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_expandInCmd(lean_object*); @@ -162,6 +169,7 @@ lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addOpenDecl_ 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_Command_getLevelNames___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___closed__6; lean_object* l_Lean_Elab_Command_getScopes___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_MonadIO(lean_object*); lean_object* l___private_Lean_Elab_SyntheticMVars_11__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -186,7 +194,6 @@ lean_object* l___private_Lean_Elab_Command_1__mkCoreContext(lean_object*, lean_o lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariables___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabUniverses___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_MonadEnv___closed__1; -lean_object* l_Lean_Elab_Command_resolveNamespace___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_MonadEnv; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__9; @@ -207,36 +214,32 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabOpenOnly___sp lean_object* l_Lean_Elab_throwAlreadyDeclaredUniverseLevel___at_Lean_Elab_Command_expandDeclId___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_Elab_MonadMacroAdapter___closed__1; lean_object* l_Lean_Elab_Command_elabOpen___closed__6; -lean_object* l_Lean_Elab_Command_resolveNamespace___closed__2; lean_object* l___private_Lean_Elab_Command_9__addScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_State_inhabited___closed__1; lean_object* l_Lean_Elab_Command_setOption___closed__2; extern lean_object* l_Lean_LocalContext_Inhabited___closed__2; lean_object* l_Lean_Elab_Command_elabSynth(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_MonadIO___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_resolveNamespace___closed__1; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabUniverses___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabOpen___closed__4; lean_object* l_Lean_Elab_Command_setOption___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_MonadRecDepth___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Command_elabCommand___main___spec__8___boxed(lean_object*, lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_inhabited(lean_object*); lean_object* l_Lean_Elab_Command_Lean_Ref___closed__2; lean_object* l_Lean_Elab_Command_Lean_Elab_MonadMacroAdapter___closed__2; +lean_object* l_Lean_ResolveName_resolveNamespace_x3f(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_addOpenDecl(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_getOpenDecls___boxed(lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabCheckFailure___closed__2; lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Command_elabCommand___main___spec__7___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_1__mkCoreContext___boxed(lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSynth___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariables(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Command_8__addTraceAsMessages___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_Ref___closed__1; +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCheck___closed__1; lean_object* l_Lean_Elab_Command_liftEIO___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_MonadRecDepth___closed__2; @@ -277,7 +280,6 @@ lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__1___boxed(lean_object* lean_object* l_ReaderT_bind___at_Lean_Elab_Command_Lean_MonadEnv___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Elab_logException___at_Lean_Elab_Command_withLogging___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_getCurrNamespace___boxed(lean_object*); lean_object* l_Lean_Elab_Command_withFreshMacroScope(lean_object*); lean_object* l_Lean_Elab_mkMessageCore(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_Elab_Command_elabVariables___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -300,10 +302,9 @@ lean_object* l___regBuiltin_Lean_Elab_Command_elabUniverse___closed__3; lean_object* l_Lean_Elab_Command_elabEval___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandDeclId___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabOpenRenaming(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariable___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_resolveNamespace(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___private_Lean_Elab_Command_8__addTraceAsMessages(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkState(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_7__mkMessageAux(lean_object*, lean_object*, lean_object*, uint8_t); @@ -358,9 +359,9 @@ lean_object* l___regBuiltin_Lean_Elab_Command_elabExport(lean_object*); lean_object* l_Lean_Elab_Command_getScopes(lean_object*); extern lean_object* l_Lean_protectedExt; lean_object* l_Lean_Elab_Command_elbChoice(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Elab_Command_elabExport(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSynth___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_getOpenDecls___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCheck___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabOpenOnly(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_hasNoErrorMessages(lean_object*); @@ -434,7 +435,6 @@ lean_object* l_Lean_Elab_Command_Lean_Elab_MonadMacroAdapter___lambda__2___boxed extern lean_object* l_Lean_nullKind___closed__2; lean_object* l___private_Lean_Elab_Command_6__mkTermContext___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___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*); -lean_object* l_Lean_Elab_Command_getCurrNamespace___rarg(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_find_x3f___at_Lean_Elab_Command_elabCommand___main___spec__5(lean_object*, lean_object*); lean_object* l_StateRefT_x27_get___at_Lean_Elab_Command_Lean_MonadEnv___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_getMainModule___rarg___boxed(lean_object*, lean_object*); @@ -444,6 +444,7 @@ lean_object* l_Lean_Elab_Command_CommandElabM_monadLog; lean_object* l_Lean_Elab_Command_addUnivLevel(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_head_x21___at_Lean_Elab_Command_Lean_MonadOptions___spec__1___boxed(lean_object*); lean_object* l_Lean_Elab_Command_Lean_MonadRecDepth___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_evalConst___at_Lean_Elab_Command_elabEvalUnsafe___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_resetMessageLog(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_failIfSucceeds___closed__1; @@ -523,9 +524,9 @@ uint8_t l___private_Lean_Elab_Command_12__checkAnonymousScope(lean_object*); lean_object* l_Lean_Elab_Command_elbChoice___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabNamespace(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkLambdaFVars___at___private_Lean_Elab_Term_19__elabImplicitLambdaAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_resolveNamespace___rarg___lambda__1___closed__3; lean_object* l_Lean_Elab_Command_getMainModule___rarg(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabOpen(lean_object*); -lean_object* l_Lean_Elab_Command_resolveNamespace___closed__3; lean_object* l___private_Lean_Elab_Command_4__getVarDecls___boxed(lean_object*); lean_object* l_Lean_Elab_Command_withNamespace___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentArray_foldlM___at___private_Lean_Elab_Command_8__addTraceAsMessages___spec__1___boxed(lean_object*, lean_object*, lean_object*); @@ -545,7 +546,6 @@ lean_object* l_Lean_evalConst___at_Lean_Elab_Command_elabEvalUnsafe___spec__2___ lean_object* l_Lean_Elab_Command_expandInCmd___closed__3; extern lean_object* l_Lean_Elab_abortExceptionId; lean_object* l_Lean_Elab_Command_elabOpenHiding___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_getOpenDecls(lean_object*); extern lean_object* l_Lean_mkAppStx___closed__9; lean_object* l___private_Lean_Elab_Command_4__getVarDecls(lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Command_8__addTraceAsMessages___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -561,9 +561,12 @@ lean_object* l_Lean_Elab_Command_elabVariable___lambda__2___boxed(lean_object*, lean_object* l_Lean_Elab_Command_expandInCmd___closed__1; lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*); lean_object* l_Lean_Elab_Command_elabVariable___lambda__2___closed__1; +lean_object* l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__3(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEvalUnsafe___lambda__4___closed__3; 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_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName; lean_object* l___regBuiltin_Lean_Elab_Command_elabInitQuot___closed__1; lean_object* l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*); @@ -579,6 +582,7 @@ lean_object* l___regBuiltin_Lean_Elab_Command_elabSynth(lean_object*); lean_object* l_Lean_Elab_Command_elabVariable___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_5__mkMetaContext; uint8_t l_Lean_DataValue_sameCtor(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___closed__3; lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at_Lean_Elab_Command_elabCommand___main___spec__7(lean_object*); lean_object* l_Lean_Elab_Command_getScopes___rarg(lean_object*, lean_object*); @@ -606,7 +610,6 @@ lean_object* l___regBuiltin_Lean_Elab_Command_elabVariables(lean_object*); extern lean_object* l___private_Lean_Elab_Term_5__tryCoe___closed__3; lean_object* l_Lean_Elab_Command_MonadIO___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_asNode(lean_object*); -lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Lean_Elab_MonadMacroAdapter___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute___closed__5; lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, uint8_t, lean_object*, lean_object*); @@ -664,7 +667,6 @@ uint8_t l_Lean_Elab_getMacroStackOption(lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3; lean_object* l_Lean_Elab_Command_liftTermElabM___rarg___closed__1; lean_object* l_Lean_Elab_Command_elabNamespace___closed__1; -lean_object* l_Lean_Elab_Command_getCurrNamespace___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftTermElabM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_failIfSucceeds___closed__6; extern lean_object* l_Lean_Parser_regBuiltinCommandParserAttr___closed__3; @@ -676,7 +678,6 @@ lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_withLogging___spec__3(lean_o extern lean_object* l___private_Lean_Elab_Util_6__regTraceClasses___closed__1; lean_object* l___regBuiltin_Lean_Elab_Command_elabSetOption___closed__2; lean_object* l___regBuiltin_Lean_Elab_Command_elabEnd___closed__3; -lean_object* l_Lean_Elab_resolveNamespace(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabOpenOnly___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_NameGenerator_Inhabited___closed__3; lean_object* l_Lean_Elab_Command_liftEIO___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -2229,124 +2230,118 @@ lean_dec(x_1); return x_2; } } -lean_object* l_Lean_Elab_Command_getCurrNamespace___rarg(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_3; uint8_t x_4; -x_3 = l_Lean_Elab_Command_getScope___rarg(x_1, x_2); -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); -x_6 = lean_ctor_get(x_5, 3); -lean_inc(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 0, x_6); -return x_3; -} -else -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_7 = lean_ctor_get(x_3, 0); -x_8 = lean_ctor_get(x_3, 1); -lean_inc(x_8); -lean_inc(x_7); -lean_dec(x_3); -x_9 = lean_ctor_get(x_7, 3); -lean_inc(x_9); -lean_dec(x_7); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_9); -lean_ctor_set(x_10, 1, x_8); -return x_10; +x_5 = lean_ctor_get(x_1, 3); +lean_inc(x_5); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_4); +return x_6; } } -} -lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object* x_1) { +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_getCurrNamespace___rarg___boxed), 2, 0); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_getCurrNamespace___rarg___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_1, x_2); -lean_dec(x_1); -return x_3; -} -} -lean_object* l_Lean_Elab_Command_getCurrNamespace___boxed(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = l_Lean_Elab_Command_getCurrNamespace(x_1); -lean_dec(x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_getOpenDecls___rarg(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; uint8_t x_4; -x_3 = l_Lean_Elab_Command_getScope___rarg(x_1, x_2); -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); -x_6 = lean_ctor_get(x_5, 4); -lean_inc(x_6); -lean_dec(x_5); -lean_ctor_set(x_3, 0, x_6); +x_5 = lean_ctor_get(x_1, 4); +lean_inc(x_5); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_4); +return x_6; +} +} +lean_object* _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_getScope___boxed), 1, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_Lean_MonadResolveName___lambda__1___boxed), 4, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_Lean_MonadResolveName___closed__1; +x_2 = l_Lean_Elab_Command_Lean_MonadResolveName___closed__2; +x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Command_Lean_MonadEnv___spec__2___rarg), 5, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); return x_3; } -else +} +lean_object* _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__4() { +_start: { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_7 = lean_ctor_get(x_3, 0); -x_8 = lean_ctor_get(x_3, 1); -lean_inc(x_8); -lean_inc(x_7); +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_Lean_MonadResolveName___lambda__2___boxed), 4, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_Lean_MonadResolveName___closed__1; +x_2 = l_Lean_Elab_Command_Lean_MonadResolveName___closed__4; +x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Command_Lean_MonadEnv___spec__2___rarg), 5, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_Lean_MonadResolveName___closed__3; +x_2 = l_Lean_Elab_Command_Lean_MonadResolveName___closed__5; +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_Command_Lean_MonadResolveName() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Elab_Command_Lean_MonadResolveName___closed__6; +return x_1; +} +} +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___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_Lean_Elab_Command_Lean_MonadResolveName___lambda__1(x_1, x_2, x_3, x_4); lean_dec(x_3); -x_9 = lean_ctor_get(x_7, 4); -lean_inc(x_9); -lean_dec(x_7); -x_10 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_10, 0, x_9); -lean_ctor_set(x_10, 1, x_8); -return x_10; -} -} -} -lean_object* l_Lean_Elab_Command_getOpenDecls(lean_object* x_1) { -_start: -{ -lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_getOpenDecls___rarg___boxed), 2, 0); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_getOpenDecls___rarg___boxed(lean_object* x_1, lean_object* x_2) { -_start: -{ -lean_object* x_3; -x_3 = l_Lean_Elab_Command_getOpenDecls___rarg(x_1, x_2); +lean_dec(x_2); lean_dec(x_1); -return x_3; +return x_5; } } -lean_object* l_Lean_Elab_Command_getOpenDecls___boxed(lean_object* x_1) { +lean_object* l_Lean_Elab_Command_Lean_MonadResolveName___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_2; -x_2 = l_Lean_Elab_Command_getOpenDecls(x_1); +lean_object* x_5; +x_5 = l_Lean_Elab_Command_Lean_MonadResolveName___lambda__2(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); -return x_2; +return x_5; } } lean_object* l_ReaderT_read___at_Lean_Elab_Command_CommandElabM_monadLog___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -2386,211 +2381,217 @@ return x_6; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; -x_5 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_3, x_4); +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_5 = l_Lean_Elab_Command_getScope___rarg(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_Command_getOpenDecls___rarg(x_3, x_7); -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_8, 1); +x_8 = lean_ctor_get(x_6, 3); +lean_inc(x_8); +lean_dec(x_6); +x_9 = l_Lean_Elab_Command_getScope___rarg(x_3, x_7); +x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); -lean_dec(x_8); -x_11 = !lean_is_exclusive(x_1); -if (x_11 == 0) +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_ctor_get(x_10, 4); +lean_inc(x_12); +lean_dec(x_10); +x_13 = !lean_is_exclusive(x_1); +if (x_13 == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; -x_12 = lean_ctor_get(x_1, 4); -x_13 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_13, 0, x_6); -lean_ctor_set(x_13, 1, x_9); -x_14 = lean_alloc_ctor(7, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_12); -lean_ctor_set(x_1, 4, x_14); -x_15 = lean_st_ref_take(x_3, x_10); -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_15, 1); -lean_inc(x_17); -lean_dec(x_15); -x_18 = !lean_is_exclusive(x_16); -if (x_18 == 0) +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; +x_14 = lean_ctor_get(x_1, 4); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_8); +lean_ctor_set(x_15, 1, x_12); +x_16 = lean_alloc_ctor(7, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_14); +lean_ctor_set(x_1, 4, x_16); +x_17 = lean_st_ref_take(x_3, x_11); +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +x_20 = !lean_is_exclusive(x_18); +if (x_20 == 0) { -lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; -x_19 = lean_ctor_get(x_16, 1); -x_20 = l_Std_PersistentArray_push___rarg(x_19, x_1); -lean_ctor_set(x_16, 1, x_20); -x_21 = lean_st_ref_set(x_3, x_16, x_17); -x_22 = !lean_is_exclusive(x_21); -if (x_22 == 0) +lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_21 = lean_ctor_get(x_18, 1); +x_22 = l_Std_PersistentArray_push___rarg(x_21, x_1); +lean_ctor_set(x_18, 1, x_22); +x_23 = lean_st_ref_set(x_3, x_18, x_19); +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) { -lean_object* x_23; lean_object* x_24; -x_23 = lean_ctor_get(x_21, 0); -lean_dec(x_23); -x_24 = lean_box(0); -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); +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_23, 0); +lean_dec(x_25); x_26 = lean_box(0); -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; +lean_ctor_set(x_23, 0, x_26); +return x_23; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_23, 1); +lean_inc(x_27); +lean_dec(x_23); +x_28 = lean_box(0); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_27); +return x_29; } } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_28 = lean_ctor_get(x_16, 0); -x_29 = lean_ctor_get(x_16, 1); -x_30 = lean_ctor_get(x_16, 2); -x_31 = lean_ctor_get(x_16, 3); -x_32 = lean_ctor_get(x_16, 4); -x_33 = lean_ctor_get(x_16, 5); -x_34 = lean_ctor_get(x_16, 6); +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_30 = lean_ctor_get(x_18, 0); +x_31 = lean_ctor_get(x_18, 1); +x_32 = lean_ctor_get(x_18, 2); +x_33 = lean_ctor_get(x_18, 3); +x_34 = lean_ctor_get(x_18, 4); +x_35 = lean_ctor_get(x_18, 5); +x_36 = lean_ctor_get(x_18, 6); +lean_inc(x_36); +lean_inc(x_35); lean_inc(x_34); lean_inc(x_33); lean_inc(x_32); lean_inc(x_31); lean_inc(x_30); -lean_inc(x_29); -lean_inc(x_28); -lean_dec(x_16); -x_35 = l_Std_PersistentArray_push___rarg(x_29, x_1); -x_36 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_36, 0, x_28); -lean_ctor_set(x_36, 1, x_35); -lean_ctor_set(x_36, 2, x_30); -lean_ctor_set(x_36, 3, x_31); -lean_ctor_set(x_36, 4, x_32); -lean_ctor_set(x_36, 5, x_33); -lean_ctor_set(x_36, 6, x_34); -x_37 = lean_st_ref_set(x_3, x_36, x_17); -x_38 = lean_ctor_get(x_37, 1); -lean_inc(x_38); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - x_39 = x_37; -} else { - lean_dec_ref(x_37); - x_39 = lean_box(0); -} -x_40 = lean_box(0); -if (lean_is_scalar(x_39)) { - x_41 = lean_alloc_ctor(0, 2, 0); -} else { +lean_dec(x_18); +x_37 = l_Std_PersistentArray_push___rarg(x_31, x_1); +x_38 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_38, 0, x_30); +lean_ctor_set(x_38, 1, x_37); +lean_ctor_set(x_38, 2, x_32); +lean_ctor_set(x_38, 3, x_33); +lean_ctor_set(x_38, 4, x_34); +lean_ctor_set(x_38, 5, x_35); +lean_ctor_set(x_38, 6, x_36); +x_39 = lean_st_ref_set(x_3, x_38, x_19); +x_40 = lean_ctor_get(x_39, 1); +lean_inc(x_40); +if (lean_is_exclusive(x_39)) { + lean_ctor_release(x_39, 0); + lean_ctor_release(x_39, 1); x_41 = x_39; +} else { + lean_dec_ref(x_39); + x_41 = lean_box(0); } -lean_ctor_set(x_41, 0, x_40); -lean_ctor_set(x_41, 1, x_38); -return x_41; +x_42 = lean_box(0); +if (lean_is_scalar(x_41)) { + x_43 = lean_alloc_ctor(0, 2, 0); +} else { + x_43 = x_41; +} +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_40); +return x_43; } } else { -lean_object* x_42; 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_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; -x_42 = lean_ctor_get(x_1, 0); -x_43 = lean_ctor_get(x_1, 1); -x_44 = lean_ctor_get(x_1, 2); -x_45 = lean_ctor_get_uint8(x_1, sizeof(void*)*5); -x_46 = lean_ctor_get(x_1, 3); -x_47 = lean_ctor_get(x_1, 4); -lean_inc(x_47); +lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_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; +x_44 = lean_ctor_get(x_1, 0); +x_45 = lean_ctor_get(x_1, 1); +x_46 = lean_ctor_get(x_1, 2); +x_47 = lean_ctor_get_uint8(x_1, sizeof(void*)*5); +x_48 = lean_ctor_get(x_1, 3); +x_49 = lean_ctor_get(x_1, 4); +lean_inc(x_49); +lean_inc(x_48); lean_inc(x_46); +lean_inc(x_45); lean_inc(x_44); -lean_inc(x_43); -lean_inc(x_42); lean_dec(x_1); -x_48 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_48, 0, x_6); -lean_ctor_set(x_48, 1, x_9); -x_49 = lean_alloc_ctor(7, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_47); -x_50 = lean_alloc_ctor(0, 5, 1); -lean_ctor_set(x_50, 0, x_42); -lean_ctor_set(x_50, 1, x_43); -lean_ctor_set(x_50, 2, x_44); -lean_ctor_set(x_50, 3, x_46); -lean_ctor_set(x_50, 4, x_49); -lean_ctor_set_uint8(x_50, sizeof(void*)*5, x_45); -x_51 = lean_st_ref_take(x_3, x_10); -x_52 = lean_ctor_get(x_51, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_51, 1); -lean_inc(x_53); -lean_dec(x_51); -x_54 = lean_ctor_get(x_52, 0); +x_50 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_50, 0, x_8); +lean_ctor_set(x_50, 1, x_12); +x_51 = lean_alloc_ctor(7, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_49); +x_52 = lean_alloc_ctor(0, 5, 1); +lean_ctor_set(x_52, 0, x_44); +lean_ctor_set(x_52, 1, x_45); +lean_ctor_set(x_52, 2, x_46); +lean_ctor_set(x_52, 3, x_48); +lean_ctor_set(x_52, 4, x_51); +lean_ctor_set_uint8(x_52, sizeof(void*)*5, x_47); +x_53 = lean_st_ref_take(x_3, x_11); +x_54 = lean_ctor_get(x_53, 0); lean_inc(x_54); -x_55 = lean_ctor_get(x_52, 1); +x_55 = lean_ctor_get(x_53, 1); lean_inc(x_55); -x_56 = lean_ctor_get(x_52, 2); +lean_dec(x_53); +x_56 = lean_ctor_get(x_54, 0); lean_inc(x_56); -x_57 = lean_ctor_get(x_52, 3); +x_57 = lean_ctor_get(x_54, 1); lean_inc(x_57); -x_58 = lean_ctor_get(x_52, 4); +x_58 = lean_ctor_get(x_54, 2); lean_inc(x_58); -x_59 = lean_ctor_get(x_52, 5); +x_59 = lean_ctor_get(x_54, 3); lean_inc(x_59); -x_60 = lean_ctor_get(x_52, 6); +x_60 = lean_ctor_get(x_54, 4); lean_inc(x_60); -if (lean_is_exclusive(x_52)) { - lean_ctor_release(x_52, 0); - lean_ctor_release(x_52, 1); - lean_ctor_release(x_52, 2); - lean_ctor_release(x_52, 3); - lean_ctor_release(x_52, 4); - lean_ctor_release(x_52, 5); - lean_ctor_release(x_52, 6); - x_61 = x_52; +x_61 = lean_ctor_get(x_54, 5); +lean_inc(x_61); +x_62 = lean_ctor_get(x_54, 6); +lean_inc(x_62); +if (lean_is_exclusive(x_54)) { + lean_ctor_release(x_54, 0); + lean_ctor_release(x_54, 1); + lean_ctor_release(x_54, 2); + lean_ctor_release(x_54, 3); + lean_ctor_release(x_54, 4); + lean_ctor_release(x_54, 5); + lean_ctor_release(x_54, 6); + x_63 = x_54; } else { - lean_dec_ref(x_52); - x_61 = lean_box(0); + lean_dec_ref(x_54); + x_63 = lean_box(0); } -x_62 = l_Std_PersistentArray_push___rarg(x_55, x_50); -if (lean_is_scalar(x_61)) { - x_63 = lean_alloc_ctor(0, 7, 0); +x_64 = l_Std_PersistentArray_push___rarg(x_57, x_52); +if (lean_is_scalar(x_63)) { + x_65 = lean_alloc_ctor(0, 7, 0); } else { - x_63 = x_61; + x_65 = x_63; } -lean_ctor_set(x_63, 0, x_54); -lean_ctor_set(x_63, 1, x_62); -lean_ctor_set(x_63, 2, x_56); -lean_ctor_set(x_63, 3, x_57); -lean_ctor_set(x_63, 4, x_58); -lean_ctor_set(x_63, 5, x_59); -lean_ctor_set(x_63, 6, x_60); -x_64 = lean_st_ref_set(x_3, x_63, x_53); -x_65 = lean_ctor_get(x_64, 1); -lean_inc(x_65); -if (lean_is_exclusive(x_64)) { - lean_ctor_release(x_64, 0); - lean_ctor_release(x_64, 1); - x_66 = x_64; -} else { - lean_dec_ref(x_64); - x_66 = lean_box(0); -} -x_67 = lean_box(0); -if (lean_is_scalar(x_66)) { - x_68 = lean_alloc_ctor(0, 2, 0); -} else { +lean_ctor_set(x_65, 0, x_56); +lean_ctor_set(x_65, 1, x_64); +lean_ctor_set(x_65, 2, x_58); +lean_ctor_set(x_65, 3, x_59); +lean_ctor_set(x_65, 4, x_60); +lean_ctor_set(x_65, 5, x_61); +lean_ctor_set(x_65, 6, x_62); +x_66 = lean_st_ref_set(x_3, x_65, x_55); +x_67 = lean_ctor_get(x_66, 1); +lean_inc(x_67); +if (lean_is_exclusive(x_66)) { + lean_ctor_release(x_66, 0); + lean_ctor_release(x_66, 1); x_68 = x_66; +} else { + lean_dec_ref(x_66); + x_68 = lean_box(0); } -lean_ctor_set(x_68, 0, x_67); -lean_ctor_set(x_68, 1, x_65); -return x_68; +x_69 = lean_box(0); +if (lean_is_scalar(x_68)) { + x_70 = lean_alloc_ctor(0, 2, 0); +} else { + x_70 = x_68; +} +lean_ctor_set(x_70, 0, x_69); +lean_ctor_set(x_70, 1, x_67); +return x_70; } } } @@ -3733,7 +3734,7 @@ x_11 = l_Lean_Syntax_getPos(x_10); lean_dec(x_10); if (lean_obj_tag(x_11) == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 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; uint8_t x_33; +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; 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; x_12 = lean_ctor_get(x_4, 0); x_13 = lean_ctor_get(x_4, 1); x_14 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_Lean_AddMessageContext___spec__1(x_2, x_4, x_5, x_9); @@ -3745,246 +3746,258 @@ lean_dec(x_14); x_17 = lean_unsigned_to_nat(0u); x_18 = l_Lean_FileMap_toPosition(x_13, x_17); x_19 = lean_box(0); -x_20 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_5, x_16); +x_20 = l_Lean_Elab_Command_getScope___rarg(x_5, x_16); x_21 = lean_ctor_get(x_20, 0); lean_inc(x_21); x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); lean_dec(x_20); -x_23 = l_Lean_Elab_Command_getOpenDecls___rarg(x_5, x_22); -x_24 = lean_ctor_get(x_23, 0); -lean_inc(x_24); -x_25 = lean_ctor_get(x_23, 1); +x_23 = lean_ctor_get(x_21, 3); +lean_inc(x_23); +lean_dec(x_21); +x_24 = l_Lean_Elab_Command_getScope___rarg(x_5, x_22); +x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); -lean_dec(x_23); -x_26 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_26, 0, x_21); -lean_ctor_set(x_26, 1, x_24); -x_27 = lean_alloc_ctor(7, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_15); -x_28 = l_String_splitAux___main___closed__1; +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +x_27 = lean_ctor_get(x_25, 4); +lean_inc(x_27); +lean_dec(x_25); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_27); +x_29 = lean_alloc_ctor(7, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_15); +x_30 = l_String_splitAux___main___closed__1; lean_inc(x_12); -x_29 = lean_alloc_ctor(0, 5, 1); -lean_ctor_set(x_29, 0, x_12); -lean_ctor_set(x_29, 1, x_18); -lean_ctor_set(x_29, 2, x_19); -lean_ctor_set(x_29, 3, x_28); -lean_ctor_set(x_29, 4, x_27); -lean_ctor_set_uint8(x_29, sizeof(void*)*5, x_3); -x_30 = lean_st_ref_take(x_5, x_25); -x_31 = lean_ctor_get(x_30, 0); -lean_inc(x_31); -x_32 = lean_ctor_get(x_30, 1); -lean_inc(x_32); -lean_dec(x_30); -x_33 = !lean_is_exclusive(x_31); -if (x_33 == 0) +x_31 = lean_alloc_ctor(0, 5, 1); +lean_ctor_set(x_31, 0, x_12); +lean_ctor_set(x_31, 1, x_18); +lean_ctor_set(x_31, 2, x_19); +lean_ctor_set(x_31, 3, x_30); +lean_ctor_set(x_31, 4, x_29); +lean_ctor_set_uint8(x_31, sizeof(void*)*5, x_3); +x_32 = lean_st_ref_take(x_5, x_26); +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_32, 1); +lean_inc(x_34); +lean_dec(x_32); +x_35 = !lean_is_exclusive(x_33); +if (x_35 == 0) { -lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37; -x_34 = lean_ctor_get(x_31, 1); -x_35 = l_Std_PersistentArray_push___rarg(x_34, x_29); -lean_ctor_set(x_31, 1, x_35); -x_36 = lean_st_ref_set(x_5, x_31, x_32); -x_37 = !lean_is_exclusive(x_36); -if (x_37 == 0) +lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; +x_36 = lean_ctor_get(x_33, 1); +x_37 = l_Std_PersistentArray_push___rarg(x_36, x_31); +lean_ctor_set(x_33, 1, x_37); +x_38 = lean_st_ref_set(x_5, x_33, x_34); +x_39 = !lean_is_exclusive(x_38); +if (x_39 == 0) { -lean_object* x_38; lean_object* x_39; -x_38 = lean_ctor_get(x_36, 0); -lean_dec(x_38); -x_39 = lean_box(0); -lean_ctor_set(x_36, 0, x_39); -return x_36; -} -else -{ -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_36, 1); -lean_inc(x_40); -lean_dec(x_36); +lean_object* x_40; lean_object* x_41; +x_40 = lean_ctor_get(x_38, 0); +lean_dec(x_40); x_41 = lean_box(0); -x_42 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_42, 0, x_41); -lean_ctor_set(x_42, 1, x_40); -return x_42; +lean_ctor_set(x_38, 0, x_41); +return x_38; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_38, 1); +lean_inc(x_42); +lean_dec(x_38); +x_43 = lean_box(0); +x_44 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_44, 1, x_42); +return x_44; } } else { -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; -x_43 = lean_ctor_get(x_31, 0); -x_44 = lean_ctor_get(x_31, 1); -x_45 = lean_ctor_get(x_31, 2); -x_46 = lean_ctor_get(x_31, 3); -x_47 = lean_ctor_get(x_31, 4); -x_48 = lean_ctor_get(x_31, 5); -x_49 = lean_ctor_get(x_31, 6); +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; +x_45 = lean_ctor_get(x_33, 0); +x_46 = lean_ctor_get(x_33, 1); +x_47 = lean_ctor_get(x_33, 2); +x_48 = lean_ctor_get(x_33, 3); +x_49 = lean_ctor_get(x_33, 4); +x_50 = lean_ctor_get(x_33, 5); +x_51 = lean_ctor_get(x_33, 6); +lean_inc(x_51); +lean_inc(x_50); lean_inc(x_49); lean_inc(x_48); lean_inc(x_47); lean_inc(x_46); lean_inc(x_45); -lean_inc(x_44); -lean_inc(x_43); -lean_dec(x_31); -x_50 = l_Std_PersistentArray_push___rarg(x_44, x_29); -x_51 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_51, 0, x_43); -lean_ctor_set(x_51, 1, x_50); -lean_ctor_set(x_51, 2, x_45); -lean_ctor_set(x_51, 3, x_46); -lean_ctor_set(x_51, 4, x_47); -lean_ctor_set(x_51, 5, x_48); -lean_ctor_set(x_51, 6, x_49); -x_52 = lean_st_ref_set(x_5, x_51, x_32); -x_53 = lean_ctor_get(x_52, 1); -lean_inc(x_53); -if (lean_is_exclusive(x_52)) { - lean_ctor_release(x_52, 0); - lean_ctor_release(x_52, 1); - x_54 = x_52; -} else { - lean_dec_ref(x_52); - x_54 = lean_box(0); -} -x_55 = lean_box(0); -if (lean_is_scalar(x_54)) { - x_56 = lean_alloc_ctor(0, 2, 0); -} else { +lean_dec(x_33); +x_52 = l_Std_PersistentArray_push___rarg(x_46, x_31); +x_53 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_53, 0, x_45); +lean_ctor_set(x_53, 1, x_52); +lean_ctor_set(x_53, 2, x_47); +lean_ctor_set(x_53, 3, x_48); +lean_ctor_set(x_53, 4, x_49); +lean_ctor_set(x_53, 5, x_50); +lean_ctor_set(x_53, 6, x_51); +x_54 = lean_st_ref_set(x_5, x_53, x_34); +x_55 = lean_ctor_get(x_54, 1); +lean_inc(x_55); +if (lean_is_exclusive(x_54)) { + lean_ctor_release(x_54, 0); + lean_ctor_release(x_54, 1); x_56 = x_54; +} else { + lean_dec_ref(x_54); + x_56 = lean_box(0); } -lean_ctor_set(x_56, 0, x_55); -lean_ctor_set(x_56, 1, x_53); -return x_56; +x_57 = lean_box(0); +if (lean_is_scalar(x_56)) { + x_58 = lean_alloc_ctor(0, 2, 0); +} else { + x_58 = x_56; +} +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_55); +return x_58; } } else { -lean_object* x_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; uint8_t x_78; -x_57 = lean_ctor_get(x_11, 0); -lean_inc(x_57); +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; uint8_t x_82; +x_59 = lean_ctor_get(x_11, 0); +lean_inc(x_59); lean_dec(x_11); -x_58 = lean_ctor_get(x_4, 0); -x_59 = lean_ctor_get(x_4, 1); -x_60 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_Lean_AddMessageContext___spec__1(x_2, x_4, x_5, x_9); -x_61 = lean_ctor_get(x_60, 0); -lean_inc(x_61); -x_62 = lean_ctor_get(x_60, 1); -lean_inc(x_62); -lean_dec(x_60); -x_63 = l_Lean_FileMap_toPosition(x_59, x_57); -x_64 = lean_box(0); -x_65 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_5, x_62); -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_Lean_Elab_Command_getOpenDecls___rarg(x_5, x_67); -x_69 = lean_ctor_get(x_68, 0); +x_60 = lean_ctor_get(x_4, 0); +x_61 = lean_ctor_get(x_4, 1); +x_62 = l_Lean_addMessageContextPartial___at_Lean_Elab_Command_Lean_AddMessageContext___spec__1(x_2, x_4, x_5, x_9); +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_FileMap_toPosition(x_61, x_59); +x_66 = lean_box(0); +x_67 = l_Lean_Elab_Command_getScope___rarg(x_5, x_64); +x_68 = lean_ctor_get(x_67, 0); +lean_inc(x_68); +x_69 = lean_ctor_get(x_67, 1); lean_inc(x_69); -x_70 = lean_ctor_get(x_68, 1); +lean_dec(x_67); +x_70 = lean_ctor_get(x_68, 3); lean_inc(x_70); lean_dec(x_68); -x_71 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_71, 0, x_66); -lean_ctor_set(x_71, 1, x_69); -x_72 = lean_alloc_ctor(7, 2, 0); -lean_ctor_set(x_72, 0, x_71); -lean_ctor_set(x_72, 1, x_61); -x_73 = l_String_splitAux___main___closed__1; -lean_inc(x_58); -x_74 = lean_alloc_ctor(0, 5, 1); -lean_ctor_set(x_74, 0, x_58); -lean_ctor_set(x_74, 1, x_63); -lean_ctor_set(x_74, 2, x_64); -lean_ctor_set(x_74, 3, x_73); -lean_ctor_set(x_74, 4, x_72); -lean_ctor_set_uint8(x_74, sizeof(void*)*5, x_3); -x_75 = lean_st_ref_take(x_5, x_70); -x_76 = lean_ctor_get(x_75, 0); -lean_inc(x_76); -x_77 = lean_ctor_get(x_75, 1); -lean_inc(x_77); -lean_dec(x_75); -x_78 = !lean_is_exclusive(x_76); -if (x_78 == 0) -{ -lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; -x_79 = lean_ctor_get(x_76, 1); -x_80 = l_Std_PersistentArray_push___rarg(x_79, x_74); -lean_ctor_set(x_76, 1, x_80); -x_81 = lean_st_ref_set(x_5, x_76, x_77); -x_82 = !lean_is_exclusive(x_81); +x_71 = l_Lean_Elab_Command_getScope___rarg(x_5, x_69); +x_72 = lean_ctor_get(x_71, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_71, 1); +lean_inc(x_73); +lean_dec(x_71); +x_74 = lean_ctor_get(x_72, 4); +lean_inc(x_74); +lean_dec(x_72); +x_75 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_75, 0, x_70); +lean_ctor_set(x_75, 1, x_74); +x_76 = lean_alloc_ctor(7, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_63); +x_77 = l_String_splitAux___main___closed__1; +lean_inc(x_60); +x_78 = lean_alloc_ctor(0, 5, 1); +lean_ctor_set(x_78, 0, x_60); +lean_ctor_set(x_78, 1, x_65); +lean_ctor_set(x_78, 2, x_66); +lean_ctor_set(x_78, 3, x_77); +lean_ctor_set(x_78, 4, x_76); +lean_ctor_set_uint8(x_78, sizeof(void*)*5, x_3); +x_79 = lean_st_ref_take(x_5, x_73); +x_80 = lean_ctor_get(x_79, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_79, 1); +lean_inc(x_81); +lean_dec(x_79); +x_82 = !lean_is_exclusive(x_80); if (x_82 == 0) { -lean_object* x_83; lean_object* x_84; -x_83 = lean_ctor_get(x_81, 0); -lean_dec(x_83); -x_84 = lean_box(0); -lean_ctor_set(x_81, 0, x_84); -return x_81; +lean_object* x_83; lean_object* x_84; lean_object* x_85; uint8_t x_86; +x_83 = lean_ctor_get(x_80, 1); +x_84 = l_Std_PersistentArray_push___rarg(x_83, x_78); +lean_ctor_set(x_80, 1, x_84); +x_85 = lean_st_ref_set(x_5, x_80, x_81); +x_86 = !lean_is_exclusive(x_85); +if (x_86 == 0) +{ +lean_object* x_87; lean_object* x_88; +x_87 = lean_ctor_get(x_85, 0); +lean_dec(x_87); +x_88 = lean_box(0); +lean_ctor_set(x_85, 0, x_88); +return x_85; } else { -lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_85 = lean_ctor_get(x_81, 1); -lean_inc(x_85); -lean_dec(x_81); -x_86 = lean_box(0); -x_87 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_87, 0, x_86); -lean_ctor_set(x_87, 1, x_85); -return x_87; +lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_89 = lean_ctor_get(x_85, 1); +lean_inc(x_89); +lean_dec(x_85); +x_90 = lean_box(0); +x_91 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_91, 0, x_90); +lean_ctor_set(x_91, 1, x_89); +return x_91; } } else { -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; -x_88 = lean_ctor_get(x_76, 0); -x_89 = lean_ctor_get(x_76, 1); -x_90 = lean_ctor_get(x_76, 2); -x_91 = lean_ctor_get(x_76, 3); -x_92 = lean_ctor_get(x_76, 4); -x_93 = lean_ctor_get(x_76, 5); -x_94 = lean_ctor_get(x_76, 6); +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; +x_92 = lean_ctor_get(x_80, 0); +x_93 = lean_ctor_get(x_80, 1); +x_94 = lean_ctor_get(x_80, 2); +x_95 = lean_ctor_get(x_80, 3); +x_96 = lean_ctor_get(x_80, 4); +x_97 = lean_ctor_get(x_80, 5); +x_98 = lean_ctor_get(x_80, 6); +lean_inc(x_98); +lean_inc(x_97); +lean_inc(x_96); +lean_inc(x_95); lean_inc(x_94); lean_inc(x_93); lean_inc(x_92); -lean_inc(x_91); -lean_inc(x_90); -lean_inc(x_89); -lean_inc(x_88); -lean_dec(x_76); -x_95 = l_Std_PersistentArray_push___rarg(x_89, x_74); -x_96 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_96, 0, x_88); -lean_ctor_set(x_96, 1, x_95); -lean_ctor_set(x_96, 2, x_90); -lean_ctor_set(x_96, 3, x_91); -lean_ctor_set(x_96, 4, x_92); -lean_ctor_set(x_96, 5, x_93); -lean_ctor_set(x_96, 6, x_94); -x_97 = lean_st_ref_set(x_5, x_96, x_77); -x_98 = lean_ctor_get(x_97, 1); -lean_inc(x_98); -if (lean_is_exclusive(x_97)) { - lean_ctor_release(x_97, 0); - lean_ctor_release(x_97, 1); - x_99 = x_97; +lean_dec(x_80); +x_99 = l_Std_PersistentArray_push___rarg(x_93, x_78); +x_100 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_100, 0, x_92); +lean_ctor_set(x_100, 1, x_99); +lean_ctor_set(x_100, 2, x_94); +lean_ctor_set(x_100, 3, x_95); +lean_ctor_set(x_100, 4, x_96); +lean_ctor_set(x_100, 5, x_97); +lean_ctor_set(x_100, 6, x_98); +x_101 = lean_st_ref_set(x_5, x_100, x_81); +x_102 = lean_ctor_get(x_101, 1); +lean_inc(x_102); +if (lean_is_exclusive(x_101)) { + lean_ctor_release(x_101, 0); + lean_ctor_release(x_101, 1); + x_103 = x_101; } else { - lean_dec_ref(x_97); - x_99 = lean_box(0); + lean_dec_ref(x_101); + x_103 = lean_box(0); } -x_100 = lean_box(0); -if (lean_is_scalar(x_99)) { - x_101 = lean_alloc_ctor(0, 2, 0); +x_104 = lean_box(0); +if (lean_is_scalar(x_103)) { + x_105 = lean_alloc_ctor(0, 2, 0); } else { - x_101 = x_99; + x_105 = x_103; } -lean_ctor_set(x_101, 0, x_100); -lean_ctor_set(x_101, 1, x_98); -return x_101; +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_102); +return x_105; } } } @@ -8424,71 +8437,77 @@ lean_object* x_12; lean_object* x_13; x_12 = lean_ctor_get(x_11, 1); lean_inc(x_12); lean_dec(x_11); -x_13 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_5, x_12); +x_13 = l_Lean_Elab_Command_getScope___rarg(x_5, x_12); if (x_2 == 0) { -lean_object* x_14; lean_object* x_15; lean_object* x_16; +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_13, 1); lean_inc(x_15); lean_dec(x_13); -x_16 = l___private_Lean_Elab_Command_9__addScope(x_1, x_10, x_14, x_4, x_5, x_15); +x_16 = lean_ctor_get(x_14, 3); +lean_inc(x_16); +lean_dec(x_14); +x_17 = l___private_Lean_Elab_Command_9__addScope(x_1, x_10, x_16, x_4, x_5, x_15); lean_dec(x_4); -return x_16; +return x_17; } else { -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_17 = lean_ctor_get(x_13, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_13, 1); +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_18 = lean_ctor_get(x_13, 0); lean_inc(x_18); +x_19 = lean_ctor_get(x_13, 1); +lean_inc(x_19); lean_dec(x_13); -x_19 = lean_box(0); +x_20 = lean_ctor_get(x_18, 3); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_box(0); lean_inc(x_10); -x_20 = lean_name_mk_string(x_19, x_10); -x_21 = l_Lean_Name_append___main(x_17, x_20); -lean_dec(x_17); -x_22 = l___private_Lean_Elab_Command_9__addScope(x_1, x_10, x_21, x_4, x_5, x_18); +x_22 = lean_name_mk_string(x_21, x_10); +x_23 = l_Lean_Name_append___main(x_20, x_22); +lean_dec(x_20); +x_24 = l___private_Lean_Elab_Command_9__addScope(x_1, x_10, x_23, x_4, x_5, x_19); lean_dec(x_4); -return x_22; +return x_24; } } else { -uint8_t x_23; +uint8_t x_25; lean_dec(x_10); lean_dec(x_4); lean_dec(x_1); -x_23 = !lean_is_exclusive(x_11); -if (x_23 == 0) +x_25 = !lean_is_exclusive(x_11); +if (x_25 == 0) { return x_11; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_11, 0); -x_25 = lean_ctor_get(x_11, 1); -lean_inc(x_25); -lean_inc(x_24); +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_11, 0); +x_27 = lean_ctor_get(x_11, 1); +lean_inc(x_27); +lean_inc(x_26); lean_dec(x_11); -x_26 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_26, 0, x_24); -lean_ctor_set(x_26, 1, x_25); -return x_26; +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; } } } default: { -lean_object* x_27; lean_object* x_28; +lean_object* x_29; lean_object* x_30; lean_dec(x_3); lean_dec(x_1); -x_27 = l___private_Lean_Elab_Command_10__addScopes___main___closed__3; -x_28 = l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(x_27, x_4, x_5, x_6); -return x_28; +x_29 = l___private_Lean_Elab_Command_10__addScopes___main___closed__3; +x_30 = l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(x_29, x_4, x_5, x_6); +return x_30; } } } @@ -8686,30 +8705,30 @@ return x_3; lean_object* l_Lean_Elab_Command_elabSection(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -uint8_t x_5; lean_object* x_39; uint8_t x_40; -x_39 = l_Lean_Elab_Command_elabSection___closed__2; +uint8_t x_5; lean_object* x_40; uint8_t x_41; +x_40 = l_Lean_Elab_Command_elabSection___closed__2; lean_inc(x_1); -x_40 = l_Lean_Syntax_isOfKind(x_1, x_39); -if (x_40 == 0) +x_41 = l_Lean_Syntax_isOfKind(x_1, x_40); +if (x_41 == 0) { -uint8_t x_41; -x_41 = 0; -x_5 = x_41; -goto block_38; +uint8_t x_42; +x_42 = 0; +x_5 = x_42; +goto block_39; } else { -lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; -x_42 = l_Lean_Syntax_getArgs(x_1); -x_43 = lean_array_get_size(x_42); -lean_dec(x_42); -x_44 = lean_unsigned_to_nat(2u); -x_45 = lean_nat_dec_eq(x_43, x_44); +lean_object* x_43; lean_object* x_44; lean_object* x_45; uint8_t x_46; +x_43 = l_Lean_Syntax_getArgs(x_1); +x_44 = lean_array_get_size(x_43); lean_dec(x_43); -x_5 = x_45; -goto block_38; +x_45 = lean_unsigned_to_nat(2u); +x_46 = lean_nat_dec_eq(x_44, x_45); +lean_dec(x_44); +x_5 = x_46; +goto block_39; } -block_38: +block_39: { if (x_5 == 0) { @@ -8730,23 +8749,23 @@ lean_inc(x_8); x_10 = l_Lean_Syntax_isOfKind(x_8, x_9); if (x_10 == 0) { -uint8_t x_34; -x_34 = 0; -x_11 = x_34; -goto block_33; +uint8_t x_35; +x_35 = 0; +x_11 = x_35; +goto block_34; } else { -lean_object* x_35; lean_object* x_36; uint8_t x_37; -x_35 = l_Lean_Syntax_getArgs(x_8); -x_36 = lean_array_get_size(x_35); -lean_dec(x_35); -x_37 = lean_nat_dec_eq(x_36, x_7); +lean_object* x_36; lean_object* x_37; uint8_t x_38; +x_36 = l_Lean_Syntax_getArgs(x_8); +x_37 = lean_array_get_size(x_36); lean_dec(x_36); -x_11 = x_37; -goto block_33; +x_38 = lean_nat_dec_eq(x_37, x_7); +lean_dec(x_37); +x_11 = x_38; +goto block_34; } -block_33: +block_34: { if (x_11 == 0) { @@ -8777,47 +8796,50 @@ return x_17; } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_18 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_3, x_4); +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_18 = l_Lean_Elab_Command_getScope___rarg(x_3, x_4); x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); x_20 = lean_ctor_get(x_18, 1); lean_inc(x_20); lean_dec(x_18); -x_21 = l_Lean_Elab_Command_elabSection___closed__1; -x_22 = l_String_splitAux___main___closed__1; -x_23 = l___private_Lean_Elab_Command_9__addScope(x_21, x_22, x_19, x_2, x_3, x_20); +x_21 = lean_ctor_get(x_19, 3); +lean_inc(x_21); +lean_dec(x_19); +x_22 = l_Lean_Elab_Command_elabSection___closed__1; +x_23 = l_String_splitAux___main___closed__1; +x_24 = l___private_Lean_Elab_Command_9__addScope(x_22, x_23, x_21, x_2, x_3, x_20); lean_dec(x_2); -return x_23; +return x_24; } } } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; -x_24 = lean_unsigned_to_nat(0u); -x_25 = l_Lean_Syntax_getArg(x_8, x_24); +lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_25 = lean_unsigned_to_nat(0u); +x_26 = l_Lean_Syntax_getArg(x_8, x_25); lean_dec(x_8); -x_26 = l_Lean_identKind___closed__2; -lean_inc(x_25); -x_27 = l_Lean_Syntax_isOfKind(x_25, x_26); -if (x_27 == 0) +x_27 = l_Lean_identKind___closed__2; +lean_inc(x_26); +x_28 = l_Lean_Syntax_isOfKind(x_26, x_27); +if (x_28 == 0) { -lean_object* x_28; -lean_dec(x_25); +lean_object* x_29; +lean_dec(x_26); lean_dec(x_2); -x_28 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Command_elabNamespace___spec__1___rarg(x_4); -return x_28; +x_29 = l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Command_elabNamespace___spec__1___rarg(x_4); +return x_29; } else { -lean_object* x_29; lean_object* x_30; uint8_t x_31; lean_object* x_32; -x_29 = l_Lean_Syntax_getId(x_25); -lean_dec(x_25); -x_30 = l_Lean_Elab_Command_elabSection___closed__1; -x_31 = 0; -x_32 = l___private_Lean_Elab_Command_10__addScopes___main(x_30, x_31, x_29, x_2, x_3, x_4); -return x_32; +lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_object* x_33; +x_30 = l_Lean_Syntax_getId(x_26); +lean_dec(x_26); +x_31 = l_Lean_Elab_Command_elabSection___closed__1; +x_32 = 0; +x_33 = l___private_Lean_Elab_Command_10__addScopes___main(x_31, x_32, x_30, x_2, x_3, x_4); +return x_33; } } } @@ -11088,7 +11110,7 @@ x_9 = l_Lean_Elab_Command_logUnknownDecl___closed__2; x_10 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); -x_11 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_11 = l_Lean_throwUnknownConstant___rarg___closed__5; x_12 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); @@ -11107,38 +11129,10 @@ lean_dec(x_2); return x_5; } } -lean_object* _init_l_Lean_Elab_Command_resolveNamespace___closed__1() { +lean_object* l_Lean_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_1; -x_1 = lean_mk_string("unknown namespace '"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_resolveNamespace___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_resolveNamespace___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_resolveNamespace___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_resolveNamespace___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_resolveNamespace(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_5 = lean_st_ref_get(x_3, x_4); x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); @@ -11148,108 +11142,108 @@ lean_dec(x_5); x_8 = lean_ctor_get(x_6, 0); lean_inc(x_8); lean_dec(x_6); -x_9 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_3, x_7); +x_9 = l_Lean_Elab_Command_getScope___rarg(x_3, x_7); x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_9, 1); lean_inc(x_11); lean_dec(x_9); -x_12 = l_Lean_Elab_Command_getOpenDecls___rarg(x_3, x_11); -x_13 = !lean_is_exclusive(x_12); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_14 = lean_ctor_get(x_12, 0); -x_15 = lean_ctor_get(x_12, 1); -lean_inc(x_1); -x_16 = l_Lean_Elab_resolveNamespace(x_8, x_10, x_14, x_1); -lean_dec(x_14); +x_12 = lean_ctor_get(x_10, 3); +lean_inc(x_12); lean_dec(x_10); -lean_dec(x_8); -if (lean_obj_tag(x_16) == 0) +x_13 = l_Lean_Elab_Command_getScope___rarg(x_3, x_11); +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) { -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -lean_free_object(x_12); -x_17 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_17, 0, x_1); -x_18 = l_Lean_Elab_Command_resolveNamespace___closed__3; -x_19 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_19, 0, x_18); -lean_ctor_set(x_19, 1, x_17); -x_20 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_21 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -x_22 = l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(x_21, x_2, x_3, x_15); -return x_22; -} -else -{ -lean_object* x_23; -lean_dec(x_2); -lean_dec(x_1); -x_23 = lean_ctor_get(x_16, 0); -lean_inc(x_23); -lean_dec(x_16); -lean_ctor_set(x_12, 0, x_23); -return x_12; -} -} -else -{ -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_12, 0); -x_25 = lean_ctor_get(x_12, 1); -lean_inc(x_25); -lean_inc(x_24); +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = lean_ctor_get(x_13, 0); +x_16 = lean_ctor_get(x_13, 1); +x_17 = lean_ctor_get(x_15, 4); +lean_inc(x_17); +lean_dec(x_15); +lean_inc(x_1); +x_18 = l_Lean_ResolveName_resolveNamespace_x3f(x_8, x_12, x_17, x_1); +lean_dec(x_17); lean_dec(x_12); -lean_inc(x_1); -x_26 = l_Lean_Elab_resolveNamespace(x_8, x_10, x_24, x_1); -lean_dec(x_24); -lean_dec(x_10); lean_dec(x_8); -if (lean_obj_tag(x_26) == 0) +if (lean_obj_tag(x_18) == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_27 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_27, 0, x_1); -x_28 = l_Lean_Elab_Command_resolveNamespace___closed__3; -x_29 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_29, 0, x_28); -lean_ctor_set(x_29, 1, x_27); -x_30 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_31 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -x_32 = l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(x_31, x_2, x_3, x_25); -return x_32; +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_free_object(x_13); +x_19 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_19, 0, x_1); +x_20 = l_Lean_resolveNamespace___rarg___lambda__1___closed__3; +x_21 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_19); +x_22 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_23 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_23, 0, x_21); +lean_ctor_set(x_23, 1, x_22); +x_24 = l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(x_23, x_2, x_3, x_16); +return x_24; } else { -lean_object* x_33; lean_object* x_34; +lean_object* x_25; lean_dec(x_2); lean_dec(x_1); -x_33 = lean_ctor_get(x_26, 0); -lean_inc(x_33); -lean_dec(x_26); -x_34 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_25); -return x_34; +x_25 = lean_ctor_get(x_18, 0); +lean_inc(x_25); +lean_dec(x_18); +lean_ctor_set(x_13, 0, x_25); +return x_13; } } -} -} -lean_object* l_Lean_Elab_Command_resolveNamespace___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: +else { -lean_object* x_5; -x_5 = l_Lean_Elab_Command_resolveNamespace(x_1, x_2, x_3, x_4); -lean_dec(x_3); -return x_5; +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_26 = lean_ctor_get(x_13, 0); +x_27 = lean_ctor_get(x_13, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_13); +x_28 = lean_ctor_get(x_26, 4); +lean_inc(x_28); +lean_dec(x_26); +lean_inc(x_1); +x_29 = l_Lean_ResolveName_resolveNamespace_x3f(x_8, x_12, x_28, x_1); +lean_dec(x_28); +lean_dec(x_12); +lean_dec(x_8); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_30 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_30, 0, x_1); +x_31 = l_Lean_resolveNamespace___rarg___lambda__1___closed__3; +x_32 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_30); +x_33 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_34 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +x_35 = l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(x_34, x_2, x_3, x_27); +return x_35; +} +else +{ +lean_object* x_36; lean_object* x_37; +lean_dec(x_2); +lean_dec(x_1); +x_36 = lean_ctor_get(x_29, 0); +lean_inc(x_36); +lean_dec(x_29); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_27); +return x_37; } } -lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; uint8_t x_12; @@ -11338,7 +11332,7 @@ goto _start; } } } -lean_object* l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__2(lean_object* x_1, lean_object* x_2) { +lean_object* l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__3(lean_object* x_1, lean_object* x_2) { _start: { if (lean_obj_tag(x_2) == 0) @@ -11400,200 +11394,212 @@ lean_object* x_5; lean_object* x_6; lean_object* x_7; x_5 = lean_unsigned_to_nat(1u); x_6 = l_Lean_Syntax_getIdAt(x_1, x_5); lean_inc(x_2); -x_7 = l_Lean_Elab_Command_resolveNamespace(x_6, x_2, x_3, x_4); +x_7 = l_Lean_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1(x_6, x_2, x_3, x_4); if (lean_obj_tag(x_7) == 0) { -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_51; +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_52; x_8 = lean_ctor_get(x_7, 0); lean_inc(x_8); x_9 = lean_ctor_get(x_7, 1); lean_inc(x_9); lean_dec(x_7); -x_10 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_3, x_9); +x_10 = l_Lean_Elab_Command_getScope___rarg(x_3, x_9); 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_51 = lean_name_eq(x_8, x_11); -if (x_51 == 0) +x_13 = lean_ctor_get(x_11, 3); +lean_inc(x_13); +lean_dec(x_11); +x_52 = lean_name_eq(x_8, x_13); +if (x_52 == 0) { -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_52 = lean_st_ref_get(x_3, x_12); -x_53 = lean_ctor_get(x_52, 0); -lean_inc(x_53); -x_54 = lean_ctor_get(x_52, 1); +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_53 = lean_st_ref_get(x_3, x_12); +x_54 = lean_ctor_get(x_53, 0); lean_inc(x_54); -lean_dec(x_52); -x_55 = lean_ctor_get(x_53, 0); +x_55 = lean_ctor_get(x_53, 1); lean_inc(x_55); lean_dec(x_53); -x_13 = x_55; -x_14 = x_54; -goto block_50; +x_56 = lean_ctor_get(x_54, 0); +lean_inc(x_56); +lean_dec(x_54); +x_14 = x_56; +x_15 = x_55; +goto block_51; } else { -lean_object* x_56; lean_object* x_57; uint8_t x_58; -lean_dec(x_11); +lean_object* x_57; lean_object* x_58; uint8_t x_59; +lean_dec(x_13); lean_dec(x_8); -x_56 = l_Lean_Elab_Command_elabExport___closed__3; -x_57 = l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(x_56, x_2, x_3, x_12); -x_58 = !lean_is_exclusive(x_57); -if (x_58 == 0) +x_57 = l_Lean_Elab_Command_elabExport___closed__3; +x_58 = l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(x_57, x_2, x_3, x_12); +x_59 = !lean_is_exclusive(x_58); +if (x_59 == 0) { -return x_57; +return x_58; } else { -lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_59 = lean_ctor_get(x_57, 0); -x_60 = lean_ctor_get(x_57, 1); +lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_60 = lean_ctor_get(x_58, 0); +x_61 = lean_ctor_get(x_58, 1); +lean_inc(x_61); lean_inc(x_60); -lean_inc(x_59); -lean_dec(x_57); -x_61 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_61, 0, x_59); -lean_ctor_set(x_61, 1, x_60); -return x_61; +lean_dec(x_58); +x_62 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_62, 0, x_60); +lean_ctor_set(x_62, 1, x_61); +return x_62; } } -block_50: +block_51: { -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; uint8_t x_26; -x_15 = lean_unsigned_to_nat(3u); -x_16 = l_Lean_Syntax_getArg(x_1, x_15); -x_17 = l_Lean_Syntax_getArgs(x_16); -lean_dec(x_16); -x_18 = lean_box(0); -x_19 = lean_unsigned_to_nat(0u); -x_20 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__1(x_1, x_8, x_11, x_13, x_17, x_19, x_18, x_2, x_3, x_14); -lean_dec(x_2); +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; uint8_t x_27; +x_16 = lean_unsigned_to_nat(3u); +x_17 = l_Lean_Syntax_getArg(x_1, x_16); +x_18 = l_Lean_Syntax_getArgs(x_17); lean_dec(x_17); -lean_dec(x_11); +x_19 = lean_box(0); +x_20 = lean_unsigned_to_nat(0u); +x_21 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__2(x_1, x_8, x_13, x_14, x_18, x_20, x_19, x_2, x_3, x_15); +lean_dec(x_2); +lean_dec(x_18); +lean_dec(x_13); lean_dec(x_8); -x_21 = lean_ctor_get(x_20, 0); -lean_inc(x_21); -x_22 = lean_ctor_get(x_20, 1); +x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); -lean_dec(x_20); -x_23 = lean_st_ref_take(x_3, x_22); -x_24 = lean_ctor_get(x_23, 0); -lean_inc(x_24); -x_25 = lean_ctor_get(x_23, 1); +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +lean_dec(x_21); +x_24 = lean_st_ref_take(x_3, x_23); +x_25 = lean_ctor_get(x_24, 0); lean_inc(x_25); -lean_dec(x_23); -x_26 = !lean_is_exclusive(x_24); -if (x_26 == 0) +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +x_27 = !lean_is_exclusive(x_25); +if (x_27 == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; -x_27 = lean_ctor_get(x_24, 0); -x_28 = l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__2(x_27, x_21); -lean_ctor_set(x_24, 0, x_28); -x_29 = lean_st_ref_set(x_3, x_24, x_25); -x_30 = !lean_is_exclusive(x_29); -if (x_30 == 0) +lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +x_28 = lean_ctor_get(x_25, 0); +x_29 = l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__3(x_28, x_22); +lean_ctor_set(x_25, 0, x_29); +x_30 = lean_st_ref_set(x_3, x_25, x_26); +x_31 = !lean_is_exclusive(x_30); +if (x_31 == 0) { -lean_object* x_31; lean_object* x_32; -x_31 = lean_ctor_get(x_29, 0); -lean_dec(x_31); -x_32 = lean_box(0); -lean_ctor_set(x_29, 0, x_32); -return x_29; +lean_object* x_32; lean_object* x_33; +x_32 = lean_ctor_get(x_30, 0); +lean_dec(x_32); +x_33 = lean_box(0); +lean_ctor_set(x_30, 0, x_33); +return x_30; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_33 = lean_ctor_get(x_29, 1); -lean_inc(x_33); -lean_dec(x_29); -x_34 = lean_box(0); -x_35 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_35, 0, x_34); -lean_ctor_set(x_35, 1, x_33); -return x_35; +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_30, 1); +lean_inc(x_34); +lean_dec(x_30); +x_35 = lean_box(0); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_34); +return x_36; } } else { -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; -x_36 = lean_ctor_get(x_24, 0); -x_37 = lean_ctor_get(x_24, 1); -x_38 = lean_ctor_get(x_24, 2); -x_39 = lean_ctor_get(x_24, 3); -x_40 = lean_ctor_get(x_24, 4); -x_41 = lean_ctor_get(x_24, 5); -x_42 = lean_ctor_get(x_24, 6); +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; +x_37 = lean_ctor_get(x_25, 0); +x_38 = lean_ctor_get(x_25, 1); +x_39 = lean_ctor_get(x_25, 2); +x_40 = lean_ctor_get(x_25, 3); +x_41 = lean_ctor_get(x_25, 4); +x_42 = lean_ctor_get(x_25, 5); +x_43 = lean_ctor_get(x_25, 6); +lean_inc(x_43); lean_inc(x_42); lean_inc(x_41); lean_inc(x_40); lean_inc(x_39); lean_inc(x_38); lean_inc(x_37); -lean_inc(x_36); -lean_dec(x_24); -x_43 = l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__2(x_36, x_21); -x_44 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_44, 1, x_37); -lean_ctor_set(x_44, 2, x_38); -lean_ctor_set(x_44, 3, x_39); -lean_ctor_set(x_44, 4, x_40); -lean_ctor_set(x_44, 5, x_41); -lean_ctor_set(x_44, 6, x_42); -x_45 = lean_st_ref_set(x_3, x_44, x_25); -x_46 = lean_ctor_get(x_45, 1); -lean_inc(x_46); -if (lean_is_exclusive(x_45)) { - lean_ctor_release(x_45, 0); - lean_ctor_release(x_45, 1); - x_47 = x_45; +lean_dec(x_25); +x_44 = l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__3(x_37, x_22); +x_45 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_45, 0, x_44); +lean_ctor_set(x_45, 1, x_38); +lean_ctor_set(x_45, 2, x_39); +lean_ctor_set(x_45, 3, x_40); +lean_ctor_set(x_45, 4, x_41); +lean_ctor_set(x_45, 5, x_42); +lean_ctor_set(x_45, 6, x_43); +x_46 = lean_st_ref_set(x_3, x_45, x_26); +x_47 = lean_ctor_get(x_46, 1); +lean_inc(x_47); +if (lean_is_exclusive(x_46)) { + lean_ctor_release(x_46, 0); + lean_ctor_release(x_46, 1); + x_48 = x_46; } else { - lean_dec_ref(x_45); - x_47 = lean_box(0); + lean_dec_ref(x_46); + x_48 = lean_box(0); } -x_48 = lean_box(0); -if (lean_is_scalar(x_47)) { - x_49 = lean_alloc_ctor(0, 2, 0); +x_49 = lean_box(0); +if (lean_is_scalar(x_48)) { + x_50 = lean_alloc_ctor(0, 2, 0); } else { - x_49 = x_47; + x_50 = x_48; } -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_46); -return x_49; +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_47); +return x_50; } } } else { -uint8_t x_62; +uint8_t x_63; lean_dec(x_2); -x_62 = !lean_is_exclusive(x_7); -if (x_62 == 0) +x_63 = !lean_is_exclusive(x_7); +if (x_63 == 0) { return x_7; } else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; -x_63 = lean_ctor_get(x_7, 0); -x_64 = lean_ctor_get(x_7, 1); +lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_64 = lean_ctor_get(x_7, 0); +x_65 = lean_ctor_get(x_7, 1); +lean_inc(x_65); lean_inc(x_64); -lean_inc(x_63); lean_dec(x_7); -x_65 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_65, 0, x_63); -lean_ctor_set(x_65, 1, x_64); -return x_65; +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_64); +lean_ctor_set(x_66, 1, x_65); +return x_66; } } } } -lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; -x_11 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_11 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_5); @@ -12095,7 +12101,7 @@ lean_dec(x_3); x_14 = l_Lean_Syntax_getId(x_11); lean_dec(x_11); lean_inc(x_5); -x_15 = l_Lean_Elab_Command_resolveNamespace(x_14, x_5, x_6, x_7); +x_15 = l_Lean_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1(x_14, x_5, x_6, x_7); if (lean_obj_tag(x_15) == 0) { 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; @@ -12297,7 +12303,7 @@ x_8 = lean_array_get(x_6, x_5, x_7); x_9 = l_Lean_Syntax_getId(x_8); lean_dec(x_8); lean_inc(x_2); -x_10 = l_Lean_Elab_Command_resolveNamespace(x_9, x_2, x_3, x_4); +x_10 = l_Lean_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1(x_9, x_2, x_3, x_4); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; @@ -12462,7 +12468,7 @@ x_8 = lean_array_get(x_6, x_5, x_7); x_9 = l_Lean_Syntax_getId(x_8); lean_dec(x_8); lean_inc(x_2); -x_10 = l_Lean_Elab_Command_resolveNamespace(x_9, x_2, x_3, x_4); +x_10 = l_Lean_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1(x_9, x_2, x_3, x_4); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; 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; @@ -12664,7 +12670,7 @@ x_8 = lean_array_get(x_6, x_5, x_7); x_9 = l_Lean_Syntax_getId(x_8); lean_dec(x_8); lean_inc(x_2); -x_10 = l_Lean_Elab_Command_resolveNamespace(x_9, x_2, x_3, x_4); +x_10 = l_Lean_resolveNamespace___at_Lean_Elab_Command_elabExport___spec__1(x_9, x_2, x_3, x_4); if (lean_obj_tag(x_10) == 0) { lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; @@ -18495,7 +18501,7 @@ if (lean_obj_tag(x_34) == 0) lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; x_35 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_35, 0, x_1); -x_36 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_36 = l_Lean_throwUnknownConstant___rarg___closed__5; x_37 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_37, 0, x_36); lean_ctor_set(x_37, 1, x_35); @@ -18683,7 +18689,7 @@ if (lean_obj_tag(x_85) == 0) 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; x_86 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_86, 0, x_1); -x_87 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_87 = l_Lean_throwUnknownConstant___rarg___closed__5; x_88 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_88, 0, x_87); lean_ctor_set(x_88, 1, x_86); @@ -18976,7 +18982,7 @@ x_12 = l_Lean_Elab_mkDeclName___rarg___closed__3; x_13 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_11); -x_14 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_14 = l_Lean_throwUnknownConstant___rarg___closed__5; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_14); @@ -19678,21 +19684,24 @@ return x_107; lean_object* l_Lean_Elab_Command_expandDeclId(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_6 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_4, x_5); +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_6 = l_Lean_Elab_Command_getScope___rarg(x_4, x_5); x_7 = lean_ctor_get(x_6, 0); lean_inc(x_7); x_8 = lean_ctor_get(x_6, 1); lean_inc(x_8); lean_dec(x_6); -x_9 = l_Lean_Elab_Command_getLevelNames___rarg(x_4, x_8); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 1); +x_9 = lean_ctor_get(x_7, 3); +lean_inc(x_9); +lean_dec(x_7); +x_10 = l_Lean_Elab_Command_getLevelNames___rarg(x_4, x_8); +x_11 = lean_ctor_get(x_10, 0); lean_inc(x_11); -lean_dec(x_9); -x_12 = l_Lean_Elab_expandDeclId___at_Lean_Elab_Command_expandDeclId___spec__1(x_7, x_10, x_1, x_2, x_3, x_4, x_11); -return x_12; +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_Elab_expandDeclId___at_Lean_Elab_Command_expandDeclId___spec__1(x_9, x_11, x_1, x_2, x_3, x_4, x_12); +return x_13; } } lean_object* l_Lean_Elab_throwAlreadyDeclaredUniverseLevel___at_Lean_Elab_Command_expandDeclId___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { @@ -19768,9 +19777,8 @@ return x_6; } } lean_object* initialize_Init(lean_object*); -lean_object* initialize_Lean_Elab_Alias(lean_object*); +lean_object* initialize_Lean_ResolveName(lean_object*); lean_object* initialize_Lean_Elab_Log(lean_object*); -lean_object* initialize_Lean_Elab_ResolveName(lean_object*); lean_object* initialize_Lean_Elab_Term(lean_object*); lean_object* initialize_Lean_Elab_Binders(lean_object*); lean_object* initialize_Lean_Elab_SyntheticMVars(lean_object*); @@ -19783,15 +19791,12 @@ _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = initialize_Lean_Elab_Alias(lean_io_mk_world()); +res = initialize_Lean_ResolveName(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Log(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = initialize_Lean_Elab_ResolveName(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); res = initialize_Lean_Elab_Term(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -19850,6 +19855,20 @@ l_Lean_Elab_Command_Lean_Ref___closed__3 = _init_l_Lean_Elab_Command_Lean_Ref___ lean_mark_persistent(l_Lean_Elab_Command_Lean_Ref___closed__3); l_Lean_Elab_Command_Lean_Ref = _init_l_Lean_Elab_Command_Lean_Ref(); lean_mark_persistent(l_Lean_Elab_Command_Lean_Ref); +l_Lean_Elab_Command_Lean_MonadResolveName___closed__1 = _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_Lean_MonadResolveName___closed__1); +l_Lean_Elab_Command_Lean_MonadResolveName___closed__2 = _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_Lean_MonadResolveName___closed__2); +l_Lean_Elab_Command_Lean_MonadResolveName___closed__3 = _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_Lean_MonadResolveName___closed__3); +l_Lean_Elab_Command_Lean_MonadResolveName___closed__4 = _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_Lean_MonadResolveName___closed__4); +l_Lean_Elab_Command_Lean_MonadResolveName___closed__5 = _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_Lean_MonadResolveName___closed__5); +l_Lean_Elab_Command_Lean_MonadResolveName___closed__6 = _init_l_Lean_Elab_Command_Lean_MonadResolveName___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_Lean_MonadResolveName___closed__6); +l_Lean_Elab_Command_Lean_MonadResolveName = _init_l_Lean_Elab_Command_Lean_MonadResolveName(); +lean_mark_persistent(l_Lean_Elab_Command_Lean_MonadResolveName); l_Lean_Elab_Command_CommandElabM_monadLog___closed__1 = _init_l_Lean_Elab_Command_CommandElabM_monadLog___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_CommandElabM_monadLog___closed__1); l_Lean_Elab_Command_CommandElabM_monadLog___closed__2 = _init_l_Lean_Elab_Command_CommandElabM_monadLog___closed__2(); @@ -20030,12 +20049,6 @@ l_Lean_Elab_Command_logUnknownDecl___closed__1 = _init_l_Lean_Elab_Command_logUn lean_mark_persistent(l_Lean_Elab_Command_logUnknownDecl___closed__1); l_Lean_Elab_Command_logUnknownDecl___closed__2 = _init_l_Lean_Elab_Command_logUnknownDecl___closed__2(); lean_mark_persistent(l_Lean_Elab_Command_logUnknownDecl___closed__2); -l_Lean_Elab_Command_resolveNamespace___closed__1 = _init_l_Lean_Elab_Command_resolveNamespace___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_resolveNamespace___closed__1); -l_Lean_Elab_Command_resolveNamespace___closed__2 = _init_l_Lean_Elab_Command_resolveNamespace___closed__2(); -lean_mark_persistent(l_Lean_Elab_Command_resolveNamespace___closed__2); -l_Lean_Elab_Command_resolveNamespace___closed__3 = _init_l_Lean_Elab_Command_resolveNamespace___closed__3(); -lean_mark_persistent(l_Lean_Elab_Command_resolveNamespace___closed__3); l_Lean_Elab_Command_elabExport___closed__1 = _init_l_Lean_Elab_Command_elabExport___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_elabExport___closed__1); l_Lean_Elab_Command_elabExport___closed__2 = _init_l_Lean_Elab_Command_elabExport___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/DeclModifiers.c b/stage0/stdlib/Lean/Elab/DeclModifiers.c index a11e2c96c3..1a85fc84ea 100644 --- a/stage0/stdlib/Lean/Elab/DeclModifiers.c +++ b/stage0/stdlib/Lean/Elab/DeclModifiers.c @@ -67,7 +67,6 @@ lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_elabModifiers___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_checkNotAlreadyDeclared___rarg___lambda__3___closed__3; lean_object* l_Lean_Elab_elabModifiers___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Elab_Modifiers_hasFormat___closed__10; lean_object* l_Lean_Elab_elabModifiers___rarg___lambda__3___closed__1; lean_object* l_Lean_Elab_Modifiers_hasFormat___closed__13; @@ -89,6 +88,7 @@ lean_object* l_Lean_Elab_Modifiers_hasFormat___closed__20; lean_object* l_Lean_Elab_Visibility_hasToString___boxed(lean_object*); extern lean_object* l_Lean_protectedExt; lean_object* l_Lean_fmt___at_Lean_Elab_Modifiers_hasFormat___spec__1(lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Elab_Modifiers_hasFormat___closed__6; lean_object* l_Lean_Elab_checkNotAlreadyDeclared___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_elabModifiers___rarg___lambda__3___closed__3; @@ -437,7 +437,7 @@ if (lean_obj_tag(x_15) == 0) lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; x_16 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_16, 0, x_1); -x_17 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_17 = l_Lean_throwUnknownConstant___rarg___closed__5; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); @@ -2432,7 +2432,7 @@ x_16 = l_Lean_Elab_mkDeclName___rarg___closed__3; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); -x_18 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_18 = l_Lean_throwUnknownConstant___rarg___closed__5; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); diff --git a/stage0/stdlib/Lean/Elab/DeclUtil.c b/stage0/stdlib/Lean/Elab/DeclUtil.c index 73bfb6f005..b78a830510 100644 --- a/stage0/stdlib/Lean/Elab/DeclUtil.c +++ b/stage0/stdlib/Lean/Elab/DeclUtil.c @@ -57,13 +57,13 @@ lean_object* l_Lean_Meta_forallTelescopeCompatible___rarg___lambda__2___boxed(le lean_object* l_Lean_Meta_forallTelescopeCompatibleAux(lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___main___rarg___closed__7; -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Name_appendIndexAfter(lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___main___rarg___closed__16; extern lean_object* l_Char_HasRepr___closed__1; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___main___rarg___closed__14; uint8_t l_Array_contains___at_Lean_registerInternalExceptionId___spec__1(lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___main(lean_object*); lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___main___rarg___closed__15; lean_object* l_Lean_Meta_forallTelescopeCompatibleAux___main___rarg___closed__18; @@ -371,7 +371,7 @@ lean_ctor_set(x_35, 0, x_25); x_36 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_36, 0, x_34); lean_ctor_set(x_36, 1, x_35); -x_37 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_37 = l_Lean_throwUnknownConstant___rarg___closed__5; x_38 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_37); @@ -434,7 +434,7 @@ x_66 = l_Lean_Meta_forallTelescopeCompatibleAux___main___rarg___closed__15; x_67 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_67, 0, x_66); lean_ctor_set(x_67, 1, x_65); -x_68 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_68 = l_Lean_throwUnknownConstant___rarg___closed__5; x_69 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_69, 0, x_67); lean_ctor_set(x_69, 1, x_68); @@ -544,7 +544,7 @@ x_49 = l_Lean_Meta_forallTelescopeCompatibleAux___main___rarg___closed__12; x_50 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_50, 0, x_49); lean_ctor_set(x_50, 1, x_48); -x_51 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_51 = l_Lean_throwUnknownConstant___rarg___closed__5; x_52 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_52, 0, x_50); lean_ctor_set(x_52, 1, x_51); diff --git a/stage0/stdlib/Lean/Elab/Declaration.c b/stage0/stdlib/Lean/Elab/Declaration.c index 940c92c356..d0bf90c754 100644 --- a/stage0/stdlib/Lean/Elab/Declaration.c +++ b/stage0/stdlib/Lean/Elab/Declaration.c @@ -16,9 +16,11 @@ extern "C" { lean_object* l_Lean_Elab_Command_elabDeclaration(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandInitialize(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_elabStructure___closed__11; +extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; lean_object* l_Lean_Elab_Command_expandInitialize___closed__29; lean_object* l_Lean_Elab_applyVisibility___at_Lean_Elab_Command_expandDeclId___spec__5(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_extractMacroScopes(lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3(lean_object*); lean_object* l_Lean_Elab_expandOptDeclSig(lean_object*); extern lean_object* l_Lean_KeyedDeclsAttribute_declareBuiltin___rarg___closed__3; lean_object* l_Lean_Elab_Command_expandInitialize___closed__22; @@ -36,20 +38,20 @@ extern lean_object* l___private_Lean_Elab_Command_11__addNamespace___closed__1; extern lean_object* l_Lean_Elab_Command_elabSection___closed__2; lean_object* l_Lean_Elab_Command_expandInitialize___closed__7; uint8_t l_Lean_Elab_Modifiers_isProtected(lean_object*); -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_expandInitialize___closed__1; uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandInitialize___closed__16; -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__4; lean_object* l_Lean_Elab_Command_expandInitialize___closed__3; lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); extern lean_object* l_Std_HashMap_inhabited___closed__1; +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_commandElabAttribute; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_expandMutualElement___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_extract___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_expandInitialize___closed__2; lean_object* l_Lean_Elab_Command_expandInitialize___closed__24; +lean_object* l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_Elab_Command_expandInitialize___closed__5; lean_object* l_Lean_Elab_Command_expandInitialize___closed__13; @@ -57,6 +59,7 @@ lean_object* l_Lean_Elab_Command_expandInitialize___closed__41; lean_object* lean_st_ref_get(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_expandMutualNamespace___spec__1___closed__2; lean_object* l_Lean_Elab_elabAttrs___at_Lean_Elab_Command_elabMutualDef___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabAttr___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandDeclNamespace_x3f___closed__10; lean_object* l_Lean_Elab_Term_ensureNoUnassignedMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*); @@ -71,6 +74,7 @@ lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Elab_Command_expandInitialize___closed__34; lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_Lean_MessageData_ofList(lean_object*); lean_object* l_Lean_Elab_Command_expandInitialize___closed__14; lean_object* l_Lean_Elab_Term_applyAttributesAt(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_5__isMutualDef___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); @@ -87,6 +91,7 @@ lean_object* l_Lean_Meta_setMCtx___at___private_Lean_Meta_Basic_6__liftMkBinding lean_object* l___regBuiltin_Lean_Elab_Command_elabDeclaration___closed__1; lean_object* l_Lean_Elab_Command_expandInitialize___closed__33; extern lean_object* l_Lean_Elab_Command_expandInCmd___closed__7; +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4___lambda__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandInitialize___closed__28; extern lean_object* l_Lean_mkAppStx___closed__8; lean_object* lean_nat_add(lean_object*, lean_object*); @@ -119,7 +124,6 @@ lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_isDefLike___closed__2; lean_object* l_Lean_Elab_Command_expandMutualNamespace___closed__1; lean_object* l_Lean_Elab_Command_expandDeclId(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___lambda__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandInitialize___closed__39; extern lean_object* l_Lean_Elab_Attribute_hasFormat___closed__1; lean_object* l_Lean_Elab_elabModifiers___at_Lean_Elab_Command_elabMutualDef___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); @@ -137,9 +141,11 @@ lean_object* l_Lean_Elab_Command_expandInitialize___closed__21; lean_object* l_Lean_Elab_Command_expandInitialize___closed__38; lean_object* l___regBuiltin_Lean_Elab_Command_expandMutualPreamble(lean_object*); extern lean_object* l___regBuiltin_Lean_Elab_Command_elabOpen___closed__2; +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabAttr___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___regBuiltin_Lean_Elab_Command_elabVariables___closed__2; lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Term_21__elabTermAux___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_elabModifiers___rarg___lambda__3___closed__2; +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* l_Lean_Elab_Command_elabClassInductive(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); @@ -148,9 +154,11 @@ lean_object* l_Lean_Elab_Command_expandInitialize___closed__1; extern lean_object* l___private_Lean_Meta_RecursorInfo_10__getProduceMotiveAndRecursive___closed__1; lean_object* l_Lean_Elab_Command_expandInitialize___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_isDefLike___closed__9; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l___regBuiltin_Lean_Elab_Command_expandMutualNamespace___closed__3; lean_object* l_Lean_Elab_Command_expandInitialize___closed__9; extern lean_object* l_Lean_mkAppStx___closed__6; +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_expandArrayLit___closed__9; lean_object* l_Lean_Elab_Command_expandInitialize___closed__40; lean_object* l_Lean_Elab_Command_expandMutualPreamble___closed__1; @@ -167,6 +175,8 @@ lean_object* l_Lean_Elab_Command_expandMutualPreamble___closed__3; lean_object* l_Lean_Elab_Command_expandDeclNamespace_x3f(lean_object*); lean_object* l___private_Lean_Elab_Declaration_3__isMutualInductive___boxed(lean_object*); lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__2; +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l_Lean_Elab_Command_expandInitialize___closed__27; lean_object* l_Lean_Elab_sortDeclLevelParams(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMutual___closed__2; @@ -179,7 +189,6 @@ lean_object* l___regBuiltin_Lean_Elab_Command_elabAttr___closed__2; lean_object* l_Lean_Elab_Command_elabAxiom___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_expandDeclIdCore(lean_object*); lean_object* l_Lean_Elab_Command_elabAttr___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandMutualPreamble(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabBinders___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -198,6 +207,8 @@ lean_object* l_Lean_Elab_Command_expandMutualPreamble___closed__2; lean_object* l___private_Lean_Elab_Declaration_7__splitMutualPreamble___main(lean_object*, lean_object*); extern lean_object* l___regBuiltin_Lean_Elab_Command_elabCheck___closed__1; uint8_t l___private_Lean_Elab_Declaration_6__isMutualPreambleCommand(lean_object*); +lean_object* l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Macro_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandDeclNamespace_x3f___closed__1; lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -217,13 +228,13 @@ lean_object* l_Lean_MacroScopesView_review(lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Lean_Elab_Declaration_3__isMutualInductive___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_applyAttributes(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandDeclNamespace_x3f___closed__4; +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandMutualPreamble___closed__5; extern lean_object* l___private_Lean_Elab_Binders_12__expandFunBindersAux___main___closed__7; lean_object* l_Lean_Elab_Command_expandInitialize___closed__26; extern lean_object* l_Lean_Elab_Command_isDefLike___closed__6; lean_object* l_Lean_Elab_Command_getMainModule___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabStructure(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandDeclNamespace_x3f___closed__9; lean_object* l_Lean_Elab_Command_expandInitialize___closed__11; lean_object* l_Lean_Elab_Command_elabMutual___closed__3; @@ -234,6 +245,7 @@ extern lean_object* l_Lean_Elab_Tactic_evalIntro___closed__5; lean_object* l_Lean_Elab_expandDeclSig(lean_object*); lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Command_4__getVarDecls(lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); lean_object* l_Lean_Elab_Command_expandInitialize___closed__10; @@ -248,6 +260,7 @@ uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__5; lean_object* l_Lean_Elab_Command_expandMutualPreamble___closed__6; extern lean_object* l_Lean_Elab_Command_isDefLike___closed__3; +extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; lean_object* l___regBuiltin_Lean_Elab_Command_expandMutualNamespace___closed__1; lean_object* l_Lean_Elab_Command_expandDeclNamespace_x3f___closed__3; lean_object* l___private_Lean_Elab_Declaration_4__elabMutualInductive(lean_object*, lean_object*, lean_object*, lean_object*); @@ -256,14 +269,17 @@ lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkForallUsedOnly___at_Lean_Elab_Command_elabAxiom___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__2; extern lean_object* l_Lean_mkOptionalNode___closed__2; +lean_object* l_List_map___main___at_Lean_resolveGlobalConst___spec__2(lean_object*); lean_object* l_Lean_Elab_Command_expandDeclNamespace_x3f___closed__5; lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__3; lean_object* l_Lean_Elab_Command_elabAxiom___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(lean_object*); lean_object* l_Lean_Elab_Command_checkValidCtorModifier(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_System_FilePath_dirName___closed__1; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__5; lean_object* l_Lean_Elab_Command_elabInductive(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); extern lean_object* l___regBuiltin_Lean_Elab_Command_elabUniverse___closed__2; lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___spec__1___closed__6; @@ -272,13 +288,16 @@ lean_object* l_Lean_Elab_Command_elabAttr(lean_object*, lean_object*, lean_objec lean_object* l_Lean_Elab_Command_expandInitialize___closed__20; lean_object* l_Lean_Elab_Command_elabDeclaration___closed__1; extern lean_object* l_Lean_mkInitAttr___closed__2; +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Declaration_1__inductiveSyntaxToView___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__3; lean_object* l_Lean_Meta_mkForallUsedOnly___at_Lean_Elab_Command_elabAxiom___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_expandMutualNamespace___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandInitialize___closed__42; +lean_object* l_Lean_throwError___at_Lean_Elab_Term_throwErrorIfErrors___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkInitAttr___closed__1; lean_object* l_Lean_Elab_Command_checkValidInductiveModifier(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_expandInCmd___closed__2; extern lean_object* l_Lean_Elab_Command_mkDefViewOfInstance___closed__3; extern lean_object* l_Lean_Elab_Command_isDefLike___closed__7; @@ -4896,7 +4915,310 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___lambda__1(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3___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, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_9 = lean_box(0); +x_10 = l_Lean_mkConst(x_1, x_9); +x_11 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_11, 0, x_10); +x_12 = l_Lean_throwUnknownConstant___rarg___closed__3; +x_13 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_11); +x_14 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_15 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_15, 0, x_13); +lean_ctor_set(x_15, 1, x_14); +x_16 = l_Lean_throwError___at_Lean_Elab_Term_throwErrorIfErrors___spec__1___rarg(x_15, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +return x_16; +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3___rarg___boxed), 8, 0); +return x_2; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabAttr___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; uint8_t x_10; +lean_inc(x_2); +lean_inc(x_1); +x_9 = l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_11 = lean_ctor_get(x_9, 0); +x_12 = lean_ctor_get(x_9, 1); +x_13 = lean_box(0); +x_14 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_11, x_13); +x_15 = l_List_isEmpty___rarg(x_14); +if (x_15 == 0) +{ +lean_object* x_16; +lean_dec(x_2); +lean_dec(x_1); +x_16 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_14); +lean_ctor_set(x_9, 0, x_16); +return x_9; +} +else +{ +lean_object* x_17; uint8_t x_18; +lean_dec(x_14); +lean_free_object(x_9); +x_17 = l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_12); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +return x_17; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_17); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; +x_22 = lean_ctor_get(x_9, 0); +x_23 = lean_ctor_get(x_9, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_9); +x_24 = lean_box(0); +x_25 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_22, x_24); +x_26 = l_List_isEmpty___rarg(x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +lean_dec(x_2); +lean_dec(x_1); +x_27 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_25); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_23); +return x_28; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +lean_dec(x_25); +x_29 = l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_23); +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_32 = x_29; +} else { + lean_dec_ref(x_29); + x_32 = lean_box(0); +} +if (lean_is_scalar(x_32)) { + x_33 = lean_alloc_ctor(1, 2, 0); +} else { + x_33 = x_32; +} +lean_ctor_set(x_33, 0, x_30); +lean_ctor_set(x_33, 1, x_31); +return x_33; +} +} +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabAttr___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +lean_inc(x_2); +lean_inc(x_1); +x_9 = l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabAttr___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +if (lean_obj_tag(x_9) == 0) +{ +uint8_t x_10; +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_9, 0); +x_12 = lean_ctor_get(x_9, 1); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_27; +lean_free_object(x_9); +x_27 = lean_box(0); +x_13 = x_27; +goto block_26; +} +else +{ +lean_object* x_28; +x_28 = lean_ctor_get(x_11, 1); +lean_inc(x_28); +if (lean_obj_tag(x_28) == 0) +{ +lean_object* x_29; +lean_dec(x_2); +lean_dec(x_1); +x_29 = lean_ctor_get(x_11, 0); +lean_inc(x_29); +lean_dec(x_11); +lean_ctor_set(x_9, 0, x_29); +return x_9; +} +else +{ +lean_object* x_30; +lean_dec(x_28); +lean_free_object(x_9); +x_30 = lean_box(0); +x_13 = x_30; +goto block_26; +} +} +block_26: +{ +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_dec(x_13); +x_14 = lean_box(0); +x_15 = l_Lean_mkConst(x_1, x_14); +x_16 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_16, 0, x_15); +x_17 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; +x_18 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +x_19 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +x_20 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +x_21 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_14, x_11); +x_22 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_21); +x_23 = l_Lean_MessageData_ofList(x_22); +lean_dec(x_22); +x_24 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_24, 0, x_20); +lean_ctor_set(x_24, 1, x_23); +x_25 = l_Lean_throwError___at_Lean_Elab_Term_throwErrorIfErrors___spec__1___rarg(x_24, x_2, x_3, x_4, x_5, x_6, x_7, x_12); +return x_25; +} +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_9, 0); +x_32 = lean_ctor_get(x_9, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_9); +if (lean_obj_tag(x_31) == 0) +{ +lean_object* x_47; +x_47 = lean_box(0); +x_33 = x_47; +goto block_46; +} +else +{ +lean_object* x_48; +x_48 = lean_ctor_get(x_31, 1); +lean_inc(x_48); +if (lean_obj_tag(x_48) == 0) +{ +lean_object* x_49; lean_object* x_50; +lean_dec(x_2); +lean_dec(x_1); +x_49 = lean_ctor_get(x_31, 0); +lean_inc(x_49); +lean_dec(x_31); +x_50 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_32); +return x_50; +} +else +{ +lean_object* x_51; +lean_dec(x_48); +x_51 = lean_box(0); +x_33 = x_51; +goto block_46; +} +} +block_46: +{ +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_dec(x_33); +x_34 = lean_box(0); +x_35 = l_Lean_mkConst(x_1, x_34); +x_36 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_36, 0, x_35); +x_37 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; +x_38 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_36); +x_39 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +x_40 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +x_41 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_34, x_31); +x_42 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_41); +x_43 = l_Lean_MessageData_ofList(x_42); +lean_dec(x_42); +x_44 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_44, 0, x_40); +lean_ctor_set(x_44, 1, x_43); +x_45 = l_Lean_throwError___at_Lean_Elab_Term_throwErrorIfErrors___spec__1___rarg(x_44, x_2, x_3, x_4, x_5, x_6, x_7, x_32); +return x_45; +} +} +} +else +{ +uint8_t x_52; +lean_dec(x_2); +lean_dec(x_1); +x_52 = !lean_is_exclusive(x_9); +if (x_52 == 0) +{ +return x_9; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_9, 0); +x_54 = lean_ctor_get(x_9, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_9); +x_55 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_55, 0, x_53); +lean_ctor_set(x_55, 1, x_54); +return x_55; +} +} +} +} +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4___lambda__1(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { lean_object* x_11; @@ -4904,7 +5226,7 @@ x_11 = l_Lean_Elab_Term_applyAttributes(x_3, x_1, x_2, x_4, x_5, x_6, x_7, x_8, return x_11; } } -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { lean_object* x_8; uint8_t x_9; @@ -4928,11 +5250,11 @@ lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean x_12 = lean_array_fget(x_3, x_4); x_13 = lean_box(0); x_14 = l_Lean_Syntax_getId(x_12); -x_15 = lean_alloc_closure((void*)(l_Lean_Elab_Term_resolveGlobalConstNoOverload___boxed), 8, 1); +x_15 = lean_alloc_closure((void*)(l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabAttr___spec__1___boxed), 8, 1); lean_closure_set(x_15, 0, x_14); x_16 = lean_box(x_1); lean_inc(x_2); -x_17 = lean_alloc_closure((void*)(l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___lambda__1___boxed), 10, 2); +x_17 = lean_alloc_closure((void*)(l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4___lambda__1___boxed), 10, 2); lean_closure_set(x_17, 0, x_2); lean_closure_set(x_17, 1, x_16); x_18 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_monadLog___spec__2___rarg), 9, 2); @@ -5033,7 +5355,7 @@ x_13 = lean_unsigned_to_nat(5u); x_14 = l_Lean_Syntax_getArg(x_1, x_13); x_15 = l_Lean_Syntax_getArgs(x_14); lean_dec(x_14); -x_16 = l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1(x_7, x_11, x_15, x_5, x_2, x_3, x_12); +x_16 = l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4(x_7, x_11, x_15, x_5, x_2, x_3, x_12); lean_dec(x_2); lean_dec(x_15); return x_16; @@ -5063,13 +5385,52 @@ return x_20; } } } -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_throwUnknownConstant___at_Lean_Elab_Command_elabAttr___spec__3___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_9; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabAttr___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_resolveGlobalConst___at_Lean_Elab_Command_elabAttr___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_9; +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Command_elabAttr___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_9; +} +} +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { uint8_t x_11; lean_object* x_12; x_11 = lean_unbox(x_2); lean_dec(x_2); -x_12 = l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___lambda__1(x_1, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_12 = l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4___lambda__1(x_1, x_11, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); @@ -5077,13 +5438,13 @@ lean_dec(x_1); return x_12; } } -lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { uint8_t x_8; lean_object* x_9; x_8 = lean_unbox(x_1); lean_dec(x_1); -x_9 = l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__1(x_8, x_2, x_3, x_4, x_5, x_6, x_7); +x_9 = l_Array_forMAux___main___at_Lean_Elab_Command_elabAttr___spec__4(x_8, x_2, x_3, x_4, x_5, x_6, x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_3); diff --git a/stage0/stdlib/Lean/Elab/Do.c b/stage0/stdlib/Lean/Elab/Do.c index 03e92e9bc8..7dd8a01049 100644 --- a/stage0/stdlib/Lean/Elab/Do.c +++ b/stage0/stdlib/Lean/Elab/Do.c @@ -400,7 +400,6 @@ lean_object* l_Lean_Elab_Term_Do_getDoIdDeclVar(lean_object*); lean_object* l___private_Lean_Elab_Do_5__extractBind___closed__2; lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_withNewVars___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doReassignArrowToCode___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doForToCode___closed__1; lean_object* l_Lean_Elab_Term_Do_mkAuxDeclFor___rarg___lambda__3___closed__7; extern lean_object* l_Array_myMacro____x40_Init_Data_Array_Macros___hyg_464____closed__6; @@ -472,6 +471,7 @@ lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Term_Do_ToCodeBlo lean_object* l_Lean_Elab_Term_expandOptType(lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Binders_17__expandMatchAltsIntoMatchAux___main___closed__3; lean_object* l_Lean_Elab_Term_Do_ToCodeBlock_doTryToCode___closed__16; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Elab_Term_Do_hasExitPointPred___main___at_Lean_Elab_Term_Do_hasBreakContinue___spec__1___boxed(lean_object*); uint8_t l_Lean_Elab_Term_Do_hasExitPointPred___main___at_Lean_Elab_Term_Do_hasTerminalAction___spec__1(lean_object*); lean_object* l___private_Lean_CoreM_1__mkFreshNameImp(lean_object*, lean_object*, lean_object*, lean_object*); @@ -29461,7 +29461,7 @@ lean_dec(x_19); x_22 = lean_simp_macro_scopes(x_16); x_23 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_23, 0, x_22); -x_24 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_24 = l_Lean_throwUnknownConstant___rarg___closed__5; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); @@ -29524,7 +29524,7 @@ lean_dec(x_19); x_40 = lean_simp_macro_scopes(x_16); x_41 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_41, 0, x_40); -x_42 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_42 = l_Lean_throwUnknownConstant___rarg___closed__5; x_43 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_43, 0, x_42); lean_ctor_set(x_43, 1, x_41); diff --git a/stage0/stdlib/Lean/Elab/LetRec.c b/stage0/stdlib/Lean/Elab/LetRec.c index 396538fc66..7a117706b9 100644 --- a/stage0/stdlib/Lean/Elab/LetRec.c +++ b/stage0/stdlib/Lean/Elab/LetRec.c @@ -66,7 +66,6 @@ lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_LetRec_6__registerLetRecsToLift___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withLetDecl___at_Lean_Elab_Term_elabLetDeclAux___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Term_21__elabTermAux___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -77,6 +76,7 @@ lean_object* l_Lean_Elab_elabDeclAttrs___at___private_Lean_Elab_LetRec_1__mkLetR lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_expandOptType(lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; extern lean_object* l_Lean_mkAppStx___closed__6; lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_LetRec_1__mkLetRecDeclView___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_elabAttr___at___private_Lean_Elab_LetRec_1__mkLetRecDeclView___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -255,7 +255,7 @@ if (lean_obj_tag(x_38) == 0) lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; x_39 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_39, 0, x_1); -x_40 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_40 = l_Lean_throwUnknownConstant___rarg___closed__5; x_41 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_39); @@ -443,7 +443,7 @@ if (lean_obj_tag(x_89) == 0) lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; x_90 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_90, 0, x_1); -x_91 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_91 = l_Lean_throwUnknownConstant___rarg___closed__5; x_92 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_92, 0, x_91); lean_ctor_set(x_92, 1, x_90); diff --git a/stage0/stdlib/Lean/Elab/Match.c b/stage0/stdlib/Lean/Elab/Match.c index d69aa38bb1..9e52468cff 100644 --- a/stage0/stdlib/Lean/Elab/Match.c +++ b/stage0/stdlib/Lean/Elab/Match.c @@ -181,7 +181,6 @@ lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_mkFreshId___at___private_Lean_Elab_Match_36__mkLocalDeclFor___spec__2___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Match_25__processVar___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_27__nameToPattern___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__3; extern lean_object* l_myMacro____x40_Init_Data_ToString_Macro___hyg_39____closed__10; lean_object* l_Lean_Elab_Term_elabMatch___closed__3; extern lean_object* l_Array_myMacro____x40_Init_Data_Array_Macros___hyg_464____closed__14; @@ -282,7 +281,6 @@ lean_object* l_Lean_Meta_inferType___at___private_Lean_Elab_Match_36__mkLocalDec lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Term_withDepElimPatterns___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___private_Lean_Elab_Match_32__elabPatternsAux___main___closed__1; lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_myMacro____x40_Init_Data_Array_Macros___hyg_464____closed__6; @@ -342,6 +340,7 @@ lean_object* l_Lean_Elab_Term_CollectPatternVars_collect___main___closed__14; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Term_finalizePatternDecls___spec__2___closed__7; extern lean_object* l___private_Lean_Elab_Binders_17__expandMatchAltsIntoMatchAux___main___closed__3; lean_object* l___regBuiltin_Lean_Elab_Term_elabNoMatch___closed__1; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l___private_Lean_Elab_Match_27__nameToPattern___main___closed__19; lean_object* l___private_Lean_Elab_Match_35__throwInvalidPattern___rarg___closed__1; lean_object* l_Lean_Elab_Term_CollectPatternVars_processCtorApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -364,6 +363,7 @@ lean_object* l___private_Lean_Elab_Match_13__throwCtorExpected___rarg___boxed(le lean_object* l___private_Lean_Elab_Match_32__elabPatternsAux___main___closed__2; lean_object* l___private_Lean_Elab_Match_36__mkLocalDeclFor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Match_38__elabMatchAux___closed__3; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_redLength___main___rarg(lean_object*); lean_object* l___private_Lean_Elab_Match_33__alreadyVisited(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -5542,11 +5542,11 @@ lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean lean_free_object(x_10); x_16 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_16, 0, x_1); -x_17 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_17 = l_Lean_throwUnknownConstant___rarg___closed__3; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); -x_19 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_19 = l_Lean_throwUnknownConstant___rarg___closed__5; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); @@ -5582,11 +5582,11 @@ if (lean_obj_tag(x_26) == 0) lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; x_27 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_27, 0, x_1); -x_28 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_28 = l_Lean_throwUnknownConstant___rarg___closed__3; x_29 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_27); -x_30 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_30 = l_Lean_throwUnknownConstant___rarg___closed__5; x_31 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); diff --git a/stage0/stdlib/Lean/Elab/MutualDef.c b/stage0/stdlib/Lean/Elab/MutualDef.c index d2c2a6c48a..6ca99882c3 100644 --- a/stage0/stdlib/Lean/Elab/MutualDef.c +++ b/stage0/stdlib/Lean/Elab/MutualDef.c @@ -190,7 +190,6 @@ lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Std_RBNode_find___main___at_Lean_Elab_Term_MutualClosure_Replacement_apply___spec__1(lean_object*, lean_object*); lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_expandDeclId___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_throwAlreadyDeclaredUniverseLevel___rarg___closed__6; -lean_object* l_Lean_Elab_Term_getCurrNamespace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_MutualDef_24__markModified___boxed(lean_object*); lean_object* l___private_Lean_Elab_MutualDef_38__mkLetRecClosures(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_MutualClosure_pushLetRecs(lean_object*, lean_object*, uint8_t, lean_object*); @@ -232,7 +231,6 @@ lean_object* l_List_foldl___main___at___private_Lean_Elab_MutualDef_30__mkFreeVa lean_object* l_Lean_Elab_elabModifiers___at_Lean_Elab_Command_elabMutualDef___spec__1___closed__14; lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at_Lean_Elab_Term_MutualClosure_getModifiersForLetRecs___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Meta_forallBoundedTelescope___at_Lean_Elab_Term_elabLetDeclAux___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_mkDefViewOfConstant___closed__8; lean_object* l_Lean_Elab_elabModifiers___at_Lean_Elab_Command_elabMutualDef___spec__1___closed__5; @@ -276,6 +274,7 @@ uint8_t l_Lean_Name_isAtomic(lean_object*); uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); extern lean_object* l_Lean_protectedExt; lean_object* l_Lean_Elab_checkNotAlreadyDeclared___at___private_Lean_Elab_MutualDef_6__elabHeaders___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Elab_checkNotAlreadyDeclared___at___private_Lean_Elab_MutualDef_6__elabHeaders___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_MutualDef_35__mkClosureForAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_MutualDef_23__resetModified___rarg(lean_object*); @@ -2427,7 +2426,7 @@ if (lean_obj_tag(x_38) == 0) lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; x_39 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_39, 0, x_1); -x_40 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_40 = l_Lean_throwUnknownConstant___rarg___closed__5; x_41 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_39); @@ -2615,7 +2614,7 @@ if (lean_obj_tag(x_89) == 0) lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; x_90 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_90, 0, x_1); -x_91 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_91 = l_Lean_throwUnknownConstant___rarg___closed__5; x_92 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_92, 0, x_91); lean_ctor_set(x_92, 1, x_90); @@ -2908,7 +2907,7 @@ x_16 = l_Lean_Elab_mkDeclName___rarg___closed__3; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); -x_18 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_18 = l_Lean_throwUnknownConstant___rarg___closed__5; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); @@ -3762,7 +3761,7 @@ return x_14; } else { -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; 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_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; x_15 = lean_array_fget(x_2, x_3); x_16 = lean_unsigned_to_nat(1u); x_17 = lean_nat_add(x_3, x_16); @@ -3786,128 +3785,124 @@ lean_ctor_set(x_26, 0, x_19); lean_ctor_set(x_26, 1, x_20); lean_ctor_set(x_26, 2, x_21); lean_ctor_set(x_26, 3, x_25); -x_27 = l_Lean_Elab_Term_getCurrNamespace(x_5, x_6, x_7, x_8, x_26, x_10, x_11); -x_28 = lean_ctor_get(x_27, 0); -lean_inc(x_28); -x_29 = lean_ctor_get(x_27, 1); +x_27 = lean_ctor_get(x_5, 2); +lean_inc(x_27); +x_28 = l_Lean_Elab_Term_getLevelNames(x_5, x_6, x_7, x_8, x_26, x_10, x_11); +x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); -lean_dec(x_27); -x_30 = l_Lean_Elab_Term_getLevelNames(x_5, x_6, x_7, x_8, x_26, x_10, x_29); -x_31 = lean_ctor_get(x_30, 0); +x_30 = lean_ctor_get(x_28, 1); +lean_inc(x_30); +lean_dec(x_28); +x_31 = lean_ctor_get(x_15, 2); lean_inc(x_31); -x_32 = lean_ctor_get(x_30, 1); +x_32 = lean_ctor_get(x_15, 1); lean_inc(x_32); -lean_dec(x_30); -x_33 = lean_ctor_get(x_15, 2); -lean_inc(x_33); -x_34 = lean_ctor_get(x_15, 1); -lean_inc(x_34); lean_inc(x_26); lean_inc(x_5); -x_35 = l_Lean_Elab_expandDeclId___at___private_Lean_Elab_MutualDef_6__elabHeaders___spec__1(x_28, x_31, x_33, x_34, x_5, x_6, x_7, x_8, x_26, x_10, x_32); -lean_dec(x_33); -if (lean_obj_tag(x_35) == 0) +x_33 = l_Lean_Elab_expandDeclId___at___private_Lean_Elab_MutualDef_6__elabHeaders___spec__1(x_27, x_29, x_31, x_32, x_5, x_6, x_7, x_8, x_26, x_10, x_30); +lean_dec(x_31); +if (lean_obj_tag(x_33) == 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; uint8_t x_42; uint8_t x_43; lean_object* x_44; -x_36 = lean_ctor_get(x_35, 0); +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; uint8_t x_41; lean_object* x_42; +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_33, 1); +lean_inc(x_35); +lean_dec(x_33); +x_36 = lean_ctor_get(x_34, 0); lean_inc(x_36); -x_37 = lean_ctor_get(x_35, 1); +x_37 = lean_ctor_get(x_34, 1); lean_inc(x_37); -lean_dec(x_35); -x_38 = lean_ctor_get(x_36, 0); +x_38 = lean_ctor_get(x_34, 2); lean_inc(x_38); -x_39 = lean_ctor_get(x_36, 1); +lean_dec(x_34); +x_39 = lean_ctor_get(x_32, 1); lean_inc(x_39); -x_40 = lean_ctor_get(x_36, 2); -lean_inc(x_40); -lean_dec(x_36); -x_41 = lean_ctor_get(x_34, 1); -lean_inc(x_41); -x_42 = 2; -x_43 = 1; +x_40 = 2; +x_41 = 1; lean_inc(x_10); lean_inc(x_26); lean_inc(x_5); -lean_inc(x_39); -x_44 = l_Lean_Elab_Term_applyAttributesAt(x_39, x_41, x_42, x_43, x_5, x_6, x_7, x_8, x_26, x_10, x_37); -lean_dec(x_41); -if (lean_obj_tag(x_44) == 0) +lean_inc(x_37); +x_42 = l_Lean_Elab_Term_applyAttributesAt(x_37, x_39, x_40, x_41, x_5, x_6, x_7, x_8, x_26, x_10, x_35); +lean_dec(x_39); +if (lean_obj_tag(x_42) == 0) { -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_45 = lean_ctor_get(x_44, 1); -lean_inc(x_45); +lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_43 = lean_ctor_get(x_42, 1); +lean_inc(x_43); +lean_dec(x_42); +x_44 = lean_ctor_get(x_15, 3); +lean_inc(x_44); +x_45 = l_Lean_Syntax_getArgs(x_44); lean_dec(x_44); -x_46 = lean_ctor_get(x_15, 3); -lean_inc(x_46); -x_47 = l_Lean_Syntax_getArgs(x_46); -lean_dec(x_46); -lean_inc(x_40); -x_48 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at___private_Lean_Elab_MutualDef_6__elabHeaders___spec__7___lambda__1), 15, 7); -lean_closure_set(x_48, 0, x_15); -lean_closure_set(x_48, 1, x_18); -lean_closure_set(x_48, 2, x_34); -lean_closure_set(x_48, 3, x_38); -lean_closure_set(x_48, 4, x_39); -lean_closure_set(x_48, 5, x_40); -lean_closure_set(x_48, 6, x_4); -x_49 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinders___rarg___boxed), 9, 2); -lean_closure_set(x_49, 0, x_47); -lean_closure_set(x_49, 1, x_48); +lean_inc(x_38); +x_46 = lean_alloc_closure((void*)(l_Array_iterateMAux___main___at___private_Lean_Elab_MutualDef_6__elabHeaders___spec__7___lambda__1), 15, 7); +lean_closure_set(x_46, 0, x_15); +lean_closure_set(x_46, 1, x_18); +lean_closure_set(x_46, 2, x_32); +lean_closure_set(x_46, 3, x_36); +lean_closure_set(x_46, 4, x_37); +lean_closure_set(x_46, 5, x_38); +lean_closure_set(x_46, 6, x_4); +x_47 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabBinders___rarg___boxed), 9, 2); +lean_closure_set(x_47, 0, x_45); +lean_closure_set(x_47, 1, x_46); lean_inc(x_10); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -x_50 = l_Lean_Elab_Term_withLevelNames___rarg(x_40, x_49, x_5, x_6, x_7, x_8, x_26, x_10, x_45); -if (lean_obj_tag(x_50) == 0) +x_48 = l_Lean_Elab_Term_withLevelNames___rarg(x_38, x_47, x_5, x_6, x_7, x_8, x_26, x_10, x_43); +if (lean_obj_tag(x_48) == 0) { -lean_object* x_51; lean_object* x_52; -x_51 = lean_ctor_get(x_50, 0); -lean_inc(x_51); -x_52 = lean_ctor_get(x_50, 1); -lean_inc(x_52); -lean_dec(x_50); +lean_object* x_49; lean_object* x_50; +x_49 = lean_ctor_get(x_48, 0); +lean_inc(x_49); +x_50 = lean_ctor_get(x_48, 1); +lean_inc(x_50); +lean_dec(x_48); x_3 = x_17; -x_4 = x_51; -x_11 = x_52; +x_4 = x_49; +x_11 = x_50; goto _start; } else { -uint8_t x_54; +uint8_t x_52; lean_dec(x_17); lean_dec(x_10); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_54 = !lean_is_exclusive(x_50); -if (x_54 == 0) +x_52 = !lean_is_exclusive(x_48); +if (x_52 == 0) { -return x_50; +return x_48; } else { -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_50, 0); -x_56 = lean_ctor_get(x_50, 1); -lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_50); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); -return x_57; +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_48, 0); +x_54 = lean_ctor_get(x_48, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_48); +x_55 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_55, 0, x_53); +lean_ctor_set(x_55, 1, x_54); +return x_55; } } } else { -uint8_t x_58; -lean_dec(x_40); -lean_dec(x_39); +uint8_t x_56; lean_dec(x_38); -lean_dec(x_34); +lean_dec(x_37); +lean_dec(x_36); +lean_dec(x_32); lean_dec(x_26); lean_dec(x_18); lean_dec(x_17); @@ -3918,30 +3913,30 @@ lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -x_58 = !lean_is_exclusive(x_44); -if (x_58 == 0) +x_56 = !lean_is_exclusive(x_42); +if (x_56 == 0) { -return x_44; +return x_42; } else { -lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_59 = lean_ctor_get(x_44, 0); -x_60 = lean_ctor_get(x_44, 1); -lean_inc(x_60); -lean_inc(x_59); -lean_dec(x_44); -x_61 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_61, 0, x_59); -lean_ctor_set(x_61, 1, x_60); -return x_61; +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_42, 0); +x_58 = lean_ctor_get(x_42, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_42); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +return x_59; } } } else { -uint8_t x_62; -lean_dec(x_34); +uint8_t x_60; +lean_dec(x_32); lean_dec(x_26); lean_dec(x_18); lean_dec(x_17); @@ -3952,23 +3947,23 @@ lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -x_62 = !lean_is_exclusive(x_35); -if (x_62 == 0) +x_60 = !lean_is_exclusive(x_33); +if (x_60 == 0) { -return x_35; +return x_33; } else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; -x_63 = lean_ctor_get(x_35, 0); -x_64 = lean_ctor_get(x_35, 1); -lean_inc(x_64); -lean_inc(x_63); -lean_dec(x_35); -x_65 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_65, 0, x_63); -lean_ctor_set(x_65, 1, x_64); -return x_65; +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_33, 0); +x_62 = lean_ctor_get(x_33, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_33); +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_61); +lean_ctor_set(x_63, 1, x_62); +return x_63; } } } diff --git a/stage0/stdlib/Lean/Elab/Print.c b/stage0/stdlib/Lean/Elab/Print.c index e1e7732146..fde486c86b 100644 --- a/stage0/stdlib/Lean/Elab/Print.c +++ b/stage0/stdlib/Lean/Elab/Print.c @@ -22,11 +22,9 @@ extern lean_object* l___private_Lean_Meta_ExprDefEq_8__checkTypesAndAssign___clo lean_object* l_Std_RBNode_insert___at_Lean_NameSet_insert___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_8__printIdCore(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_CollectAxioms_collect___main___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_liftTermElabM___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_2__lparamsToMessageData(lean_object*); extern lean_object* l_Lean_MessageData_ofList___closed__3; lean_object* l_Lean_getConstInfo___at___private_Lean_Elab_Print_7__printInduct___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Command_commandElabAttribute; lean_object* l___private_Lean_Elab_Print_3__mkHeader___closed__7; lean_object* l_Lean_Elab_Command_elabPrint___closed__6; @@ -39,7 +37,6 @@ extern lean_object* l_Lean_Meta_SynthInstance_getInstances___lambda__1___closed_ extern lean_object* l_Lean_Elab_Term_resolveName___closed__3; lean_object* l___regBuiltin_Lean_Elab_Command_elabPrint___closed__1; lean_object* lean_st_ref_get(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_resolveGlobalConst___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabPrint___closed__1; lean_object* lean_private_to_user_name(lean_object*); lean_object* l___private_Lean_Elab_Print_1__throwUnknownId___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -60,19 +57,18 @@ lean_object* l___private_Lean_Elab_Print_5__printAxiomLike(lean_object*, lean_ob lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_4__printDefLike(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__3; lean_object* l___regBuiltin_Lean_Elab_Command_elabPrintAxioms(lean_object*); lean_object* l___private_Lean_Elab_Print_10__printAxiomsOf___closed__2; +lean_object* l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabPrintAxioms___closed__1; uint8_t lean_nat_dec_eq(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_resolveId___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Command_elabPrintAxioms___closed__2; lean_object* l_Lean_Syntax_isStrLit_x3f(lean_object*); +lean_object* l_Lean_resolveGlobalConst___at___private_Lean_Elab_Print_9__printId___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabPrint(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_3__mkHeader___closed__8; lean_object* l_Lean_Elab_Command_elabPrint___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; extern lean_object* l_Array_iterateMAux___main___at_Lean_ppGoal___spec__6___closed__8; lean_object* l___private_Lean_Elab_Print_2__lparamsToMessageData___closed__2; lean_object* l___private_Lean_Elab_Print_9__printId___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -81,19 +77,26 @@ lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_2__lparamsToMessageData___closed__1; extern lean_object* l_Lean_protectedExt; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l___private_Lean_Elab_Print_2__lparamsToMessageData___boxed(lean_object*); lean_object* l___private_Lean_Elab_Print_3__mkHeader___closed__9; lean_object* l_List_foldlM___main___at___private_Lean_Elab_Print_7__printInduct___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_10__printAxiomsOf___closed__5; uint8_t l_Array_isEmpty___rarg(lean_object*); lean_object* l___private_Lean_Elab_Print_10__printAxiomsOf(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l_Lean_Elab_Command_elabPrintAxioms___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_3__mkHeader___closed__4; extern lean_object* l_Lean_NameSet_empty; lean_object* l_Lean_ConstantInfo_type(lean_object*); +lean_object* l_Lean_resolveGlobalName___at___private_Lean_Elab_Print_9__printId___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_3__mkHeader(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___at___private_Lean_Elab_Print_9__printId___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_3__mkHeader___closed__5; +lean_object* l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Syntax_getNumArgs(lean_object*); +lean_object* l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3(lean_object*); lean_object* l___private_Lean_Elab_Print_6__printQuot___boxed(lean_object*); lean_object* l___private_Lean_Elab_Print_3__mkHeader___closed__3; lean_object* l___private_Lean_Elab_Print_10__printAxiomsOf___closed__1; @@ -118,25 +121,30 @@ lean_object* l_Array_toList___rarg(lean_object*); lean_object* l___private_Lean_Elab_Print_8__printIdCore___closed__3; lean_object* l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_TagDeclarationExtension_isTagged(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main___closed__2; lean_object* l___private_Lean_Elab_Print_1__throwUnknownId(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CollectAxioms_collect___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabPrint___closed__3; lean_object* l_Lean_Elab_Command_elabPrint___closed__5; -lean_object* l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_7__printInduct(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_List_forM___main___at_Lean_Elab_Command_elabPrintAxioms___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_7__printInduct___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_resolveGlobalConst___spec__2(lean_object*); lean_object* l___private_Lean_Elab_Print_7__printInduct___closed__1; +lean_object* l_Lean_resolveGlobalName___at___private_Lean_Elab_Print_9__printId___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getUsedConstants(lean_object*); extern lean_object* l_System_FilePath_dirName___closed__1; +uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_Lean_getConstInfo___at___private_Lean_Elab_Print_7__printInduct___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_getScope___rarg(lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_10__printAxiomsOf___closed__6; lean_object* l___private_Lean_Elab_Print_2__lparamsToMessageData___closed__3; -lean_object* l_Lean_Elab_Command_resolveId(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_8__printIdCore___closed__2; lean_object* l___private_Lean_Elab_Print_8__printIdCore___closed__6; lean_object* l___private_Lean_Elab_Print_6__printQuot___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -144,6 +152,7 @@ lean_object* l_List_foldl___main___at___private_Lean_Elab_Print_2__lparamsToMess lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_withLogging___spec__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_7__printInduct___closed__3; extern lean_object* l_Lean_Elab_Modifiers_hasFormat___closed__4; +lean_object* l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Print_10__printAxiomsOf___closed__3; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); uint8_t l_Lean_Syntax_isIdent(lean_object*); @@ -161,7 +170,7 @@ x_9 = l_Lean_Elab_Term_resolveName___closed__3; x_10 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); -x_11 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_11 = l_Lean_throwUnknownConstant___rarg___closed__5; x_12 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); @@ -935,11 +944,11 @@ lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean lean_free_object(x_5); x_11 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_11, 0, x_1); -x_12 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_12 = l_Lean_throwUnknownConstant___rarg___closed__3; x_13 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_13, 0, x_12); lean_ctor_set(x_13, 1, x_11); -x_14 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_14 = l_Lean_throwUnknownConstant___rarg___closed__5; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_13); lean_ctor_set(x_15, 1, x_14); @@ -976,11 +985,11 @@ if (lean_obj_tag(x_21) == 0) lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_22 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_22, 0, x_1); -x_23 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_23 = l_Lean_throwUnknownConstant___rarg___closed__3; x_24 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_22); -x_25 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_25 = l_Lean_throwUnknownConstant___rarg___closed__5; x_26 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_25); @@ -1488,27 +1497,192 @@ lean_dec(x_3); return x_5; } } -lean_object* l_Lean_Elab_Command_resolveId(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_resolveGlobalName___at___private_Lean_Elab_Print_9__printId___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_5; lean_object* x_6; lean_object* x_7; +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_5 = lean_st_ref_get(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 = lean_ctor_get(x_6, 0); +lean_inc(x_8); +lean_dec(x_6); +x_9 = l_Lean_Elab_Command_getScope___rarg(x_3, x_7); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_ctor_get(x_10, 3); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_Elab_Command_getScope___rarg(x_3, x_11); +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_13, 0); +x_16 = lean_ctor_get(x_15, 4); +lean_inc(x_16); +lean_dec(x_15); +x_17 = l_Lean_ResolveName_resolveGlobalName(x_8, x_12, x_16, x_1); +lean_dec(x_12); +lean_ctor_set(x_13, 0, x_17); +return x_13; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_18 = lean_ctor_get(x_13, 0); +x_19 = lean_ctor_get(x_13, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_13); +x_20 = lean_ctor_get(x_18, 4); +lean_inc(x_20); +lean_dec(x_18); +x_21 = l_Lean_ResolveName_resolveGlobalName(x_8, x_12, x_20, x_1); +lean_dec(x_12); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_19); +return x_22; +} +} +} +lean_object* l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_5 = lean_box(0); -x_6 = lean_alloc_closure((void*)(l_Lean_Elab_Term_resolveGlobalConst___boxed), 8, 1); -lean_closure_set(x_6, 0, x_1); -x_7 = l_Lean_Elab_Command_liftTermElabM___rarg(x_5, x_6, x_2, x_3, x_4); -return x_7; +x_6 = l_Lean_mkConst(x_1, x_5); +x_7 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_7, 0, x_6); +x_8 = l_Lean_throwUnknownConstant___rarg___closed__3; +x_9 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_7); +x_10 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_11 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_11, 0, x_9); +lean_ctor_set(x_11, 1, x_10); +x_12 = l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(x_11, x_2, x_3, x_4); +return x_12; } } -lean_object* l_Lean_Elab_Command_resolveId___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3(lean_object* x_1) { _start: { -lean_object* x_5; -x_5 = l_Lean_Elab_Command_resolveId(x_1, x_2, x_3, x_4); -lean_dec(x_3); +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* l_Lean_resolveGlobalConst___at___private_Lean_Elab_Print_9__printId___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +lean_inc(x_1); +x_5 = l_Lean_resolveGlobalName___at___private_Lean_Elab_Print_9__printId___spec__2(x_1, x_2, x_3, x_4); +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_ctor_get(x_5, 1); +x_9 = lean_box(0); +x_10 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_7, x_9); +x_11 = l_List_isEmpty___rarg(x_10); +if (x_11 == 0) +{ +lean_object* x_12; +lean_dec(x_2); +lean_dec(x_1); +x_12 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_10); +lean_ctor_set(x_5, 0, x_12); return x_5; } +else +{ +lean_object* x_13; uint8_t x_14; +lean_dec(x_10); +lean_free_object(x_5); +x_13 = l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3___rarg(x_1, x_2, x_3, x_8); +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +return x_13; } -lean_object* l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_13, 0); +x_16 = lean_ctor_get(x_13, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_13); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +return x_17; +} +} +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; +x_18 = lean_ctor_get(x_5, 0); +x_19 = lean_ctor_get(x_5, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_5); +x_20 = lean_box(0); +x_21 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_18, x_20); +x_22 = l_List_isEmpty___rarg(x_21); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; +lean_dec(x_2); +lean_dec(x_1); +x_23 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_21); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_19); +return x_24; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_dec(x_21); +x_25 = l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3___rarg(x_1, x_2, x_3, x_19); +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +if (lean_is_exclusive(x_25)) { + lean_ctor_release(x_25, 0); + lean_ctor_release(x_25, 1); + x_28 = x_25; +} else { + lean_dec_ref(x_25); + x_28 = lean_box(0); +} +if (lean_is_scalar(x_28)) { + x_29 = lean_alloc_ctor(1, 2, 0); +} else { + x_29 = x_28; +} +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_27); +return x_29; +} +} +} +} +lean_object* l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_1) == 0) @@ -1573,7 +1747,7 @@ _start: { lean_object* x_5; lean_inc(x_2); -x_5 = l_Lean_Elab_Command_resolveId(x_1, x_2, x_3, x_4); +x_5 = l_Lean_resolveGlobalConst___at___private_Lean_Elab_Print_9__printId___spec__1(x_1, x_2, x_3, x_4); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; lean_object* x_8; @@ -1582,7 +1756,7 @@ lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); lean_dec(x_5); -x_8 = l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__1(x_6, x_2, x_3, x_7); +x_8 = l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__4(x_6, x_2, x_3, x_7); return x_8; } else @@ -1610,11 +1784,39 @@ return x_12; } } } -lean_object* l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_resolveGlobalName___at___private_Lean_Elab_Print_9__printId___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; -x_5 = l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__1(x_1, x_2, x_3, x_4); +x_5 = l_Lean_resolveGlobalName___at___private_Lean_Elab_Print_9__printId___spec__2(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_5; +} +} +lean_object* l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_throwUnknownConstant___at___private_Lean_Elab_Print_9__printId___spec__3___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_resolveGlobalConst___at___private_Lean_Elab_Print_9__printId___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_resolveGlobalConst___at___private_Lean_Elab_Print_9__printId___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_List_forM___main___at___private_Lean_Elab_Print_9__printId___spec__4(x_1, x_2, x_3, x_4); lean_dec(x_3); return x_5; } @@ -2332,7 +2534,7 @@ if (x_13 == 0) lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; lean_object* x_25; x_14 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_14, 0, x_1); -x_15 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_15 = l_Lean_throwUnknownConstant___rarg___closed__5; x_16 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); @@ -2360,7 +2562,7 @@ lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean lean_dec(x_12); x_26 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_26, 0, x_1); -x_27 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_27 = l_Lean_throwUnknownConstant___rarg___closed__5; x_28 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_26); @@ -2423,7 +2625,7 @@ x_6 = l_Lean_Syntax_getArg(x_1, x_5); x_7 = l_Lean_Syntax_getId(x_6); lean_dec(x_6); lean_inc(x_2); -x_8 = l_Lean_Elab_Command_resolveId(x_7, x_2, x_3, x_4); +x_8 = l_Lean_resolveGlobalConst___at___private_Lean_Elab_Print_9__printId___spec__1(x_7, x_2, x_3, x_4); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; lean_object* x_11; diff --git a/stage0/stdlib/Lean/Elab/Quotation.c b/stage0/stdlib/Lean/Elab/Quotation.c index 84b63cea5d..fd45fc272e 100644 --- a/stage0/stdlib/Lean/Elab/Quotation.c +++ b/stage0/stdlib/Lean/Elab/Quotation.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Elab.Quotation -// Imports: Init Lean.Syntax Lean.Elab.ResolveName Lean.Elab.Term +// Imports: Init Lean.Syntax Lean.ResolveName Lean.Elab.Term #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -480,6 +480,7 @@ lean_object* l___private_Lean_Elab_Quotation_2__quoteSyntax___main___closed__52; lean_object* l_List_mapM___main___at___private_Lean_Elab_Quotation_6__compileStxMatch___main___spec__8___closed__6; lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); extern lean_object* l___kind_term____x40_Init_Data_ToString_Macro___hyg_2____closed__18; +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkCAppStx(lean_object*, lean_object*); extern lean_object* l_Lean_mkAppStx___closed__9; lean_object* l_List_filterAux___main___at___private_Lean_Elab_Quotation_6__compileStxMatch___main___spec__4(lean_object*, lean_object*, lean_object*); @@ -507,7 +508,6 @@ lean_object* l_Lean_Elab_Term_Quotation_elabMatchSyntax(lean_object*, lean_objec uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_Quotation_stxQuot_expand___closed__16; lean_object* l___private_Lean_Elab_Quotation_4__getHeadInfo___closed__4; -lean_object* l_Lean_Elab_Term_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_filterAux___main___at___private_Lean_Elab_Quotation_6__compileStxMatch___main___spec__9___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_Quotation_elabDoElemQuot(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Quotation_2__quoteSyntax___main___closed__63; @@ -2836,8 +2836,9 @@ x_267 = lean_ctor_get(x_1, 2); x_268 = lean_ctor_get(x_1, 3); x_269 = lean_ctor_get(x_1, 0); lean_dec(x_269); +lean_inc(x_2); lean_inc(x_267); -x_270 = l_Lean_Elab_Term_resolveGlobalName(x_267, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +x_270 = l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1(x_267, x_2, x_3, x_4, x_5, x_6, x_7, x_8); x_271 = lean_ctor_get(x_270, 0); lean_inc(x_271); x_272 = lean_ctor_get(x_270, 1); @@ -3176,8 +3177,9 @@ lean_inc(x_446); lean_inc(x_445); lean_inc(x_444); lean_dec(x_1); +lean_inc(x_2); lean_inc(x_445); -x_447 = l_Lean_Elab_Term_resolveGlobalName(x_445, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +x_447 = l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1(x_445, x_2, x_3, x_4, x_5, x_6, x_7, x_8); x_448 = lean_ctor_get(x_447, 0); lean_inc(x_448); x_449 = lean_ctor_get(x_447, 1); @@ -23506,7 +23508,7 @@ return x_14; } lean_object* initialize_Init(lean_object*); lean_object* initialize_Lean_Syntax(lean_object*); -lean_object* initialize_Lean_Elab_ResolveName(lean_object*); +lean_object* initialize_Lean_ResolveName(lean_object*); lean_object* initialize_Lean_Elab_Term(lean_object*); static bool _G_initialized = false; lean_object* initialize_Lean_Elab_Quotation(lean_object* w) { @@ -23519,7 +23521,7 @@ lean_dec_ref(res); res = initialize_Lean_Syntax(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = initialize_Lean_Elab_ResolveName(lean_io_mk_world()); +res = initialize_Lean_ResolveName(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); res = initialize_Lean_Elab_Term(lean_io_mk_world()); diff --git a/stage0/stdlib/Lean/Elab/ResolveName.c b/stage0/stdlib/Lean/Elab/ResolveName.c deleted file mode 100644 index 6a182e5c82..0000000000 --- a/stage0/stdlib/Lean/Elab/ResolveName.c +++ /dev/null @@ -1,1017 +0,0 @@ -// Lean compiler output -// Module: Lean.Elab.ResolveName -// Imports: Init Lean.Data.OpenDecl Lean.Hygiene Lean.Modifiers Lean.Elab.Alias -#include -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wunused-parameter" -#pragma clang diagnostic ignored "-Wunused-label" -#elif defined(__GNUC__) && !defined(__CLANG__) -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wunused-label" -#pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif -#ifdef __cplusplus -extern "C" { -#endif -lean_object* l_List_reverse___rarg(lean_object*); -lean_object* l_Lean_Elab_resolveNamespaceUsingScope(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_extractMacroScopes(lean_object*); -extern lean_object* l_Lean_rootNamespace; -uint8_t l_Lean_Environment_isNamespace(lean_object*, lean_object*); -lean_object* l_unreachable_x21___rarg(lean_object*); -lean_object* l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__4(lean_object*, lean_object*); -uint8_t lean_name_eq(lean_object*, lean_object*); -uint8_t l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_append___rarg(lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveGlobalName___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveNamespaceUsingScope___main(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveNamespaceUsingScope___main___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls___main(lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_Name_isAtomic(lean_object*); -uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); -extern lean_object* l_Lean_protectedExt; -lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveNamespace___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveNamespaceUsingScope___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_getAliases(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace___main___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Name_replacePrefix___main(lean_object*, lean_object*, lean_object*); -lean_object* l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__3(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_4__resolveOpenDecls___main(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_mkPrivateName(lean_object*, lean_object*); -lean_object* l_List_eraseDups___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__1(lean_object*); -lean_object* l_Lean_MacroScopesView_review(lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_4__resolveOpenDecls(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_3__resolveExact(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_1__resolveQualifiedName___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_TagDeclarationExtension_isTagged(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_1__resolveQualifiedName(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls___main___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_List_eraseDupsAux___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__2(lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace___main(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_resolveNamespace(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Lean_Elab_ResolveName_1__resolveQualifiedName(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_3); -x_4 = l_Lean_Name_append___main(x_2, x_3); -x_5 = l_Lean_getAliases(x_1, x_4); -lean_inc(x_1); -x_6 = l_Lean_Environment_contains(x_1, x_4); -if (x_6 == 0) -{ -lean_object* x_7; uint8_t x_8; -lean_dec(x_3); -lean_inc(x_1); -x_7 = l_Lean_mkPrivateName(x_1, x_4); -x_8 = l_Lean_Environment_contains(x_1, x_7); -if (x_8 == 0) -{ -lean_dec(x_7); -return x_5; -} -else -{ -lean_object* x_9; -x_9 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_9, 0, x_7); -lean_ctor_set(x_9, 1, x_5); -return x_9; -} -} -else -{ -uint8_t x_10; -x_10 = l_Lean_Name_isAtomic(x_3); -lean_dec(x_3); -if (x_10 == 0) -{ -lean_object* x_11; -lean_dec(x_1); -x_11 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_11, 0, x_4); -lean_ctor_set(x_11, 1, x_5); -return x_11; -} -else -{ -lean_object* x_12; uint8_t x_13; -x_12 = l_Lean_protectedExt; -x_13 = l_Lean_TagDeclarationExtension_isTagged(x_12, x_1, x_4); -if (x_13 == 0) -{ -lean_object* x_14; -lean_dec(x_1); -x_14 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_14, 0, x_4); -lean_ctor_set(x_14, 1, x_5); -return x_14; -} -else -{ -lean_object* x_15; uint8_t x_16; -lean_inc(x_1); -x_15 = l_Lean_mkPrivateName(x_1, x_4); -x_16 = l_Lean_Environment_contains(x_1, x_15); -if (x_16 == 0) -{ -lean_dec(x_15); -return x_5; -} -else -{ -lean_object* x_17; -x_17 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_5); -return x_17; -} -} -} -} -} -} -lean_object* l___private_Lean_Elab_ResolveName_1__resolveQualifiedName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l___private_Lean_Elab_ResolveName_1__resolveQualifiedName(x_1, x_2, x_3); -lean_dec(x_2); -return x_4; -} -} -lean_object* l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_3) == 1) -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_ctor_get(x_3, 0); -lean_inc(x_2); -lean_inc(x_1); -x_5 = l___private_Lean_Elab_ResolveName_1__resolveQualifiedName(x_1, x_3, x_2); -if (lean_obj_tag(x_5) == 0) -{ -x_3 = x_4; -goto _start; -} -else -{ -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -else -{ -lean_object* x_7; -lean_dec(x_2); -lean_dec(x_1); -x_7 = lean_box(0); -return x_7; -} -} -} -lean_object* l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace___main(x_1, x_2, x_3); -lean_dec(x_3); -return x_4; -} -} -lean_object* l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace___main(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace(x_1, x_2, x_3); -lean_dec(x_3); -return x_4; -} -} -lean_object* l___private_Lean_Elab_ResolveName_3__resolveExact(lean_object* x_1, lean_object* x_2) { -_start: -{ -uint8_t x_3; -x_3 = l_Lean_Name_isAtomic(x_2); -if (x_3 == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_4 = l_Lean_rootNamespace; -x_5 = lean_box(0); -x_6 = l_Lean_Name_replacePrefix___main(x_2, x_4, x_5); -lean_inc(x_1); -x_7 = l_Lean_Environment_contains(x_1, x_6); -if (x_7 == 0) -{ -lean_object* x_8; uint8_t x_9; -lean_inc(x_1); -x_8 = l_Lean_mkPrivateName(x_1, x_6); -x_9 = l_Lean_Environment_contains(x_1, x_8); -if (x_9 == 0) -{ -lean_object* x_10; -lean_dec(x_8); -x_10 = lean_box(0); -return x_10; -} -else -{ -lean_object* x_11; -x_11 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_11, 0, x_8); -return x_11; -} -} -else -{ -lean_object* x_12; -lean_dec(x_1); -x_12 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_12, 0, x_6); -return x_12; -} -} -else -{ -lean_object* x_13; -lean_dec(x_2); -lean_dec(x_1); -x_13 = lean_box(0); -return x_13; -} -} -} -lean_object* l___private_Lean_Elab_ResolveName_4__resolveOpenDecls___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -if (lean_obj_tag(x_3) == 0) -{ -lean_dec(x_2); -lean_dec(x_1); -return x_4; -} -else -{ -lean_object* x_5; -x_5 = lean_ctor_get(x_3, 0); -lean_inc(x_5); -if (lean_obj_tag(x_5) == 0) -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; -x_6 = lean_ctor_get(x_3, 1); -lean_inc(x_6); -lean_dec(x_3); -x_7 = lean_ctor_get(x_5, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_5, 1); -lean_inc(x_8); -lean_dec(x_5); -x_9 = l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(x_2, x_8); -lean_dec(x_8); -if (x_9 == 0) -{ -lean_object* x_10; lean_object* x_11; -lean_inc(x_2); -lean_inc(x_1); -x_10 = l___private_Lean_Elab_ResolveName_1__resolveQualifiedName(x_1, x_7, x_2); -lean_dec(x_7); -x_11 = l_List_append___rarg(x_10, x_4); -x_3 = x_6; -x_4 = x_11; -goto _start; -} -else -{ -lean_dec(x_7); -x_3 = x_6; -goto _start; -} -} -else -{ -uint8_t x_14; -x_14 = !lean_is_exclusive(x_3); -if (x_14 == 0) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; -x_15 = lean_ctor_get(x_3, 1); -x_16 = lean_ctor_get(x_3, 0); -lean_dec(x_16); -x_17 = lean_ctor_get(x_5, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_5, 1); -lean_inc(x_18); -lean_dec(x_5); -x_19 = lean_name_eq(x_2, x_17); -lean_dec(x_17); -if (x_19 == 0) -{ -lean_dec(x_18); -lean_free_object(x_3); -x_3 = x_15; -goto _start; -} -else -{ -lean_ctor_set(x_3, 1, x_4); -lean_ctor_set(x_3, 0, x_18); -{ -lean_object* _tmp_2 = x_15; -lean_object* _tmp_3 = x_3; -x_3 = _tmp_2; -x_4 = _tmp_3; -} -goto _start; -} -} -else -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; -x_22 = lean_ctor_get(x_3, 1); -lean_inc(x_22); -lean_dec(x_3); -x_23 = lean_ctor_get(x_5, 0); -lean_inc(x_23); -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); -lean_dec(x_5); -x_25 = lean_name_eq(x_2, x_23); -lean_dec(x_23); -if (x_25 == 0) -{ -lean_dec(x_24); -x_3 = x_22; -goto _start; -} -else -{ -lean_object* x_27; -x_27 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_27, 0, x_24); -lean_ctor_set(x_27, 1, x_4); -x_3 = x_22; -x_4 = x_27; -goto _start; -} -} -} -} -} -} -lean_object* l___private_Lean_Elab_ResolveName_4__resolveOpenDecls(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l___private_Lean_Elab_ResolveName_4__resolveOpenDecls___main(x_1, x_2, x_3, x_4); -return x_5; -} -} -lean_object* l_List_eraseDupsAux___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__2(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_3; -x_3 = l_List_reverse___rarg(x_2); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_1); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_5 = lean_ctor_get(x_1, 0); -x_6 = lean_ctor_get(x_1, 1); -x_7 = l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(x_5, x_2); -if (x_7 == 0) -{ -lean_ctor_set(x_1, 1, x_2); -{ -lean_object* _tmp_0 = x_6; -lean_object* _tmp_1 = x_1; -x_1 = _tmp_0; -x_2 = _tmp_1; -} -goto _start; -} -else -{ -lean_free_object(x_1); -lean_dec(x_5); -x_1 = x_6; -goto _start; -} -} -else -{ -lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_10 = lean_ctor_get(x_1, 0); -x_11 = lean_ctor_get(x_1, 1); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_1); -x_12 = l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(x_10, x_2); -if (x_12 == 0) -{ -lean_object* x_13; -x_13 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_13, 0, x_10); -lean_ctor_set(x_13, 1, x_2); -x_1 = x_11; -x_2 = x_13; -goto _start; -} -else -{ -lean_dec(x_10); -x_1 = x_11; -goto _start; -} -} -} -} -} -lean_object* l_List_eraseDups___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__1(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = lean_box(0); -x_3 = l_List_eraseDupsAux___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__2(x_1, x_2); -return x_3; -} -} -lean_object* l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__3(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_3; -lean_dec(x_1); -x_3 = lean_box(0); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_2); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_5 = lean_ctor_get(x_2, 0); -x_6 = lean_ctor_get(x_2, 1); -lean_inc(x_1); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_5); -lean_ctor_set(x_7, 1, x_1); -x_8 = l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__3(x_1, x_6); -lean_ctor_set(x_2, 1, x_8); -lean_ctor_set(x_2, 0, x_7); -return x_2; -} -else -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_9 = lean_ctor_get(x_2, 0); -x_10 = lean_ctor_get(x_2, 1); -lean_inc(x_10); -lean_inc(x_9); -lean_dec(x_2); -lean_inc(x_1); -x_11 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_11, 0, x_9); -lean_ctor_set(x_11, 1, x_1); -x_12 = l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__3(x_1, x_10); -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* l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__4(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_3; -lean_dec(x_1); -x_3 = lean_box(0); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_2); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_5 = lean_ctor_get(x_2, 0); -x_6 = lean_ctor_get(x_2, 1); -lean_inc(x_1); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_5); -lean_ctor_set(x_7, 1, x_1); -x_8 = l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__4(x_1, x_6); -lean_ctor_set(x_2, 1, x_8); -lean_ctor_set(x_2, 0, x_7); -return x_2; -} -else -{ -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_9 = lean_ctor_get(x_2, 0); -x_10 = lean_ctor_get(x_2, 1); -lean_inc(x_10); -lean_inc(x_9); -lean_dec(x_2); -lean_inc(x_1); -x_11 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_11, 0, x_9); -lean_ctor_set(x_11, 1, x_1); -x_12 = l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__4(x_1, x_10); -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* l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main(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: -{ -if (lean_obj_tag(x_5) == 1) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_7 = lean_ctor_get(x_5, 0); -lean_inc(x_7); -x_8 = lean_ctor_get(x_5, 1); -lean_inc(x_8); -x_9 = lean_ctor_get(x_4, 1); -x_10 = lean_ctor_get(x_4, 2); -x_11 = lean_ctor_get(x_4, 3); -lean_inc(x_11); -lean_inc(x_10); -lean_inc(x_9); -x_12 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_12, 0, x_5); -lean_ctor_set(x_12, 1, x_9); -lean_ctor_set(x_12, 2, x_10); -lean_ctor_set(x_12, 3, x_11); -x_13 = l_Lean_MacroScopesView_review(x_12); -lean_inc(x_13); -lean_inc(x_1); -x_14 = l___private_Lean_Elab_ResolveName_2__resolveUsingNamespace___main(x_1, x_13, x_2); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; -lean_inc(x_13); -lean_inc(x_1); -x_15 = l___private_Lean_Elab_ResolveName_3__resolveExact(x_1, x_13); -if (lean_obj_tag(x_15) == 0) -{ -uint8_t x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; -lean_inc(x_1); -x_16 = l_Lean_Environment_contains(x_1, x_13); -lean_inc(x_13); -lean_inc(x_1); -x_17 = l_Lean_mkPrivateName(x_1, x_13); -lean_inc(x_1); -x_18 = l_Lean_Environment_contains(x_1, x_17); -x_19 = l_Lean_getAliases(x_1, x_13); -if (x_16 == 0) -{ -if (x_18 == 0) -{ -lean_object* x_26; lean_object* x_27; -lean_dec(x_17); -lean_inc(x_3); -lean_inc(x_1); -x_26 = l___private_Lean_Elab_ResolveName_4__resolveOpenDecls___main(x_1, x_13, x_3, x_14); -x_27 = l_List_append___rarg(x_19, x_26); -x_20 = x_27; -goto block_25; -} -else -{ -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_28 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_28, 0, x_17); -lean_ctor_set(x_28, 1, x_14); -x_29 = l_List_append___rarg(x_28, x_14); -lean_inc(x_3); -lean_inc(x_1); -x_30 = l___private_Lean_Elab_ResolveName_4__resolveOpenDecls___main(x_1, x_13, x_3, x_29); -x_31 = l_List_append___rarg(x_19, x_30); -x_20 = x_31; -goto block_25; -} -} -else -{ -lean_object* x_32; -lean_inc(x_13); -x_32 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_32, 0, x_13); -lean_ctor_set(x_32, 1, x_14); -if (x_18 == 0) -{ -lean_object* x_33; lean_object* x_34; -lean_dec(x_17); -lean_inc(x_3); -lean_inc(x_1); -x_33 = l___private_Lean_Elab_ResolveName_4__resolveOpenDecls___main(x_1, x_13, x_3, x_32); -x_34 = l_List_append___rarg(x_19, x_33); -x_20 = x_34; -goto block_25; -} -else -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_35 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_35, 0, x_17); -lean_ctor_set(x_35, 1, x_14); -x_36 = l_List_append___rarg(x_35, x_32); -lean_inc(x_3); -lean_inc(x_1); -x_37 = l___private_Lean_Elab_ResolveName_4__resolveOpenDecls___main(x_1, x_13, x_3, x_36); -x_38 = l_List_append___rarg(x_19, x_37); -x_20 = x_38; -goto block_25; -} -} -block_25: -{ -if (lean_obj_tag(x_20) == 0) -{ -lean_object* x_21; -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_8); -lean_ctor_set(x_21, 1, x_6); -x_5 = x_7; -x_6 = x_21; -goto _start; -} -else -{ -lean_object* x_23; lean_object* x_24; -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_3); -lean_dec(x_1); -x_23 = l_List_eraseDups___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__1(x_20); -x_24 = l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__3(x_6, x_23); -return x_24; -} -} -} -else -{ -lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; -lean_dec(x_13); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_3); -lean_dec(x_1); -x_39 = lean_ctor_get(x_15, 0); -lean_inc(x_39); -lean_dec(x_15); -x_40 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_6); -x_41 = lean_box(0); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_40); -lean_ctor_set(x_42, 1, x_41); -return x_42; -} -} -else -{ -lean_object* x_43; lean_object* x_44; -lean_dec(x_13); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_3); -lean_dec(x_1); -x_43 = l_List_eraseDups___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__1(x_14); -x_44 = l_List_map___main___at___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main___spec__4(x_6, x_43); -return x_44; -} -} -else -{ -lean_object* x_45; -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_3); -lean_dec(x_1); -x_45 = lean_box(0); -return x_45; -} -} -} -lean_object* l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___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: -{ -lean_object* x_7; -x_7 = l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_2); -return x_7; -} -} -lean_object* l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main(x_1, x_2, x_3, x_4, x_5, x_6); -return x_7; -} -} -lean_object* l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); -lean_dec(x_2); -return x_7; -} -} -lean_object* l_Lean_Elab_resolveGlobalName(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_5 = l_Lean_extractMacroScopes(x_4); -x_6 = lean_ctor_get(x_5, 0); -lean_inc(x_6); -x_7 = lean_box(0); -x_8 = l___private_Lean_Elab_ResolveName_5__resolveGlobalNameAux___main(x_1, x_2, x_3, x_5, x_6, x_7); -lean_dec(x_5); -return x_8; -} -} -lean_object* l_Lean_Elab_resolveGlobalName___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_resolveGlobalName(x_1, x_2, x_3, x_4); -lean_dec(x_2); -return x_5; -} -} -lean_object* l_Lean_Elab_resolveNamespaceUsingScope___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -switch (lean_obj_tag(x_3)) { -case 0: -{ -lean_object* x_4; -lean_dec(x_2); -x_4 = lean_box(0); -return x_4; -} -case 1: -{ -lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_5 = lean_ctor_get(x_3, 0); -lean_inc(x_2); -x_6 = l_Lean_Name_append___main(x_3, x_2); -x_7 = l_Lean_Environment_isNamespace(x_1, x_6); -if (x_7 == 0) -{ -lean_dec(x_6); -x_3 = x_5; -goto _start; -} -else -{ -lean_object* x_9; -lean_dec(x_2); -x_9 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_9, 0, x_6); -return x_9; -} -} -default: -{ -lean_object* x_10; lean_object* x_11; -lean_dec(x_2); -x_10 = lean_box(0); -x_11 = l_unreachable_x21___rarg(x_10); -return x_11; -} -} -} -} -lean_object* l_Lean_Elab_resolveNamespaceUsingScope___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_resolveNamespaceUsingScope___main(x_1, x_2, x_3); -lean_dec(x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_Lean_Elab_resolveNamespaceUsingScope(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_resolveNamespaceUsingScope___main(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_Elab_resolveNamespaceUsingScope___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_resolveNamespaceUsingScope(x_1, x_2, x_3); -lean_dec(x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -if (lean_obj_tag(x_3) == 0) -{ -lean_object* x_4; -lean_dec(x_2); -x_4 = lean_box(0); -return x_4; -} -else -{ -lean_object* x_5; -x_5 = lean_ctor_get(x_3, 0); -if (lean_obj_tag(x_5) == 0) -{ -lean_object* x_6; -x_6 = lean_ctor_get(x_5, 1); -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_7 = lean_ctor_get(x_3, 1); -x_8 = lean_ctor_get(x_5, 0); -lean_inc(x_2); -x_9 = l_Lean_Name_append___main(x_8, x_2); -x_10 = l_Lean_Environment_isNamespace(x_1, x_9); -if (x_10 == 0) -{ -lean_dec(x_9); -x_3 = x_7; -goto _start; -} -else -{ -lean_object* x_12; -lean_dec(x_2); -x_12 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_12, 0, x_9); -return x_12; -} -} -else -{ -lean_object* x_13; -x_13 = lean_ctor_get(x_3, 1); -x_3 = x_13; -goto _start; -} -} -else -{ -lean_object* x_15; -x_15 = lean_ctor_get(x_3, 1); -x_3 = x_15; -goto _start; -} -} -} -} -lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_resolveNamespaceUsingOpenDecls___main(x_1, x_2, x_3); -lean_dec(x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_resolveNamespaceUsingOpenDecls___main(x_1, x_2, x_3); -return x_4; -} -} -lean_object* l_Lean_Elab_resolveNamespaceUsingOpenDecls___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_resolveNamespaceUsingOpenDecls(x_1, x_2, x_3); -lean_dec(x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_Lean_Elab_resolveNamespace(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; -x_5 = l_Lean_Environment_isNamespace(x_1, x_4); -if (x_5 == 0) -{ -lean_object* x_6; -lean_inc(x_4); -x_6 = l_Lean_Elab_resolveNamespaceUsingScope___main(x_1, x_4, x_2); -if (lean_obj_tag(x_6) == 0) -{ -lean_object* x_7; -x_7 = l_Lean_Elab_resolveNamespaceUsingOpenDecls___main(x_1, x_4, x_3); -return x_7; -} -else -{ -lean_dec(x_4); -return x_6; -} -} -else -{ -lean_object* x_8; -x_8 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_8, 0, x_4); -return x_8; -} -} -} -lean_object* l_Lean_Elab_resolveNamespace___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_resolveNamespace(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -return x_5; -} -} -lean_object* initialize_Init(lean_object*); -lean_object* initialize_Lean_Data_OpenDecl(lean_object*); -lean_object* initialize_Lean_Hygiene(lean_object*); -lean_object* initialize_Lean_Modifiers(lean_object*); -lean_object* initialize_Lean_Elab_Alias(lean_object*); -static bool _G_initialized = false; -lean_object* initialize_Lean_Elab_ResolveName(lean_object* w) { -lean_object * res; -if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); -_G_initialized = true; -res = initialize_Init(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Lean_Data_OpenDecl(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Lean_Hygiene(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Lean_Modifiers(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Lean_Elab_Alias(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -return lean_io_result_mk_ok(lean_box(0)); -} -#ifdef __cplusplus -} -#endif diff --git a/stage0/stdlib/Lean/Elab/StructInst.c b/stage0/stdlib/Lean/Elab/StructInst.c index e9557c8f3e..d240f7c76b 100644 --- a/stage0/stdlib/Lean/Elab/StructInst.c +++ b/stage0/stdlib/Lean/Elab/StructInst.c @@ -240,7 +240,6 @@ lean_object* l_Lean_Elab_Term_StructInst_DefaultFields_mkDefaultValue_x3f___boxe lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Std_mkHashMapImp___rarg(lean_object*); lean_object* l_List_mapM___main___at___private_Lean_Elab_StructInst_10__expandParentFields___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; extern lean_object* l_Array_myMacro____x40_Init_Data_Array_Macros___hyg_464____closed__6; lean_object* l_Lean_Elab_Term_StructInst_DefaultFields_propagateLoop___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_StructInst_17__groupFields___lambda__1(lean_object*); @@ -299,6 +298,7 @@ uint8_t l_Lean_Elab_Term_StructInst_Struct_allDefault___main(lean_object*); lean_object* l_Std_HashMapImp_insert___at___private_Lean_Elab_StructInst_12__mkFieldMap___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_StructInst_DefaultFields_tryToSynthesizeDefaultAux___main___closed__2; lean_object* l_Lean_Elab_Term_StructInst_Struct_hasFormat___closed__1; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; extern lean_object* l___private_Lean_Elab_App_19__elabAppLValsAux___main___closed__1; lean_object* l_Lean_Elab_Term_StructInst_DefaultFields_reduce(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkAppStx___closed__6; @@ -12328,7 +12328,7 @@ lean_dec(x_13); lean_dec(x_2); x_40 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_40, 0, x_37); -x_41 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_41 = l_Lean_throwUnknownConstant___rarg___closed__5; x_42 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_42, 0, x_41); lean_ctor_set(x_42, 1, x_40); @@ -13801,7 +13801,7 @@ lean_ctor_set(x_18, 0, x_1); x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); -x_20 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_20 = l_Lean_throwUnknownConstant___rarg___closed__5; x_21 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_21, 0, x_19); lean_ctor_set(x_21, 1, x_20); diff --git a/stage0/stdlib/Lean/Elab/Structure.c b/stage0/stdlib/Lean/Elab/Structure.c index a5917a4b62..4a2aceacae 100644 --- a/stage0/stdlib/Lean/Elab/Structure.c +++ b/stage0/stdlib/Lean/Elab/Structure.c @@ -188,7 +188,6 @@ lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_checkValidFieldModifier___closed__15; lean_object* l___private_Lean_Elab_Structure_18__levelMVarToParamAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_inferType___at___private_Lean_Elab_Structure_16__levelMVarToParamFVar___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Meta_withLetDecl___at_Lean_Elab_Term_elabLetDeclAux___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabStructure___closed__4; lean_object* l_Lean_Meta_mkAuxDefinition___at___private_Lean_Elab_Structure_30__addDefaults___spec__2(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -216,6 +215,7 @@ lean_object* l___private_Lean_Elab_Structure_5__checkParentIsStructure(lean_obje lean_object* l_Lean_Elab_Command_StructFieldInfo_isSubobject___boxed(lean_object*); lean_object* l_Array_umapMAux___main___at___private_Lean_Elab_Structure_31__elabStructureView___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Level_getOffsetAux___main(lean_object*, lean_object*); lean_object* l_Lean_Meta_getLocalInstances___at_Lean_Elab_Term_removeUnused___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Structure_8__processSubfields___main___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -8889,7 +8889,7 @@ x_19 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_19, 0, x_18); x_20 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_20, 0, x_19); -x_21 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_21 = l_Lean_throwUnknownConstant___rarg___closed__5; x_22 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_20); @@ -8946,7 +8946,7 @@ x_36 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_36, 0, x_35); x_37 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_37, 0, x_36); -x_38 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_38 = l_Lean_throwUnknownConstant___rarg___closed__5; x_39 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_37); diff --git a/stage0/stdlib/Lean/Elab/Syntax.c b/stage0/stdlib/Lean/Elab/Syntax.c index a0134ec85e..7491297931 100644 --- a/stage0/stdlib/Lean/Elab/Syntax.c +++ b/stage0/stdlib/Lean/Elab/Syntax.c @@ -64,6 +64,7 @@ lean_object* l_Lean_Elab_Command_expandMixfix___closed__14; lean_object* l_Lean_Elab_Command_expandMacroArgIntoSyntaxItem(lean_object*, lean_object*, lean_object*); lean_object* l_unreachable_x21___rarg(lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__4; +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__26; lean_object* l_Lean_Elab_Command_expandMacroArgIntoSyntaxItem___closed__2; @@ -97,6 +98,7 @@ lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__5; extern lean_object* l_Lean_Elab_throwUnsupportedSyntax___rarg___closed__1; uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandElab___closed__12; +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_Macro_mkFreshKind(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandMixfix___closed__6; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__104; @@ -313,7 +315,6 @@ lean_object* l_Lean_Elab_Command_expandMixfix___closed__27; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__3; lean_object* l_Lean_Syntax_isStrLit_x3f(lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__6; -lean_object* l_Lean_Elab_Term_resolveGlobalConst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandMacroArgIntoPattern___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__14; lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); @@ -346,7 +347,6 @@ lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__32; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__10; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__167; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__1; lean_object* l_Lean_Elab_Command_elabMacroRules___closed__1; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__160; @@ -399,7 +399,6 @@ lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__16; extern lean_object* l_Lean_Parser_regTermParserAttribute___closed__2; lean_object* l___regBuiltin_Lean_Elab_Command_expandMacro(lean_object*); lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___closed__2; -lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Syntax_11__regTraceClasses(lean_object*); lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_checkLeftRec___closed__2; @@ -411,6 +410,7 @@ lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___boxed(lean_object*, l lean_object* l___private_Lean_Elab_Syntax_7__elabKindPrio___closed__8; lean_object* l_Lean_Elab_Command_withExpectedType___closed__2; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__93; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__121; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__153; lean_object* l___private_Lean_Elab_Syntax_7__elabKindPrio___closed__4; @@ -423,6 +423,7 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__89; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__47; lean_object* l_Lean_Elab_Term_toParserDescrAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__5; +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__14; lean_object* l_Nat_pred(lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__18; @@ -440,10 +441,12 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__25; lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntax___closed__3; extern lean_object* l_Lean_Elab_Term_expandArrayLit___closed__8; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l_Lean_Elab_Command_expandElab___closed__23; lean_object* l___private_Lean_Elab_Syntax_10__expandNotationAux___closed__2; lean_object* l_Lean_Elab_Command_expandMixfix___closed__19; lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__42; +lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Syntax_10__expandNotationAux___closed__1; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__52; lean_object* l_Lean_Elab_Command_expandMixfix___closed__11; @@ -485,7 +488,6 @@ lean_object* l___private_Lean_Elab_Syntax_10__expandNotationAux___closed__4; extern lean_object* l_Lean_nullKind___closed__2; lean_object* l_Lean_Elab_Command_expandMixfix(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandElab___closed__41; -lean_object* l_Lean_Elab_Command_getCurrNamespace___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed__7; lean_object* l_Lean_mkAtomFrom(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabSyntaxAbbrev___closed__1; @@ -504,6 +506,7 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__126; uint8_t l_Lean_Name_hasMacroScopes___main(lean_object*); lean_object* l_Lean_Parser_registerParserCategory(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__63; +lean_object* l_List_filterAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__5(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_resetMessageLog(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandMixfix___closed__4; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__157; @@ -515,6 +518,7 @@ lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed extern lean_object* l_Bool_HasRepr___closed__1; extern lean_object* l_Lean_Syntax_inhabited; lean_object* l_Lean_Elab_Command_elabNoKindMacroRulesAux___closed__5; +lean_object* l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(lean_object*, lean_object*); extern lean_object* l___private_Lean_Elab_Binders_12__expandFunBindersAux___main___closed__16; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__102; lean_object* l_Lean_Macro_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -550,6 +554,7 @@ uint8_t l_Lean_Syntax_hasArgs(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__166; lean_object* l___private_Lean_Elab_Util_5__expandMacro_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandMixfix___closed__17; +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_toParserDescrAux___main___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Parser_isParserCategory(lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_elabLetDeclCore___closed__6; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__125; @@ -572,6 +577,7 @@ lean_object* l_Lean_Elab_Command_expandElab___closed__34; extern lean_object* l_Lean_Parser_categoryParserFnImpl___closed__3; lean_object* l_Lean_Syntax_getKind(lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__24; +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Term_toParserDescrAux___main___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_findMAux___main___at_Lean_Elab_Command_elabMacroRulesAux___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandElab___closed__48; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__48; @@ -642,7 +648,6 @@ lean_object* l___private_Lean_Elab_Syntax_6__declareSyntaxCatQuotParser___closed lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__131; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__27; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__17; -lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__21; extern lean_object* l_Lean_mkOptionalNode___closed__1; lean_object* l_Lean_Elab_Command_expandMixfix___closed__16; @@ -658,7 +663,7 @@ extern lean_object* l___private_Lean_Elab_Util_2__evalSyntaxConstantUnsafe___clo lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__122; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__139; lean_object* l_Lean_throwError___at___private_Lean_Elab_Command_3__elabCommandUsing___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_filterAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Term_toParserDescrAux___main___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_expandOptPrecedence(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__94; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__8; @@ -683,6 +688,7 @@ lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__147; lean_object* l_Lean_Elab_Command_expandElab___closed__9; lean_object* l_Array_iterateMAux___main___at___private_Lean_Elab_Syntax_1__mkParserSeq___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__84; +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandElab(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Syntax_9__antiquote(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_expandElab___closed__40; @@ -708,6 +714,7 @@ lean_object* l_Lean_Elab_Command_elabMacroRulesAux(lean_object*, lean_object*, l lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__6; extern lean_object* l_Lean_mkOptionalNode___closed__2; lean_object* l_Lean_Elab_Command_expandElab___closed__19; +lean_object* l_List_map___main___at_Lean_resolveGlobalConst___spec__2(lean_object*); lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__19; lean_object* l_Lean_Elab_Command_expandElab___closed__44; lean_object* lean_nat_mod(lean_object*, lean_object*); @@ -716,6 +723,7 @@ lean_object* l_Lean_Elab_Command_expandElab___closed__8; lean_object* l_Lean_Elab_Command_expandMixfix___closed__20; lean_object* l___private_Lean_Elab_Syntax_9__antiquote___main___closed__3; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__11; +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__177; lean_object* l_Lean_Elab_Command_expandElab___closed__6; extern lean_object* l_Lean_Meta_DiscrTree_Trie_format___main___rarg___closed__1; @@ -733,10 +741,13 @@ lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__164; lean_object* l_Lean_Elab_Command_expandMacroHeadIntoSyntaxItem(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_mkAntiquot___closed__8; +uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l___private_Lean_Elab_Syntax_3__withNotFirst___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__170; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__1; lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_toParserDescrAux___main___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_getScope___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__106; extern lean_object* l_Lean_Elab_mkMacroAttribute___closed__8; lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__158; @@ -769,6 +780,7 @@ lean_object* l_Lean_Elab_Command_expandMixfix___closed__26; lean_object* l___private_Init_LeanInit_17__mapSepElemsMAux___main___at_Lean_Elab_Command_elabMacroRulesAux___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_mkParserOfConstantUnsafe___closed__5; lean_object* l_Lean_Elab_Command_elabMacroRulesAux___closed__2; +lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_List_head_x21___at_Lean_Elab_Command_Lean_MonadOptions___spec__1(lean_object*); lean_object* l_Lean_Elab_Term_toParserDescrAux___main___closed__44; lean_object* l___private_Lean_Elab_Syntax_1__mkParserSeq___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1701,7 +1713,187 @@ x_9 = lean_alloc_closure((void*)(l_Lean_Elab_throwUnsupportedSyntax___at_Lean_El return x_9; } } -lean_object* l_List_filterAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_toParserDescrAux___main___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; uint8_t x_12; +x_11 = lean_st_ref_get(x_9, x_10); +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_13 = lean_ctor_get(x_11, 0); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +lean_dec(x_13); +x_15 = lean_ctor_get(x_4, 2); +lean_inc(x_15); +x_16 = lean_ctor_get(x_4, 5); +lean_inc(x_16); +lean_dec(x_4); +x_17 = l_Lean_ResolveName_resolveGlobalName(x_14, x_15, x_16, x_1); +lean_dec(x_15); +lean_ctor_set(x_11, 0, x_17); +return x_11; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_18 = lean_ctor_get(x_11, 0); +x_19 = lean_ctor_get(x_11, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_11); +x_20 = lean_ctor_get(x_18, 0); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_ctor_get(x_4, 2); +lean_inc(x_21); +x_22 = lean_ctor_get(x_4, 5); +lean_inc(x_22); +lean_dec(x_4); +x_23 = l_Lean_ResolveName_resolveGlobalName(x_20, x_21, x_22, x_1); +lean_dec(x_21); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_19); +return x_24; +} +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4___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, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +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_11 = lean_box(0); +x_12 = l_Lean_mkConst(x_1, x_11); +x_13 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_13, 0, x_12); +x_14 = l_Lean_throwUnknownConstant___rarg___closed__3; +x_15 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +x_16 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_17 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_Lean_throwError___at_Lean_Elab_Term_checkLeftRec___spec__2___rarg(x_17, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +return x_18; +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4___rarg___boxed), 10, 0); +return x_2; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Term_toParserDescrAux___main___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; uint8_t x_12; +lean_inc(x_4); +lean_inc(x_1); +x_11 = l_Lean_resolveGlobalName___at_Lean_Elab_Term_toParserDescrAux___main___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_13 = lean_ctor_get(x_11, 0); +x_14 = lean_ctor_get(x_11, 1); +x_15 = lean_box(0); +x_16 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_13, x_15); +x_17 = l_List_isEmpty___rarg(x_16); +if (x_17 == 0) +{ +lean_object* x_18; +lean_dec(x_4); +lean_dec(x_1); +x_18 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_16); +lean_ctor_set(x_11, 0, x_18); +return x_11; +} +else +{ +lean_object* x_19; uint8_t x_20; +lean_dec(x_16); +lean_free_object(x_11); +x_19 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_14); +lean_dec(x_4); +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) +{ +return x_19; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_19, 0); +x_22 = lean_ctor_get(x_19, 1); +lean_inc(x_22); +lean_inc(x_21); +lean_dec(x_19); +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_21); +lean_ctor_set(x_23, 1, x_22); +return x_23; +} +} +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_24 = lean_ctor_get(x_11, 0); +x_25 = lean_ctor_get(x_11, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_11); +x_26 = lean_box(0); +x_27 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_24, x_26); +x_28 = l_List_isEmpty___rarg(x_27); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; +lean_dec(x_4); +lean_dec(x_1); +x_29 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_27); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_25); +return x_30; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_27); +x_31 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_25); +lean_dec(x_4); +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +if (lean_is_exclusive(x_31)) { + lean_ctor_release(x_31, 0); + lean_ctor_release(x_31, 1); + x_34 = x_31; +} else { + lean_dec_ref(x_31); + x_34 = lean_box(0); +} +if (lean_is_scalar(x_34)) { + x_35 = lean_alloc_ctor(1, 2, 0); +} else { + x_35 = x_34; +} +lean_ctor_set(x_35, 0, x_32); +lean_ctor_set(x_35, 1, x_33); +return x_35; +} +} +} +} +lean_object* l_List_filterAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { if (lean_obj_tag(x_2) == 0) @@ -2194,7 +2386,7 @@ goto _start; } } } -lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; uint8_t x_13; @@ -8026,8 +8218,9 @@ x_1254 = l_Lean_Parser_isParserCategory(x_1204, x_1196); if (x_1254 == 0) { lean_object* x_1255; +lean_inc(x_4); lean_inc(x_1196); -x_1255 = l_Lean_Elab_Term_resolveGlobalConst(x_1196, x_4, x_5, x_6, x_7, x_8, x_9, x_1203); +x_1255 = l_Lean_resolveGlobalConst___at_Lean_Elab_Term_toParserDescrAux___main___spec__2(x_1196, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_1203); if (lean_obj_tag(x_1255) == 0) { lean_object* x_1256; lean_object* x_1257; lean_object* x_1258; lean_object* x_1259; @@ -8037,7 +8230,7 @@ x_1257 = lean_ctor_get(x_1255, 1); lean_inc(x_1257); lean_dec(x_1255); x_1258 = lean_box(0); -x_1259 = l_List_filterAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__2(x_1204, x_1256, x_1258); +x_1259 = l_List_filterAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__5(x_1204, x_1256, x_1258); if (lean_obj_tag(x_1259) == 0) { lean_object* x_1260; lean_object* x_1261; lean_object* x_1262; lean_object* x_1263; lean_object* x_1264; lean_object* x_1265; lean_object* x_1266; lean_object* x_1267; @@ -8429,7 +8622,7 @@ x_1350 = lean_ctor_get(x_1347, 1); lean_inc(x_1350); lean_dec(x_1347); x_1351 = x_1344; -x_1352 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__3___boxed), 11, 2); +x_1352 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__6___boxed), 11, 2); lean_closure_set(x_1352, 0, x_1345); lean_closure_set(x_1352, 1, x_1351); x_1353 = x_1352; @@ -8503,7 +8696,7 @@ lean_object* x_1366; lean_object* x_1367; lean_object* x_1368; lean_object* x_13 lean_dec(x_1); x_1366 = l_Array_eraseIdx___rarg(x_1344, x_1345); x_1367 = x_1366; -x_1368 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__3___boxed), 11, 2); +x_1368 = lean_alloc_closure((void*)(l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__6___boxed), 11, 2); lean_closure_set(x_1368, 0, x_1345); lean_closure_set(x_1368, 1, x_1367); x_1369 = x_1368; @@ -8647,11 +8840,57 @@ lean_dec(x_1); return x_9; } } -lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_toParserDescrAux___main___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_resolveGlobalName___at_Lean_Elab_Term_toParserDescrAux___main___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_throwUnknownConstant___at_Lean_Elab_Term_toParserDescrAux___main___spec__4___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Term_toParserDescrAux___main___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_resolveGlobalConst___at_Lean_Elab_Term_toParserDescrAux___main___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +lean_object* l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) { _start: { lean_object* x_12; -x_12 = l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +x_12 = l_Array_umapMAux___main___at_Lean_Elab_Term_toParserDescrAux___main___spec__6(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11); lean_dec(x_3); return x_12; } @@ -9864,40 +10103,46 @@ x_6 = l_Lean_Name_hasMacroScopes___main(x_5); if (x_6 == 0) { lean_object* x_7; uint8_t x_8; -x_7 = l_Lean_Elab_Command_getCurrNamespace___rarg(x_3, x_4); +x_7 = l_Lean_Elab_Command_getScope___rarg(x_3, x_4); x_8 = !lean_is_exclusive(x_7); if (x_8 == 0) { -lean_object* x_9; lean_object* x_10; +lean_object* x_9; lean_object* x_10; lean_object* x_11; x_9 = lean_ctor_get(x_7, 0); -x_10 = l_Lean_Name_append___main(x_9, x_5); +x_10 = lean_ctor_get(x_9, 3); +lean_inc(x_10); lean_dec(x_9); -lean_ctor_set(x_7, 0, x_10); +x_11 = l_Lean_Name_append___main(x_10, x_5); +lean_dec(x_10); +lean_ctor_set(x_7, 0, x_11); return x_7; } else { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_11 = lean_ctor_get(x_7, 0); -x_12 = lean_ctor_get(x_7, 1); +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_12 = lean_ctor_get(x_7, 0); +x_13 = lean_ctor_get(x_7, 1); +lean_inc(x_13); lean_inc(x_12); -lean_inc(x_11); lean_dec(x_7); -x_13 = l_Lean_Name_append___main(x_11, x_5); -lean_dec(x_11); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_12); -return x_14; +x_14 = lean_ctor_get(x_12, 3); +lean_inc(x_14); +lean_dec(x_12); +x_15 = l_Lean_Name_append___main(x_14, x_5); +lean_dec(x_14); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_13); +return x_16; } } else { -lean_object* x_15; -x_15 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_15, 0, x_5); -lean_ctor_set(x_15, 1, x_4); -return x_15; +lean_object* x_17; +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_5); +lean_ctor_set(x_17, 1, x_4); +return x_17; } } } @@ -10639,7 +10884,7 @@ x_304 = l_Lean_Elab_Term_toParserDescrAux___main___closed__168; x_305 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_305, 0, x_304); lean_ctor_set(x_305, 1, x_303); -x_306 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_306 = l_Lean_throwUnknownConstant___rarg___closed__5; x_307 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_307, 0, x_305); lean_ctor_set(x_307, 1, x_306); @@ -12020,7 +12265,7 @@ x_17 = l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__3; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); -x_19 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_19 = l_Lean_throwUnknownConstant___rarg___closed__5; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); @@ -12047,7 +12292,7 @@ x_25 = l_Lean_Elab_Command_elabMacroRulesAux___lambda__1___closed__6; x_26 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); -x_27 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_27 = l_Lean_throwUnknownConstant___rarg___closed__5; x_28 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); diff --git a/stage0/stdlib/Lean/Elab/Tactic/Basic.c b/stage0/stdlib/Lean/Elab/Tactic/Basic.c index c5a368c73c..0dafd8fb1f 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Basic.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Basic.c @@ -263,7 +263,6 @@ lean_object* l_Lean_Elab_Tactic_getGoals___rarg___boxed(lean_object*, lean_objec lean_object* l_Lean_Meta_clear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Lean_Elab_Tactic_evalChoiceAux___main___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_saveAllState___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___regBuiltin_Lean_Elab_Tactic_evalDone(lean_object*); lean_object* l_Lean_Name_appendIndexAfter(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalFocus___closed__2; @@ -295,6 +294,7 @@ lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*, lean lean_object* l_Lean_Elab_Tactic_evalParen___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalSeq1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getMainModule___rarg___boxed(lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Elab_Tactic_evalTacticSeq___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Basic_3__introStep___closed__1; lean_object* l_Lean_Elab_Tactic_getMainGoal(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -5803,7 +5803,7 @@ x_19 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_18); -x_21 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_21 = l_Lean_throwUnknownConstant___rarg___closed__5; x_22 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_22, 0, x_20); lean_ctor_set(x_22, 1, x_21); @@ -5844,7 +5844,7 @@ x_31 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_32 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_32, 0, x_31); lean_ctor_set(x_32, 1, x_30); -x_33 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_33 = l_Lean_throwUnknownConstant___rarg___closed__5; x_34 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_34, 0, x_32); lean_ctor_set(x_34, 1, x_33); @@ -10593,7 +10593,7 @@ x_24 = l_Lean_Meta_clear___lambda__1___closed__6; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_24); lean_ctor_set(x_25, 1, x_23); -x_26 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_26 = l_Lean_throwUnknownConstant___rarg___closed__5; x_27 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_27, 0, x_25); lean_ctor_set(x_27, 1, x_26); @@ -10686,7 +10686,7 @@ x_53 = l_Lean_Meta_clear___lambda__1___closed__6; x_54 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_54, 0, x_53); lean_ctor_set(x_54, 1, x_52); -x_55 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_55 = l_Lean_throwUnknownConstant___rarg___closed__5; x_56 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_56, 0, x_54); lean_ctor_set(x_56, 1, x_55); diff --git a/stage0/stdlib/Lean/Elab/Tactic/Induction.c b/stage0/stdlib/Lean/Elab/Tactic/Induction.c index fd9099a534..9f38c40e4e 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Induction.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Induction.c @@ -16,11 +16,11 @@ extern "C" { lean_object* l___private_Lean_Elab_Tactic_Induction_5__getGeneralizingFVarIds___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldMAux___main___at___private_Lean_Elab_Tactic_Induction_15__processResult___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalCases(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; lean_object* l___private_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__1; lean_object* l___private_Lean_Elab_Tactic_Induction_7__getAlts___boxed(lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__7; lean_object* l___private_Lean_Elab_Tactic_Induction_17__checkCasesResult___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__5; lean_object* l_Lean_Name_eraseMacroScopes(lean_object*); lean_object* l_List_foldlM___main___at___private_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__2; @@ -47,6 +47,7 @@ lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); lean_object* lean_array_fswap(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_WHNF_19__unfoldDefinitionImp_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalCases___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_done(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Array_empty___closed__1; lean_object* l___private_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -73,6 +74,7 @@ lean_object* lean_local_ctx_find_from_user_name(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getInductiveValFromMajor___lambda__1___closed__2; lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); +lean_object* l_Lean_MessageData_ofList(lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_10__getAltRHS(lean_object*); lean_object* l_Lean_Expr_getAppFn___main(lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_5__getGeneralizingFVarIds(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -91,6 +93,7 @@ lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_15__processResult___closed__9; lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2___closed__3; lean_object* l___private_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__6; +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Tactic_getRecFromUsing___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Term_elabParen___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalInduction(lean_object*); @@ -107,6 +110,8 @@ lean_object* l___private_Lean_Elab_Tactic_Induction_6__generalizeVars___lambda__ lean_object* l___private_Lean_Elab_Tactic_Induction_3__elabMajor___lambda__1___closed__3; lean_object* l___private_Lean_Elab_Tactic_Induction_3__elabMajor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Tactic_getRecFromUsing___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4(lean_object*); lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Array_shrink___main___rarg(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Tactic_evalCases___closed__2; @@ -118,9 +123,10 @@ lean_object* l_Lean_Elab_Tactic_getInductiveValFromMajor(lean_object*, lean_obje lean_object* l_Lean_replaceRef(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Tactic_getRecFromUsing___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___private_Lean_Elab_Tactic_Induction_10__getAltRHS___boxed(lean_object*); +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Tactic_getRecFromUsing___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_assignExprMVar___at_Lean_Elab_Tactic_evalExact___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_15__processResult___closed__6; lean_object* l_Nat_repr(lean_object*); @@ -129,6 +135,7 @@ lean_object* l_Lean_Syntax_getId(lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Meta_revert___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getRecFromUsing(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l___private_Lean_Elab_Tactic_Induction_15__processResult___closed__3; lean_object* l_Lean_Elab_Tactic_getMainGoal(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getInductiveValFromMajor___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -143,10 +150,13 @@ uint8_t l_Array_isEmpty___rarg(lean_object*); lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_toExpr(lean_object*); extern lean_object* l___private_Lean_Meta_Tactic_Cases_9__unifyEqsAux___main___lambda__2___closed__1; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l_List_redLength___main___rarg(lean_object*); lean_object* l_Lean_Meta_getMVarsNoDelayedImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_5__getGeneralizingFVarIds___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_3__elabMajor___lambda__1___closed__2; lean_object* l___private_Lean_Elab_Tactic_Induction_3__elabMajor___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* l_Lean_mkFVar(lean_object*); @@ -170,6 +180,7 @@ lean_object* l_Lean_Meta_inferType___at_Lean_Elab_Tactic_elabAsFVar___spec__1(le lean_object* l___private_Lean_Elab_Tactic_Induction_16__checkCasesResultAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Syntax_inhabited; lean_object* l___private_Lean_Elab_Tactic_Induction_12__getRecFromUsingLoop___main___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(lean_object*, lean_object*); lean_object* l_Nat_foldMAux___main___at___private_Lean_Elab_Tactic_Induction_14__getRecInfo___spec__3___closed__1; lean_object* l_Nat_foldMAux___main___at___private_Lean_Elab_Tactic_Induction_15__processResult___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Cases_cases(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -185,6 +196,7 @@ lean_object* l_Lean_Elab_Tactic_evalCases___lambda__1___boxed(lean_object*, lean lean_object* l_List_foldr___main___at___private_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_15__processResult___closed__7; lean_object* l_Array_forMAux___main___at___private_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Tactic_getRecFromUsing___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalTactic___main(lean_object*, lean_object*, lean_object*, 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_ReaderT_bind___at_Lean_Elab_Tactic_liftMetaTacticAux___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -206,6 +218,7 @@ lean_object* l_Lean_Elab_Tactic_getInductiveValFromMajor___lambda__1___closed__3 lean_object* l_Array_filterAux___main___at_Lean_Elab_Tactic_evalCases___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getRecFromUsing___closed__2; lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__2___boxed(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Tactic_getRecFromUsing___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_elabTerm(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at_Lean_Elab_Tactic_evalCases___spec__1(lean_object*, lean_object*); @@ -227,6 +240,7 @@ extern lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main___closed__ extern lean_object* l_Lean_mkHole___closed__2; lean_object* l_Lean_Elab_Tactic_liftMetaM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_3__elabMajor___lambda__1___closed__1; +extern lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; lean_object* l_Lean_Meta_getMVarDecl___at_Lean_Elab_Tactic_getMainTag___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldMAux___main___at___private_Lean_Elab_Tactic_Induction_15__processResult___spec__1___closed__2; lean_object* l_List_foldlM___main___at___private_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -237,12 +251,16 @@ lean_object* l_Lean_Elab_Tactic_getRecFromUsing___closed__1; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__3; lean_object* l___regBuiltin_Lean_Elab_Tactic_evalInduction___closed__1; +lean_object* l_List_map___main___at_Lean_resolveGlobalConst___spec__2(lean_object*); lean_object* l_Nat_foldMAux___main___at___private_Lean_Elab_Tactic_Induction_15__processResult___spec__1___closed__1; lean_object* l_Nat_foldMAux___main___at___private_Lean_Elab_Tactic_Induction_15__processResult___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(lean_object*); lean_object* l_List_toArrayAux___main___rarg(lean_object*, lean_object*); extern lean_object* l_System_FilePath_dirName___closed__1; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__1___boxed(lean_object*, lean_object*, lean_object*); +uint8_t l_List_isEmpty___rarg(lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_6__generalizeVars___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_9__getAltVarNames___boxed(lean_object*); @@ -255,6 +273,7 @@ lean_object* l_Lean_indentExpr(lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_2__getMajor___boxed(lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_4__generalizeMajor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Tactic_Induction_14__getRecInfo___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_elabTerm___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Tactic_Induction_8__getAltName___boxed(lean_object*); lean_object* l_Nat_foldMAux___main___at___private_Lean_Elab_Tactic_Induction_14__getRecInfo___spec__3___closed__3; @@ -1554,7 +1573,7 @@ x_30 = l_Array_forMAux___main___at___private_Lean_Elab_Tactic_Induction_11__chec x_31 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_31, 0, x_30); lean_ctor_set(x_31, 1, x_29); -x_32 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_32 = l_Lean_throwUnknownConstant___rarg___closed__5; x_33 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_33, 0, x_31); lean_ctor_set(x_33, 1, x_32); @@ -2703,6 +2722,361 @@ x_12 = l___private_Lean_Elab_Tactic_Induction_12__getRecFromUsingLoop___main(x_1 return x_12; } } +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Tactic_getRecFromUsing___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; uint8_t x_12; +x_11 = lean_st_ref_get(x_9, x_10); +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_13 = lean_ctor_get(x_11, 0); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +lean_dec(x_13); +x_15 = lean_ctor_get(x_4, 2); +lean_inc(x_15); +x_16 = lean_ctor_get(x_4, 5); +lean_inc(x_16); +lean_dec(x_4); +x_17 = l_Lean_ResolveName_resolveGlobalName(x_14, x_15, x_16, x_1); +lean_dec(x_15); +lean_ctor_set(x_11, 0, x_17); +return x_11; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_18 = lean_ctor_get(x_11, 0); +x_19 = lean_ctor_get(x_11, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_11); +x_20 = lean_ctor_get(x_18, 0); +lean_inc(x_20); +lean_dec(x_18); +x_21 = lean_ctor_get(x_4, 2); +lean_inc(x_21); +x_22 = lean_ctor_get(x_4, 5); +lean_inc(x_22); +lean_dec(x_4); +x_23 = l_Lean_ResolveName_resolveGlobalName(x_20, x_21, x_22, x_1); +lean_dec(x_21); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_19); +return x_24; +} +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4___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, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +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_11 = lean_box(0); +x_12 = l_Lean_mkConst(x_1, x_11); +x_13 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_13, 0, x_12); +x_14 = l_Lean_throwUnknownConstant___rarg___closed__3; +x_15 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_15, 0, x_14); +lean_ctor_set(x_15, 1, x_13); +x_16 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_17 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +x_18 = l_Lean_throwError___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__2___rarg(x_17, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +return x_18; +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4___rarg___boxed), 10, 0); +return x_2; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Tactic_getRecFromUsing___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; uint8_t x_12; +lean_inc(x_4); +lean_inc(x_1); +x_11 = l_Lean_resolveGlobalName___at_Lean_Elab_Tactic_getRecFromUsing___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; +x_13 = lean_ctor_get(x_11, 0); +x_14 = lean_ctor_get(x_11, 1); +x_15 = lean_box(0); +x_16 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_13, x_15); +x_17 = l_List_isEmpty___rarg(x_16); +if (x_17 == 0) +{ +lean_object* x_18; +lean_dec(x_4); +lean_dec(x_1); +x_18 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_16); +lean_ctor_set(x_11, 0, x_18); +return x_11; +} +else +{ +lean_object* x_19; uint8_t x_20; +lean_dec(x_16); +lean_free_object(x_11); +x_19 = l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_14); +lean_dec(x_4); +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) +{ +return x_19; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_19, 0); +x_22 = lean_ctor_get(x_19, 1); +lean_inc(x_22); +lean_inc(x_21); +lean_dec(x_19); +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_21); +lean_ctor_set(x_23, 1, x_22); +return x_23; +} +} +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_24 = lean_ctor_get(x_11, 0); +x_25 = lean_ctor_get(x_11, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_11); +x_26 = lean_box(0); +x_27 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_24, x_26); +x_28 = l_List_isEmpty___rarg(x_27); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; +lean_dec(x_4); +lean_dec(x_1); +x_29 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_27); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_25); +return x_30; +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_27); +x_31 = l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_25); +lean_dec(x_4); +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +if (lean_is_exclusive(x_31)) { + lean_ctor_release(x_31, 0); + lean_ctor_release(x_31, 1); + x_34 = x_31; +} else { + lean_dec_ref(x_31); + x_34 = lean_box(0); +} +if (lean_is_scalar(x_34)) { + x_35 = lean_alloc_ctor(1, 2, 0); +} else { + x_35 = x_34; +} +lean_ctor_set(x_35, 0, x_32); +lean_ctor_set(x_35, 1, x_33); +return x_35; +} +} +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Tactic_getRecFromUsing___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +lean_inc(x_4); +lean_inc(x_1); +x_11 = l_Lean_resolveGlobalConst___at_Lean_Elab_Tactic_getRecFromUsing___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_11) == 0) +{ +uint8_t x_12; +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_11, 0); +x_14 = lean_ctor_get(x_11, 1); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_29; +lean_free_object(x_11); +x_29 = lean_box(0); +x_15 = x_29; +goto block_28; +} +else +{ +lean_object* x_30; +x_30 = lean_ctor_get(x_13, 1); +lean_inc(x_30); +if (lean_obj_tag(x_30) == 0) +{ +lean_object* x_31; +lean_dec(x_4); +lean_dec(x_1); +x_31 = lean_ctor_get(x_13, 0); +lean_inc(x_31); +lean_dec(x_13); +lean_ctor_set(x_11, 0, x_31); +return x_11; +} +else +{ +lean_object* x_32; +lean_dec(x_30); +lean_free_object(x_11); +x_32 = lean_box(0); +x_15 = x_32; +goto block_28; +} +} +block_28: +{ +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_dec(x_15); +x_16 = lean_box(0); +x_17 = l_Lean_mkConst(x_1, x_16); +x_18 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_18, 0, x_17); +x_19 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; +x_20 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_18); +x_21 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +x_22 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +x_23 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_16, x_13); +x_24 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_23); +x_25 = l_Lean_MessageData_ofList(x_24); +lean_dec(x_24); +x_26 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_26, 0, x_22); +lean_ctor_set(x_26, 1, x_25); +x_27 = l_Lean_throwError___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__2___rarg(x_26, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_14); +lean_dec(x_4); +return x_27; +} +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_11, 0); +x_34 = lean_ctor_get(x_11, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_11); +if (lean_obj_tag(x_33) == 0) +{ +lean_object* x_49; +x_49 = lean_box(0); +x_35 = x_49; +goto block_48; +} +else +{ +lean_object* x_50; +x_50 = lean_ctor_get(x_33, 1); +lean_inc(x_50); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; lean_object* x_52; +lean_dec(x_4); +lean_dec(x_1); +x_51 = lean_ctor_get(x_33, 0); +lean_inc(x_51); +lean_dec(x_33); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_34); +return x_52; +} +else +{ +lean_object* x_53; +lean_dec(x_50); +x_53 = lean_box(0); +x_35 = x_53; +goto block_48; +} +} +block_48: +{ +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_dec(x_35); +x_36 = lean_box(0); +x_37 = l_Lean_mkConst(x_1, x_36); +x_38 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_38, 0, x_37); +x_39 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; +x_40 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); +x_41 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +x_42 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_42, 0, x_40); +lean_ctor_set(x_42, 1, x_41); +x_43 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_36, x_33); +x_44 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_43); +x_45 = l_Lean_MessageData_ofList(x_44); +lean_dec(x_44); +x_46 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_46, 0, x_42); +lean_ctor_set(x_46, 1, x_45); +x_47 = l_Lean_throwError___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__2___rarg(x_46, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_34); +lean_dec(x_4); +return x_47; +} +} +} +else +{ +uint8_t x_54; +lean_dec(x_4); +lean_dec(x_1); +x_54 = !lean_is_exclusive(x_11); +if (x_54 == 0) +{ +return x_11; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_11, 0); +x_56 = lean_ctor_get(x_11, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_11); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_55); +lean_ctor_set(x_57, 1, x_56); +return x_57; +} +} +} +} lean_object* _init_l_Lean_Elab_Tactic_getRecFromUsing___closed__1() { _start: { @@ -2771,10 +3145,10 @@ lean_inc(x_17); lean_dec(x_15); lean_inc(x_5); lean_inc(x_2); -x_18 = l_Lean_Elab_Term_resolveGlobalConstNoOverload(x_2, x_5, x_6, x_7, x_8, x_9, x_10, x_17); +x_18 = l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Tactic_getRecFromUsing___spec__1(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_17); if (lean_obj_tag(x_18) == 0) { -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_34; +lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); x_20 = lean_ctor_get(x_18, 1); @@ -2786,24 +3160,24 @@ lean_inc(x_22); x_23 = lean_ctor_get(x_21, 1); lean_inc(x_23); lean_dec(x_21); -x_34 = l_Lean_Elab_Tactic_getMainGoal(x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_23); -if (lean_obj_tag(x_34) == 0) +x_24 = l_Lean_Elab_Tactic_getMainGoal(x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_23); +if (lean_obj_tag(x_24) == 0) { -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_35 = lean_ctor_get(x_34, 0); -lean_inc(x_35); -x_36 = lean_ctor_get(x_34, 1); -lean_inc(x_36); -lean_dec(x_34); -x_37 = lean_ctor_get(x_35, 0); -lean_inc(x_37); -lean_dec(x_35); -x_38 = lean_box(0); -x_39 = lean_alloc_closure((void*)(l_Lean_Meta_mkRecursorInfo), 7, 2); -lean_closure_set(x_39, 0, x_19); -lean_closure_set(x_39, 1, x_38); -x_40 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_liftMetaM___rarg___boxed), 10, 1); -lean_closure_set(x_40, 0, x_39); +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +x_27 = lean_ctor_get(x_25, 0); +lean_inc(x_27); +lean_dec(x_25); +x_28 = lean_box(0); +x_29 = lean_alloc_closure((void*)(l_Lean_Meta_mkRecursorInfo), 7, 2); +lean_closure_set(x_29, 0, x_19); +lean_closure_set(x_29, 1, x_28); +x_30 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_liftMetaM___rarg___boxed), 10, 1); +lean_closure_set(x_30, 0, x_29); lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); @@ -2812,8 +3186,8 @@ lean_inc(x_6); lean_inc(x_5); lean_inc(x_4); lean_inc(x_3); -x_41 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Tactic_withMainMVarContext___spec__1___rarg(x_37, x_40, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_36); -if (lean_obj_tag(x_41) == 0) +x_31 = l_Lean_Meta_withMVarContext___at_Lean_Elab_Tactic_withMainMVarContext___spec__1___rarg(x_27, x_30, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_26); +if (lean_obj_tag(x_31) == 0) { lean_dec(x_22); lean_dec(x_10); @@ -2825,46 +3199,29 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -return x_41; +return x_31; } else { -lean_object* x_42; -x_42 = lean_ctor_get(x_41, 1); -lean_inc(x_42); -lean_dec(x_41); -x_24 = x_42; -goto block_33; -} -} -else -{ -lean_object* x_43; -lean_dec(x_19); -x_43 = lean_ctor_get(x_34, 1); -lean_inc(x_43); -lean_dec(x_34); -x_24 = x_43; -goto block_33; -} -block_33: -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_25 = l_Lean_Elab_Tactic_BacktrackableState_restore(x_22, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_24); -x_26 = lean_ctor_get(x_25, 1); -lean_inc(x_26); -lean_dec(x_25); -x_27 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_27, 0, x_2); -x_28 = l_Lean_Elab_Tactic_getRecFromUsing___closed__3; -x_29 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_29, 0, x_28); -lean_ctor_set(x_29, 1, x_27); -x_30 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; -x_31 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -x_32 = l_Lean_throwError___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__2___rarg(x_31, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_26); +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; +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = l_Lean_Elab_Tactic_BacktrackableState_restore(x_22, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_32); +x_34 = lean_ctor_get(x_33, 1); +lean_inc(x_34); +lean_dec(x_33); +x_35 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_35, 0, x_2); +x_36 = l_Lean_Elab_Tactic_getRecFromUsing___closed__3; +x_37 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_35); +x_38 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_39 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +x_40 = l_Lean_throwError___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__2___rarg(x_39, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_34); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); @@ -2873,12 +3230,45 @@ lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); -return x_32; +return x_40; } } else { -uint8_t x_44; +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_19); +x_41 = lean_ctor_get(x_24, 1); +lean_inc(x_41); +lean_dec(x_24); +x_42 = l_Lean_Elab_Tactic_BacktrackableState_restore(x_22, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_41); +x_43 = lean_ctor_get(x_42, 1); +lean_inc(x_43); +lean_dec(x_42); +x_44 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_44, 0, x_2); +x_45 = l_Lean_Elab_Tactic_getRecFromUsing___closed__3; +x_46 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_44); +x_47 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_48 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_48, 0, x_46); +lean_ctor_set(x_48, 1, x_47); +x_49 = l_Lean_throwError___at___private_Lean_Elab_Tactic_Basic_1__evalTacticUsing___main___spec__2___rarg(x_48, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_43); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_49; +} +} +else +{ +uint8_t x_50; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); @@ -2888,62 +3278,22 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_44 = !lean_is_exclusive(x_18); -if (x_44 == 0) +x_50 = !lean_is_exclusive(x_18); +if (x_50 == 0) { return x_18; } else { -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_18, 0); -x_46 = lean_ctor_get(x_18, 1); -lean_inc(x_46); -lean_inc(x_45); -lean_dec(x_18); -x_47 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_47, 0, x_45); -lean_ctor_set(x_47, 1, x_46); -return x_47; -} -} -} -else -{ -uint8_t x_48; -lean_dec(x_10); -lean_dec(x_9); -lean_dec(x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_48 = !lean_is_exclusive(x_15); -if (x_48 == 0) -{ -lean_object* x_49; lean_object* x_50; -x_49 = lean_ctor_get(x_15, 0); -lean_dec(x_49); -x_50 = lean_ctor_get(x_16, 0); -lean_inc(x_50); -lean_dec(x_16); -lean_ctor_set(x_15, 0, x_50); -return x_15; -} -else -{ lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_15, 1); -lean_inc(x_51); -lean_dec(x_15); -x_52 = lean_ctor_get(x_16, 0); +x_51 = lean_ctor_get(x_18, 0); +x_52 = lean_ctor_get(x_18, 1); lean_inc(x_52); -lean_dec(x_16); -x_53 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_53, 0, x_52); -lean_ctor_set(x_53, 1, x_51); +lean_inc(x_51); +lean_dec(x_18); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_51); +lean_ctor_set(x_53, 1, x_52); return x_53; } } @@ -2963,26 +3313,34 @@ lean_dec(x_2); x_54 = !lean_is_exclusive(x_15); if (x_54 == 0) { +lean_object* x_55; lean_object* x_56; +x_55 = lean_ctor_get(x_15, 0); +lean_dec(x_55); +x_56 = lean_ctor_get(x_16, 0); +lean_inc(x_56); +lean_dec(x_16); +lean_ctor_set(x_15, 0, x_56); return x_15; } else { -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_15, 0); -x_56 = lean_ctor_get(x_15, 1); -lean_inc(x_56); -lean_inc(x_55); +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_15, 1); +lean_inc(x_57); lean_dec(x_15); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); -return x_57; +x_58 = lean_ctor_get(x_16, 0); +lean_inc(x_58); +lean_dec(x_16); +x_59 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_59, 0, x_58); +lean_ctor_set(x_59, 1, x_57); +return x_59; } } } else { -uint8_t x_58; +uint8_t x_60; lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); @@ -2992,27 +3350,120 @@ lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_58 = !lean_is_exclusive(x_12); -if (x_58 == 0) +x_60 = !lean_is_exclusive(x_15); +if (x_60 == 0) +{ +return x_15; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_15, 0); +x_62 = lean_ctor_get(x_15, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_15); +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_61); +lean_ctor_set(x_63, 1, x_62); +return x_63; +} +} +} +else +{ +uint8_t x_64; +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_64 = !lean_is_exclusive(x_12); +if (x_64 == 0) { return x_12; } else { -lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_59 = lean_ctor_get(x_12, 0); -x_60 = lean_ctor_get(x_12, 1); -lean_inc(x_60); -lean_inc(x_59); +lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_65 = lean_ctor_get(x_12, 0); +x_66 = lean_ctor_get(x_12, 1); +lean_inc(x_66); +lean_inc(x_65); lean_dec(x_12); -x_61 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_61, 0, x_59); -lean_ctor_set(x_61, 1, x_60); -return x_61; +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_65); +lean_ctor_set(x_67, 1, x_66); +return x_67; } } } } +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Tactic_getRecFromUsing___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_resolveGlobalName___at_Lean_Elab_Tactic_getRecFromUsing___spec__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +lean_object* l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_throwUnknownConstant___at_Lean_Elab_Tactic_getRecFromUsing___spec__4___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +lean_object* l_Lean_resolveGlobalConst___at_Lean_Elab_Tactic_getRecFromUsing___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_resolveGlobalConst___at_Lean_Elab_Tactic_getRecFromUsing___spec__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Tactic_getRecFromUsing___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_Lean_resolveGlobalConstNoOverload___at_Lean_Elab_Tactic_getRecFromUsing___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} lean_object* l_Array_findIdxAux___main___at___private_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { diff --git a/stage0/stdlib/Lean/Elab/Tactic/Rewrite.c b/stage0/stdlib/Lean/Elab/Tactic/Rewrite.c index e7d296fa30..814abfa3fa 100644 --- a/stage0/stdlib/Lean/Elab/Tactic/Rewrite.c +++ b/stage0/stdlib/Lean/Elab/Tactic/Rewrite.c @@ -54,13 +54,13 @@ lean_object* l_Lean_Elab_Tactic_rewriteAll___boxed(lean_object*, lean_object*, l lean_object* l_Lean_Elab_Tactic_expandOptLocation(lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___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*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___regBuiltin_Lean_Elab_Tactic_evalRewrite___closed__1; lean_object* l_Lean_Elab_Tactic_rewriteAll___lambda__1___closed__3; lean_object* l_Lean_Elab_Tactic_rewriteTarget___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Array_forMAux___main___at_Lean_Elab_Tactic_evalRewrite___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_rewriteLocalDeclFVarId___lambda__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Elab_Tactic_getMainGoal(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_getLocalDeclFromUserName___rarg___lambda__1___closed__3; lean_object* l___regBuiltin_Lean_Elab_Tactic_expandRewriteTactic___closed__2; @@ -809,7 +809,7 @@ x_14 = l_Lean_Meta_getLocalDeclFromUserName___rarg___lambda__1___closed__3; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); -x_16 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_16 = l_Lean_throwUnknownConstant___rarg___closed__5; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); diff --git a/stage0/stdlib/Lean/Elab/Term.c b/stage0/stdlib/Lean/Elab/Term.c index 160fa58872..5988ea8895 100644 --- a/stage0/stdlib/Lean/Elab/Term.c +++ b/stage0/stdlib/Lean/Elab/Term.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Lean.Elab.Term -// Imports: Init Lean.Util.Sorry Lean.Structure Lean.Meta.ExprDefEq Lean.Meta.AppBuilder Lean.Meta.SynthInstance Lean.Meta.CollectMVars Lean.Meta.Tactic.Util Lean.Hygiene Lean.Util.RecDepth Lean.Elab.Log Lean.Elab.Alias Lean.Elab.ResolveName Lean.Elab.Level Lean.Elab.Attributes +// Imports: Init Lean.ResolveName Lean.Util.Sorry Lean.Structure Lean.Meta.ExprDefEq Lean.Meta.AppBuilder Lean.Meta.SynthInstance Lean.Meta.CollectMVars Lean.Meta.Tactic.Util Lean.Hygiene Lean.Util.RecDepth Lean.Elab.Log Lean.Elab.Level Lean.Elab.Attributes #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -14,7 +14,6 @@ extern "C" { #endif lean_object* l_Lean_Elab_Term_getLevelNames(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_reverse___rarg(lean_object*); extern lean_object* l_Lean_Meta_commitWhen___at___private_Lean_Meta_ExprDefEq_1__isDefEqEta___spec__4___closed__1; lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__4; lean_object* l_Lean_getConstInfo___at_Lean_Elab_Term_mkConst___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -35,9 +34,9 @@ lean_object* l___regBuiltin_Lean_Elab_Term_elabTypeStx___closed__1; lean_object* l_Lean_Elab_throwIllFormedSyntax___at_Lean_Elab_Term_elabStrLit___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_extractMacroScopes(lean_object*); lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__8; +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___closed__3; lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__6; lean_object* l___private_Lean_Elab_Term_25__mkPairsAux___main___closed__3; -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isType___at_Lean_Elab_Term_ensureType___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_mvarId_x21(lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___main___at___private_Lean_Elab_Term_13__elabUsingElabFns___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -62,6 +61,7 @@ lean_object* l_Lean_Meta_mkAppM___rarg___lambda__1___boxed(lean_object*, lean_ob lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__9; lean_object* l___private_Lean_Elab_Term_1__liftAttrM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___closed__5; lean_object* l_unreachable_x21___rarg(lean_object*); extern lean_object* l_Lean_nullKind; lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_20__elabImplicitLambda___main___spec__1(lean_object*); @@ -102,6 +102,7 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Term_MVarErrorInfo_logErr lean_object* l_Lean_getConstInfo___at_Lean_Elab_Term_mkConst___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Util_Trace_4__addNode___at_Lean_Meta_isLevelDefEq___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_21__elabTermAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_levelMVarToParam___closed__1; lean_object* l_Lean_Elab_Term_elabParen(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_resolveLocalName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -152,7 +153,6 @@ lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabQuotedName___closed__2; lean_object* l_Lean_Elab_Term_withDeclName(lean_object*); lean_object* l___private_Lean_Elab_Term_12__elabUsingElabFnsAux___main___closed__2; -lean_object* l_Lean_Elab_Term_resolveGlobalConst___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_throwAbort___rarg___closed__1; extern lean_object* l_Lean_Elab_logException___rarg___lambda__1___closed__3; lean_object* l___private_Lean_Elab_Term_25__mkPairsAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -262,7 +262,6 @@ lean_object* l___private_Lean_Elab_Term_19__elabImplicitLambdaAux___closed__2; lean_object* l_Lean_Meta_ppGoal(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkTypeMismatchError___closed__5; lean_object* l_Lean_Elab_Term_ensureHasType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__3; lean_object* l_Array_foldlStepMAux___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__7; lean_object* l_Lean_Meta_withLocalDecl___at___private_Lean_Elab_Term_20__elabImplicitLambda___main___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -276,7 +275,6 @@ lean_object* l___private_Lean_Elab_Term_10__exceptionToSorry(lean_object*, lean_ lean_object* l___private_Lean_Elab_Term_7__isMonad_x3f___closed__1; lean_object* l_Std_HashMapImp_find_x3f___at___private_Lean_Elab_Term_13__elabUsingElabFns___spec__5___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabParen___closed__1; -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__2; lean_object* l___private_Lean_Elab_Term_27__resolveLocalNameAux___main(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Term_elabParen___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_liftMetaM(lean_object*); @@ -291,9 +289,11 @@ lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); uint8_t lean_metavar_ctx_is_expr_assigned(lean_object*, lean_object*); lean_object* l_Lean_addMessageContextFull___at_Lean_Meta_Lean_AddMessageContext___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabHole(lean_object*); +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_logDbgTrace___rarg___closed__2; lean_object* l___private_Lean_Elab_Term_7__isMonad_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_Lean_Elab_MonadMacroAdapter___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_AttributeApplicationTime_beq(uint8_t, uint8_t); lean_object* l_Lean_Meta_assignExprMVar___at_Lean_Elab_Term_synthesizeInstMVarCore___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_monadLog___closed__5; @@ -345,12 +345,10 @@ lean_object* l_Lean_Elab_Term_isLocalIdent_x3f___boxed(lean_object*, lean_object lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__7; lean_object* l_Lean_Elab_Term_mkConst___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_getCurrNamespace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_Lean_Elab_MonadMacroAdapter___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_find_x3f___main___at___private_Lean_Elab_Term_13__elabUsingElabFns___spec__6___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_TermElabM_run(lean_object*); -lean_object* l_Lean_Meta_throwUnknownConstant___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Lean_Elab_Term_29__mkConsts___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Term_26__elabCDot___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__1; @@ -360,7 +358,6 @@ lean_object* l___private_Lean_Elab_Term_13__elabUsingElabFns___closed__5; lean_object* l_Lean_Elab_Term_elabProp___rarg(lean_object*); lean_object* l___private_Lean_Elab_Term_13__elabUsingElabFns___closed__3; lean_object* l_Lean_Syntax_isStrLit_x3f(lean_object*); -lean_object* l_Lean_Elab_Term_resolveGlobalConst(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkFreshInstanceName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkTypeMismatchError___closed__1; @@ -407,7 +404,6 @@ lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_levelMVarToParam_x27___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_13__elabUsingElabFns___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Elab_Term_mkTypeMismatchError___closed__6; lean_object* l___private_Lean_MonadEnv_1__mkAuxNameAux___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabNumLit___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -430,7 +426,6 @@ lean_object* l_Lean_Elab_Term_resolveName___closed__7; size_t l_Lean_Name_hash(lean_object*); lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Term_21__elabTermAux___main___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_registerSyntheticMVarWithCurrRef___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__1; lean_object* l_Nat_repr(lean_object*); lean_object* l_Lean_Elab_Term_throwErrorIfErrors___closed__3; extern lean_object* l_Lean_MessageData_hasCoeOfOptExpr___closed__1; @@ -438,7 +433,6 @@ lean_object* l___private_Lean_Elab_Term_2__applyAttributesCore___boxed(lean_obje lean_object* l_Lean_Elab_getMacros(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarsAtDecl___at_Lean_Elab_Term_ensureNoUnassignedMVars___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Lean_Elab_Term_3__hasCDot___main___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__4; extern lean_object* l_Lean_Meta_inferTypeRef; lean_object* lean_st_mk_ref(lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabCharLit(lean_object*); @@ -477,6 +471,7 @@ lean_object* l_Lean_Elab_Term_monadQuotation___closed__4; lean_object* l_Lean_Elab_Term_getMainModule(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkTermElabAttribute(lean_object*); extern lean_object* l_Lean_numLitKind___closed__2; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Elab_Term_MetaHasEval___rarg___lambda__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_Lean_Ref___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_SavedState_inhabited___closed__1; @@ -521,16 +516,16 @@ lean_object* l_Lean_Elab_Term_mkFreshIdent(lean_object*, lean_object*, lean_obje lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__3; lean_object* l_Std_PersistentArray_forMAux___main___at_Lean_Elab_Term_MetaHasEval___spec__3___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabSyntheticHole___closed__1; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l_Lean_Elab_Term_registerMVarErrorHoleInfo___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_Lean_Ref___closed__2; lean_object* l___private_Lean_Elab_Term_16__isLambdaWithImplicit___boxed(lean_object*); lean_object* l_Lean_Elab_Term_Lean_Ref; lean_object* l___private_Lean_Elab_Term_9__tryLiftAndCoe___closed__2; lean_object* l___regBuiltin_Lean_Elab_Term_expandListLit___closed__1; -lean_object* l_List_map___main___at_Lean_Elab_Term_resolveGlobalConst___spec__2(lean_object*); lean_object* l_Lean_Meta_withLCtx___at_Lean_Elab_Term_elabSyntheticHole___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshLevelMVar___at_Lean_Elab_Term_ensureType___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_getCurrNamespace___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_5__tryCoe___closed__4; lean_object* l_Lean_Elab_Term_MVarErrorInfo_logError___closed__15; lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Term_MVarErrorInfo_logError___spec__2___closed__2; @@ -549,7 +544,6 @@ uint8_t l_Lean_Expr_Data_binderInfo(uint64_t); lean_object* l_Lean_Elab_Term_expandArrayLit___closed__1; lean_object* l_Lean_Elab_Term_elabSyntheticHole___closed__8; lean_object* l_Lean_Elab_Term_getFVarLocalDecl_x21___closed__1; -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__3; lean_object* l___regBuiltin_Lean_Elab_Term_expandListLit(lean_object*); lean_object* l___private_Lean_Meta_LevelDefEq_2__decLevelImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_InternalExceptionId_getName(lean_object*, lean_object*); @@ -588,12 +582,12 @@ lean_object* l_Lean_Elab_Term_Lean_Elab_MonadMacroAdapter___closed__2; lean_object* l_Lean_Elab_Term_monadLog___closed__2; extern lean_object* l_Lean_Elab_addMacroStack___rarg___lambda__1___closed__3; lean_object* l_Lean_Meta_inferType___at_Lean_Elab_Term_throwTypeMismatchError___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__6; lean_object* l___private_Lean_Elab_Term_24__mkTacticMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlStepMAux___main___at_Lean_Elab_Term_elabParen___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getDeclName_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_29__mkConsts___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_setMacroStackOption(lean_object*, uint8_t); +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore___closed__10; lean_object* l_Lean_Elab_Term_Lean_Elab_MonadMacroAdapter___closed__5; lean_object* l___regBuiltin_Lean_Elab_Term_expandArrayLit(lean_object*); @@ -617,6 +611,7 @@ lean_object* l_Lean_Elab_Term_TermElabM_inhabited___lambda__1(lean_object*, lean lean_object* l_Lean_Elab_Term_savingMCtx(lean_object*); lean_object* l_Lean_Elab_Term_elabHole(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabCharLit___closed__1; +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___closed__4; lean_object* l___private_Lean_Elab_Term_17__dropTermParens(lean_object*); extern lean_object* l_Lean_Syntax_inhabited; extern lean_object* l_Lean_Prod_hasQuote___rarg___closed__3; @@ -676,13 +671,13 @@ lean_object* l_Lean_Syntax_getKind(lean_object*); lean_object* l_Lean_Elab_Term_expandArrayLit(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabSort___closed__1; lean_object* l___regBuiltin_Lean_Elab_Term_elabQuotedName___closed__3; +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName; lean_object* l_Lean_MacroScopesView_review(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Term_monadLog___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_synthesizeInstMVarCore(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_Term_MetaHasEval___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Name_isAnonymous(lean_object*); lean_object* l___private_Lean_Elab_Term_12__elabUsingElabFnsAux(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_filterAux___main___at_Lean_Elab_Term_resolveGlobalConst___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_assignLevelMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_applyAttributes(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l___private_Lean_Elab_Term_16__isLambdaWithImplicit(lean_object*); @@ -691,6 +686,7 @@ lean_object* l_Lean_Elab_Term_savingMCtx___rarg(lean_object*, lean_object*, lean lean_object* l_Lean_Elab_Term_registerMVarErrorCustomInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_PersistentHashMap_mkCollisionNode___rarg___closed__1; lean_object* l_Lean_Meta_getMVarsImp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___closed__2; lean_object* l_Lean_Name_toExprAux___main(lean_object*); lean_object* l_Lean_Elab_Term_elabEnsureTypeOf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_11__postponeElabTerm(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -709,7 +705,6 @@ lean_object* l_Lean_throwErrorAt___at___private_Lean_Elab_Term_21__elabTermAux__ extern lean_object* l___private_Init_Util_1__mkPanicMessage___closed__2; extern lean_object* l_Lean_Meta_whnfRef; lean_object* l_Lean_mkAuxName___at_Lean_Elab_Term_mkAuxName___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_resolveGlobalName___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabSyntheticHole___closed__6; lean_object* l_Lean_Elab_Term_expandArrayLit___closed__6; lean_object* l_Lean_Meta_mkLambdaFVars___at___private_Lean_Elab_Term_19__elabImplicitLambdaAux___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -718,10 +713,10 @@ lean_object* l___regBuiltin_Lean_Elab_Term_expandListLit___closed__2; lean_object* l_Lean_Meta_mkFreshExprMVar___at___private_Lean_Elab_Term_5__tryCoe___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltin_Lean_Elab_Term_elabProp___closed__1; lean_object* l_Lean_Elab_Term_mkConst___closed__1; -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_isExprMVarAssigned(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabCharLit___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabHole___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___closed__1; extern lean_object* l_Lean_Meta_evalNat___main___closed__8; lean_object* l___private_Lean_Elab_Term_20__elabImplicitLambda___main___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkExplicitBinder(lean_object*, lean_object*); @@ -743,7 +738,6 @@ lean_object* l_Nat_foldMAux___main___at___private_Lean_Elab_Term_28__mkFreshLeve lean_object* l___private_Lean_Elab_Term_21__elabTermAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_19__elabImplicitLambdaAux___closed__1; lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_toString___at_Lean_OpenDecl_HasToString___spec__2(lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_throwAppTypeMismatch___rarg___lambda__1___closed__3; lean_object* l_Lean_Meta_decLevel___at_Lean_Meta_getDecLevel___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -751,6 +745,7 @@ lean_object* l___regBuiltin_Lean_Elab_Term_elabQuotedName(lean_object*); extern lean_object* l_Lean_Elab_abortExceptionId; extern lean_object* l_Array_myMacro____x40_Init_Data_Array_Macros___hyg_464____closed__11; lean_object* l___private_Lean_Elab_Term_9__tryLiftAndCoe___closed__5; +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkForall(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_19__elabImplicitLambdaAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_mkSorry___rarg___lambda__1___closed__4; @@ -766,8 +761,6 @@ extern lean_object* l_Lean_TraceState_Inhabited___closed__1; lean_object* l___private_Lean_Elab_Term_25__mkPairsAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Term_8__tryPureCoe_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_mkSorry___rarg___lambda__1___closed__2; -lean_object* l_Lean_Elab_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_getOpenDecls(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___main___at___private_Lean_Elab_Term_13__elabUsingElabFns___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshLevelMVar___at_Lean_Elab_Term_ensureType___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_FileMap_Inhabited___closed__1; @@ -797,9 +790,7 @@ lean_object* l_Lean_Elab_Term_mkTermElabAttribute___closed__6; uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabByTactic___closed__3; -lean_object* l_Lean_Elab_Term_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getLetRecsToLift___boxed(lean_object*); -lean_object* l_Lean_Elab_Term_getOpenDecls___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_throwTypeMismatchError___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_decLevel___rarg___lambda__1___closed__3; lean_object* l___private_Lean_Elab_Term_9__tryLiftAndCoe___closed__1; @@ -925,6 +916,7 @@ lean_object* l_Lean_Elab_Term_isLocalIdent_x3f(lean_object*, lean_object*, lean_ lean_object* l_Lean_Elab_Term_MetaHasEval(lean_object*); lean_object* l_Lean_mkConst(lean_object*, lean_object*); extern lean_object* l_Lean_MessageData_Inhabited___closed__1; +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkSimpleThunk(lean_object*); lean_object* l_Lean_Elab_Term_registerSyntheticMVar___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_ensureHasTypeAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -994,7 +986,6 @@ lean_object* l_Lean_Meta_mkFreshLevelMVar___at___private_Lean_Meta_Basic_4__mkFr extern lean_object* l_Lean_Meta_mkArrow___rarg___closed__2; lean_object* l_Lean_Elab_Term_Lean_Elab_MonadMacroAdapter___closed__6; lean_object* l___private_Lean_Elab_Term_25__mkPairsAux___main___closed__1; -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__5; lean_object* l_Lean_Elab_Term_expandArrayLit___closed__5; uint8_t l_Lean_Syntax_isIdent(lean_object*); extern lean_object* l_Lean_Elab_registerPostponeId___closed__1; @@ -3248,6 +3239,120 @@ return x_15; } } } +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_1, 2); +lean_inc(x_9); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +return x_10; +} +} +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_1, 5); +lean_inc(x_9); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +return x_10; +} +} +lean_object* _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_Lean_MonadResolveName___lambda__1___boxed), 8, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Term_monadLog___closed__1; +x_2 = l_Lean_Elab_Term_Lean_MonadResolveName___closed__1; +x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_monadLog___spec__2___rarg), 9, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_Lean_MonadResolveName___lambda__2___boxed), 8, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Term_monadLog___closed__1; +x_2 = l_Lean_Elab_Term_Lean_MonadResolveName___closed__3; +x_3 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Term_monadLog___spec__2___rarg), 9, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Term_Lean_MonadResolveName___closed__2; +x_2 = l_Lean_Elab_Term_Lean_MonadResolveName___closed__4; +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_Term_Lean_MonadResolveName() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Elab_Term_Lean_MonadResolveName___closed__5; +return x_1; +} +} +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Elab_Term_Lean_MonadResolveName___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_9; +} +} +lean_object* l_Lean_Elab_Term_Lean_MonadResolveName___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_Elab_Term_Lean_MonadResolveName___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_9; +} +} lean_object* l_Lean_Elab_Term_getDeclName_x3f(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: { @@ -3274,58 +3379,6 @@ lean_dec(x_1); return x_8; } } -lean_object* l_Lean_Elab_Term_getCurrNamespace(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; lean_object* x_9; -x_8 = lean_ctor_get(x_1, 2); -lean_inc(x_8); -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; -} -} -lean_object* l_Lean_Elab_Term_getCurrNamespace___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Elab_Term_getCurrNamespace(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -return x_8; -} -} -lean_object* l_Lean_Elab_Term_getOpenDecls(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; lean_object* x_9; -x_8 = lean_ctor_get(x_1, 5); -lean_inc(x_8); -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; -} -} -lean_object* l_Lean_Elab_Term_getOpenDecls___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { -_start: -{ -lean_object* x_8; -x_8 = l_Lean_Elab_Term_getOpenDecls(x_1, x_2, x_3, x_4, x_5, x_6, x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -return x_8; -} -} lean_object* l_Lean_Elab_Term_getLetRecsToLift___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: { @@ -27622,11 +27675,11 @@ lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean lean_free_object(x_9); x_15 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_15, 0, x_1); -x_16 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_16 = l_Lean_throwUnknownConstant___rarg___closed__3; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); -x_18 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_18 = l_Lean_throwUnknownConstant___rarg___closed__5; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); @@ -27663,11 +27716,11 @@ if (lean_obj_tag(x_25) == 0) lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; x_26 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_26, 0, x_1); -x_27 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_27 = l_Lean_throwUnknownConstant___rarg___closed__3; x_28 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_26); -x_29 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_29 = l_Lean_throwUnknownConstant___rarg___closed__5; x_30 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); @@ -28096,538 +28149,54 @@ lean_dec(x_4); return x_10; } } -lean_object* l_Lean_Elab_Term_resolveGlobalName(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; 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_9 = lean_st_ref_get(x_7, x_8); -x_10 = lean_ctor_get(x_9, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 1); -lean_inc(x_11); -lean_dec(x_9); -x_12 = lean_ctor_get(x_10, 0); -lean_inc(x_12); -lean_dec(x_10); -x_13 = l_Lean_Elab_Term_getCurrNamespace(x_2, x_3, x_4, x_5, x_6, x_7, x_11); -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_13, 1); -lean_inc(x_15); -lean_dec(x_13); -x_16 = l_Lean_Elab_Term_getOpenDecls(x_2, x_3, x_4, x_5, x_6, x_7, x_15); -x_17 = !lean_is_exclusive(x_16); -if (x_17 == 0) -{ -lean_object* x_18; lean_object* x_19; -x_18 = lean_ctor_get(x_16, 0); -x_19 = l_Lean_Elab_resolveGlobalName(x_12, x_14, x_18, x_1); -lean_dec(x_14); -lean_ctor_set(x_16, 0, x_19); -return x_16; -} -else -{ -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_20 = lean_ctor_get(x_16, 0); -x_21 = lean_ctor_get(x_16, 1); -lean_inc(x_21); -lean_inc(x_20); -lean_dec(x_16); -x_22 = l_Lean_Elab_resolveGlobalName(x_12, x_14, x_20, x_1); -lean_dec(x_14); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_21); -return x_23; -} -} -} -lean_object* l_Lean_Elab_Term_resolveGlobalName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; -x_9 = l_Lean_Elab_Term_resolveGlobalName(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -return x_9; -} -} -lean_object* l_List_filterAux___main___at_Lean_Elab_Term_resolveGlobalConst___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_3; -x_3 = l_List_reverse___rarg(x_2); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_1); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; -x_5 = lean_ctor_get(x_1, 0); -x_6 = lean_ctor_get(x_1, 1); -x_7 = lean_ctor_get(x_5, 1); -lean_inc(x_7); -x_8 = l_List_isEmpty___rarg(x_7); -lean_dec(x_7); -if (x_8 == 0) -{ -lean_free_object(x_1); -lean_dec(x_5); -x_1 = x_6; -goto _start; -} -else -{ -lean_ctor_set(x_1, 1, x_2); -{ -lean_object* _tmp_0 = x_6; -lean_object* _tmp_1 = x_1; -x_1 = _tmp_0; -x_2 = _tmp_1; -} -goto _start; -} -} -else -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; -x_11 = lean_ctor_get(x_1, 0); -x_12 = lean_ctor_get(x_1, 1); -lean_inc(x_12); -lean_inc(x_11); -lean_dec(x_1); -x_13 = lean_ctor_get(x_11, 1); -lean_inc(x_13); -x_14 = l_List_isEmpty___rarg(x_13); -lean_dec(x_13); -if (x_14 == 0) -{ -lean_dec(x_11); -x_1 = x_12; -goto _start; -} -else -{ -lean_object* x_16; -x_16 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_16, 0, x_11); -lean_ctor_set(x_16, 1, x_2); -x_1 = x_12; -x_2 = x_16; -goto _start; -} -} -} -} -} -lean_object* l_List_map___main___at_Lean_Elab_Term_resolveGlobalConst___spec__2(lean_object* x_1) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_2; -x_2 = lean_box(0); -return x_2; -} -else -{ -uint8_t x_3; -x_3 = !lean_is_exclusive(x_1); -if (x_3 == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_4 = lean_ctor_get(x_1, 0); -x_5 = lean_ctor_get(x_1, 1); -x_6 = lean_ctor_get(x_4, 0); -lean_inc(x_6); -lean_dec(x_4); -x_7 = l_List_map___main___at_Lean_Elab_Term_resolveGlobalConst___spec__2(x_5); -lean_ctor_set(x_1, 1, x_7); -lean_ctor_set(x_1, 0, x_6); -return x_1; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_8 = lean_ctor_get(x_1, 0); -x_9 = lean_ctor_get(x_1, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_1); -x_10 = lean_ctor_get(x_8, 0); -lean_inc(x_10); -lean_dec(x_8); -x_11 = l_List_map___main___at_Lean_Elab_Term_resolveGlobalConst___spec__2(x_9); -x_12 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_12, 0, x_10); -lean_ctor_set(x_12, 1, x_11); -return x_12; -} -} -} -} -lean_object* l_Lean_Elab_Term_resolveGlobalConst(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { lean_object* x_9; uint8_t x_10; -lean_inc(x_1); -x_9 = l_Lean_Elab_Term_resolveGlobalName(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +x_9 = lean_st_ref_get(x_7, x_8); x_10 = !lean_is_exclusive(x_9); if (x_10 == 0) { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; x_11 = lean_ctor_get(x_9, 0); -x_12 = lean_ctor_get(x_9, 1); -x_13 = lean_box(0); -x_14 = l_List_filterAux___main___at_Lean_Elab_Term_resolveGlobalConst___spec__1(x_11, x_13); -x_15 = l_List_isEmpty___rarg(x_14); -if (x_15 == 0) -{ -lean_object* x_16; -lean_dec(x_1); -x_16 = l_List_map___main___at_Lean_Elab_Term_resolveGlobalConst___spec__2(x_14); -lean_ctor_set(x_9, 0, x_16); -return x_9; -} -else -{ -lean_object* x_17; uint8_t x_18; -lean_dec(x_14); -lean_free_object(x_9); -x_17 = l_Lean_Meta_throwUnknownConstant___rarg(x_1, x_4, x_5, x_6, x_7, x_12); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) -{ -return x_17; -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_17, 0); -x_20 = lean_ctor_get(x_17, 1); -lean_inc(x_20); -lean_inc(x_19); -lean_dec(x_17); -x_21 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_21, 0, x_19); -lean_ctor_set(x_21, 1, x_20); -return x_21; -} -} -} -else -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; -x_22 = lean_ctor_get(x_9, 0); -x_23 = lean_ctor_get(x_9, 1); -lean_inc(x_23); -lean_inc(x_22); -lean_dec(x_9); -x_24 = lean_box(0); -x_25 = l_List_filterAux___main___at_Lean_Elab_Term_resolveGlobalConst___spec__1(x_22, x_24); -x_26 = l_List_isEmpty___rarg(x_25); -if (x_26 == 0) -{ -lean_object* x_27; lean_object* x_28; -lean_dec(x_1); -x_27 = l_List_map___main___at_Lean_Elab_Term_resolveGlobalConst___spec__2(x_25); -x_28 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_28, 0, x_27); -lean_ctor_set(x_28, 1, x_23); -return x_28; -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -lean_dec(x_25); -x_29 = l_Lean_Meta_throwUnknownConstant___rarg(x_1, x_4, x_5, x_6, x_7, x_23); -x_30 = lean_ctor_get(x_29, 0); -lean_inc(x_30); -x_31 = lean_ctor_get(x_29, 1); -lean_inc(x_31); -if (lean_is_exclusive(x_29)) { - lean_ctor_release(x_29, 0); - lean_ctor_release(x_29, 1); - x_32 = x_29; -} else { - lean_dec_ref(x_29); - x_32 = lean_box(0); -} -if (lean_is_scalar(x_32)) { - x_33 = lean_alloc_ctor(1, 2, 0); -} else { - x_33 = x_32; -} -lean_ctor_set(x_33, 0, x_30); -lean_ctor_set(x_33, 1, x_31); -return x_33; -} -} -} -} -lean_object* l_Lean_Elab_Term_resolveGlobalConst___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; -x_9 = l_Lean_Elab_Term_resolveGlobalConst(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -return x_9; -} -} -lean_object* _init_l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("ambiguous identifier '"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_resolveGlobalConstNoOverload___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_resolveGlobalConstNoOverload___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_resolveGlobalConstNoOverload___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_resolveGlobalConstNoOverload___closed__4() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("', possible interpretations: "); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_resolveGlobalConstNoOverload___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_resolveGlobalConstNoOverload___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Term_resolveGlobalConstNoOverload___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_resolveGlobalConstNoOverload(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; -lean_inc(x_1); -x_9 = l_Lean_Elab_Term_resolveGlobalConst(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -if (lean_obj_tag(x_9) == 0) -{ -uint8_t x_10; -x_10 = !lean_is_exclusive(x_9); -if (x_10 == 0) -{ -lean_object* x_11; lean_object* x_12; lean_object* x_13; -x_11 = lean_ctor_get(x_9, 0); -x_12 = lean_ctor_get(x_9, 1); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_25; -lean_free_object(x_9); -x_25 = lean_box(0); -x_13 = x_25; -goto block_24; -} -else -{ -lean_object* x_26; -x_26 = lean_ctor_get(x_11, 1); -lean_inc(x_26); -if (lean_obj_tag(x_26) == 0) -{ -lean_object* x_27; -lean_dec(x_2); -lean_dec(x_1); -x_27 = lean_ctor_get(x_11, 0); -lean_inc(x_27); +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); lean_dec(x_11); -lean_ctor_set(x_9, 0, x_27); -return x_9; -} -else -{ -lean_object* x_28; -lean_dec(x_26); -lean_free_object(x_9); -x_28 = lean_box(0); -x_13 = x_28; -goto block_24; -} -} -block_24: -{ -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; +x_13 = lean_ctor_get(x_2, 2); +lean_inc(x_13); +x_14 = lean_ctor_get(x_2, 5); +lean_inc(x_14); +lean_dec(x_2); +x_15 = l_Lean_ResolveName_resolveGlobalName(x_12, x_13, x_14, x_1); lean_dec(x_13); -x_14 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_14, 0, x_1); -x_15 = l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__3; -x_16 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_16, 0, x_15); -lean_ctor_set(x_16, 1, x_14); -x_17 = l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__6; -x_18 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_18, 0, x_16); -lean_ctor_set(x_18, 1, x_17); -x_19 = l_List_toString___at_Lean_OpenDecl_HasToString___spec__2(x_11); -x_20 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_20, 0, x_19); -x_21 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_21, 0, x_20); -x_22 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_22, 0, x_18); -lean_ctor_set(x_22, 1, x_21); -x_23 = l_Lean_throwError___at_Lean_Elab_Term_throwErrorIfErrors___spec__1___rarg(x_22, x_2, x_3, x_4, x_5, x_6, x_7, x_12); -return x_23; -} -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = lean_ctor_get(x_9, 0); -x_30 = lean_ctor_get(x_9, 1); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_9); -if (lean_obj_tag(x_29) == 0) -{ -lean_object* x_43; -x_43 = lean_box(0); -x_31 = x_43; -goto block_42; -} -else -{ -lean_object* x_44; -x_44 = lean_ctor_get(x_29, 1); -lean_inc(x_44); -if (lean_obj_tag(x_44) == 0) -{ -lean_object* x_45; lean_object* x_46; -lean_dec(x_2); -lean_dec(x_1); -x_45 = lean_ctor_get(x_29, 0); -lean_inc(x_45); -lean_dec(x_29); -x_46 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_46, 0, x_45); -lean_ctor_set(x_46, 1, x_30); -return x_46; -} -else -{ -lean_object* x_47; -lean_dec(x_44); -x_47 = lean_box(0); -x_31 = x_47; -goto block_42; -} -} -block_42: -{ -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_dec(x_31); -x_32 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_32, 0, x_1); -x_33 = l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__3; -x_34 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_32); -x_35 = l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__6; -x_36 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_36, 0, x_34); -lean_ctor_set(x_36, 1, x_35); -x_37 = l_List_toString___at_Lean_OpenDecl_HasToString___spec__2(x_29); -x_38 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_38, 0, x_37); -x_39 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_39, 0, x_38); -x_40 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_40, 0, x_36); -lean_ctor_set(x_40, 1, x_39); -x_41 = l_Lean_throwError___at_Lean_Elab_Term_throwErrorIfErrors___spec__1___rarg(x_40, x_2, x_3, x_4, x_5, x_6, x_7, x_30); -return x_41; -} -} -} -else -{ -uint8_t x_48; -lean_dec(x_2); -lean_dec(x_1); -x_48 = !lean_is_exclusive(x_9); -if (x_48 == 0) -{ +lean_ctor_set(x_9, 0, x_15); return x_9; } else { -lean_object* x_49; lean_object* x_50; lean_object* x_51; -x_49 = lean_ctor_get(x_9, 0); -x_50 = lean_ctor_get(x_9, 1); -lean_inc(x_50); -lean_inc(x_49); +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_16 = lean_ctor_get(x_9, 0); +x_17 = lean_ctor_get(x_9, 1); +lean_inc(x_17); +lean_inc(x_16); lean_dec(x_9); -x_51 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_51, 0, x_49); -lean_ctor_set(x_51, 1, x_50); -return x_51; +x_18 = lean_ctor_get(x_16, 0); +lean_inc(x_18); +lean_dec(x_16); +x_19 = lean_ctor_get(x_2, 2); +lean_inc(x_19); +x_20 = lean_ctor_get(x_2, 5); +lean_inc(x_20); +lean_dec(x_2); +x_21 = l_Lean_ResolveName_resolveGlobalName(x_18, x_19, x_20, x_1); +lean_dec(x_19); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_21); +lean_ctor_set(x_22, 1, x_17); +return x_22; } } } -} -lean_object* l_Lean_Elab_Term_resolveGlobalConstNoOverload___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { -_start: -{ -lean_object* x_9; -x_9 = l_Lean_Elab_Term_resolveGlobalConstNoOverload(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); -lean_dec(x_7); -lean_dec(x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -return x_9; -} -} lean_object* _init_l_Lean_Elab_Term_resolveName___closed__1() { _start: { @@ -28740,8 +28309,9 @@ else { lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_dec(x_2); +lean_inc(x_4); lean_inc(x_1); -x_16 = l_Lean_Elab_Term_resolveGlobalName(x_1, x_4, x_5, x_6, x_7, x_8, x_9, x_13); +x_16 = l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1(x_1, x_4, x_5, x_6, x_7, x_8, x_9, x_13); x_17 = lean_ctor_get(x_16, 0); lean_inc(x_17); x_18 = lean_ctor_get(x_16, 1); @@ -28776,7 +28346,7 @@ x_27 = l_Lean_Elab_Term_resolveName___closed__3; x_28 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_26); -x_29 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_29 = l_Lean_throwUnknownConstant___rarg___closed__5; x_30 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); @@ -28938,6 +28508,19 @@ return x_69; } } } +lean_object* l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_resolveGlobalName___at_Lean_Elab_Term_resolveName___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_9; +} +} lean_object* l_Lean_Elab_Term_resolveName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { _start: { @@ -31811,6 +31394,7 @@ return x_27; } } lean_object* initialize_Init(lean_object*); +lean_object* initialize_Lean_ResolveName(lean_object*); lean_object* initialize_Lean_Util_Sorry(lean_object*); lean_object* initialize_Lean_Structure(lean_object*); lean_object* initialize_Lean_Meta_ExprDefEq(lean_object*); @@ -31821,8 +31405,6 @@ lean_object* initialize_Lean_Meta_Tactic_Util(lean_object*); lean_object* initialize_Lean_Hygiene(lean_object*); lean_object* initialize_Lean_Util_RecDepth(lean_object*); lean_object* initialize_Lean_Elab_Log(lean_object*); -lean_object* initialize_Lean_Elab_Alias(lean_object*); -lean_object* initialize_Lean_Elab_ResolveName(lean_object*); lean_object* initialize_Lean_Elab_Level(lean_object*); lean_object* initialize_Lean_Elab_Attributes(lean_object*); static bool _G_initialized = false; @@ -31833,6 +31415,9 @@ _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Lean_ResolveName(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Lean_Util_Sorry(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -31863,12 +31448,6 @@ lean_dec_ref(res); res = initialize_Lean_Elab_Log(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = initialize_Lean_Elab_Alias(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); -res = initialize_Lean_Elab_ResolveName(lean_io_mk_world()); -if (lean_io_result_is_error(res)) return res; -lean_dec_ref(res); res = initialize_Lean_Elab_Level(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -31952,6 +31531,18 @@ if (lean_io_result_is_error(res)) return res; l_Lean_Elab_Term_termElabAttribute = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_Elab_Term_termElabAttribute); lean_dec_ref(res); +l_Lean_Elab_Term_Lean_MonadResolveName___closed__1 = _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_Lean_MonadResolveName___closed__1); +l_Lean_Elab_Term_Lean_MonadResolveName___closed__2 = _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_Lean_MonadResolveName___closed__2); +l_Lean_Elab_Term_Lean_MonadResolveName___closed__3 = _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__3(); +lean_mark_persistent(l_Lean_Elab_Term_Lean_MonadResolveName___closed__3); +l_Lean_Elab_Term_Lean_MonadResolveName___closed__4 = _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__4(); +lean_mark_persistent(l_Lean_Elab_Term_Lean_MonadResolveName___closed__4); +l_Lean_Elab_Term_Lean_MonadResolveName___closed__5 = _init_l_Lean_Elab_Term_Lean_MonadResolveName___closed__5(); +lean_mark_persistent(l_Lean_Elab_Term_Lean_MonadResolveName___closed__5); +l_Lean_Elab_Term_Lean_MonadResolveName = _init_l_Lean_Elab_Term_Lean_MonadResolveName(); +lean_mark_persistent(l_Lean_Elab_Term_Lean_MonadResolveName); l_Lean_Elab_Term_throwErrorIfErrors___closed__1 = _init_l_Lean_Elab_Term_throwErrorIfErrors___closed__1(); lean_mark_persistent(l_Lean_Elab_Term_throwErrorIfErrors___closed__1); l_Lean_Elab_Term_throwErrorIfErrors___closed__2 = _init_l_Lean_Elab_Term_throwErrorIfErrors___closed__2(); @@ -32305,18 +31896,6 @@ l_Lean_Elab_Term_mkConst___closed__2 = _init_l_Lean_Elab_Term_mkConst___closed__ lean_mark_persistent(l_Lean_Elab_Term_mkConst___closed__2); l_Lean_Elab_Term_mkConst___closed__3 = _init_l_Lean_Elab_Term_mkConst___closed__3(); lean_mark_persistent(l_Lean_Elab_Term_mkConst___closed__3); -l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__1 = _init_l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__1(); -lean_mark_persistent(l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__1); -l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__2 = _init_l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__2(); -lean_mark_persistent(l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__2); -l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__3 = _init_l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__3(); -lean_mark_persistent(l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__3); -l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__4 = _init_l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__4(); -lean_mark_persistent(l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__4); -l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__5 = _init_l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__5(); -lean_mark_persistent(l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__5); -l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__6 = _init_l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__6(); -lean_mark_persistent(l_Lean_Elab_Term_resolveGlobalConstNoOverload___closed__6); l_Lean_Elab_Term_resolveName___closed__1 = _init_l_Lean_Elab_Term_resolveName___closed__1(); lean_mark_persistent(l_Lean_Elab_Term_resolveName___closed__1); l_Lean_Elab_Term_resolveName___closed__2 = _init_l_Lean_Elab_Term_resolveName___closed__2(); diff --git a/stage0/stdlib/Lean/Elab/Util.c b/stage0/stdlib/Lean/Elab/Util.c index 5d87204869..add0b68063 100644 --- a/stage0/stdlib/Lean/Elab/Util.c +++ b/stage0/stdlib/Lean/Elab/Util.c @@ -87,7 +87,6 @@ lean_object* l_Lean_Elab_liftMacroM___rarg(lean_object*, lean_object*, lean_obje lean_object* l_Lean_Elab_checkSyntaxNodeKindAtNamespaces___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_List_foldl___main___at_Lean_Elab_addMacroStack___spec__1___closed__3; -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Elab_checkSyntaxNodeKindAtNamespacesAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_ppMacroStackOption___closed__4; size_t l_Lean_Name_hash(lean_object*); @@ -101,6 +100,7 @@ extern size_t l_Std_PersistentHashMap_insertAux___main___rarg___closed__2; lean_object* l_Lean_Elab_liftMacroM___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_adaptMacro___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_mkElabAttribute___rarg___lambda__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Elab_liftMacroM___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_liftMacroM___rarg___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Elab_Util_3__evalConstant(lean_object*, lean_object*, lean_object*, lean_object*); @@ -1091,7 +1091,7 @@ x_16 = l_Lean_Elab_syntaxNodeKindOfAttrParam___closed__6; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); -x_18 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_18 = l_Lean_throwUnknownConstant___rarg___closed__5; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); diff --git a/stage0/stdlib/Lean/Exception.c b/stage0/stdlib/Lean/Exception.c index 7f4bd29022..b0eab1ede2 100644 --- a/stage0/stdlib/Lean/Exception.c +++ b/stage0/stdlib/Lean/Exception.c @@ -20,27 +20,34 @@ lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___closed__2; lean_object* l_Lean_withIncRecDepth___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_withIncRecDepth___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___closed__1; +lean_object* l_Lean_throwUnknownConstant___rarg___closed__4; lean_object* l_Lean_withRef___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_maxRecDepthErrorMessage; lean_object* l_Lean_withIncRecDepth___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateRefT_x27_run___rarg___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_withRef___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ReaderT_MonadRecDepth___rarg___lambda__2(lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwKernelException(lean_object*); lean_object* l_Lean_Exception_inhabited; lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_ReaderT_MonadRecDepth___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___rarg___closed__2; lean_object* l_Lean_refTrans(lean_object*, lean_object*); lean_object* l_Lean_withIncRecDepth___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Exception_inhabited___closed__1; lean_object* l_Lean_ReaderT_MonadRecDepth___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___rarg___closed__1; lean_object* l_Lean_throwKernelException___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_KernelException_toMessageData(lean_object*, lean_object*); lean_object* l_Lean_replaceRef(lean_object*, lean_object*); lean_object* l_Lean_refTrans___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Char_HasRepr___closed__1; lean_object* l_Lean_ReaderT_MonadRecDepth___rarg___lambda__3(lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_withRef___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l_Lean_throwErrorAt___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Exception_getRef___boxed(lean_object*); lean_object* l_Lean_throwError___rarg___lambda__1(lean_object*, lean_object*); @@ -61,10 +68,12 @@ lean_object* l_Lean_withIncRecDepth___rarg___lambda__1(lean_object*, lean_object lean_object* l_Lean_addErrorMessageContextDefault___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_StateRefT_monadRecDepth___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addErrorMessageContextDefault(lean_object*); +lean_object* l_Lean_throwUnknownConstant(lean_object*); lean_object* l_Lean_withRef(lean_object*); lean_object* l_Lean_refTrans___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_throwError___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ofExcept(lean_object*); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); extern lean_object* l_Lean_MessageData_Inhabited___closed__1; lean_object* l_Lean_ReaderT_MonadRecDepth___rarg___lambda__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_Exception_toMessageData(lean_object*); @@ -352,6 +361,82 @@ lean_dec(x_2); return x_3; } } +lean_object* _init_l_Lean_throwUnknownConstant___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unknown constant '"); +return x_1; +} +} +lean_object* _init_l_Lean_throwUnknownConstant___rarg___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_throwUnknownConstant___rarg___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_throwUnknownConstant___rarg___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_throwUnknownConstant___rarg___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_throwUnknownConstant___rarg___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Char_HasRepr___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_throwUnknownConstant___rarg___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_throwUnknownConstant___rarg___closed__4; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_throwUnknownConstant___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; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_7 = lean_box(0); +x_8 = l_Lean_mkConst(x_6, x_7); +x_9 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_9, 0, x_8); +x_10 = l_Lean_throwUnknownConstant___rarg___closed__3; +x_11 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_9); +x_12 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_13 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_13, 0, x_11); +lean_ctor_set(x_13, 1, x_12); +x_14 = l_Lean_throwError___rarg(x_1, x_2, x_3, x_4, lean_box(0), x_13); +return x_14; +} +} +lean_object* l_Lean_throwUnknownConstant(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_throwUnknownConstant___rarg), 6, 0); +return x_2; +} +} lean_object* l_Lean_throwErrorAt___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: { @@ -732,6 +817,16 @@ l_Lean_Exception_inhabited___closed__1 = _init_l_Lean_Exception_inhabited___clos lean_mark_persistent(l_Lean_Exception_inhabited___closed__1); l_Lean_Exception_inhabited = _init_l_Lean_Exception_inhabited(); lean_mark_persistent(l_Lean_Exception_inhabited); +l_Lean_throwUnknownConstant___rarg___closed__1 = _init_l_Lean_throwUnknownConstant___rarg___closed__1(); +lean_mark_persistent(l_Lean_throwUnknownConstant___rarg___closed__1); +l_Lean_throwUnknownConstant___rarg___closed__2 = _init_l_Lean_throwUnknownConstant___rarg___closed__2(); +lean_mark_persistent(l_Lean_throwUnknownConstant___rarg___closed__2); +l_Lean_throwUnknownConstant___rarg___closed__3 = _init_l_Lean_throwUnknownConstant___rarg___closed__3(); +lean_mark_persistent(l_Lean_throwUnknownConstant___rarg___closed__3); +l_Lean_throwUnknownConstant___rarg___closed__4 = _init_l_Lean_throwUnknownConstant___rarg___closed__4(); +lean_mark_persistent(l_Lean_throwUnknownConstant___rarg___closed__4); +l_Lean_throwUnknownConstant___rarg___closed__5 = _init_l_Lean_throwUnknownConstant___rarg___closed__5(); +lean_mark_persistent(l_Lean_throwUnknownConstant___rarg___closed__5); l_Lean_withIncRecDepth___rarg___lambda__2___closed__1 = _init_l_Lean_withIncRecDepth___rarg___lambda__2___closed__1(); lean_mark_persistent(l_Lean_withIncRecDepth___rarg___lambda__2___closed__1); l_Lean_withIncRecDepth___rarg___lambda__2___closed__2 = _init_l_Lean_withIncRecDepth___rarg___lambda__2___closed__2(); diff --git a/stage0/stdlib/Lean/Meta/Basic.c b/stage0/stdlib/Lean/Meta/Basic.c index 10e9a96f1e..8ec6899803 100644 --- a/stage0/stdlib/Lean/Meta/Basic.c +++ b/stage0/stdlib/Lean/Meta/Basic.c @@ -324,6 +324,7 @@ lean_object* l_Lean_Meta_whnfD___rarg___lambda__1(lean_object*, lean_object*, le lean_object* l___private_Lean_Meta_Basic_36__liftStateMCtx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isReadOnlyExprMVar___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_printTraces___at_Lean_Core_hasEval___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshExprMVarAt___rarg___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__72___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -372,7 +373,6 @@ lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___a lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__59(lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__65___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_setInlineAttribute___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__3; lean_object* l_Lean_Meta_forallTelescopeReducing(lean_object*); lean_object* l_Lean_Meta_MetaM_inhabited___rarg(lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__34(lean_object*); @@ -456,7 +456,6 @@ lean_object* l___private_Lean_Meta_Basic_26__withNewFVar(lean_object*); lean_object* l_Lean_Meta_isReadOnlyLevelMVar___rarg___lambda__1___closed__3; lean_object* l_Lean_Meta_isExprMVarAssigned___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__14___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_map2MetaM___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwUnknownFVar(lean_object*); lean_object* l___private_Lean_Meta_Basic_15__forallTelescopeReducingAux___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__1(lean_object*); @@ -510,7 +509,6 @@ uint8_t l_Lean_Meta_InfoCacheKey_HasBeq(lean_object*, lean_object*); lean_object* l_Lean_Meta_assignLevelMVar___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_instantiateLevelMVars___main(lean_object*, lean_object*); lean_object* l_Lean_Meta_Lean_Ref___closed__2; -lean_object* l_Lean_Meta_throwUnknownConstant___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkWHNFRef___lambda__1___closed__2; lean_object* l_Lean_Meta_getMVarDecl___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_14__forallTelescopeReducingAuxAux___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__40(lean_object*); @@ -543,6 +541,7 @@ lean_object* l___private_Lean_Meta_Basic_15__forallTelescopeReducingAux(lean_obj lean_object* l_Lean_Meta_mkInferTypeRef___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__41___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__34(lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_isDefEqStuckExceptionId; lean_object* l_Lean_Meta_mkInferTypeRef___lambda__1___closed__1; lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__63(lean_object*); @@ -578,7 +577,6 @@ lean_object* l_Lean_Meta_Lean_MonadMCtx___closed__4; lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_16__isClassExpensive_x3f___main___spec__22(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__4(lean_object*); lean_object* l_Lean_Meta_mkForallUsedOnly(lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_16__isClassExpensive_x3f___main___spec__19(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__45___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_shouldReduceReducibleOnly___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -609,7 +607,6 @@ lean_object* l_Nat_repr(lean_object*); lean_object* l_Lean_Meta_MetaM_run___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__32___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_instantiateLevelMVars(lean_object*, lean_object*); -lean_object* l_Lean_Meta_throwUnknownConstant___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_LocalDecl_binderInfo(lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__31(lean_object*); lean_object* l_Lean_Meta_Lean_Ref___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -667,6 +664,7 @@ lean_object* l_Lean_getConstInfo___at_Lean_Meta_getParamNamesImp___spec__1(lean_ lean_object* l___private_Lean_Meta_Basic_15__forallTelescopeReducingAux___at___private_Lean_Meta_Basic_16__isClassExpensive_x3f___main___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_16__isClassExpensive_x3f___main___spec__29(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_assignExpr(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1(lean_object*); lean_object* l___private_Lean_Meta_Basic_3__mkFreshExprMVarCore(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_18__withNewLocalInstancesImpAux___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_35__fullApproxDefEqImp(lean_object*); @@ -681,6 +679,7 @@ lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___a lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__43___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Lean_Meta_Basic_29__withExistingLocalDeclsImp___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarDecl___at_Lean_Meta_isReadOnlyExprMVar___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__76___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_18__withNewLocalInstancesImpAux___at_Lean_Meta_withNewLocalInstances___spec__1(lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances(lean_object*); @@ -733,6 +732,7 @@ lean_object* l_Lean_Meta_shouldReduceReducibleOnly___rarg___closed__2; lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__14(lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__37___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_19__forallTelescopeImp___spec__29(lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_assignExprMVar___rarg(lean_object*, lean_object*, lean_object*); uint8_t l_Array_isEqvAux___main___at___private_Lean_Meta_Basic_31__withLocalContextImp___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -819,6 +819,7 @@ lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___a lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__62(lean_object*); lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef(lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_21__forallBoundedTelescopeImp___spec__77___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshExprMVarAt(lean_object*); lean_object* l_Lean_Meta_State_inhabited___closed__1; lean_object* l_Lean_LocalDecl_type(lean_object*); @@ -855,7 +856,6 @@ lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___a lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef___closed__1; lean_object* l___private_Lean_Meta_Basic_30__withNewMCtxDepthImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Lean_MonadMCtx___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_throwUnknownConstant(lean_object*); lean_object* l_Lean_Meta_hasAssignableMVar(lean_object*); lean_object* l___private_Lean_Meta_Basic_37__instantiateForallAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef___lambda__1___closed__2; @@ -1160,6 +1160,7 @@ lean_object* l_Lean_Meta_getParamNamesImp___lambda__1(lean_object*, lean_object* lean_object* l_Lean_throwError___at_Lean_Meta_mkIsExprDefEqAuxRef___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__65___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_isReadOnlyOrSyntheticOpaqueExprMVar___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__68___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_22__lambdaTelescopeAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__56___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1216,6 +1217,7 @@ lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___a lean_object* l_Lean_getConstInfo___at_Lean_Meta_getParamNamesImp___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_forallBoundedTelescope___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Core_Lean_MonadEnv; +lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_Meta_getConfig(lean_object*); lean_object* l_Lean_Meta_forallTelescope___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_lambdaLetTelescope___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -1279,7 +1281,6 @@ lean_object* l_Lean_Meta_mkFreshExprMVar___at_Lean_Meta_mkFreshTypeMVar___spec__ lean_object* l_Lean_Meta_mkArrow___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_22__lambdaTelescopeAux(lean_object*); lean_object* l___private_Lean_Meta_Basic_25__lambdaMetaTelescopeAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Basic_12__withNewLocalInstancesImp___main___at___private_Lean_Meta_Basic_20__forallTelescopeReducingImp___spec__71___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFreshId___at_Lean_Meta_mkFreshExprMVarAt___spec__1___rarg___boxed(lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_Lean_MonadLCtx___spec__2(lean_object*, lean_object*); @@ -5843,7 +5844,7 @@ x_11 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_12 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_10); -x_13 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_13 = l_Lean_throwUnknownConstant___rarg___closed__5; x_14 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); @@ -6049,7 +6050,7 @@ x_15 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_16 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); -x_17 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_17 = l_Lean_throwUnknownConstant___rarg___closed__5; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_16); lean_ctor_set(x_18, 1, x_17); @@ -6090,7 +6091,7 @@ x_27 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_28 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_28, 0, x_27); lean_ctor_set(x_28, 1, x_26); -x_29 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_29 = l_Lean_throwUnknownConstant___rarg___closed__5; x_30 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_30, 0, x_28); lean_ctor_set(x_30, 1, x_29); @@ -6432,7 +6433,7 @@ x_11 = l_Lean_Meta_isReadOnlyLevelMVar___rarg___lambda__1___closed__3; x_12 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_12, 0, x_11); lean_ctor_set(x_12, 1, x_10); -x_13 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_13 = l_Lean_throwUnknownConstant___rarg___closed__5; x_14 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_14, 0, x_12); lean_ctor_set(x_14, 1, x_13); @@ -7001,7 +7002,7 @@ x_9 = l_Lean_Meta_throwUnknownFVar___rarg___closed__3; x_10 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); -x_11 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_11 = l_Lean_throwUnknownConstant___rarg___closed__5; x_12 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); @@ -7246,7 +7247,7 @@ x_10 = l_Lean_Meta_getLocalDeclFromUserName___rarg___lambda__1___closed__3; x_11 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); -x_12 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_12 = l_Lean_throwUnknownConstant___rarg___closed__5; x_13 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); @@ -9231,45 +9232,35 @@ x_7 = l_Lean_Meta_withAtLeastTransparency___rarg(x_1, x_2, x_3, x_6, x_5); return x_7; } } -lean_object* l_Lean_Meta_throwUnknownConstant___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_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1___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; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_7 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_7, 0, x_1); -x_8 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; -x_9 = lean_alloc_ctor(10, 2, 0); +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_7 = lean_box(0); +x_8 = l_Lean_mkConst(x_1, x_7); +x_9 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_7); -x_10 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_10 = l_Lean_throwUnknownConstant___rarg___closed__3; x_11 = lean_alloc_ctor(10, 2, 0); -lean_ctor_set(x_11, 0, x_9); -lean_ctor_set(x_11, 1, x_10); -x_12 = l_Lean_throwError___at_Lean_Meta_mkWHNFRef___spec__1___rarg(x_11, x_2, x_3, x_4, x_5, x_6); -return x_12; +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_9); +x_12 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_13 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_13, 0, x_11); +lean_ctor_set(x_13, 1, x_12); +x_14 = l_Lean_throwError___at_Lean_Meta_mkWHNFRef___spec__1___rarg(x_13, x_2, x_3, x_4, x_5, x_6); +return x_14; } } -lean_object* l_Lean_Meta_throwUnknownConstant(lean_object* x_1) { +lean_object* l_Lean_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = lean_alloc_closure((void*)(l_Lean_Meta_throwUnknownConstant___rarg___boxed), 6, 0); +x_2 = lean_alloc_closure((void*)(l_Lean_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1___rarg___boxed), 6, 0); return x_2; } } -lean_object* l_Lean_Meta_throwUnknownConstant___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; -x_7 = l_Lean_Meta_throwUnknownConstant___rarg(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -return x_7; -} -} -lean_object* l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; uint8_t x_7; uint8_t x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; @@ -9304,7 +9295,7 @@ if (lean_obj_tag(x_12) == 0) { lean_object* x_13; lean_free_object(x_7); -x_13 = l_Lean_Meta_throwUnknownConstant___rarg(x_1, x_2, x_3, x_4, x_5, x_10); +x_13 = l_Lean_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_10); return x_13; } else @@ -9318,7 +9309,7 @@ case 1: lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_dec(x_14); lean_free_object(x_7); -x_15 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__1(x_2, x_3, x_4, x_5, x_10); +x_15 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__2(x_2, x_3, x_4, x_5, x_10); x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); x_17 = lean_unbox(x_16); @@ -9501,7 +9492,7 @@ x_52 = lean_environment_find(x_51, x_1); if (lean_obj_tag(x_52) == 0) { lean_object* x_53; -x_53 = l_Lean_Meta_throwUnknownConstant___rarg(x_1, x_2, x_3, x_4, x_5, x_50); +x_53 = l_Lean_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_50); return x_53; } else @@ -9514,7 +9505,7 @@ case 1: { lean_object* x_55; lean_object* x_56; uint8_t x_57; lean_dec(x_54); -x_55 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__1(x_2, x_3, x_4, x_5, x_50); +x_55 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__2(x_2, x_3, x_4, x_5, x_50); x_56 = lean_ctor_get(x_55, 0); lean_inc(x_56); x_57 = lean_unbox(x_56); @@ -9673,11 +9664,23 @@ return x_82; } } } -lean_object* l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_throwUnknownConstant___at_Lean_Meta_getConst_x3f___spec__1___rarg(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} +lean_object* l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { lean_object* x_6; -x_6 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__1(x_1, x_2, x_3, x_4, x_5); +x_6 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__2(x_1, x_2, x_3, x_4, x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); @@ -9730,7 +9733,7 @@ case 1: lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_dec(x_13); lean_free_object(x_7); -x_14 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__1(x_2, x_3, x_4, x_5, x_10); +x_14 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__2(x_2, x_3, x_4, x_5, x_10); x_15 = lean_ctor_get(x_14, 0); lean_inc(x_15); x_16 = lean_unbox(x_15); @@ -9929,7 +9932,7 @@ case 1: { lean_object* x_54; lean_object* x_55; uint8_t x_56; lean_dec(x_53); -x_54 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__1(x_2, x_3, x_4, x_5, x_49); +x_54 = l_Lean_Meta_shouldReduceReducibleOnly___at_Lean_Meta_getConst_x3f___spec__2(x_2, x_3, x_4, x_5, x_49); x_55 = lean_ctor_get(x_54, 0); lean_inc(x_55); x_56 = lean_unbox(x_55); @@ -85805,11 +85808,11 @@ lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean lean_free_object(x_7); x_13 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_13, 0, x_1); -x_14 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_14 = l_Lean_throwUnknownConstant___rarg___closed__3; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); -x_16 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_16 = l_Lean_throwUnknownConstant___rarg___closed__5; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); @@ -85845,11 +85848,11 @@ if (lean_obj_tag(x_23) == 0) lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_24 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_24, 0, x_1); -x_25 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_25 = l_Lean_throwUnknownConstant___rarg___closed__3; x_26 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); -x_27 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_27 = l_Lean_throwUnknownConstant___rarg___closed__5; x_28 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); diff --git a/stage0/stdlib/Lean/Meta/Closure.c b/stage0/stdlib/Lean/Meta/Closure.c index f2358befd6..3d3e7455dd 100644 --- a/stage0/stdlib/Lean/Meta/Closure.c +++ b/stage0/stdlib/Lean/Meta/Closure.c @@ -98,7 +98,6 @@ lean_object* l_Std_AssocList_find_x3f___main___at_Lean_Meta_Closure_visitExpr___ extern lean_object* l_Lean_formatEntry___closed__2; lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Std_mkHashMapImp___rarg(lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Meta_Closure_pickNextToProcess_x3f___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_appendIndexAfter(lean_object*, lean_object*); lean_object* l_Std_AssocList_find_x3f___main___at_Lean_Meta_Closure_visitExpr___spec__2(lean_object*, lean_object*); @@ -121,6 +120,7 @@ lean_object* l_Lean_Meta_mkAuxDefinitionFor___rarg___lambda__1(lean_object*, lea lean_object* l_Lean_Meta_mkAuxDefinition___at_Lean_Meta_mkAuxDefinitionFor___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_LocalDecl_Inhabited; lean_object* l_Array_umapMAux___main___at_Lean_Meta_Closure_process___main___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; extern lean_object* l_Array_iterateMAux___main___at_Lean_ppGoal___spec__6___closed__6; lean_object* l_Lean_Meta_Closure_collectExpr(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_expand___at_Lean_Meta_Closure_visitExpr___spec__5(lean_object*, lean_object*); @@ -3478,7 +3478,7 @@ x_17 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); -x_19 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_19 = l_Lean_throwUnknownConstant___rarg___closed__5; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); @@ -3519,7 +3519,7 @@ x_29 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_30 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_30, 0, x_29); lean_ctor_set(x_30, 1, x_28); -x_31 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_31 = l_Lean_throwUnknownConstant___rarg___closed__5; x_32 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_32, 0, x_30); lean_ctor_set(x_32, 1, x_31); diff --git a/stage0/stdlib/Lean/Meta/ExprDefEq.c b/stage0/stdlib/Lean/Meta/ExprDefEq.c index bff637094c..a275f4841b 100644 --- a/stage0/stdlib/Lean/Meta/ExprDefEq.c +++ b/stage0/stdlib/Lean/Meta/ExprDefEq.c @@ -227,7 +227,6 @@ lean_object* l_Lean_Meta_throwIsDefEqStuck___rarg(lean_object*); lean_object* l_Lean_Meta_commitWhen___at_Lean_Meta_isExprDefEqAuxImpl___main___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_StateRefT_x27_MonadLift___rarg___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_CheckAssignment_checkMVar___closed__6; -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Array_anyRangeMAux___main___at___private_Lean_Meta_ExprDefEq_5__isDefEqArgs___spec__1___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_ExprDefEq_22__isListLevelDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_CheckAssignment_run___closed__2; @@ -267,6 +266,7 @@ lean_object* l_Lean_Meta_getMVarDecl___at_Lean_Meta_isReadOnlyExprMVar___spec__1 lean_object* l_Lean_MetavarContext_assignExpr(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_LevelDefEq_14__restore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_ExprDefEq_26__tryHeuristic(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l___private_Lean_Meta_ExprDefEq_23__isDefEqLeft___closed__1; extern lean_object* l_Array_iterateMAux___main___at_Lean_ppGoal___spec__6___closed__6; lean_object* l_Lean_Meta_inferType___at___private_Lean_Meta_ExprDefEq_1__isDefEqEta___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -28939,7 +28939,7 @@ x_16 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); -x_18 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_18 = l_Lean_throwUnknownConstant___rarg___closed__5; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); @@ -28980,7 +28980,7 @@ x_28 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_29 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_29, 0, x_28); lean_ctor_set(x_29, 1, x_27); -x_30 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_30 = l_Lean_throwUnknownConstant___rarg___closed__5; x_31 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); diff --git a/stage0/stdlib/Lean/Meta/InferType.c b/stage0/stdlib/Lean/Meta/InferType.c index d4023a534a..0dbba32f78 100644 --- a/stage0/stdlib/Lean/Meta/InferType.c +++ b/stage0/stdlib/Lean/Meta/InferType.c @@ -109,7 +109,6 @@ lean_object* l___private_Lean_Meta_InferType_21__isTypeImp___at_Lean_Meta_isType lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* lean_instantiate_type_lparams(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at___private_Lean_Meta_InferType_10__checkInferTypeCache___spec__6(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getLevel___at___private_Lean_Meta_InferType_5__inferForallType___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -128,6 +127,7 @@ lean_object* l_Lean_getConstInfo___at_Lean_Meta_getParamNamesImp___spec__1(lean_ lean_object* l_Lean_MetavarContext_assignExpr(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_InferType_9__inferFVarType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwTypeExcepted___rarg___closed__2; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l___private_Lean_Meta_InferType_10__checkInferTypeCache(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_InferType_5__inferForallType___closed__1; lean_object* l_Lean_Meta_isTypeFormer___rarg___closed__1; @@ -3738,7 +3738,7 @@ x_9 = l_Lean_Meta_getMVarDecl___rarg___lambda__1___closed__3; x_10 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); -x_11 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_11 = l_Lean_throwUnknownConstant___rarg___closed__5; x_12 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); diff --git a/stage0/stdlib/Lean/Meta/LevelDefEq.c b/stage0/stdlib/Lean/Meta/LevelDefEq.c index 45eb766aea..9558e77fbf 100644 --- a/stage0/stdlib/Lean/Meta/LevelDefEq.c +++ b/stage0/stdlib/Lean/Meta/LevelDefEq.c @@ -127,7 +127,6 @@ lean_object* l_Lean_mkLevelMax(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_LevelDefEq_8__solve___at_Lean_Meta_isLevelDefEqAux___main___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_LevelDefEq_12__processPostponedAux___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_throwIsDefEqStuck___rarg(lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Meta_isExprDefEq___rarg___closed__4; lean_object* l_Lean_Meta_decLevel_x3f___at_Lean_Meta_isLevelDefEqAux___main___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_LevelDefEq_12__processPostponedAux___main___rarg___closed__1; @@ -149,6 +148,7 @@ lean_object* l_Lean_Meta_isLevelDefEqAux___main___lambda__1(lean_object*, lean_o lean_object* l___private_Lean_Meta_LevelDefEq_6__solveSelfMax(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_LevelDefEq_14__restore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_LevelDefEq_12__processPostponedAux___main___rarg___lambda__1___boxed(lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Meta_isDefEqNoConstantApprox___rarg(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_LevelDefEq_11__processPostponedStep(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_decLevel_x3f___rarg(lean_object*, lean_object*); @@ -290,7 +290,7 @@ x_15 = l_Lean_Meta_isReadOnlyLevelMVar___rarg___lambda__1___closed__3; x_16 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_16, 0, x_15); lean_ctor_set(x_16, 1, x_14); -x_17 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_17 = l_Lean_throwUnknownConstant___rarg___closed__5; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_16); lean_ctor_set(x_18, 1, x_17); @@ -352,7 +352,7 @@ x_33 = l_Lean_Meta_isReadOnlyLevelMVar___rarg___lambda__1___closed__3; x_34 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_32); -x_35 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_35 = l_Lean_throwUnknownConstant___rarg___closed__5; x_36 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_36, 0, x_34); lean_ctor_set(x_36, 1, x_35); @@ -2896,7 +2896,7 @@ x_16 = l_Lean_Meta_isReadOnlyLevelMVar___rarg___lambda__1___closed__3; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); -x_18 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_18 = l_Lean_throwUnknownConstant___rarg___closed__5; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); @@ -2958,7 +2958,7 @@ x_34 = l_Lean_Meta_isReadOnlyLevelMVar___rarg___lambda__1___closed__3; x_35 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_35, 0, x_34); lean_ctor_set(x_35, 1, x_33); -x_36 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_36 = l_Lean_throwUnknownConstant___rarg___closed__5; x_37 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_37, 0, x_35); lean_ctor_set(x_37, 1, x_36); diff --git a/stage0/stdlib/Lean/Meta/RecursorInfo.c b/stage0/stdlib/Lean/Meta/RecursorInfo.c index 15a26ff887..9fcb5ad51b 100644 --- a/stage0/stdlib/Lean/Meta/RecursorInfo.c +++ b/stage0/stdlib/Lean/Meta/RecursorInfo.c @@ -163,7 +163,6 @@ lean_object* l_Lean_Expr_withAppAux___main___at___private_Lean_Meta_RecursorInfo lean_object* l___private_Lean_Meta_RecursorInfo_10__getProduceMotiveAndRecursive___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerParametricAttribute___rarg___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l___private_Lean_Meta_RecursorInfo_11__checkMotiveResultType___closed__8; lean_object* l_List_foldlM___main___at___private_Lean_Meta_RecursorInfo_9__getUnivLevelPos___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Lean_Meta_RecursorInfo_9__getUnivLevelPos___spec__2___closed__1; @@ -205,6 +204,7 @@ lean_object* l___private_Lean_Meta_RecursorInfo_5__getMajorPosDepElim___closed__ lean_object* l_addParenHeuristic(lean_object*); lean_object* l_List_toStringAux___main___at_Lean_Meta_RecursorInfo_HasToString___spec__8___boxed(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_RecursorInfo_5__getMajorPosDepElim___closed__5; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Meta_mkRecOnFor(lean_object*); extern lean_object* l_Lean_mkRecFor___closed__1; lean_object* l_Lean_Expr_withAppAux___main___at___private_Lean_Meta_RecursorInfo_12__mkRecursorInfoAux___spec__3___closed__2; @@ -1457,7 +1457,7 @@ lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean lean_dec(x_11); x_12 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_12, 0, x_1); -x_13 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_13 = l_Lean_throwUnknownConstant___rarg___closed__5; x_14 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); @@ -1503,7 +1503,7 @@ lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean lean_dec(x_23); x_24 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_24, 0, x_1); -x_25 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_25 = l_Lean_throwUnknownConstant___rarg___closed__5; x_26 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); @@ -1989,7 +1989,7 @@ lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean lean_dec(x_11); x_12 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_12, 0, x_1); -x_13 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_13 = l_Lean_throwUnknownConstant___rarg___closed__5; x_14 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_14, 0, x_13); lean_ctor_set(x_14, 1, x_12); @@ -2035,7 +2035,7 @@ lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean lean_dec(x_23); x_24 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_24, 0, x_1); -x_25 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_25 = l_Lean_throwUnknownConstant___rarg___closed__5; x_26 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_26, 0, x_25); lean_ctor_set(x_26, 1, x_24); @@ -3063,7 +3063,7 @@ x_19 = l___private_Lean_Meta_RecursorInfo_5__getMajorPosDepElim___closed__3; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_19); lean_ctor_set(x_20, 1, x_18); -x_21 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_21 = l_Lean_throwUnknownConstant___rarg___closed__5; x_22 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_22, 0, x_20); lean_ctor_set(x_22, 1, x_21); @@ -4262,7 +4262,7 @@ lean_ctor_set(x_28, 0, x_27); x_29 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_29, 0, x_25); lean_ctor_set(x_29, 1, x_28); -x_30 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_30 = l_Lean_throwUnknownConstant___rarg___closed__5; x_31 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Clear.c b/stage0/stdlib/Lean/Meta/Tactic/Clear.c index 2530166345..25888e602c 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Clear.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Clear.c @@ -40,12 +40,12 @@ lean_object* l_Lean_Meta_tryClear(lean_object*, lean_object*, lean_object*, lean lean_object* l_Lean_Meta_clear___closed__2; lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* l_Lean_Meta_clear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Std_PersistentArray_forMAux___main___at_Lean_Meta_clear___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_clear___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Meta_withMVarContext___at_Lean_Meta_admit___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarDecl___at_Lean_Meta_isReadOnlyExprMVar___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Meta_clear___lambda__1___closed__4; lean_object* l_Lean_MetavarContext_localDeclDependsOn(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_toExpr(lean_object*); @@ -288,7 +288,7 @@ lean_ctor_set(x_35, 0, x_34); x_36 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_36, 0, x_33); lean_ctor_set(x_36, 1, x_35); -x_37 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_37 = l_Lean_throwUnknownConstant___rarg___closed__5; x_38 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_37); @@ -433,7 +433,7 @@ lean_ctor_set(x_35, 0, x_34); x_36 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_36, 0, x_33); lean_ctor_set(x_36, 1, x_35); -x_37 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_37 = l_Lean_throwUnknownConstant___rarg___closed__5; x_38 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_38, 0, x_36); lean_ctor_set(x_38, 1, x_37); @@ -650,7 +650,7 @@ x_87 = l_Lean_Meta_clear___lambda__1___closed__6; x_88 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_88, 0, x_87); lean_ctor_set(x_88, 1, x_86); -x_89 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_89 = l_Lean_throwUnknownConstant___rarg___closed__5; x_90 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_90, 0, x_88); lean_ctor_set(x_90, 1, x_89); @@ -750,7 +750,7 @@ x_61 = l_Lean_Meta_clear___lambda__1___closed__3; x_62 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_62, 0, x_61); lean_ctor_set(x_62, 1, x_60); -x_63 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_63 = l_Lean_throwUnknownConstant___rarg___closed__5; x_64 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_64, 0, x_62); lean_ctor_set(x_64, 1, x_63); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Induction.c b/stage0/stdlib/Lean/Meta/Tactic/Induction.c index 3e3ea6f83f..de1eab0650 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Induction.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Induction.c @@ -102,7 +102,6 @@ lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Tactic_Induction_2__addRecParams___main___closed__7; uint8_t l_Lean_Expr_isHeadBetaTarget(lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_List_forM___main___at_Lean_Meta_induction___spec__4___closed__1; lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_SynthInstance_tryResolveCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Tactic_Induction_2__addRecParams___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -126,6 +125,7 @@ lean_object* l_Lean_Meta_normalizeLevel___at_Lean_Meta_induction___spec__9___box lean_object* l___private_Lean_Meta_Tactic_Induction_2__addRecParams(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Meta_Tactic_Induction_3__getTypeBody___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Meta_RecursorInfo_10__getProduceMotiveAndRecursive___closed__1; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Array_iterateMAux___main___at___private_Lean_Meta_Tactic_Induction_4__finalizeAux___main___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_induction___spec__11___closed__8; lean_object* l___private_Lean_Meta_Tactic_Induction_2__addRecParams___main___closed__5; @@ -4133,7 +4133,7 @@ lean_dec(x_19); lean_dec(x_5); x_81 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_81, 0, x_8); -x_82 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_82 = l_Lean_throwUnknownConstant___rarg___closed__5; x_83 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_83, 0, x_82); lean_ctor_set(x_83, 1, x_81); @@ -4245,7 +4245,7 @@ lean_dec(x_5); lean_dec(x_3); x_39 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_39, 0, x_8); -x_40 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_40 = l_Lean_throwUnknownConstant___rarg___closed__5; x_41 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_41, 0, x_40); lean_ctor_set(x_41, 1, x_39); @@ -4354,7 +4354,7 @@ lean_dec(x_19); lean_dec(x_5); x_65 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_65, 0, x_8); -x_66 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_66 = l_Lean_throwUnknownConstant___rarg___closed__5; x_67 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_67, 0, x_66); lean_ctor_set(x_67, 1, x_65); diff --git a/stage0/stdlib/Lean/Meta/Tactic/Subst.c b/stage0/stdlib/Lean/Meta/Tactic/Subst.c index 39e92b9d00..898f2ebd91 100644 --- a/stage0/stdlib/Lean/Meta/Tactic/Subst.c +++ b/stage0/stdlib/Lean/Meta/Tactic/Subst.c @@ -77,7 +77,6 @@ lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__5___closed__8; lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* l_Lean_Meta_clear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Meta_substCore___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_substCore___lambda__5___closed__9; lean_object* l_Lean_Meta_mkLambdaFVars___at_Lean_Meta_SynthInstance_tryResolveCore___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -90,6 +89,7 @@ lean_object* l_Lean_Meta_revert(lean_object*, lean_object*, uint8_t, lean_object extern lean_object* l_List_reprAux___main___rarg___closed__1; lean_object* l_Lean_Meta_withMVarContext___at_Lean_Meta_admit___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarDecl___at_Lean_Meta_isReadOnlyExprMVar___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_Meta_substCore___lambda__4___boxed(lean_object**); lean_object* l_Lean_Meta_substCore___lambda__1___closed__8; lean_object* l_Lean_Meta_getLocalDecl___at_Lean_Meta_getFVarLocalDecl___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -2846,7 +2846,7 @@ lean_dec(x_3); lean_dec(x_2); x_117 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_117, 0, x_34); -x_118 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_118 = l_Lean_throwUnknownConstant___rarg___closed__5; x_119 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_119, 0, x_118); lean_ctor_set(x_119, 1, x_117); @@ -5284,7 +5284,7 @@ x_23 = l_Lean_Meta_subst___lambda__1___closed__3; x_24 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_24, 0, x_23); lean_ctor_set(x_24, 1, x_22); -x_25 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_25 = l_Lean_throwUnknownConstant___rarg___closed__5; x_26 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_26, 0, x_24); lean_ctor_set(x_26, 1, x_25); diff --git a/stage0/stdlib/Lean/MonadEnv.c b/stage0/stdlib/Lean/MonadEnv.c index d154372769..6ce1cfdde2 100644 --- a/stage0/stdlib/Lean/MonadEnv.c +++ b/stage0/stdlib/Lean/MonadEnv.c @@ -14,7 +14,6 @@ extern "C" { #endif lean_object* l_Lean_evalConst(lean_object*); -lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__4; lean_object* l_Lean_hasConst___rarg___lambda__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addDecl___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_setEnv___rarg(lean_object*, lean_object*); @@ -40,7 +39,6 @@ lean_object* l_Lean_setEnv(lean_object*); lean_object* l_Lean_hasConst___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addAndCompile___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); -lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__3; lean_object* l_Lean_getConstInfoCtor___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_evalConst___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_evalConstCheck___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -53,12 +51,10 @@ lean_object* l_Lean_matchConstStruct___rarg(lean_object*, lean_object*, lean_obj lean_object* l_Lean_getConstInfoCtor___rarg___lambda__1___closed__3; lean_object* l_Lean_addAndCompile___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getConstInfoInduct(lean_object*); -lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_Name_appendIndexAfter(lean_object*, lean_object*); lean_object* l___private_Lean_MonadEnv_1__mkAuxNameAux___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_addDecl___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_compileDecl___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Char_HasRepr___closed__1; lean_object* l_Lean_getConstInfo___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getConstInfoInduct___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_matchConstCtor___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -67,8 +63,10 @@ lean_object* l_Lean_matchConst(lean_object*); lean_object* lean_eval_const(lean_object*, lean_object*); uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); lean_object* l_Lean_evalConst___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_matchConstInduct(lean_object*); lean_object* l_Lean_getConstInfo(lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__3; lean_object* l_Lean_addDecl(lean_object*); extern lean_object* l_finally___rarg___closed__1; lean_object* l_Lean_withoutModifyingEnv___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -77,13 +75,11 @@ lean_object* l_Lean_ofExcept___at_Lean_evalConst___spec__1(lean_object*); lean_object* l_Lean_Environment_evalConstCheck___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_evalConstCheck(lean_object*); lean_object* l_fix1___rarg___lambda__1___boxed(lean_object*, lean_object*); -lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__1; lean_object* l_Lean_mkAuxName(lean_object*); lean_object* l_Lean_addDecl___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAuxName___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAuxName___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_matchConstRec(lean_object*); -lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__2; lean_object* l_Lean_throwKernelException___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getConstInfoCtor___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ofExcept___at_Lean_evalConstCheck___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -643,54 +639,6 @@ x_2 = lean_alloc_closure((void*)(l_Lean_mkAuxName___rarg), 4, 0); return x_2; } } -lean_object* _init_l_Lean_getConstInfo___rarg___lambda__1___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("unknown constant '"); -return x_1; -} -} -lean_object* _init_l_Lean_getConstInfo___rarg___lambda__1___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_getConstInfo___rarg___lambda__1___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_getConstInfo___rarg___lambda__1___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_getConstInfo___rarg___lambda__1___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_getConstInfo___rarg___lambda__1___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Char_HasRepr___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_getConstInfo___rarg___lambda__1___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_getConstInfo___rarg___lambda__1___closed__4; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} lean_object* l_Lean_getConstInfo___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { @@ -702,11 +650,11 @@ if (lean_obj_tag(x_7) == 0) lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; x_8 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_8, 0, x_1); -x_9 = l_Lean_getConstInfo___rarg___lambda__1___closed__3; +x_9 = l_Lean_throwUnknownConstant___rarg___closed__3; x_10 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_8); -x_11 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_11 = l_Lean_throwUnknownConstant___rarg___closed__5; x_12 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_12, 0, x_10); lean_ctor_set(x_12, 1, x_11); @@ -826,7 +774,7 @@ lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_ lean_dec(x_8); x_9 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_9, 0, x_1); -x_10 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_10 = l_Lean_throwUnknownConstant___rarg___closed__5; x_11 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); @@ -945,7 +893,7 @@ lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_ lean_dec(x_8); x_9 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_9, 0, x_1); -x_10 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_10 = l_Lean_throwUnknownConstant___rarg___closed__5; x_11 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); @@ -1064,7 +1012,7 @@ lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_ lean_dec(x_8); x_9 = lean_alloc_ctor(4, 1, 0); lean_ctor_set(x_9, 0, x_1); -x_10 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_10 = l_Lean_throwUnknownConstant___rarg___closed__5; x_11 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_11, 0, x_10); lean_ctor_set(x_11, 1, x_9); @@ -1746,16 +1694,6 @@ lean_dec_ref(res); res = initialize_Lean_Exception(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_getConstInfo___rarg___lambda__1___closed__1 = _init_l_Lean_getConstInfo___rarg___lambda__1___closed__1(); -lean_mark_persistent(l_Lean_getConstInfo___rarg___lambda__1___closed__1); -l_Lean_getConstInfo___rarg___lambda__1___closed__2 = _init_l_Lean_getConstInfo___rarg___lambda__1___closed__2(); -lean_mark_persistent(l_Lean_getConstInfo___rarg___lambda__1___closed__2); -l_Lean_getConstInfo___rarg___lambda__1___closed__3 = _init_l_Lean_getConstInfo___rarg___lambda__1___closed__3(); -lean_mark_persistent(l_Lean_getConstInfo___rarg___lambda__1___closed__3); -l_Lean_getConstInfo___rarg___lambda__1___closed__4 = _init_l_Lean_getConstInfo___rarg___lambda__1___closed__4(); -lean_mark_persistent(l_Lean_getConstInfo___rarg___lambda__1___closed__4); -l_Lean_getConstInfo___rarg___lambda__1___closed__5 = _init_l_Lean_getConstInfo___rarg___lambda__1___closed__5(); -lean_mark_persistent(l_Lean_getConstInfo___rarg___lambda__1___closed__5); l_Lean_getConstInfoInduct___rarg___lambda__1___closed__1 = _init_l_Lean_getConstInfoInduct___rarg___lambda__1___closed__1(); lean_mark_persistent(l_Lean_getConstInfoInduct___rarg___lambda__1___closed__1); l_Lean_getConstInfoInduct___rarg___lambda__1___closed__2 = _init_l_Lean_getConstInfoInduct___rarg___lambda__1___closed__2(); diff --git a/stage0/stdlib/Lean/Parser/Command.c b/stage0/stdlib/Lean/Parser/Command.c index 8dae11a176..150175b995 100644 --- a/stage0/stdlib/Lean/Parser/Command.c +++ b/stage0/stdlib/Lean/Parser/Command.c @@ -709,7 +709,6 @@ lean_object* l_Lean_Parser_Command_inferMod___elambda__1___closed__4; lean_object* l_Lean_Parser_Command_declaration_parenthesizer___closed__19; lean_object* l___regBuiltin_Lean_Parser_Command_in_parenthesizer___closed__1; lean_object* l_Lean_Parser_Command_end_formatter___closed__2; -lean_object* l_Lean_Parser_Command_protected___elambda__1___closed__9; lean_object* l_Lean_Parser_Command_printAxioms___closed__3; lean_object* l_Lean_PrettyPrinter_Formatter_trailingNode_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_openRenaming_formatter___closed__3; @@ -2371,6 +2370,7 @@ lean_object* l_Lean_Parser_Command_partial_formatter___closed__2; lean_object* l_Lean_PrettyPrinter_Formatter_categoryParser_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_Command_declModifiers_parenthesizer___closed__3; lean_object* l_Lean_Parser_Command_constant; +extern lean_object* l_Lean_mkProtectedExtension___closed__1; lean_object* _init_l_Lean_Parser_Term_quot___elambda__1___closed__1() { _start: { @@ -4288,43 +4288,35 @@ return x_1; lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__1() { _start: { -lean_object* x_1; -x_1 = lean_mk_string("protected"); -return x_1; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Command_docComment___elambda__1___closed__2; +x_2 = l_Lean_mkProtectedExtension___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; } } lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_docComment___elambda__1___closed__2; -x_2 = l_Lean_Parser_Command_protected___elambda__1___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__3() { -_start: -{ lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_2 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__4() { +lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__3() { _start: { lean_object* x_1; lean_object* x_2; uint8_t x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__1; -x_2 = l_Lean_Parser_Command_protected___elambda__1___closed__3; +x_1 = l_Lean_mkProtectedExtension___closed__1; +x_2 = l_Lean_Parser_Command_protected___elambda__1___closed__2; x_3 = 1; x_4 = l_Lean_Parser_mkAntiquot(x_1, x_2, x_3); return x_4; } } -lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__5() { +lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__4() { _start: { lean_object* x_1; @@ -4332,21 +4324,31 @@ x_1 = lean_mk_string("protected "); return x_1; } } -lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__6() { +lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__5() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__5; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__4; x_2 = l_String_trim(x_1); return x_2; } } +lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Char_HasRepr___closed__1; +x_2 = l_Lean_Parser_Command_protected___elambda__1___closed__5; +x_3 = lean_string_append(x_1, x_2); +return x_3; +} +} lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__7() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Char_HasRepr___closed__1; -x_2 = l_Lean_Parser_Command_protected___elambda__1___closed__6; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__6; +x_2 = l_Char_HasRepr___closed__1; x_3 = lean_string_append(x_1, x_2); return x_3; } @@ -4355,18 +4357,8 @@ lean_object* _init_l_Lean_Parser_Command_protected___elambda__1___closed__8() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__7; -x_2 = l_Char_HasRepr___closed__1; -x_3 = lean_string_append(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Parser_Command_protected___elambda__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_Parser_Command_protected___elambda__1___closed__8; +x_2 = l_Lean_Parser_Command_protected___elambda__1___closed__7; x_3 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_3, 0, x_2); lean_ctor_set(x_3, 1, x_1); @@ -4377,7 +4369,7 @@ lean_object* l_Lean_Parser_Command_protected___elambda__1(lean_object* x_1, lean _start: { lean_object* x_3; lean_object* x_4; uint8_t x_5; -x_3 = l_Lean_Parser_Command_protected___elambda__1___closed__4; +x_3 = l_Lean_Parser_Command_protected___elambda__1___closed__3; x_4 = lean_ctor_get(x_3, 1); lean_inc(x_4); lean_inc(x_2); @@ -4416,15 +4408,15 @@ lean_object* x_16; lean_object* x_17; uint8_t x_18; x_16 = lean_ctor_get(x_15, 1); lean_inc(x_16); lean_dec(x_15); -x_17 = l_Lean_Parser_Command_protected___elambda__1___closed__6; +x_17 = l_Lean_Parser_Command_protected___elambda__1___closed__5; x_18 = lean_string_dec_eq(x_16, x_17); lean_dec(x_16); if (x_18 == 0) { lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_19 = l_Lean_Parser_Command_protected___elambda__1___closed__9; +x_19 = l_Lean_Parser_Command_protected___elambda__1___closed__8; x_20 = l_Lean_Parser_ParserState_mkErrorsAt(x_12, x_19, x_11); -x_21 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_21 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_22 = l_Lean_Parser_ParserState_mkNode(x_20, x_21, x_10); return x_22; } @@ -4432,7 +4424,7 @@ else { lean_object* x_23; lean_object* x_24; lean_dec(x_11); -x_23 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_23 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_24 = l_Lean_Parser_ParserState_mkNode(x_12, x_23, x_10); return x_24; } @@ -4441,9 +4433,9 @@ else { lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_dec(x_15); -x_25 = l_Lean_Parser_Command_protected___elambda__1___closed__9; +x_25 = l_Lean_Parser_Command_protected___elambda__1___closed__8; x_26 = l_Lean_Parser_ParserState_mkErrorsAt(x_12, x_25, x_11); -x_27 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_27 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_28 = l_Lean_Parser_ParserState_mkNode(x_26, x_27, x_10); return x_28; } @@ -4452,9 +4444,9 @@ else { lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_dec(x_13); -x_29 = l_Lean_Parser_Command_protected___elambda__1___closed__9; +x_29 = l_Lean_Parser_Command_protected___elambda__1___closed__8; x_30 = l_Lean_Parser_ParserState_mkErrorsAt(x_12, x_29, x_11); -x_31 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_31 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_32 = l_Lean_Parser_ParserState_mkNode(x_30, x_31, x_10); return x_32; } @@ -4539,15 +4531,15 @@ lean_object* x_52; lean_object* x_53; uint8_t x_54; x_52 = lean_ctor_get(x_51, 1); lean_inc(x_52); lean_dec(x_51); -x_53 = l_Lean_Parser_Command_protected___elambda__1___closed__6; +x_53 = l_Lean_Parser_Command_protected___elambda__1___closed__5; x_54 = lean_string_dec_eq(x_52, x_53); lean_dec(x_52); if (x_54 == 0) { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_59; lean_object* x_60; -x_55 = l_Lean_Parser_Command_protected___elambda__1___closed__9; +x_55 = l_Lean_Parser_Command_protected___elambda__1___closed__8; x_56 = l_Lean_Parser_ParserState_mkErrorsAt(x_48, x_55, x_47); -x_57 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_57 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_58 = l_Lean_Parser_ParserState_mkNode(x_56, x_57, x_46); x_59 = 1; x_60 = l_Lean_Parser_mergeOrElseErrors(x_58, x_38, x_35, x_59); @@ -4558,7 +4550,7 @@ else { lean_object* x_61; lean_object* x_62; uint8_t x_63; lean_object* x_64; lean_dec(x_47); -x_61 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_61 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_62 = l_Lean_Parser_ParserState_mkNode(x_48, x_61, x_46); x_63 = 1; x_64 = l_Lean_Parser_mergeOrElseErrors(x_62, x_38, x_35, x_63); @@ -4570,9 +4562,9 @@ else { lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; uint8_t x_69; lean_object* x_70; lean_dec(x_51); -x_65 = l_Lean_Parser_Command_protected___elambda__1___closed__9; +x_65 = l_Lean_Parser_Command_protected___elambda__1___closed__8; x_66 = l_Lean_Parser_ParserState_mkErrorsAt(x_48, x_65, x_47); -x_67 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_67 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_68 = l_Lean_Parser_ParserState_mkNode(x_66, x_67, x_46); x_69 = 1; x_70 = l_Lean_Parser_mergeOrElseErrors(x_68, x_38, x_35, x_69); @@ -4584,9 +4576,9 @@ else { lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; lean_object* x_76; lean_dec(x_49); -x_71 = l_Lean_Parser_Command_protected___elambda__1___closed__9; +x_71 = l_Lean_Parser_Command_protected___elambda__1___closed__8; x_72 = l_Lean_Parser_ParserState_mkErrorsAt(x_48, x_71, x_47); -x_73 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_73 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_74 = l_Lean_Parser_ParserState_mkNode(x_72, x_73, x_46); x_75 = 1; x_76 = l_Lean_Parser_mergeOrElseErrors(x_74, x_38, x_35, x_75); @@ -4613,7 +4605,7 @@ lean_object* _init_l_Lean_Parser_Command_protected___closed__1() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__6; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__5; x_2 = l_Lean_Parser_symbolInfo(x_1); return x_2; } @@ -4622,7 +4614,7 @@ lean_object* _init_l_Lean_Parser_Command_protected___closed__2() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_2 = l_Lean_Parser_Command_protected___closed__1; x_3 = l_Lean_Parser_nodeInfo(x_1, x_2); return x_3; @@ -4642,7 +4634,7 @@ lean_object* _init_l_Lean_Parser_Command_protected___closed__4() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__4; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__3; x_2 = lean_ctor_get(x_1, 0); lean_inc(x_2); x_3 = l_Lean_Parser_Command_protected___closed__3; @@ -25463,8 +25455,8 @@ lean_object* _init_l_Lean_Parser_Command_protected_formatter___closed__1() { _start: { lean_object* x_1; lean_object* x_2; uint8_t x_3; lean_object* x_4; lean_object* x_5; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__1; -x_2 = l_Lean_Parser_Command_protected___elambda__1___closed__3; +x_1 = l_Lean_mkProtectedExtension___closed__1; +x_2 = l_Lean_Parser_Command_protected___elambda__1___closed__2; x_3 = 1; x_4 = lean_box(x_3); x_5 = lean_alloc_closure((void*)(l_Lean_Parser_mkAntiquot_formatter___boxed), 8, 3); @@ -25478,7 +25470,7 @@ lean_object* _init_l_Lean_Parser_Command_protected_formatter___closed__2() { _start: { lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__5; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__4; x_2 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Formatter_symbol_formatter___boxed), 6, 1); lean_closure_set(x_2, 0, x_1); return x_2; @@ -25488,7 +25480,7 @@ lean_object* _init_l_Lean_Parser_Command_protected_formatter___closed__3() { _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__2; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_2 = lean_unsigned_to_nat(1024u); x_3 = l_Lean_Parser_Command_protected_formatter___closed__2; x_4 = lean_alloc_closure((void*)(l_Lean_Parser_leadingNode_formatter___boxed), 8, 3); @@ -28622,7 +28614,7 @@ lean_object* _init_l_Lean_Parser_Command_protected_parenthesizer___closed__1() { _start: { lean_object* x_1; uint8_t x_2; lean_object* x_3; lean_object* x_4; -x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__3; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__2; x_2 = 1; x_3 = lean_box(x_2); x_4 = lean_alloc_closure((void*)(l_Lean_Parser_mkAntiquot_parenthesizer___rarg___boxed), 7, 2); @@ -28635,7 +28627,7 @@ lean_object* _init_l_Lean_Parser_Command_protected_parenthesizer___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_protected___elambda__1___closed__2; +x_1 = l_Lean_Parser_Command_protected___elambda__1___closed__1; x_2 = lean_unsigned_to_nat(1024u); x_3 = l_Lean_Parser_antiquotNestedExpr_parenthesizer___closed__3; x_4 = lean_alloc_closure((void*)(l_Lean_PrettyPrinter_Parenthesizer_leadingNode_parenthesizer___boxed), 8, 3); @@ -52697,8 +52689,6 @@ l_Lean_Parser_Command_protected___elambda__1___closed__7 = _init_l_Lean_Parser_C lean_mark_persistent(l_Lean_Parser_Command_protected___elambda__1___closed__7); l_Lean_Parser_Command_protected___elambda__1___closed__8 = _init_l_Lean_Parser_Command_protected___elambda__1___closed__8(); lean_mark_persistent(l_Lean_Parser_Command_protected___elambda__1___closed__8); -l_Lean_Parser_Command_protected___elambda__1___closed__9 = _init_l_Lean_Parser_Command_protected___elambda__1___closed__9(); -lean_mark_persistent(l_Lean_Parser_Command_protected___elambda__1___closed__9); l_Lean_Parser_Command_protected___closed__1 = _init_l_Lean_Parser_Command_protected___closed__1(); lean_mark_persistent(l_Lean_Parser_Command_protected___closed__1); l_Lean_Parser_Command_protected___closed__2 = _init_l_Lean_Parser_Command_protected___closed__2(); diff --git a/stage0/stdlib/Lean/Parser/Extension.c b/stage0/stdlib/Lean/Parser/Extension.c index c75a30b07b..6d5ec0fcfd 100644 --- a/stage0/stdlib/Lean/Parser/Extension.c +++ b/stage0/stdlib/Lean/Parser/Extension.c @@ -62,7 +62,6 @@ lean_object* l_Lean_Parser_parserExtension___elambda__1___boxed(lean_object*); lean_object* l_Lean_Parser_mkParserExtension___closed__4; lean_object* l_Lean_Parser_getTokenTable___boxed(lean_object*); lean_object* l___private_Lean_Parser_Extension_6__addTokenConfig___closed__1; -uint8_t l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(lean_object*, lean_object*); extern lean_object* l_Lean_registerInternalExceptionId___closed__2; lean_object* l_Lean_Parser_addParser(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_categoryParserFnRef; @@ -82,7 +81,6 @@ lean_object* l_Lean_Parser_nonReservedSymbolFn(lean_object*, lean_object*, lean_ lean_object* l___private_Lean_Parser_Extension_2__throwParserCategoryAlreadyDefined___rarg___closed__1; lean_object* l_Lean_Parser_mkParserState(lean_object*); lean_object* l_Lean_Parser_mkParserExtension___lambda__2(lean_object*); -lean_object* l_List_foldl___main___at_Lean_Parser_addLeadingParser___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_notFollowedByFn(lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Parser_Extension_13__registerParserAttributeImplBuilder___closed__1; lean_object* l_Lean_Parser_declareBuiltinParser___closed__3; @@ -155,7 +153,6 @@ lean_object* l_Lean_Parser_setCategoryParserFnRef(lean_object*); extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__3; lean_object* l_Lean_Parser_throwUnknownParserCategory(lean_object*); lean_object* l_Lean_Parser_notFollowedByCategoryTokenFn___closed__1; -lean_object* l_List_eraseDupsAux___main___at_Lean_Parser_addLeadingParser___spec__3(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_PrattParsingTables_inhabited___closed__1; lean_object* l_Lean_Parser_compileParserDescr___main___closed__3; lean_object* l_Lean_Parser_throwUnknownParserCategory___rarg___closed__1; @@ -301,6 +298,7 @@ lean_object* l_Lean_ParametricAttribute_setParam___rarg(lean_object*, lean_objec extern lean_object* l___private_Init_LeanInit_13__quoteName___main___closed__2; lean_object* l_Lean_Parser_mkParserAttributeImpl___elambda__1___boxed(lean_object*); lean_object* l_Lean_Parser_sepBy1Info(lean_object*, lean_object*); +lean_object* l_List_eraseDups___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__1(lean_object*); lean_object* l_Lean_Parser_sepBy1Fn___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkAppStx___closed__3; uint8_t l_Array_anyRangeMAux___main___at_Lean_Parser_mkParserExtension___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -343,7 +341,6 @@ lean_object* l_Lean_Parser_parserAttributeHooks; lean_object* l___private_Lean_Parser_Extension_13__registerParserAttributeImplBuilder(lean_object*); extern lean_object* l_Lean_Parser_epsilonInfo; lean_object* l_Lean_Parser_notFollowedByTermToken; -lean_object* l_List_eraseDups___at_Lean_Parser_addLeadingParser___spec__2(lean_object*); lean_object* l_Lean_Parser_getParserPriority(lean_object*); lean_object* l_Lean_Parser_builtinSyntaxNodeKindSetRef; lean_object* l_Lean_Parser_registerBuiltinNodeKind(lean_object*, lean_object*); @@ -431,6 +428,7 @@ lean_object* l___private_Lean_Data_Trie_3__findAux_x3f___main___rarg(lean_object lean_object* l_IO_ofExcept___at___private_Lean_Parser_Extension_10__ParserExtension_addImported___spec__2(lean_object*, lean_object*); extern lean_object* l_Lean_initAttr; lean_object* l_Std_PersistentHashMap_containsAux___main___at___private_Lean_Parser_Extension_3__addParserCategoryCore___spec__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_Lean_Parser_addLeadingParser___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Lean_Parser_Extension_10__ParserExtension_addImported(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkAppStx___closed__1; lean_object* l_Lean_Parser_regBuiltinCommandParserAttr___closed__3; @@ -1811,83 +1809,7 @@ return x_14; } } } -lean_object* l_List_eraseDupsAux___main___at_Lean_Parser_addLeadingParser___spec__3(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_3; -x_3 = l_List_reverse___rarg(x_2); -return x_3; -} -else -{ -uint8_t x_4; -x_4 = !lean_is_exclusive(x_1); -if (x_4 == 0) -{ -lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_5 = lean_ctor_get(x_1, 0); -x_6 = lean_ctor_get(x_1, 1); -x_7 = l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(x_5, x_2); -if (x_7 == 0) -{ -lean_ctor_set(x_1, 1, x_2); -{ -lean_object* _tmp_0 = x_6; -lean_object* _tmp_1 = x_1; -x_1 = _tmp_0; -x_2 = _tmp_1; -} -goto _start; -} -else -{ -lean_free_object(x_1); -lean_dec(x_5); -x_1 = x_6; -goto _start; -} -} -else -{ -lean_object* x_10; lean_object* x_11; uint8_t x_12; -x_10 = lean_ctor_get(x_1, 0); -x_11 = lean_ctor_get(x_1, 1); -lean_inc(x_11); -lean_inc(x_10); -lean_dec(x_1); -x_12 = l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(x_10, x_2); -if (x_12 == 0) -{ -lean_object* x_13; -x_13 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_13, 0, x_10); -lean_ctor_set(x_13, 1, x_2); -x_1 = x_11; -x_2 = x_13; -goto _start; -} -else -{ -lean_dec(x_10); -x_1 = x_11; -goto _start; -} -} -} -} -} -lean_object* l_List_eraseDups___at_Lean_Parser_addLeadingParser___spec__2(lean_object* x_1) { -_start: -{ -lean_object* x_2; lean_object* x_3; -x_2 = lean_box(0); -x_3 = l_List_eraseDupsAux___main___at_Lean_Parser_addLeadingParser___spec__3(x_1, x_2); -return x_3; -} -} -lean_object* l_List_foldl___main___at_Lean_Parser_addLeadingParser___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_List_foldl___main___at_Lean_Parser_addLeadingParser___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { if (lean_obj_tag(x_4) == 0) @@ -2117,8 +2039,8 @@ if (x_43 == 0) { lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_44 = lean_ctor_get(x_8, 0); -x_45 = l_List_eraseDups___at_Lean_Parser_addLeadingParser___spec__2(x_42); -x_46 = l_List_foldl___main___at_Lean_Parser_addLeadingParser___spec__4(x_4, x_5, x_44, x_45); +x_45 = l_List_eraseDups___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__1(x_42); +x_46 = l_List_foldl___main___at_Lean_Parser_addLeadingParser___spec__2(x_4, x_5, x_44, x_45); lean_ctor_set(x_8, 0, x_46); x_47 = l_Std_PersistentHashMap_insert___at___private_Lean_Parser_Extension_3__addParserCategoryCore___spec__3(x_1, x_2, x_8); x_48 = lean_alloc_ctor(1, 1, 0); @@ -2132,8 +2054,8 @@ x_49 = lean_ctor_get(x_8, 0); x_50 = lean_ctor_get_uint8(x_8, sizeof(void*)*1); lean_inc(x_49); lean_dec(x_8); -x_51 = l_List_eraseDups___at_Lean_Parser_addLeadingParser___spec__2(x_42); -x_52 = l_List_foldl___main___at_Lean_Parser_addLeadingParser___spec__4(x_4, x_5, x_49, x_51); +x_51 = l_List_eraseDups___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__1(x_42); +x_52 = l_List_foldl___main___at_Lean_Parser_addLeadingParser___spec__2(x_4, x_5, x_49, x_51); x_53 = lean_alloc_ctor(0, 1, 1); lean_ctor_set(x_53, 0, x_52); lean_ctor_set_uint8(x_53, sizeof(void*)*1, x_50); @@ -2302,7 +2224,7 @@ block_21: { lean_object* x_18; lean_object* x_19; lean_object* x_20; x_18 = l_List_map___main___at_Lean_Parser_addLeadingParser___spec__1(x_17); -x_19 = l_List_eraseDups___at_Lean_Parser_addLeadingParser___spec__2(x_18); +x_19 = l_List_eraseDups___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__1(x_18); x_20 = l_List_foldl___main___at___private_Lean_Parser_Extension_7__addTrailingParserAux___spec__1(x_2, x_3, x_1, x_19); return x_20; } diff --git a/stage0/stdlib/Lean/ParserCompiler.c b/stage0/stdlib/Lean/ParserCompiler.c index f0502af89c..861f8291e1 100644 --- a/stage0/stdlib/Lean/ParserCompiler.c +++ b/stage0/stdlib/Lean/ParserCompiler.c @@ -140,7 +140,6 @@ lean_object* l_Lean_ParserCompiler_compileParserBody___main___rarg___lambda__7(l lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_ParserCompiler_compileParserBody___main___spec__20___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_ParserCompiler_compileParserBody___main___spec__25___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_ParserCompiler_compileParserBody___main___spec__19(lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_ParserCompiler_compileParserBody___main___spec__7___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParserCompiler_compileParserBody___main___rarg___lambda__17(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_ParserCompiler_compileParserBody___main___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -162,6 +161,7 @@ lean_object* l_Lean_getConstInfo___at_Lean_Meta_getParamNamesImp___spec__1(lean_ lean_object* lean_eval_const(lean_object*, lean_object*); lean_object* l_Lean_KeyedDeclsAttribute_getValues___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_ParserCompiler_compileParserBody___main___spec__22___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_ParserCompiler_compileParserBody___main___rarg___lambda__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_ParserCompiler_compileParserBody___main___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateM_u2082Aux___main___at_Lean_ParserCompiler_compileParserBody___main___spec__23___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -8017,7 +8017,7 @@ lean_ctor_set(x_148, 0, x_147); x_149 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_149, 0, x_145); lean_ctor_set(x_149, 1, x_148); -x_150 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_150 = l_Lean_throwUnknownConstant___rarg___closed__5; x_151 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_151, 0, x_149); lean_ctor_set(x_151, 1, x_150); @@ -8124,7 +8124,7 @@ lean_ctor_set(x_55, 0, x_54); x_56 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_56, 0, x_52); lean_ctor_set(x_56, 1, x_55); -x_57 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_57 = l_Lean_throwUnknownConstant___rarg___closed__5; x_58 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_58, 0, x_56); lean_ctor_set(x_58, 1, x_57); @@ -8599,7 +8599,7 @@ x_16 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_16); lean_ctor_set(x_17, 1, x_15); -x_18 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_18 = l_Lean_throwUnknownConstant___rarg___closed__5; x_19 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_19, 0, x_17); lean_ctor_set(x_19, 1, x_18); @@ -8762,7 +8762,7 @@ lean_ctor_set(x_325, 0, x_324); x_326 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_326, 0, x_322); lean_ctor_set(x_326, 1, x_325); -x_327 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_327 = l_Lean_throwUnknownConstant___rarg___closed__5; x_328 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_328, 0, x_326); lean_ctor_set(x_328, 1, x_327); @@ -8869,7 +8869,7 @@ lean_ctor_set(x_232, 0, x_231); x_233 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_233, 0, x_229); lean_ctor_set(x_233, 1, x_232); -x_234 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_234 = l_Lean_throwUnknownConstant___rarg___closed__5; x_235 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_235, 0, x_233); lean_ctor_set(x_235, 1, x_234); @@ -9344,7 +9344,7 @@ x_193 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_194 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_194, 0, x_193); lean_ctor_set(x_194, 1, x_192); -x_195 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_195 = l_Lean_throwUnknownConstant___rarg___closed__5; x_196 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_196, 0, x_194); lean_ctor_set(x_196, 1, x_195); @@ -9479,7 +9479,7 @@ lean_ctor_set(x_498, 0, x_497); x_499 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_499, 0, x_495); lean_ctor_set(x_499, 1, x_498); -x_500 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_500 = l_Lean_throwUnknownConstant___rarg___closed__5; x_501 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_501, 0, x_499); lean_ctor_set(x_501, 1, x_500); @@ -9586,7 +9586,7 @@ lean_ctor_set(x_405, 0, x_404); x_406 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_406, 0, x_402); lean_ctor_set(x_406, 1, x_405); -x_407 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_407 = l_Lean_throwUnknownConstant___rarg___closed__5; x_408 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_408, 0, x_406); lean_ctor_set(x_408, 1, x_407); @@ -10061,7 +10061,7 @@ x_366 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_367 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_367, 0, x_366); lean_ctor_set(x_367, 1, x_365); -x_368 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_368 = l_Lean_throwUnknownConstant___rarg___closed__5; x_369 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_369, 0, x_367); lean_ctor_set(x_369, 1, x_368); @@ -10196,7 +10196,7 @@ lean_ctor_set(x_671, 0, x_670); x_672 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_672, 0, x_668); lean_ctor_set(x_672, 1, x_671); -x_673 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_673 = l_Lean_throwUnknownConstant___rarg___closed__5; x_674 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_674, 0, x_672); lean_ctor_set(x_674, 1, x_673); @@ -10303,7 +10303,7 @@ lean_ctor_set(x_578, 0, x_577); x_579 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_579, 0, x_575); lean_ctor_set(x_579, 1, x_578); -x_580 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_580 = l_Lean_throwUnknownConstant___rarg___closed__5; x_581 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_581, 0, x_579); lean_ctor_set(x_581, 1, x_580); @@ -10778,7 +10778,7 @@ x_539 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_540 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_540, 0, x_539); lean_ctor_set(x_540, 1, x_538); -x_541 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_541 = l_Lean_throwUnknownConstant___rarg___closed__5; x_542 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_542, 0, x_540); lean_ctor_set(x_542, 1, x_541); @@ -10913,7 +10913,7 @@ lean_ctor_set(x_844, 0, x_843); x_845 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_845, 0, x_841); lean_ctor_set(x_845, 1, x_844); -x_846 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_846 = l_Lean_throwUnknownConstant___rarg___closed__5; x_847 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_847, 0, x_845); lean_ctor_set(x_847, 1, x_846); @@ -11020,7 +11020,7 @@ lean_ctor_set(x_751, 0, x_750); x_752 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_752, 0, x_748); lean_ctor_set(x_752, 1, x_751); -x_753 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_753 = l_Lean_throwUnknownConstant___rarg___closed__5; x_754 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_754, 0, x_752); lean_ctor_set(x_754, 1, x_753); @@ -11495,7 +11495,7 @@ x_712 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_713 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_713, 0, x_712); lean_ctor_set(x_713, 1, x_711); -x_714 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_714 = l_Lean_throwUnknownConstant___rarg___closed__5; x_715 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_715, 0, x_713); lean_ctor_set(x_715, 1, x_714); @@ -11641,7 +11641,7 @@ lean_ctor_set(x_1020, 0, x_1019); x_1021 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1021, 0, x_1017); lean_ctor_set(x_1021, 1, x_1020); -x_1022 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1022 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1023 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1023, 0, x_1021); lean_ctor_set(x_1023, 1, x_1022); @@ -11748,7 +11748,7 @@ lean_ctor_set(x_927, 0, x_926); x_928 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_928, 0, x_924); lean_ctor_set(x_928, 1, x_927); -x_929 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_929 = l_Lean_throwUnknownConstant___rarg___closed__5; x_930 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_930, 0, x_928); lean_ctor_set(x_930, 1, x_929); @@ -12223,7 +12223,7 @@ x_888 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_889 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_889, 0, x_888); lean_ctor_set(x_889, 1, x_887); -x_890 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_890 = l_Lean_throwUnknownConstant___rarg___closed__5; x_891 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_891, 0, x_889); lean_ctor_set(x_891, 1, x_890); @@ -12358,7 +12358,7 @@ lean_ctor_set(x_1193, 0, x_1192); x_1194 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1194, 0, x_1190); lean_ctor_set(x_1194, 1, x_1193); -x_1195 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1195 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1196 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1196, 0, x_1194); lean_ctor_set(x_1196, 1, x_1195); @@ -12465,7 +12465,7 @@ lean_ctor_set(x_1100, 0, x_1099); x_1101 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1101, 0, x_1097); lean_ctor_set(x_1101, 1, x_1100); -x_1102 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1102 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1103 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1103, 0, x_1101); lean_ctor_set(x_1103, 1, x_1102); @@ -12940,7 +12940,7 @@ x_1061 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_1062 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1062, 0, x_1061); lean_ctor_set(x_1062, 1, x_1060); -x_1063 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1063 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1064 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1064, 0, x_1062); lean_ctor_set(x_1064, 1, x_1063); @@ -13075,7 +13075,7 @@ lean_ctor_set(x_1366, 0, x_1365); x_1367 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1367, 0, x_1363); lean_ctor_set(x_1367, 1, x_1366); -x_1368 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1368 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1369 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1369, 0, x_1367); lean_ctor_set(x_1369, 1, x_1368); @@ -13182,7 +13182,7 @@ lean_ctor_set(x_1273, 0, x_1272); x_1274 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1274, 0, x_1270); lean_ctor_set(x_1274, 1, x_1273); -x_1275 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1275 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1276 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1276, 0, x_1274); lean_ctor_set(x_1276, 1, x_1275); @@ -13657,7 +13657,7 @@ x_1234 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_1235 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1235, 0, x_1234); lean_ctor_set(x_1235, 1, x_1233); -x_1236 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1236 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1237 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1237, 0, x_1235); lean_ctor_set(x_1237, 1, x_1236); @@ -13792,7 +13792,7 @@ lean_ctor_set(x_1539, 0, x_1538); x_1540 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1540, 0, x_1536); lean_ctor_set(x_1540, 1, x_1539); -x_1541 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1541 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1542 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1542, 0, x_1540); lean_ctor_set(x_1542, 1, x_1541); @@ -13899,7 +13899,7 @@ lean_ctor_set(x_1446, 0, x_1445); x_1447 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1447, 0, x_1443); lean_ctor_set(x_1447, 1, x_1446); -x_1448 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1448 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1449 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1449, 0, x_1447); lean_ctor_set(x_1449, 1, x_1448); @@ -14374,7 +14374,7 @@ x_1407 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_1408 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1408, 0, x_1407); lean_ctor_set(x_1408, 1, x_1406); -x_1409 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1409 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1410 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1410, 0, x_1408); lean_ctor_set(x_1410, 1, x_1409); @@ -14509,7 +14509,7 @@ lean_ctor_set(x_1712, 0, x_1711); x_1713 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1713, 0, x_1709); lean_ctor_set(x_1713, 1, x_1712); -x_1714 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1714 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1715 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1715, 0, x_1713); lean_ctor_set(x_1715, 1, x_1714); @@ -14616,7 +14616,7 @@ lean_ctor_set(x_1619, 0, x_1618); x_1620 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1620, 0, x_1616); lean_ctor_set(x_1620, 1, x_1619); -x_1621 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1621 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1622 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1622, 0, x_1620); lean_ctor_set(x_1622, 1, x_1621); @@ -15091,7 +15091,7 @@ x_1580 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_1581 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1581, 0, x_1580); lean_ctor_set(x_1581, 1, x_1579); -x_1582 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1582 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1583 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1583, 0, x_1581); lean_ctor_set(x_1583, 1, x_1582); @@ -15226,7 +15226,7 @@ lean_ctor_set(x_1885, 0, x_1884); x_1886 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1886, 0, x_1882); lean_ctor_set(x_1886, 1, x_1885); -x_1887 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1887 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1888 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1888, 0, x_1886); lean_ctor_set(x_1888, 1, x_1887); @@ -15333,7 +15333,7 @@ lean_ctor_set(x_1792, 0, x_1791); x_1793 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1793, 0, x_1789); lean_ctor_set(x_1793, 1, x_1792); -x_1794 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1794 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1795 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1795, 0, x_1793); lean_ctor_set(x_1795, 1, x_1794); @@ -15808,7 +15808,7 @@ x_1753 = l_Lean_ParserCompiler_compileParserBody___main___rarg___closed__3; x_1754 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1754, 0, x_1753); lean_ctor_set(x_1754, 1, x_1752); -x_1755 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_1755 = l_Lean_throwUnknownConstant___rarg___closed__5; x_1756 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_1756, 0, x_1754); lean_ctor_set(x_1756, 1, x_1755); diff --git a/stage0/stdlib/Lean/PrettyPrinter/Formatter.c b/stage0/stdlib/Lean/PrettyPrinter/Formatter.c index 7acae1cd09..768c265ca2 100644 --- a/stage0/stdlib/Lean/PrettyPrinter/Formatter.c +++ b/stage0/stdlib/Lean/PrettyPrinter/Formatter.c @@ -183,7 +183,6 @@ lean_object* l_Lean_PrettyPrinter_Formatter_interpolatedStr_formatter___boxed(le lean_object* l_Lean_PrettyPrinter_Formatter_toggleInsideQuot_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_node_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_unicodeSymbol_formatter(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_PrettyPrinter_Formatter_pushNone_formatter___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_mkFormatterAttribute___closed__13; lean_object* l_Lean_PrettyPrinter_Formatter_checkInsideQuot_formatter___rarg(lean_object*); @@ -209,6 +208,7 @@ lean_object* l_Lean_PrettyPrinter_Formatter_FormatterM_monadTraverser___lambda__ lean_object* l_Array_forMAux___main___at_Lean_PrettyPrinter_Formatter_categoryParser_formatter___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Formatter_checkNoWsBefore_formatter___rarg(lean_object*); lean_object* l_Lean_KeyedDeclsAttribute_getValues___rarg(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_PrettyPrinter_formatterAttribute; uint32_t lean_string_utf8_get(lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_mkFormatterAttribute___lambda__1___closed__5; @@ -741,7 +741,7 @@ x_22 = l_Lean_PrettyPrinter_mkFormatterAttribute___lambda__1___closed__6; x_23 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_21); -x_24 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_24 = l_Lean_throwUnknownConstant___rarg___closed__5; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_23); lean_ctor_set(x_25, 1, x_24); @@ -2987,7 +2987,7 @@ x_14 = l_Lean_PrettyPrinter_Formatter_formatterForKind___closed__3; x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_14); lean_ctor_set(x_15, 1, x_13); -x_16 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_16 = l_Lean_throwUnknownConstant___rarg___closed__5; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); @@ -4172,7 +4172,7 @@ lean_ctor_set(x_14, 0, x_13); x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_11); lean_ctor_set(x_15, 1, x_14); -x_16 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_16 = l_Lean_throwUnknownConstant___rarg___closed__5; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); @@ -5311,7 +5311,7 @@ lean_ctor_set(x_10, 0, x_9); x_11 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_11, 0, x_8); lean_ctor_set(x_11, 1, x_10); -x_12 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_12 = l_Lean_throwUnknownConstant___rarg___closed__5; x_13 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_13, 0, x_11); lean_ctor_set(x_13, 1, x_12); diff --git a/stage0/stdlib/Lean/PrettyPrinter/Parenthesizer.c b/stage0/stdlib/Lean/PrettyPrinter/Parenthesizer.c index 2bdc6f5826..fe7d63207e 100644 --- a/stage0/stdlib/Lean/PrettyPrinter/Parenthesizer.c +++ b/stage0/stdlib/Lean/PrettyPrinter/Parenthesizer.c @@ -213,7 +213,6 @@ lean_object* l_Lean_PrettyPrinter_Parenthesizer_node_parenthesizer___lambda__1__ lean_object* l_Lean_PrettyPrinter_Parenthesizer_categoryParserOfStack_parenthesizer(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___lambda__1___closed__5; lean_object* l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_getConstInfo___rarg___lambda__1___closed__5; lean_object* l_Lean_PrettyPrinter_Parenthesizer_interpolatedStr_parenthesizer(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Unhygienic_MonadQuotation___closed__4; lean_object* l_Lean_PrettyPrinter_Parenthesizer_setExpected_parenthesizer___boxed(lean_object*); @@ -249,6 +248,7 @@ lean_object* l_Lean_KeyedDeclsAttribute_getValues___rarg(lean_object*, lean_obje lean_object* l_addParenHeuristic(lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_checkColGe_parenthesizer___rarg(lean_object*); lean_object* l_Lean_PrettyPrinter_Parenthesizer_node_parenthesizer___closed__1; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_PrettyPrinter_Parenthesizer_maybeParenthesize___closed__5; lean_object* l_Lean_PrettyPrinter_mkCategoryParenthesizerAttribute___closed__4; lean_object* l_Lean_PrettyPrinter_Parenthesizer_tactic_parenthesizer___closed__2; @@ -789,7 +789,7 @@ x_22 = l_Lean_PrettyPrinter_mkParenthesizerAttribute___lambda__1___closed__6; x_23 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_23, 0, x_22); lean_ctor_set(x_23, 1, x_21); -x_24 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_24 = l_Lean_throwUnknownConstant___rarg___closed__5; x_25 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_25, 0, x_23); lean_ctor_set(x_25, 1, x_24); @@ -1034,7 +1034,7 @@ x_21 = l_Lean_PrettyPrinter_mkCategoryParenthesizerAttribute___lambda__1___close x_22 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_22, 0, x_21); lean_ctor_set(x_22, 1, x_20); -x_23 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_23 = l_Lean_throwUnknownConstant___rarg___closed__5; x_24 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_24, 0, x_22); lean_ctor_set(x_24, 1, x_23); @@ -1089,7 +1089,7 @@ x_38 = l_Lean_PrettyPrinter_mkCategoryParenthesizerAttribute___lambda__1___close x_39 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_39, 0, x_38); lean_ctor_set(x_39, 1, x_37); -x_40 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_40 = l_Lean_throwUnknownConstant___rarg___closed__5; x_41 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_41, 0, x_39); lean_ctor_set(x_41, 1, x_40); @@ -6233,7 +6233,7 @@ x_17 = l_Lean_PrettyPrinter_Parenthesizer_parenthesizerForKind___closed__3; x_18 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_18, 0, x_17); lean_ctor_set(x_18, 1, x_16); -x_19 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_19 = l_Lean_throwUnknownConstant___rarg___closed__5; x_20 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_20, 0, x_18); lean_ctor_set(x_20, 1, x_19); @@ -7338,7 +7338,7 @@ lean_ctor_set(x_14, 0, x_13); x_15 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_15, 0, x_11); lean_ctor_set(x_15, 1, x_14); -x_16 = l_Lean_getConstInfo___rarg___lambda__1___closed__5; +x_16 = l_Lean_throwUnknownConstant___rarg___closed__5; x_17 = lean_alloc_ctor(10, 2, 0); lean_ctor_set(x_17, 0, x_15); lean_ctor_set(x_17, 1, x_16); diff --git a/stage0/stdlib/Lean/Elab/Alias.c b/stage0/stdlib/Lean/ResolveName.c similarity index 59% rename from stage0/stdlib/Lean/Elab/Alias.c rename to stage0/stdlib/Lean/ResolveName.c index b527d2aa53..47325c5716 100644 --- a/stage0/stdlib/Lean/Elab/Alias.c +++ b/stage0/stdlib/Lean/ResolveName.c @@ -1,6 +1,6 @@ // Lean compiler output -// Module: Lean.Elab.Alias -// Imports: Init Lean.Environment +// Module: Lean.ResolveName +// Imports: Init Lean.Data.OpenDecl Lean.Hygiene Lean.Modifiers Lean.Exception #include #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -13,151 +13,235 @@ #ifdef __cplusplus extern "C" { #endif +lean_object* l_List_reverse___rarg(lean_object*); lean_object* l_Std_HashMapImp_expand___at_Lean_addAliasEntry___spec__14(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +lean_object* l_Lean_extractMacroScopes(lean_object*); size_t l_USize_add(size_t, size_t); +extern lean_object* l_Lean_rootNamespace; lean_object* l_Lean_aliasExtension___elambda__1___boxed(lean_object*); lean_object* l_Lean_aliasExtension___elambda__3___boxed(lean_object*, lean_object*); lean_object* l_Lean_aliasExtension___elambda__2(lean_object*); +uint8_t l_Lean_Environment_isNamespace(lean_object*, lean_object*); +lean_object* l_unreachable_x21___rarg(lean_object*); +lean_object* l___private_Lean_ResolveName_2__resolveUsingNamespace___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveNamespace___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_mkAliasExtension___lambda__1(lean_object*); +lean_object* l_Lean_resolveGlobalConst___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_ResolveName_5__resolveGlobalNameAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_aliasExtension___closed__5; lean_object* l_Std_PersistentHashMap_insert___at_Lean_addAliasEntry___spec__8(lean_object*, lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_mkAliasExtension___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_ResolveName_5__resolveGlobalNameAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +lean_object* l_Lean_ResolveName_resolveNamespaceUsingOpenDecls___main___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkAliasExtension___spec__7(lean_object*, lean_object*); uint8_t l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(lean_object*, lean_object*); +extern lean_object* l_Lean_registerInternalExceptionId___closed__2; lean_object* l_Array_iterateMAux___main___at_Lean_getRevAliases___spec__7(lean_object*); lean_object* l_Lean_EnvExtensionInterfaceUnsafe_registerExt___rarg(lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(lean_object*, lean_object*); lean_object* l_Lean_aliasExtension___closed__3; size_t l_USize_sub(size_t, size_t); extern lean_object* l_Array_empty___closed__1; +lean_object* l_Lean_resolveNamespace___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_mkAliasExtension___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_get(lean_object*, lean_object*); +lean_object* l_List_append___rarg(lean_object*, lean_object*); lean_object* l_Lean_aliasExtension___elambda__4___boxed(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalName(lean_object*); +lean_object* l_Lean_throwUnknownConstant___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___rarg___lambda__1(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_Std_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); +lean_object* l_Lean_resolveGlobalName___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_Lean_MessageData_ofList(lean_object*); lean_object* lean_add_alias(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getAliases___boxed(lean_object*, lean_object*); lean_object* l_Lean_aliasExtension; size_t l_USize_shiftRight(size_t, size_t); +lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__4; lean_object* l_Std_HashMapImp_find_x3f___at_Lean_addAliasEntry___spec__5(lean_object*, lean_object*); +lean_object* l_Lean_resolveNamespace___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_foldlM___main___at_Lean_getRevAliases___spec__2___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_aliasExtension___elambda__4___rarg(lean_object*); extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; +lean_object* l_Lean_ResolveName_resolveGlobalName___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_foldlM___main___at_Lean_getRevAliases___spec__2(lean_object*); lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_addAliasEntry___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Lean_aliasExtension___elambda__1(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l___private_Lean_ResolveName_1__resolveQualifiedName(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_ResolveName_2__resolveUsingNamespace(lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Lean_Environment_8__persistentEnvExtensionsRef; +lean_object* l_Lean_monadResolveNameFromLift___rarg(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_getRevAliases___spec__7___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__2(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ResolveName_resolveNamespace_x3f(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_fold___at_Lean_getRevAliases___spec__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_SMap_fold___at_Lean_getRevAliases___spec__1(lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_getRevAliases___spec__7___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_monadResolveNameFromLift(lean_object*, lean_object*); +lean_object* l_Lean_ResolveName_resolveNamespaceUsingOpenDecls___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux___main___at_Lean_getRevAliases___spec__5___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalName___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_take(lean_object*, lean_object*); lean_object* l_Std_HashMapImp_moveEntries___main___at_Lean_addAliasEntry___spec__15(lean_object*, lean_object*, lean_object*); lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_Std_PersistentHashMap_insertAux___main___rarg___closed__3; +lean_object* l___private_Lean_ResolveName_4__resolveOpenDecls___main(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_getRevAliases___spec__3___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_aliasExtension___elambda__2___boxed(lean_object*); lean_object* l_Lean_aliasExtension___elambda__3(lean_object*, lean_object*); +lean_object* l_Lean_resolveNamespace___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ResolveName_resolveNamespaceUsingScope(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__3(lean_object*, lean_object*); +lean_object* l___private_Lean_ResolveName_5__resolveGlobalNameAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_AssocList_foldlM___main___at_Lean_addAliasEntry___spec__16(lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalName___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Std_mkHashMapImp___rarg(lean_object*); +lean_object* l_Lean_resolveNamespace(lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_getRevAliases___spec__3(lean_object*); uint8_t l_Array_anyRangeMAux___main___at_Lean_mkAliasExtension___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_Lean_Name_hash(lean_object*); +lean_object* l___private_Lean_ResolveName_2__resolveUsingNamespace___main(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_ResolveName_1__resolveQualifiedName___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_fold___at_Lean_getRevAliases___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_addAliasEntry(lean_object*, lean_object*); extern size_t l_Std_PersistentHashMap_insertAux___main___rarg___closed__2; +uint8_t l_Lean_Name_isAtomic(lean_object*); +uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); +extern lean_object* l_Lean_protectedExt; +extern lean_object* l_Lean_throwUnknownConstant___rarg___closed__5; lean_object* l_Lean_registerSimplePersistentEnvExtension___at_Lean_mkAliasExtension___spec__6(lean_object*, lean_object*); extern lean_object* l_IO_Error_Inhabited___closed__1; lean_object* l_Lean_aliasExtension___closed__4; lean_object* l_Std_HashMapImp_find_x3f___at_Lean_addAliasEntry___spec__5___boxed(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload(lean_object*); lean_object* l_Lean_getRevAliases(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_mkAliasExtension___spec__8___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_getRevAliases___spec__4(lean_object*); size_t lean_usize_modn(size_t, lean_object*); +lean_object* l_Lean_ResolveName_resolveNamespaceUsingScope___main___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_insert___at_Lean_addAliasEntry___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAliasExtension___lambda__1___closed__1; +lean_object* l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__4(lean_object*, lean_object*); +lean_object* l___private_Lean_ResolveName_5__resolveGlobalNameAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_mul(size_t, size_t); lean_object* l_Std_AssocList_find_x3f___main___at_Lean_addAliasEntry___spec__6___boxed(lean_object*, lean_object*); +lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAliasExtension___lambda__1___boxed(lean_object*); lean_object* l_Lean_getAliases(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_addAliasEntry___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Name_replacePrefix___main(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_getRevAliases___spec__4___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_getRevAliases___spec__6___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); extern lean_object* l_Lean_EnvExtensionInterfaceUnsafe_Ext_inhabitedExt___closed__2; lean_object* l_Lean_SimplePersistentEnvExtension_getState___rarg(lean_object*, lean_object*); -extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; +lean_object* l_Lean_ResolveName_resolveNamespace_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_eraseDups___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__1(lean_object*); +lean_object* l_Lean_resolveGlobalName___rarg___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAliasExtension___lambda__1___closed__2; lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_addAliasEntry___spec__9(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAux___main___at_Lean_addAliasEntry___spec__9___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_aliasExtension___closed__1; lean_object* l_Lean_SMap_find_x3f___at_Lean_addAliasEntry___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__1; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1; +lean_object* l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2; lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_ResolveName_4__resolveOpenDecls(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_getRevAliases___boxed(lean_object*, lean_object*); lean_object* l_Std_mkHashMap___at_Lean_mkAliasExtension___spec__1(lean_object*); lean_object* l_Lean_aliasExtension___closed__2; uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); lean_object* l_Std_AssocList_replace___main___at_Lean_addAliasEntry___spec__17(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkPrivateName(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_addAliasEntry___spec__11(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MacroScopesView_review(lean_object*); lean_object* l_Lean_aliasExtension___elambda__4(lean_object*, lean_object*); extern lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___closed__1; +lean_object* l_Lean_resolveNamespace___rarg___lambda__1___closed__2; +lean_object* l_Lean_ResolveName_resolveNamespaceUsingOpenDecls___main(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAux___main___at_Lean_addAliasEntry___spec__3___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveNamespace___rarg___lambda__1___closed__1; lean_object* l_Lean_getRevAliases___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAux___main___at_Lean_addAliasEntry___spec__3(lean_object*, size_t, lean_object*); +lean_object* l_Lean_resolveGlobalConst(lean_object*); +lean_object* l_Lean_resolveNamespace___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_eraseDupsAux___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_resolveNamespace___rarg___lambda__1___closed__3; lean_object* l_Std_PersistentHashMap_foldlM___at_Lean_getRevAliases___spec__4___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_switch___at_Lean_mkAliasExtension___spec__5(lean_object*); +lean_object* l___private_Lean_ResolveName_3__resolveExact(lean_object*, lean_object*); lean_object* l_Lean_mkAliasExtension___closed__1; lean_object* lean_nat_mul(lean_object*, lean_object*); +lean_object* l_Lean_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_mkAliasExtension___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAliasExtension___closed__2; +uint8_t l_Lean_TagDeclarationExtension_isTagged(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l_Lean_getRevAliases___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_getRevAliases___spec__6___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_find_x3f___at_Lean_addAliasEntry___spec__2(lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2; +lean_object* l_Lean_ResolveName_resolveNamespaceUsingScope___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; lean_object* l_Lean_mkAliasExtension___closed__3; lean_object* l_Std_AssocList_contains___main___at_Lean_addAliasEntry___spec__13___boxed(lean_object*, lean_object*); lean_object* l_Std_AssocList_find_x3f___main___at_Lean_addAliasEntry___spec__6(lean_object*, lean_object*); lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_mkAliasExtension___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_addAliasEntry___spec__11___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_resolveGlobalConst___spec__2(lean_object*); lean_object* l_Lean_mkAliasExtension___closed__5; lean_object* l_Array_iterateMAux___main___at_Lean_mkAliasExtension___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAliasExtension(lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__5; lean_object* l_Lean_SMap_find_x3f___at_Lean_addAliasEntry___spec__1(lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(lean_object*); lean_object* l_Lean_mkStateFromImportedEntries___at_Lean_mkAliasExtension___spec__2(lean_object*, lean_object*); +lean_object* l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__3(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux___main___at_Lean_getRevAliases___spec__5___rarg___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_System_FilePath_dirName___closed__1; +lean_object* l_Lean_ResolveName_resolveNamespaceUsingOpenDecls(lean_object*, lean_object*, lean_object*); lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*); +uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); +lean_object* l___private_Lean_ResolveName_2__resolveUsingNamespace___main___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalName___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_foldlMAux___main___at_Lean_getRevAliases___spec__5(lean_object*); lean_object* lean_usize_to_nat(size_t); extern lean_object* l_Lean_regNamespacesExtension___closed__4; lean_object* l_Array_iterateMAux___main___at_Lean_getRevAliases___spec__6(lean_object*); lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConstNoOverload___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Std_AssocList_contains___main___at_Lean_addAliasEntry___spec__13(lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_addAliasEntry___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_HashMapImp_insert___at_Lean_addAliasEntry___spec__12(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_getRevAliases___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkConst(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_ResolveName_resolveNamespaceUsingScope___main(lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_addAliasEntry___spec__10(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAliasExtension___closed__4; uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_Lean_resolveGlobalConst___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Std_PersistentHashMap_findAtAux___main___at_Lean_addAliasEntry___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -1646,7 +1730,7 @@ x_39 = l_Lean_Name_toStringWithSep___main(x_38, x_37); x_40 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2; x_41 = lean_string_append(x_40, x_39); lean_dec(x_39); -x_42 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; +x_42 = l_Lean_registerInternalExceptionId___closed__2; x_43 = lean_string_append(x_41, x_42); x_44 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_44, 0, x_43); @@ -1774,7 +1858,7 @@ x_77 = l_Lean_Name_toStringWithSep___main(x_76, x_75); x_78 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2; x_79 = lean_string_append(x_78, x_77); lean_dec(x_77); -x_80 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; +x_80 = l_Lean_registerInternalExceptionId___closed__2; x_81 = lean_string_append(x_79, x_80); x_82 = lean_alloc_ctor(18, 1, 0); lean_ctor_set(x_82, 0, x_81); @@ -2496,17 +2580,1629 @@ lean_dec(x_1); return x_3; } } +lean_object* l___private_Lean_ResolveName_1__resolveQualifiedName(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_3); +x_4 = l_Lean_Name_append___main(x_2, x_3); +x_5 = l_Lean_getAliases(x_1, x_4); +lean_inc(x_1); +x_6 = l_Lean_Environment_contains(x_1, x_4); +if (x_6 == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_3); +lean_inc(x_1); +x_7 = l_Lean_mkPrivateName(x_1, x_4); +x_8 = l_Lean_Environment_contains(x_1, x_7); +if (x_8 == 0) +{ +lean_dec(x_7); +return x_5; +} +else +{ +lean_object* x_9; +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_7); +lean_ctor_set(x_9, 1, x_5); +return x_9; +} +} +else +{ +uint8_t x_10; +x_10 = l_Lean_Name_isAtomic(x_3); +lean_dec(x_3); +if (x_10 == 0) +{ +lean_object* x_11; +lean_dec(x_1); +x_11 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_11, 0, x_4); +lean_ctor_set(x_11, 1, x_5); +return x_11; +} +else +{ +lean_object* x_12; uint8_t x_13; +x_12 = l_Lean_protectedExt; +x_13 = l_Lean_TagDeclarationExtension_isTagged(x_12, x_1, x_4); +if (x_13 == 0) +{ +lean_object* x_14; +lean_dec(x_1); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_4); +lean_ctor_set(x_14, 1, x_5); +return x_14; +} +else +{ +lean_object* x_15; uint8_t x_16; +lean_inc(x_1); +x_15 = l_Lean_mkPrivateName(x_1, x_4); +x_16 = l_Lean_Environment_contains(x_1, x_15); +if (x_16 == 0) +{ +lean_dec(x_15); +return x_5; +} +else +{ +lean_object* x_17; +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_5); +return x_17; +} +} +} +} +} +} +lean_object* l___private_Lean_ResolveName_1__resolveQualifiedName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Lean_ResolveName_1__resolveQualifiedName(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +lean_object* l___private_Lean_ResolveName_2__resolveUsingNamespace___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 1) +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_ctor_get(x_3, 0); +lean_inc(x_2); +lean_inc(x_1); +x_5 = l___private_Lean_ResolveName_1__resolveQualifiedName(x_1, x_3, x_2); +if (lean_obj_tag(x_5) == 0) +{ +x_3 = x_4; +goto _start; +} +else +{ +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +else +{ +lean_object* x_7; +lean_dec(x_2); +lean_dec(x_1); +x_7 = lean_box(0); +return x_7; +} +} +} +lean_object* l___private_Lean_ResolveName_2__resolveUsingNamespace___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Lean_ResolveName_2__resolveUsingNamespace___main(x_1, x_2, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l___private_Lean_ResolveName_2__resolveUsingNamespace(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Lean_ResolveName_2__resolveUsingNamespace___main(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l___private_Lean_ResolveName_2__resolveUsingNamespace___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___private_Lean_ResolveName_2__resolveUsingNamespace(x_1, x_2, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l___private_Lean_ResolveName_3__resolveExact(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = l_Lean_Name_isAtomic(x_2); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_4 = l_Lean_rootNamespace; +x_5 = lean_box(0); +x_6 = l_Lean_Name_replacePrefix___main(x_2, x_4, x_5); +lean_inc(x_1); +x_7 = l_Lean_Environment_contains(x_1, x_6); +if (x_7 == 0) +{ +lean_object* x_8; uint8_t x_9; +lean_inc(x_1); +x_8 = l_Lean_mkPrivateName(x_1, x_6); +x_9 = l_Lean_Environment_contains(x_1, x_8); +if (x_9 == 0) +{ +lean_object* x_10; +lean_dec(x_8); +x_10 = lean_box(0); +return x_10; +} +else +{ +lean_object* x_11; +x_11 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_11, 0, x_8); +return x_11; +} +} +else +{ +lean_object* x_12; +lean_dec(x_1); +x_12 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_12, 0, x_6); +return x_12; +} +} +else +{ +lean_object* x_13; +lean_dec(x_2); +lean_dec(x_1); +x_13 = lean_box(0); +return x_13; +} +} +} +lean_object* l___private_Lean_ResolveName_4__resolveOpenDecls___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +else +{ +lean_object* x_5; +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_5); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +lean_dec(x_3); +x_7 = lean_ctor_get(x_5, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_5, 1); +lean_inc(x_8); +lean_dec(x_5); +x_9 = l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(x_2, x_8); +lean_dec(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +lean_inc(x_2); +lean_inc(x_1); +x_10 = l___private_Lean_ResolveName_1__resolveQualifiedName(x_1, x_7, x_2); +lean_dec(x_7); +x_11 = l_List_append___rarg(x_10, x_4); +x_3 = x_6; +x_4 = x_11; +goto _start; +} +else +{ +lean_dec(x_7); +x_3 = x_6; +goto _start; +} +} +else +{ +uint8_t x_14; +x_14 = !lean_is_exclusive(x_3); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_15 = lean_ctor_get(x_3, 1); +x_16 = lean_ctor_get(x_3, 0); +lean_dec(x_16); +x_17 = lean_ctor_get(x_5, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_5, 1); +lean_inc(x_18); +lean_dec(x_5); +x_19 = lean_name_eq(x_2, x_17); +lean_dec(x_17); +if (x_19 == 0) +{ +lean_dec(x_18); +lean_free_object(x_3); +x_3 = x_15; +goto _start; +} +else +{ +lean_ctor_set(x_3, 1, x_4); +lean_ctor_set(x_3, 0, x_18); +{ +lean_object* _tmp_2 = x_15; +lean_object* _tmp_3 = x_3; +x_3 = _tmp_2; +x_4 = _tmp_3; +} +goto _start; +} +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; +x_22 = lean_ctor_get(x_3, 1); +lean_inc(x_22); +lean_dec(x_3); +x_23 = lean_ctor_get(x_5, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_5, 1); +lean_inc(x_24); +lean_dec(x_5); +x_25 = lean_name_eq(x_2, x_23); +lean_dec(x_23); +if (x_25 == 0) +{ +lean_dec(x_24); +x_3 = x_22; +goto _start; +} +else +{ +lean_object* x_27; +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_24); +lean_ctor_set(x_27, 1, x_4); +x_3 = x_22; +x_4 = x_27; +goto _start; +} +} +} +} +} +} +lean_object* l___private_Lean_ResolveName_4__resolveOpenDecls(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Lean_ResolveName_4__resolveOpenDecls___main(x_1, x_2, x_3, x_4); +return x_5; +} +} +lean_object* l_List_eraseDupsAux___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = l_List_reverse___rarg(x_2); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(x_5, x_2); +if (x_7 == 0) +{ +lean_ctor_set(x_1, 1, x_2); +{ +lean_object* _tmp_0 = x_6; +lean_object* _tmp_1 = x_1; +x_1 = _tmp_0; +x_2 = _tmp_1; +} +goto _start; +} +else +{ +lean_free_object(x_1); +lean_dec(x_5); +x_1 = x_6; +goto _start; +} +} +else +{ +lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_10 = lean_ctor_get(x_1, 0); +x_11 = lean_ctor_get(x_1, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_1); +x_12 = l_List_elem___main___at_Lean_NameHashSet_insert___spec__2(x_10, x_2); +if (x_12 == 0) +{ +lean_object* x_13; +x_13 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_13, 0, x_10); +lean_ctor_set(x_13, 1, x_2); +x_1 = x_11; +x_2 = x_13; +goto _start; +} +else +{ +lean_dec(x_10); +x_1 = x_11; +goto _start; +} +} +} +} +} +lean_object* l_List_eraseDups___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = lean_box(0); +x_3 = l_List_eraseDupsAux___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__2(x_1, x_2); +return x_3; +} +} +lean_object* l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__3(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_3; +lean_dec(x_1); +x_3 = lean_box(0); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_ctor_get(x_2, 0); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_1); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_5); +lean_ctor_set(x_7, 1, x_1); +x_8 = l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__3(x_1, x_6); +lean_ctor_set(x_2, 1, x_8); +lean_ctor_set(x_2, 0, x_7); +return x_2; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_2, 0); +x_10 = lean_ctor_get(x_2, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_2); +lean_inc(x_1); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_9); +lean_ctor_set(x_11, 1, x_1); +x_12 = l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__3(x_1, x_10); +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* l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__4(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_3; +lean_dec(x_1); +x_3 = lean_box(0); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_ctor_get(x_2, 0); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_1); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_5); +lean_ctor_set(x_7, 1, x_1); +x_8 = l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__4(x_1, x_6); +lean_ctor_set(x_2, 1, x_8); +lean_ctor_set(x_2, 0, x_7); +return x_2; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_2, 0); +x_10 = lean_ctor_get(x_2, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_2); +lean_inc(x_1); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_9); +lean_ctor_set(x_11, 1, x_1); +x_12 = l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__4(x_1, x_10); +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* l___private_Lean_ResolveName_5__resolveGlobalNameAux___main(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: +{ +if (lean_obj_tag(x_5) == 1) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_7 = lean_ctor_get(x_5, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_5, 1); +lean_inc(x_8); +x_9 = lean_ctor_get(x_4, 1); +x_10 = lean_ctor_get(x_4, 2); +x_11 = lean_ctor_get(x_4, 3); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +x_12 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_12, 0, x_5); +lean_ctor_set(x_12, 1, x_9); +lean_ctor_set(x_12, 2, x_10); +lean_ctor_set(x_12, 3, x_11); +x_13 = l_Lean_MacroScopesView_review(x_12); +lean_inc(x_13); +lean_inc(x_1); +x_14 = l___private_Lean_ResolveName_2__resolveUsingNamespace___main(x_1, x_13, x_2); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; +lean_inc(x_13); +lean_inc(x_1); +x_15 = l___private_Lean_ResolveName_3__resolveExact(x_1, x_13); +if (lean_obj_tag(x_15) == 0) +{ +uint8_t x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; +lean_inc(x_1); +x_16 = l_Lean_Environment_contains(x_1, x_13); +lean_inc(x_13); +lean_inc(x_1); +x_17 = l_Lean_mkPrivateName(x_1, x_13); +lean_inc(x_1); +x_18 = l_Lean_Environment_contains(x_1, x_17); +x_19 = l_Lean_getAliases(x_1, x_13); +if (x_16 == 0) +{ +if (x_18 == 0) +{ +lean_object* x_26; lean_object* x_27; +lean_dec(x_17); +lean_inc(x_3); +lean_inc(x_1); +x_26 = l___private_Lean_ResolveName_4__resolveOpenDecls___main(x_1, x_13, x_3, x_14); +x_27 = l_List_append___rarg(x_19, x_26); +x_20 = x_27; +goto block_25; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_17); +lean_ctor_set(x_28, 1, x_14); +x_29 = l_List_append___rarg(x_28, x_14); +lean_inc(x_3); +lean_inc(x_1); +x_30 = l___private_Lean_ResolveName_4__resolveOpenDecls___main(x_1, x_13, x_3, x_29); +x_31 = l_List_append___rarg(x_19, x_30); +x_20 = x_31; +goto block_25; +} +} +else +{ +lean_object* x_32; +lean_inc(x_13); +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_13); +lean_ctor_set(x_32, 1, x_14); +if (x_18 == 0) +{ +lean_object* x_33; lean_object* x_34; +lean_dec(x_17); +lean_inc(x_3); +lean_inc(x_1); +x_33 = l___private_Lean_ResolveName_4__resolveOpenDecls___main(x_1, x_13, x_3, x_32); +x_34 = l_List_append___rarg(x_19, x_33); +x_20 = x_34; +goto block_25; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_17); +lean_ctor_set(x_35, 1, x_14); +x_36 = l_List_append___rarg(x_35, x_32); +lean_inc(x_3); +lean_inc(x_1); +x_37 = l___private_Lean_ResolveName_4__resolveOpenDecls___main(x_1, x_13, x_3, x_36); +x_38 = l_List_append___rarg(x_19, x_37); +x_20 = x_38; +goto block_25; +} +} +block_25: +{ +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_8); +lean_ctor_set(x_21, 1, x_6); +x_5 = x_7; +x_6 = x_21; +goto _start; +} +else +{ +lean_object* x_23; lean_object* x_24; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_3); +lean_dec(x_1); +x_23 = l_List_eraseDups___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__1(x_20); +x_24 = l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__3(x_6, x_23); +return x_24; +} +} +} +else +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +lean_dec(x_13); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_3); +lean_dec(x_1); +x_39 = lean_ctor_get(x_15, 0); +lean_inc(x_39); +lean_dec(x_15); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_6); +x_41 = lean_box(0); +x_42 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_42, 0, x_40); +lean_ctor_set(x_42, 1, x_41); +return x_42; +} +} +else +{ +lean_object* x_43; lean_object* x_44; +lean_dec(x_13); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_3); +lean_dec(x_1); +x_43 = l_List_eraseDups___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__1(x_14); +x_44 = l_List_map___main___at___private_Lean_ResolveName_5__resolveGlobalNameAux___main___spec__4(x_6, x_43); +return x_44; +} +} +else +{ +lean_object* x_45; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_1); +x_45 = lean_box(0); +return x_45; +} +} +} +lean_object* l___private_Lean_ResolveName_5__resolveGlobalNameAux___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: +{ +lean_object* x_7; +x_7 = l___private_Lean_ResolveName_5__resolveGlobalNameAux___main(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_4); +lean_dec(x_2); +return x_7; +} +} +lean_object* l___private_Lean_ResolveName_5__resolveGlobalNameAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l___private_Lean_ResolveName_5__resolveGlobalNameAux___main(x_1, x_2, x_3, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l___private_Lean_ResolveName_5__resolveGlobalNameAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l___private_Lean_ResolveName_5__resolveGlobalNameAux(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_4); +lean_dec(x_2); +return x_7; +} +} +lean_object* l_Lean_ResolveName_resolveGlobalName(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = l_Lean_extractMacroScopes(x_4); +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_box(0); +x_8 = l___private_Lean_ResolveName_5__resolveGlobalNameAux___main(x_1, x_2, x_3, x_5, x_6, x_7); +lean_dec(x_5); +return x_8; +} +} +lean_object* l_Lean_ResolveName_resolveGlobalName___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_ResolveName_resolveGlobalName(x_1, x_2, x_3, x_4); +lean_dec(x_2); +return x_5; +} +} +lean_object* l_Lean_ResolveName_resolveNamespaceUsingScope___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +switch (lean_obj_tag(x_3)) { +case 0: +{ +lean_object* x_4; +lean_dec(x_2); +x_4 = lean_box(0); +return x_4; +} +case 1: +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_ctor_get(x_3, 0); +lean_inc(x_2); +x_6 = l_Lean_Name_append___main(x_3, x_2); +x_7 = l_Lean_Environment_isNamespace(x_1, x_6); +if (x_7 == 0) +{ +lean_dec(x_6); +x_3 = x_5; +goto _start; +} +else +{ +lean_object* x_9; +lean_dec(x_2); +x_9 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_9, 0, x_6); +return x_9; +} +} +default: +{ +lean_object* x_10; lean_object* x_11; +lean_dec(x_2); +x_10 = lean_box(0); +x_11 = l_unreachable_x21___rarg(x_10); +return x_11; +} +} +} +} +lean_object* l_Lean_ResolveName_resolveNamespaceUsingScope___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_ResolveName_resolveNamespaceUsingScope___main(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_ResolveName_resolveNamespaceUsingScope(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_ResolveName_resolveNamespaceUsingScope___main(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_ResolveName_resolveNamespaceUsingScope___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_ResolveName_resolveNamespaceUsingScope(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_ResolveName_resolveNamespaceUsingOpenDecls___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_object* x_4; +lean_dec(x_2); +x_4 = lean_box(0); +return x_4; +} +else +{ +lean_object* x_5; +x_5 = lean_ctor_get(x_3, 0); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_6; +x_6 = lean_ctor_get(x_5, 1); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_7 = lean_ctor_get(x_3, 1); +x_8 = lean_ctor_get(x_5, 0); +lean_inc(x_2); +x_9 = l_Lean_Name_append___main(x_8, x_2); +x_10 = l_Lean_Environment_isNamespace(x_1, x_9); +if (x_10 == 0) +{ +lean_dec(x_9); +x_3 = x_7; +goto _start; +} +else +{ +lean_object* x_12; +lean_dec(x_2); +x_12 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_12, 0, x_9); +return x_12; +} +} +else +{ +lean_object* x_13; +x_13 = lean_ctor_get(x_3, 1); +x_3 = x_13; +goto _start; +} +} +else +{ +lean_object* x_15; +x_15 = lean_ctor_get(x_3, 1); +x_3 = x_15; +goto _start; +} +} +} +} +lean_object* l_Lean_ResolveName_resolveNamespaceUsingOpenDecls___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_ResolveName_resolveNamespaceUsingOpenDecls___main(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_ResolveName_resolveNamespaceUsingOpenDecls(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_ResolveName_resolveNamespaceUsingOpenDecls___main(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_ResolveName_resolveNamespaceUsingOpenDecls___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_ResolveName_resolveNamespaceUsingOpenDecls(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_ResolveName_resolveNamespace_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = l_Lean_Environment_isNamespace(x_1, x_4); +if (x_5 == 0) +{ +lean_object* x_6; +lean_inc(x_4); +x_6 = l_Lean_ResolveName_resolveNamespaceUsingScope___main(x_1, x_4, x_2); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; +x_7 = l_Lean_ResolveName_resolveNamespaceUsingOpenDecls___main(x_1, x_4, x_3); +return x_7; +} +else +{ +lean_dec(x_4); +return x_6; +} +} +else +{ +lean_object* x_8; +x_8 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_8, 0, x_4); +return x_8; +} +} +} +lean_object* l_Lean_ResolveName_resolveNamespace_x3f___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_ResolveName_resolveNamespace_x3f(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_monadResolveNameFromLift___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_inc(x_2); +x_4 = lean_apply_2(x_2, lean_box(0), x_3); +x_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +lean_dec(x_1); +x_6 = lean_apply_2(x_2, lean_box(0), x_5); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_4); +lean_ctor_set(x_7, 1, x_6); +return x_7; +} +} +lean_object* l_Lean_monadResolveNameFromLift(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = lean_alloc_closure((void*)(l_Lean_monadResolveNameFromLift___rarg), 2, 0); +return x_3; +} +} +lean_object* l_Lean_resolveGlobalName___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_dec(x_1); +x_7 = lean_ctor_get(x_6, 1); +lean_inc(x_7); +lean_dec(x_6); +x_8 = l_Lean_ResolveName_resolveGlobalName(x_2, x_3, x_5, x_4); +x_9 = lean_apply_2(x_7, lean_box(0), x_8); +return x_9; +} +} +lean_object* l_Lean_resolveGlobalName___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_7 = lean_ctor_get(x_1, 1); +lean_inc(x_7); +lean_dec(x_1); +x_8 = lean_alloc_closure((void*)(l_Lean_resolveGlobalName___rarg___lambda__1___boxed), 5, 4); +lean_closure_set(x_8, 0, x_2); +lean_closure_set(x_8, 1, x_3); +lean_closure_set(x_8, 2, x_6); +lean_closure_set(x_8, 3, x_4); +x_9 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_7, x_8); +return x_9; +} +} +lean_object* l_Lean_resolveGlobalName___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_1, 0); +lean_inc(x_6); +lean_inc(x_4); +x_7 = lean_alloc_closure((void*)(l_Lean_resolveGlobalName___rarg___lambda__2), 6, 5); +lean_closure_set(x_7, 0, x_1); +lean_closure_set(x_7, 1, x_2); +lean_closure_set(x_7, 2, x_5); +lean_closure_set(x_7, 3, x_3); +lean_closure_set(x_7, 4, x_4); +x_8 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_6, x_7); +return x_8; +} +} +lean_object* l_Lean_resolveGlobalName___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +x_6 = lean_ctor_get(x_3, 0); +lean_inc(x_6); +lean_dec(x_3); +lean_inc(x_5); +x_7 = lean_alloc_closure((void*)(l_Lean_resolveGlobalName___rarg___lambda__3), 5, 4); +lean_closure_set(x_7, 0, x_2); +lean_closure_set(x_7, 1, x_1); +lean_closure_set(x_7, 2, x_4); +lean_closure_set(x_7, 3, x_5); +x_8 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_6, x_7); +return x_8; +} +} +lean_object* l_Lean_resolveGlobalName(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_resolveGlobalName___rarg), 4, 0); +return x_2; +} +} +lean_object* l_Lean_resolveGlobalName___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_resolveGlobalName___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +return x_6; +} +} +lean_object* _init_l_Lean_resolveNamespace___rarg___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unknown namespace '"); +return x_1; +} +} +lean_object* _init_l_Lean_resolveNamespace___rarg___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_resolveNamespace___rarg___lambda__1___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_resolveNamespace___rarg___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_resolveNamespace___rarg___lambda__1___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_resolveNamespace___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +lean_inc(x_3); +x_9 = l_Lean_ResolveName_resolveNamespace_x3f(x_1, x_2, x_8, x_3); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_10 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_10, 0, x_3); +x_11 = l_Lean_resolveNamespace___rarg___lambda__1___closed__3; +x_12 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +x_13 = l_Lean_throwUnknownConstant___rarg___closed__5; +x_14 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_14, 0, x_12); +lean_ctor_set(x_14, 1, x_13); +x_15 = l_Lean_throwError___rarg(x_4, x_5, x_6, x_7, lean_box(0), x_14); +return x_15; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +x_16 = lean_ctor_get(x_9, 0); +lean_inc(x_16); +lean_dec(x_9); +x_17 = lean_ctor_get(x_4, 0); +lean_inc(x_17); +lean_dec(x_4); +x_18 = lean_ctor_get(x_17, 1); +lean_inc(x_18); +lean_dec(x_17); +x_19 = lean_apply_2(x_18, lean_box(0), x_16); +return x_19; +} +} +} +lean_object* l_Lean_resolveNamespace___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_1, 1); +lean_inc(x_10); +lean_dec(x_1); +x_11 = lean_alloc_closure((void*)(l_Lean_resolveNamespace___rarg___lambda__1___boxed), 8, 7); +lean_closure_set(x_11, 0, x_2); +lean_closure_set(x_11, 1, x_9); +lean_closure_set(x_11, 2, x_3); +lean_closure_set(x_11, 3, x_4); +lean_closure_set(x_11, 4, x_5); +lean_closure_set(x_11, 5, x_6); +lean_closure_set(x_11, 6, x_7); +x_12 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_10, x_11); +return x_12; +} +} +lean_object* l_Lean_resolveNamespace___rarg___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_1, 0); +lean_inc(x_9); +lean_inc(x_7); +x_10 = lean_alloc_closure((void*)(l_Lean_resolveNamespace___rarg___lambda__2), 9, 8); +lean_closure_set(x_10, 0, x_1); +lean_closure_set(x_10, 1, x_8); +lean_closure_set(x_10, 2, x_2); +lean_closure_set(x_10, 3, x_3); +lean_closure_set(x_10, 4, x_4); +lean_closure_set(x_10, 5, x_5); +lean_closure_set(x_10, 6, x_6); +lean_closure_set(x_10, 7, x_7); +x_11 = lean_apply_4(x_7, lean_box(0), lean_box(0), x_9, x_10); +return x_11; +} +} +lean_object* l_Lean_resolveNamespace___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_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_8); +x_9 = lean_ctor_get(x_3, 0); +lean_inc(x_9); +lean_dec(x_3); +lean_inc(x_8); +x_10 = lean_alloc_closure((void*)(l_Lean_resolveNamespace___rarg___lambda__3), 8, 7); +lean_closure_set(x_10, 0, x_2); +lean_closure_set(x_10, 1, x_7); +lean_closure_set(x_10, 2, x_1); +lean_closure_set(x_10, 3, x_4); +lean_closure_set(x_10, 4, x_5); +lean_closure_set(x_10, 5, x_6); +lean_closure_set(x_10, 6, x_8); +x_11 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_9, x_10); +return x_11; +} +} +lean_object* l_Lean_resolveNamespace(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_resolveNamespace___rarg), 7, 0); +return x_2; +} +} +lean_object* l_Lean_resolveNamespace___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l_Lean_resolveNamespace___rarg___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_8); +lean_dec(x_2); +lean_dec(x_1); +return x_9; +} +} +lean_object* l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = l_List_reverse___rarg(x_2); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +x_8 = l_List_isEmpty___rarg(x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_free_object(x_1); +lean_dec(x_5); +x_1 = x_6; +goto _start; +} +else +{ +lean_ctor_set(x_1, 1, x_2); +{ +lean_object* _tmp_0 = x_6; +lean_object* _tmp_1 = x_1; +x_1 = _tmp_0; +x_2 = _tmp_1; +} +goto _start; +} +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_11 = lean_ctor_get(x_1, 0); +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_1); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +x_14 = l_List_isEmpty___rarg(x_13); +lean_dec(x_13); +if (x_14 == 0) +{ +lean_dec(x_11); +x_1 = x_12; +goto _start; +} +else +{ +lean_object* x_16; +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_2); +x_1 = x_12; +x_2 = x_16; +goto _start; +} +} +} +} +} +lean_object* l_List_map___main___at_Lean_resolveGlobalConst___spec__2(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_2; +x_2 = lean_box(0); +return x_2; +} +else +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = lean_ctor_get(x_4, 0); +lean_inc(x_6); +lean_dec(x_4); +x_7 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_5); +lean_ctor_set(x_1, 1, x_7); +lean_ctor_set(x_1, 0, x_6); +return x_1; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_ctor_get(x_1, 0); +x_9 = lean_ctor_get(x_1, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_1); +x_10 = lean_ctor_get(x_8, 0); +lean_inc(x_10); +lean_dec(x_8); +x_11 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_9); +x_12 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_12, 0, x_10); +lean_ctor_set(x_12, 1, x_11); +return x_12; +} +} +} +} +lean_object* l_Lean_resolveGlobalConst___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +lean_dec(x_1); +x_5 = lean_ctor_get(x_4, 1); +lean_inc(x_5); +lean_dec(x_4); +x_6 = l_List_map___main___at_Lean_resolveGlobalConst___spec__2(x_2); +x_7 = lean_apply_2(x_5, lean_box(0), x_6); +return x_7; +} +} +lean_object* l_Lean_resolveGlobalConst___rarg___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; +x_8 = lean_box(0); +x_9 = l_List_filterAux___main___at_Lean_resolveGlobalConst___spec__1(x_7, x_8); +x_10 = l_List_isEmpty___rarg(x_9); +lean_inc(x_1); +x_11 = lean_alloc_closure((void*)(l_Lean_resolveGlobalConst___rarg___lambda__1___boxed), 3, 2); +lean_closure_set(x_11, 0, x_1); +lean_closure_set(x_11, 1, x_9); +if (x_10 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_12 = lean_ctor_get(x_1, 0); +lean_inc(x_12); +lean_dec(x_1); +x_13 = lean_ctor_get(x_12, 1); +lean_inc(x_13); +lean_dec(x_12); +x_14 = lean_box(0); +x_15 = lean_apply_2(x_13, lean_box(0), x_14); +x_16 = lean_apply_4(x_2, lean_box(0), lean_box(0), x_15, x_11); +return x_16; +} +else +{ +lean_object* x_17; lean_object* x_18; +x_17 = l_Lean_throwUnknownConstant___rarg(x_1, x_3, x_4, x_5, lean_box(0), x_6); +x_18 = lean_apply_4(x_2, lean_box(0), lean_box(0), x_17, x_11); +return x_18; +} +} +} +lean_object* l_Lean_resolveGlobalConst___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_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_1); +x_9 = l_Lean_resolveGlobalName___rarg(x_1, x_2, x_3, x_7); +lean_inc(x_8); +x_10 = lean_alloc_closure((void*)(l_Lean_resolveGlobalConst___rarg___lambda__2), 7, 6); +lean_closure_set(x_10, 0, x_1); +lean_closure_set(x_10, 1, x_8); +lean_closure_set(x_10, 2, x_4); +lean_closure_set(x_10, 3, x_5); +lean_closure_set(x_10, 4, x_6); +lean_closure_set(x_10, 5, x_7); +x_11 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_9, x_10); +return x_11; +} +} +lean_object* l_Lean_resolveGlobalConst(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_resolveGlobalConst___rarg), 7, 0); +return x_2; +} +} +lean_object* l_Lean_resolveGlobalConst___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_resolveGlobalConst___rarg___lambda__1(x_1, x_2, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_3; +lean_dec(x_1); +x_3 = lean_box(0); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_ctor_get(x_2, 0); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_1); +x_7 = l_Lean_mkConst(x_5, x_1); +x_8 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_1, x_6); +lean_ctor_set(x_2, 1, x_8); +lean_ctor_set(x_2, 0, x_7); +return x_2; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_2, 0); +x_10 = lean_ctor_get(x_2, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_2); +lean_inc(x_1); +x_11 = l_Lean_mkConst(x_9, x_1); +x_12 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_1, x_10); +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* _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("ambiguous identifier '"); +return x_1; +} +} +lean_object* _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("', possible interpretations: "); +return x_1; +} +} +lean_object* _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__4; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__5; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_21; +x_21 = lean_box(0); +x_7 = x_21; +goto block_20; +} +else +{ +lean_object* x_22; +x_22 = lean_ctor_get(x_6, 1); +lean_inc(x_22); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_1); +x_23 = lean_ctor_get(x_6, 0); +lean_inc(x_23); +lean_dec(x_6); +x_24 = lean_ctor_get(x_2, 0); +lean_inc(x_24); +lean_dec(x_2); +x_25 = lean_ctor_get(x_24, 1); +lean_inc(x_25); +lean_dec(x_24); +x_26 = lean_apply_2(x_25, lean_box(0), x_23); +return x_26; +} +else +{ +lean_object* x_27; +lean_dec(x_22); +x_27 = lean_box(0); +x_7 = x_27; +goto block_20; +} +} +block_20: +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_dec(x_7); +x_8 = lean_box(0); +x_9 = l_Lean_mkConst(x_1, x_8); +x_10 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_10, 0, x_9); +x_11 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3; +x_12 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +x_13 = l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6; +x_14 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_14, 0, x_12); +lean_ctor_set(x_14, 1, x_13); +x_15 = l_List_map___main___at_Lean_resolveGlobalConstNoOverload___spec__1(x_8, x_6); +x_16 = l_List_map___main___at_Lean_MessageData_hasCoeOfListExpr___spec__1(x_15); +x_17 = l_Lean_MessageData_ofList(x_16); +lean_dec(x_16); +x_18 = lean_alloc_ctor(10, 2, 0); +lean_ctor_set(x_18, 0, x_14); +lean_ctor_set(x_18, 1, x_17); +x_19 = l_Lean_throwError___rarg(x_2, x_3, x_4, x_5, lean_box(0), x_18); +return x_19; +} +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload___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_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_1); +x_9 = l_Lean_resolveGlobalConst___rarg(x_1, x_2, x_3, x_4, x_5, x_6, x_7); +x_10 = lean_alloc_closure((void*)(l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1), 6, 5); +lean_closure_set(x_10, 0, x_7); +lean_closure_set(x_10, 1, x_1); +lean_closure_set(x_10, 2, x_4); +lean_closure_set(x_10, 3, x_5); +lean_closure_set(x_10, 4, x_6); +x_11 = lean_apply_4(x_8, lean_box(0), lean_box(0), x_9, x_10); +return x_11; +} +} +lean_object* l_Lean_resolveGlobalConstNoOverload(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_resolveGlobalConstNoOverload___rarg), 7, 0); +return x_2; +} +} lean_object* initialize_Init(lean_object*); -lean_object* initialize_Lean_Environment(lean_object*); +lean_object* initialize_Lean_Data_OpenDecl(lean_object*); +lean_object* initialize_Lean_Hygiene(lean_object*); +lean_object* initialize_Lean_Modifiers(lean_object*); +lean_object* initialize_Lean_Exception(lean_object*); static bool _G_initialized = false; -lean_object* initialize_Lean_Elab_Alias(lean_object* w) { +lean_object* initialize_Lean_ResolveName(lean_object* w) { lean_object * res; if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); _G_initialized = true; res = initialize_Init(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -res = initialize_Lean_Environment(lean_io_mk_world()); +res = initialize_Lean_Data_OpenDecl(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Hygiene(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Modifiers(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Exception(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_mkAliasExtension___lambda__1___closed__1 = _init_l_Lean_mkAliasExtension___lambda__1___closed__1(); @@ -2538,6 +4234,24 @@ if (lean_io_result_is_error(res)) return res; l_Lean_aliasExtension = lean_io_result_get_value(res); lean_mark_persistent(l_Lean_aliasExtension); lean_dec_ref(res); +l_Lean_resolveNamespace___rarg___lambda__1___closed__1 = _init_l_Lean_resolveNamespace___rarg___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_resolveNamespace___rarg___lambda__1___closed__1); +l_Lean_resolveNamespace___rarg___lambda__1___closed__2 = _init_l_Lean_resolveNamespace___rarg___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_resolveNamespace___rarg___lambda__1___closed__2); +l_Lean_resolveNamespace___rarg___lambda__1___closed__3 = _init_l_Lean_resolveNamespace___rarg___lambda__1___closed__3(); +lean_mark_persistent(l_Lean_resolveNamespace___rarg___lambda__1___closed__3); +l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__1 = _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__1); +l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2 = _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2(); +lean_mark_persistent(l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__2); +l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3 = _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3(); +lean_mark_persistent(l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__3); +l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__4 = _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__4(); +lean_mark_persistent(l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__4); +l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__5 = _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__5(); +lean_mark_persistent(l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__5); +l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6 = _init_l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6(); +lean_mark_persistent(l_Lean_resolveGlobalConstNoOverload___rarg___lambda__1___closed__6); return lean_io_result_mk_ok(lean_box(0)); } #ifdef __cplusplus