chore: update stage0
This commit is contained in:
parent
521ed11330
commit
7dc3e72bcb
37 changed files with 9355 additions and 8019 deletions
6
stage0/src/CMakeLists.txt
generated
6
stage0/src/CMakeLists.txt
generated
|
|
@ -183,9 +183,9 @@ if(AUTO_THREAD_FINALIZATION AND NOT MSVC)
|
|||
endif()
|
||||
|
||||
if(LLVM)
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
message(STATUS "Found CLANG ${CLANG_PACKAGE_VERSION}")
|
||||
message(STATUS "Using ClangConfig.cmake in: ${CLANG_DIR}")
|
||||
if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_ID STREQUAL "Clang"))
|
||||
message(FATAL_ERROR "LLVM=ON must be used with clang. Set `CMAKE_CXX_COMPILER` and `CMAKE_C_COMPILER` accordingly.")
|
||||
endif()
|
||||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
|
||||
|
||||
|
|
|
|||
8
stage0/src/Init/Core.lean
generated
8
stage0/src/Init/Core.lean
generated
|
|
@ -944,15 +944,15 @@ instance {α : Sort u} {s : Setoid α} [d : ∀ (a b : α), Decidable (a ≈ b)]
|
|||
namespace Function
|
||||
variable {α : Sort u} {β : α → Sort v}
|
||||
|
||||
def Equiv (f₁ f₂ : ∀ (x : α), β x) : Prop := ∀ x, f₁ x = f₂ x
|
||||
protected def Equiv (f₁ f₂ : ∀ (x : α), β x) : Prop := ∀ x, f₁ x = f₂ x
|
||||
|
||||
protected theorem Equiv.refl (f : ∀ (x : α), β x) : Equiv f f :=
|
||||
protected theorem Equiv.refl (f : ∀ (x : α), β x) : Function.Equiv f f :=
|
||||
fun x => rfl
|
||||
|
||||
protected theorem Equiv.symm {f₁ f₂ : ∀ (x : α), β x} : Equiv f₁ f₂ → Equiv f₂ f₁ :=
|
||||
protected theorem Equiv.symm {f₁ f₂ : ∀ (x : α), β x} : Function.Equiv f₁ f₂ → Function.Equiv f₂ f₁ :=
|
||||
fun h x => Eq.symm (h x)
|
||||
|
||||
protected theorem Equiv.trans {f₁ f₂ f₃ : ∀ (x : α), β x} : Equiv f₁ f₂ → Equiv f₂ f₃ → Equiv f₁ f₃ :=
|
||||
protected theorem Equiv.trans {f₁ f₂ f₃ : ∀ (x : α), β x} : Function.Equiv f₁ f₂ → Function.Equiv f₂ f₃ → Function.Equiv f₁ f₃ :=
|
||||
fun h₁ h₂ x => Eq.trans (h₁ x) (h₂ x)
|
||||
|
||||
protected theorem Equiv.isEquivalence (α : Sort u) (β : α → Sort v) : Equivalence (@Function.Equiv α β) := {
|
||||
|
|
|
|||
10
stage0/src/Init/Data/UInt.lean
generated
10
stage0/src/Init/Data/UInt.lean
generated
|
|
@ -99,6 +99,10 @@ def UInt16.lor (a b : UInt16) : UInt16 := ⟨Fin.lor a.val b.val⟩
|
|||
def UInt16.xor (a b : UInt16) : UInt16 := ⟨Fin.xor a.val b.val⟩
|
||||
@[extern c inline "#1 << #2 % 16"]
|
||||
def UInt16.shiftLeft (a b : UInt16) : UInt16 := ⟨a.val <<< (modn b 16).val⟩
|
||||
@[extern c inline "((uint8_t)#1)"]
|
||||
def UInt16.toUInt8 (a : UInt16) : UInt8 := a.toNat.toUInt8
|
||||
@[extern c inline "((uint16_t)#1)"]
|
||||
def UInt8.toUInt16 (a : UInt8) : UInt16 := a.toNat.toUInt16
|
||||
@[extern c inline "#1 >> #2 % 16"]
|
||||
def UInt16.shiftRight (a b : UInt16) : UInt16 := ⟨a.val >>> (modn b 16).val⟩
|
||||
def UInt16.lt (a b : UInt16) : Prop := a.val < b.val
|
||||
|
|
@ -173,6 +177,8 @@ def UInt32.toUInt8 (a : UInt32) : UInt8 := a.toNat.toUInt8
|
|||
def UInt32.toUInt16 (a : UInt32) : UInt16 := a.toNat.toUInt16
|
||||
@[extern c inline "((uint32_t)#1)"]
|
||||
def UInt8.toUInt32 (a : UInt8) : UInt32 := a.toNat.toUInt32
|
||||
@[extern c inline "((uint32_t)#1)"]
|
||||
def UInt16.toUInt32 (a : UInt16) : UInt32 := a.toNat.toUInt32
|
||||
|
||||
instance : OfNat UInt32 n := ⟨UInt32.ofNat n⟩
|
||||
instance : Add UInt32 := ⟨UInt32.add⟩
|
||||
|
|
@ -228,6 +234,10 @@ def UInt64.toUInt16 (a : UInt64) : UInt16 := a.toNat.toUInt16
|
|||
@[extern c inline "((uint32_t)#1)"]
|
||||
def UInt64.toUInt32 (a : UInt64) : UInt32 := a.toNat.toUInt32
|
||||
@[extern c inline "((uint64_t)#1)"]
|
||||
def UInt8.toUInt64 (a : UInt8) : UInt64 := a.toNat.toUInt64
|
||||
@[extern c inline "((uint64_t)#1)"]
|
||||
def UInt16.toUInt64 (a : UInt16) : UInt64 := a.toNat.toUInt64
|
||||
@[extern c inline "((uint64_t)#1)"]
|
||||
def UInt32.toUInt64 (a : UInt32) : UInt64 := a.toNat.toUInt64
|
||||
|
||||
instance : OfNat UInt64 n := ⟨UInt64.ofNat n⟩
|
||||
|
|
|
|||
1
stage0/src/Init/Meta.lean
generated
1
stage0/src/Init/Meta.lean
generated
|
|
@ -921,7 +921,6 @@ structure Config where
|
|||
eta : Bool := true
|
||||
iota : Bool := true
|
||||
proj : Bool := true
|
||||
ctorEq : Bool := true
|
||||
decide : Bool := true
|
||||
deriving Inhabited, BEq, Repr
|
||||
|
||||
|
|
|
|||
34
stage0/src/Lean/Data/Json/FromToJson.lean
generated
34
stage0/src/Lean/Data/Json/FromToJson.lean
generated
|
|
@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Gabriel Ebner, Marc Huisinga
|
||||
-/
|
||||
import Lean.Data.Json.Basic
|
||||
import Lean.Data.Json.Printer
|
||||
|
||||
namespace Lean
|
||||
|
||||
|
|
@ -75,5 +76,38 @@ def opt [ToJson α] (k : String) : Option α → List (String × Json)
|
|||
| none => []
|
||||
| some o => [⟨k, toJson o⟩]
|
||||
|
||||
/-- Parses a JSON-encoded `structure` or `inductive` constructor. Used mostly by `deriving FromJson`. -/
|
||||
def parseTagged
|
||||
(json : Json)
|
||||
(tag : String)
|
||||
(nFields : Nat)
|
||||
(fieldNames? : Option (Array Name)) : Except String (Array Json) :=
|
||||
if nFields == 0 then
|
||||
match getStr? json with
|
||||
| Except.ok s => if s == tag then Except.ok #[] else throw s!"incorrect tag: {s} ≟ {tag}"
|
||||
| Except.error err => Except.error err
|
||||
else
|
||||
match getObjVal? json tag with
|
||||
| Except.ok payload =>
|
||||
match fieldNames? with
|
||||
| some fieldNames =>
|
||||
do
|
||||
let mut fields := #[]
|
||||
for fieldName in fieldNames do
|
||||
fields := fields.push (←getObjVal? payload fieldName.getString!)
|
||||
Except.ok fields
|
||||
| none =>
|
||||
if nFields == 1 then
|
||||
Except.ok #[payload]
|
||||
else
|
||||
match getArr? payload with
|
||||
| Except.ok fields =>
|
||||
if fields.size == nFields then
|
||||
Except.ok fields
|
||||
else
|
||||
Except.error s!"incorrect number of fields: {fields.size} ≟ {nFields}"
|
||||
| Except.error err => Except.error err
|
||||
| Except.error err => Except.error err
|
||||
|
||||
end Json
|
||||
end Lean
|
||||
|
|
|
|||
58
stage0/src/Lean/Elab/Deriving/FromToJson.lean
generated
58
stage0/src/Lean/Elab/Deriving/FromToJson.lean
generated
|
|
@ -19,38 +19,6 @@ def mkJsonField (n : Name) : Bool × Syntax :=
|
|||
let s₁ := s.dropRightWhile (· == '?')
|
||||
(s != s₁, Syntax.mkStrLit s₁)
|
||||
|
||||
private def parseTagged
|
||||
(json : Json)
|
||||
(tag : String)
|
||||
(nFields : Nat)
|
||||
(fieldNames? : Option (Array Name)) : Except String (Array Json) :=
|
||||
if nFields == 0 then
|
||||
match getStr? json with
|
||||
| Except.ok s => if s == tag then Except.ok #[] else throw s!"incorrect tag: {s} ≟ {tag}"
|
||||
| Except.error err => Except.error err
|
||||
else
|
||||
match getObjVal? json tag with
|
||||
| Except.ok payload =>
|
||||
match fieldNames? with
|
||||
| some fieldNames =>
|
||||
do
|
||||
let mut fields := #[]
|
||||
for fieldName in fieldNames do
|
||||
fields := fields.push (←getObjVal? payload fieldName.getString!)
|
||||
Except.ok fields
|
||||
| none =>
|
||||
if nFields == 1 then
|
||||
Except.ok #[payload]
|
||||
else
|
||||
match getArr? payload with
|
||||
| Except.ok fields =>
|
||||
if fields.size == nFields then
|
||||
Except.ok fields
|
||||
else
|
||||
Except.error "incorrect number of fields: {fields.size} ≟ {nFields}"
|
||||
| Except.error err => Except.error err
|
||||
| Except.error err => Except.error err
|
||||
|
||||
def mkToJsonInstanceHandler (declNames : Array Name) : CommandElabM Bool := do
|
||||
if declNames.size == 1 then
|
||||
if (← isStructure (← getEnv) declNames[0]) then
|
||||
|
|
@ -76,7 +44,7 @@ def mkToJsonInstanceHandler (declNames : Array Name) : CommandElabM Bool := do
|
|||
let alts ← mkAlts indVal fun ctor args userNames =>
|
||||
match args, userNames with
|
||||
| #[], _ => `(toJson $(quote ctor.name.getString!))
|
||||
| #[x], _ => `(mkObj [($(quote ctor.name.getString!), toJson $x)])
|
||||
| #[x], none => `(mkObj [($(quote ctor.name.getString!), toJson $x)])
|
||||
| xs, none => do
|
||||
let xs ← xs.mapM fun x => `(toJson $x)
|
||||
`(mkObj [($(quote ctor.name.getString!), toJson #[$[$xs:term],*])])
|
||||
|
|
@ -91,10 +59,10 @@ def mkToJsonInstanceHandler (declNames : Array Name) : CommandElabM Bool := do
|
|||
else
|
||||
return false
|
||||
where
|
||||
mkAlts
|
||||
(indVal : InductiveVal)
|
||||
mkAlts
|
||||
(indVal : InductiveVal)
|
||||
(rhs : ConstructorVal → Array Syntax → (Option $ Array Name) → TermElabM Syntax) : TermElabM (Array Syntax) := do
|
||||
indVal.ctors.toArray.mapM fun ctor => do
|
||||
indVal.ctors.toArray.mapM fun ctor => do
|
||||
let ctorInfo ← getConstInfoCtor ctor
|
||||
forallTelescopeReducing ctorInfo.type fun xs type => do
|
||||
let mut patterns := #[]
|
||||
|
|
@ -135,14 +103,14 @@ def mkFromJsonInstanceHandler (declNames : Array Name) : CommandElabM Bool := do
|
|||
return #[cmd] ++ (← mkInstanceCmds ctx ``FromJson declNames)
|
||||
cmds.forM elabCommand
|
||||
return true
|
||||
else
|
||||
else
|
||||
let indVal ← getConstInfoInduct declNames[0]
|
||||
let cmds ← liftTermElabM none <| do
|
||||
let ctx ← mkContext "fromJson" declNames[0]
|
||||
let header ← mkHeader ctx ``FromJson 0 ctx.typeInfos[0]
|
||||
let discrs ← mkDiscrs header indVal
|
||||
let alts ← mkAlts indVal
|
||||
let matchCmd ← alts.foldrM (fun xs x => `($xs <|> $x)) (←`(Except.error "none of the alternatives matched"))
|
||||
let alts ← mkAlts indVal
|
||||
let matchCmd ← alts.foldrM (fun xs x => `($xs <|> $x)) (←`(Except.error "no inductive constructor matched"))
|
||||
let cmd ← `(private def $(mkIdent ctx.auxFunNames[0]):ident $header.binders:explicitBinder* (json : Json)
|
||||
: Except String $(← mkInductiveApp ctx.typeInfos[0] header.argNames) :=
|
||||
$matchCmd )
|
||||
|
|
@ -153,7 +121,7 @@ def mkFromJsonInstanceHandler (declNames : Array Name) : CommandElabM Bool := do
|
|||
return false
|
||||
where
|
||||
mkAlts (indVal : InductiveVal) : TermElabM (Array Syntax) := do
|
||||
let alts ←
|
||||
let alts ←
|
||||
indVal.ctors.toArray.mapM fun ctor => do
|
||||
let ctorInfo ← getConstInfoCtor ctor
|
||||
forallTelescopeReducing ctorInfo.type fun xs type => do
|
||||
|
|
@ -168,12 +136,12 @@ where
|
|||
let a := mkIdent (← mkFreshUserName `a)
|
||||
identNames := identNames.push a
|
||||
let jsonAccess ← identNames.mapIdxM (fun idx _ => `(jsons[$(quote idx.val)]))
|
||||
let userNamesOpt ←
|
||||
if identNames.size == userNames.size then
|
||||
let userNamesOpt ←
|
||||
if identNames.size == userNames.size then
|
||||
`(some #[$[$(userNames.map quote):ident],*])
|
||||
else `(none)
|
||||
let stx ←
|
||||
`((parseTagged json $(quote ctor.getString!) $(quote ctorInfo.numFields) $(quote userNamesOpt)).bind
|
||||
let stx ←
|
||||
`((Json.parseTagged json $(quote ctor.getString!) $(quote ctorInfo.numFields) $(quote userNamesOpt)).bind
|
||||
(fun jsons => do
|
||||
$[let $identNames:ident ← fromJson? $jsonAccess]*
|
||||
return $(mkIdent ctor):ident $identNames*))
|
||||
|
|
@ -181,7 +149,7 @@ where
|
|||
-- the smaller cases, especially the ones without fields are likely faster
|
||||
let alts := alts.qsort (fun (_, x) (_, y) => x < y)
|
||||
alts.map Prod.fst
|
||||
|
||||
|
||||
builtin_initialize
|
||||
registerBuiltinDerivingHandler ``ToJson mkToJsonInstanceHandler
|
||||
registerBuiltinDerivingHandler ``FromJson mkFromJsonInstanceHandler
|
||||
|
|
|
|||
13
stage0/src/Lean/Elab/InfoTree.lean
generated
13
stage0/src/Lean/Elab/InfoTree.lean
generated
|
|
@ -60,10 +60,13 @@ def CompletionInfo.stx : CompletionInfo → Syntax
|
|||
| tactic stx .. => stx
|
||||
|
||||
structure FieldInfo where
|
||||
name : Name
|
||||
lctx : LocalContext
|
||||
val : Expr
|
||||
stx : Syntax
|
||||
/-- Name of the projection. -/
|
||||
projName : Name
|
||||
/-- Name of the field as written. -/
|
||||
fieldName : Name
|
||||
lctx : LocalContext
|
||||
val : Expr
|
||||
stx : Syntax
|
||||
deriving Inhabited
|
||||
|
||||
/- We store the list of goals before and after the execution of a tactic.
|
||||
|
|
@ -182,7 +185,7 @@ def CommandInfo.format (ctx : ContextInfo) (info : CommandInfo) : IO Format := d
|
|||
|
||||
def FieldInfo.format (ctx : ContextInfo) (info : FieldInfo) : IO Format := do
|
||||
ctx.runMetaM info.lctx do
|
||||
return f!"{info.name} : {← Meta.ppExpr (← Meta.inferType info.val)} := {← Meta.ppExpr info.val} @ {formatStxRange ctx info.stx}"
|
||||
return f!"{info.fieldName} : {← Meta.ppExpr (← Meta.inferType info.val)} := {← Meta.ppExpr info.val} @ {formatStxRange ctx info.stx}"
|
||||
|
||||
def ContextInfo.ppGoals (ctx : ContextInfo) (goals : List MVarId) : IO Format :=
|
||||
if goals.isEmpty then
|
||||
|
|
|
|||
5
stage0/src/Lean/Elab/StructInst.lean
generated
5
stage0/src/Lean/Elab/StructInst.lean
generated
|
|
@ -558,9 +558,10 @@ private partial def elabStruct (s : Struct) (expectedType? : Option Expr) : Term
|
|||
| [FieldLHS.fieldName ref fieldName] => do
|
||||
let type ← whnfForall type
|
||||
match type with
|
||||
| Expr.forallE _ d b c =>
|
||||
| Expr.forallE _ d b _ =>
|
||||
let cont (val : Expr) (field : Field Struct) : TermElabM (Expr × Expr × Fields) := do
|
||||
pushInfoTree <| InfoTree.node (children := {}) <| Info.ofFieldInfo { lctx := (← getLCtx), val := val, name := fieldName, stx := ref }
|
||||
pushInfoTree <| InfoTree.node (children := {}) <| Info.ofFieldInfo {
|
||||
projName := s.structName.append fieldName, fieldName, lctx := (← getLCtx), val, stx := ref }
|
||||
let e := mkApp e val
|
||||
let type := b.instantiate1 val
|
||||
let field := { field with expr? := some val }
|
||||
|
|
|
|||
2
stage0/src/Lean/Environment.lean
generated
2
stage0/src/Lean/Environment.lean
generated
|
|
@ -659,7 +659,7 @@ private def throwUnexpectedType {α} (typeName : Name) (constName : Name) : Exce
|
|||
This function is still unsafe because it cannot guarantee that `typeName` is in fact the name of the type `α`. -/
|
||||
unsafe def evalConstCheck (α) (env : Environment) (opts : Options) (typeName : Name) (constName : Name) : ExceptT String Id α :=
|
||||
match env.find? constName with
|
||||
| none => throw ("unknow constant '" ++ toString constName ++ "'")
|
||||
| none => throw ("unknown constant '" ++ toString constName ++ "'")
|
||||
| some info =>
|
||||
match info.type with
|
||||
| Expr.const c _ _ =>
|
||||
|
|
|
|||
4
stage0/src/Lean/Hygiene.lean
generated
4
stage0/src/Lean/Hygiene.lean
generated
|
|
@ -95,8 +95,8 @@ def sanitizeName (userName : Name) : StateM NameSanitizerState Name := do
|
|||
pure san
|
||||
|
||||
private partial def sanitizeSyntaxAux : Syntax → StateM NameSanitizerState Syntax
|
||||
| Syntax.ident _ _ n _ => do
|
||||
mkIdent <$> match (← get).userName2Sanitized.find? n with
|
||||
| stx@(Syntax.ident _ _ n _) => do
|
||||
mkIdentFrom stx <$> match (← get).userName2Sanitized.find? n with
|
||||
| some n' => pure n'
|
||||
| none => if n.hasMacroScopes then sanitizeName n else pure n
|
||||
| Syntax.node k args => Syntax.node k <$> args.mapM sanitizeSyntaxAux
|
||||
|
|
|
|||
24
stage0/src/Lean/Server/Completion.lean
generated
24
stage0/src/Lean/Server/Completion.lean
generated
|
|
@ -242,13 +242,23 @@ private def dotCompletion (ctx : ContextInfo) (info : TermInfo) (expectedType? :
|
|||
if (← isDotCompletionMethod typeName c) then
|
||||
addCompletionItem c.name.getString! c.type expectedType?
|
||||
|
||||
private def optionCompletion (ctx : ContextInfo) : IO (Option CompletionList) := do
|
||||
private def optionCompletion (ctx : ContextInfo) (stx : Syntax) : IO (Option CompletionList) :=
|
||||
ctx.runMetaM {} do
|
||||
let decls ← getOptionDecls
|
||||
let opts ← getOptions
|
||||
let items : Array CompletionItem := decls.fold (init := #[]) fun items name decl =>
|
||||
items.push { label := name.toString, detail? := s!"({opts.get name decl.defValue}), {decl.descr}", documentation? := none }
|
||||
return some { items := sortCompletionItems items, isIncomplete := true }
|
||||
let partialName := stx[1].getId
|
||||
-- HACK(WN): unfold the type so ForIn works
|
||||
let (decls : Std.RBMap _ _ _) ← getOptionDecls
|
||||
let opts ← getOptions
|
||||
let mut items := #[]
|
||||
for ⟨name, decl⟩ in decls do
|
||||
if partialName.isPrefixOf name ||
|
||||
(match partialName, name with
|
||||
| Name.str p₁ s₁ _, Name.str p₂ s₂ _ => p₁ == p₂ && s₁.isPrefixOf s₂
|
||||
| _, _ => false) then
|
||||
items := items.push
|
||||
{ label := name.toString
|
||||
detail? := s!"({opts.get name decl.defValue}), {decl.descr}"
|
||||
documentation? := none }
|
||||
return some { items := sortCompletionItems items, isIncomplete := true }
|
||||
|
||||
private def tacticCompletion (ctx : ContextInfo) : IO (Option CompletionList) :=
|
||||
-- Just return the list of tactics for now.
|
||||
|
|
@ -266,7 +276,7 @@ partial def find? (fileMap : FileMap) (hoverPos : String.Pos) (infoTree : InfoTr
|
|||
match info with
|
||||
| CompletionInfo.dot info (expectedType? := expectedType?) .. => dotCompletion ctx info expectedType?
|
||||
| CompletionInfo.id stx id danglingDot lctx expectedType? => idCompletion ctx lctx id danglingDot expectedType?
|
||||
| CompletionInfo.option .. => optionCompletion ctx
|
||||
| CompletionInfo.option stx => optionCompletion ctx stx
|
||||
| CompletionInfo.tactic .. => tacticCompletion ctx
|
||||
| _ => return none
|
||||
| _ =>
|
||||
|
|
|
|||
8
stage0/src/Lean/Server/FileWorker.lean
generated
8
stage0/src/Lean/Server/FileWorker.lean
generated
|
|
@ -70,7 +70,8 @@ section Elab
|
|||
the interrupt. Explicitly clearing diagnostics is difficult for a similar reason,
|
||||
because we cannot guarantee that no further diagnostics are emitted after clearing
|
||||
them. -/
|
||||
publishMessages m snap.msgLog hOut
|
||||
if snap.msgLog.msgs.size > parentSnap.msgLog.msgs.size then
|
||||
publishMessages m snap.msgLog hOut
|
||||
snap
|
||||
| Sum.inr msgLog =>
|
||||
publishMessages m msgLog hOut
|
||||
|
|
@ -287,7 +288,10 @@ section MessageHandling
|
|||
def handleRequest (id : RequestID) (method : String) (params : Json)
|
||||
: WorkerM Unit := do
|
||||
let st ← read
|
||||
let rc : Requests.RequestContext := { srcSearchPath := st.srcSearchPath, docRef := st.docRef }
|
||||
let rc : Requests.RequestContext :=
|
||||
{ srcSearchPath := st.srcSearchPath
|
||||
docRef := st.docRef
|
||||
hLog := st.hLog }
|
||||
let t? ← (ExceptT.run <| Requests.handleLspRequest method params rc : IO _)
|
||||
let t₁ ← match t? with
|
||||
| Except.error e =>
|
||||
|
|
|
|||
|
|
@ -56,15 +56,19 @@ partial def handleHover (p : HoverParams)
|
|||
|
||||
return none
|
||||
|
||||
open Elab in
|
||||
partial def handleDefinition (goToType? : Bool) (p : TextDocumentPositionParams)
|
||||
inductive GoToKind
|
||||
| declaration | definition | type
|
||||
deriving DecidableEq
|
||||
|
||||
open Elab GoToKind in
|
||||
partial def handleDefinition (kind : GoToKind) (p : TextDocumentPositionParams)
|
||||
: RequestM (RequestTask (Array LocationLink)) := do
|
||||
let rc ← read
|
||||
let doc ← readDoc
|
||||
let text := doc.meta.text
|
||||
let hoverPos := text.lspPosToUtf8Pos p.position
|
||||
|
||||
let locationLinksFromDecl i n := do
|
||||
let locationLinksFromDecl (i : Elab.Info) (n : Name) := do
|
||||
let mod? ← findModuleOf? n
|
||||
let modUri? ← match mod? with
|
||||
| some modName =>
|
||||
|
|
@ -92,16 +96,25 @@ partial def handleDefinition (goToType? : Bool) (p : TextDocumentPositionParams)
|
|||
if let some (ci, i) := t.hoverableInfoAt? hoverPos then
|
||||
if let Info.ofTermInfo ti := i then
|
||||
let mut expr := ti.expr
|
||||
if goToType? then
|
||||
if kind = type then
|
||||
expr ← ci.runMetaM i.lctx do
|
||||
Meta.instantiateMVars (← Meta.inferType expr)
|
||||
if let some n := expr.constName? then
|
||||
return ← ci.runMetaM i.lctx <| locationLinksFromDecl i n
|
||||
if let Info.ofFieldInfo fi := i then
|
||||
if kind = type then
|
||||
let expr ← ci.runMetaM i.lctx do
|
||||
Meta.instantiateMVars (← Meta.inferType fi.val)
|
||||
if let some n := expr.constName? then
|
||||
return ← ci.runMetaM i.lctx <| locationLinksFromDecl i n
|
||||
else
|
||||
return ← ci.runMetaM i.lctx <| locationLinksFromDecl i fi.projName
|
||||
-- If other go-tos fail, we try to show the elaborator or parser
|
||||
if let some ei := i.toElabInfo? then
|
||||
if ci.env.contains ei.elaborator then
|
||||
return ← ci.runMetaM i.lctx <| locationLinksFromDecl i ei.elaborator
|
||||
if ci.env.contains ei.stx.getKind then
|
||||
if kind = declaration ∧ ci.env.contains ei.stx.getKind then
|
||||
return ← ci.runMetaM i.lctx <| locationLinksFromDecl i ei.stx.getKind
|
||||
if kind = definition ∧ ci.env.contains ei.elaborator then
|
||||
return ← ci.runMetaM i.lctx <| locationLinksFromDecl i ei.elaborator
|
||||
return #[]
|
||||
|
||||
open Elab in
|
||||
|
|
@ -339,9 +352,9 @@ builtin_initialize
|
|||
registerLspRequestHandler "textDocument/waitForDiagnostics" WaitForDiagnosticsParams WaitForDiagnostics handleWaitForDiagnostics
|
||||
registerLspRequestHandler "textDocument/completion" CompletionParams CompletionList handleCompletion
|
||||
registerLspRequestHandler "textDocument/hover" HoverParams (Option Hover) handleHover
|
||||
registerLspRequestHandler "textDocument/declaration" TextDocumentPositionParams (Array LocationLink) (handleDefinition (goToType? := false))
|
||||
registerLspRequestHandler "textDocument/definition" TextDocumentPositionParams (Array LocationLink) (handleDefinition (goToType? := false))
|
||||
registerLspRequestHandler "textDocument/typeDefinition" TextDocumentPositionParams (Array LocationLink) (handleDefinition (goToType? := true))
|
||||
registerLspRequestHandler "textDocument/declaration" TextDocumentPositionParams (Array LocationLink) (handleDefinition GoToKind.declaration)
|
||||
registerLspRequestHandler "textDocument/definition" TextDocumentPositionParams (Array LocationLink) (handleDefinition GoToKind.definition)
|
||||
registerLspRequestHandler "textDocument/typeDefinition" TextDocumentPositionParams (Array LocationLink) (handleDefinition GoToKind.type)
|
||||
registerLspRequestHandler "textDocument/documentHighlight" DocumentHighlightParams DocumentHighlightResult handleDocumentHighlight
|
||||
registerLspRequestHandler "textDocument/documentSymbol" DocumentSymbolParams DocumentSymbolResult handleDocumentSymbol
|
||||
registerLspRequestHandler "textDocument/semanticTokens/full" SemanticTokensParams SemanticTokens handleSemanticTokensFull
|
||||
|
|
|
|||
4
stage0/src/Lean/Server/FileWorker/Utils.lean
generated
4
stage0/src/Lean/Server/FileWorker/Utils.lean
generated
|
|
@ -12,8 +12,8 @@ namespace Lean.Server.FileWorker
|
|||
open Snapshots
|
||||
open IO
|
||||
|
||||
private def logSnapContent (s : Snapshot) (text : FileMap) : IO Unit :=
|
||||
IO.eprintln s!"[{s.beginPos}, {s.endPos}]: `{text.source.extract s.beginPos (s.endPos-1)}`"
|
||||
def logSnapContent (s : Snapshot) (text : FileMap) : IO Unit :=
|
||||
IO.eprintln s!"[{s.beginPos}, {s.endPos}]: ```\n{text.source.extract s.beginPos (s.endPos-1)}\n```"
|
||||
|
||||
inductive ElabTaskError where
|
||||
| aborted
|
||||
|
|
|
|||
4
stage0/src/Lean/Server/InfoUtils.lean
generated
4
stage0/src/Lean/Server/InfoUtils.lean
generated
|
|
@ -157,13 +157,15 @@ where
|
|||
let tp ← Meta.inferType fi.val
|
||||
let tpFmt ← Meta.ppExpr tp
|
||||
return some f!"```lean
|
||||
{fi.name} : {tpFmt}
|
||||
{fi.fieldName} : {tpFmt}
|
||||
```"
|
||||
| _ => return none
|
||||
fmtDoc? := do
|
||||
if let Info.ofTermInfo ti := i then
|
||||
if let some n := ti.expr.constName? then
|
||||
return ← findDocString? n
|
||||
if let Info.ofFieldInfo fi := i then
|
||||
return ← findDocString? fi.projName
|
||||
if let some ei := i.toElabInfo? then
|
||||
return ← findDocString? ei.elaborator <||> findDocString? ei.stx.getKind
|
||||
return none
|
||||
|
|
|
|||
1
stage0/src/Lean/Server/Requests.lean
generated
1
stage0/src/Lean/Server/Requests.lean
generated
|
|
@ -49,6 +49,7 @@ end RequestError
|
|||
structure RequestContext where
|
||||
srcSearchPath : SearchPath
|
||||
docRef : IO.Ref FileWorker.EditableDocument
|
||||
hLog : IO.FS.Stream
|
||||
|
||||
abbrev RequestTask α := Task (Except RequestError α)
|
||||
/-- Workers execute request handlers in this monad. -/
|
||||
|
|
|
|||
48
stage0/src/library/compiler/util.cpp
generated
48
stage0/src/library/compiler/util.cpp
generated
|
|
@ -508,32 +508,30 @@ expr mk_runtime_type(type_checker::state & st, local_ctx const & lctx, expr e) {
|
|||
|
||||
/* If `e` is a trivial structure such as `Subtype`, then convert the only relevant
|
||||
field to a runtime type. */
|
||||
if (is_app(e)) {
|
||||
expr const & fn = get_app_fn(e);
|
||||
if (is_constant(fn) && is_inductive(st.env(), const_name(fn))) {
|
||||
name const & I_name = const_name(fn);
|
||||
environment const & env = st.env();
|
||||
if (optional<unsigned> fidx = has_trivial_structure(env, I_name)) {
|
||||
/* Retrieve field `fidx` type */
|
||||
inductive_val I_val = env.get(I_name).to_inductive_val();
|
||||
name K = head(I_val.get_cnstrs());
|
||||
unsigned nparams = I_val.get_nparams();
|
||||
buffer<expr> e_args;
|
||||
get_app_args(e, e_args);
|
||||
lean_assert(nparams <= e_args.size());
|
||||
expr k_app = mk_app(mk_constant(K, const_levels(fn)), nparams, e_args.data());
|
||||
expr type = tc.whnf(tc.infer(k_app));
|
||||
local_ctx aux_lctx = lctx;
|
||||
unsigned idx = 0;
|
||||
while (is_pi(type)) {
|
||||
if (idx == *fidx) {
|
||||
return mk_runtime_type(st, aux_lctx, binding_domain(type));
|
||||
}
|
||||
expr local = aux_lctx.mk_local_decl(st.ngen(), binding_name(type), binding_domain(type), binding_info(type));
|
||||
type = instantiate(binding_body(type), local);
|
||||
type = type_checker(st, aux_lctx).whnf(type);
|
||||
idx++;
|
||||
expr const & fn = get_app_fn(e);
|
||||
if (is_constant(fn) && is_inductive(st.env(), const_name(fn))) {
|
||||
name const & I_name = const_name(fn);
|
||||
environment const & env = st.env();
|
||||
if (optional<unsigned> fidx = has_trivial_structure(env, I_name)) {
|
||||
/* Retrieve field `fidx` type */
|
||||
inductive_val I_val = env.get(I_name).to_inductive_val();
|
||||
name K = head(I_val.get_cnstrs());
|
||||
unsigned nparams = I_val.get_nparams();
|
||||
buffer<expr> e_args;
|
||||
get_app_args(e, e_args);
|
||||
lean_assert(nparams <= e_args.size());
|
||||
expr k_app = mk_app(mk_constant(K, const_levels(fn)), nparams, e_args.data());
|
||||
expr type = tc.whnf(tc.infer(k_app));
|
||||
local_ctx aux_lctx = lctx;
|
||||
unsigned idx = 0;
|
||||
while (is_pi(type)) {
|
||||
if (idx == *fidx) {
|
||||
return mk_runtime_type(st, aux_lctx, binding_domain(type));
|
||||
}
|
||||
expr local = aux_lctx.mk_local_decl(st.ngen(), binding_name(type), binding_domain(type), binding_info(type));
|
||||
type = instantiate(binding_body(type), local);
|
||||
type = type_checker(st, aux_lctx).whnf(type);
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
10
stage0/src/runtime/CMakeLists.txt
generated
10
stage0/src/runtime/CMakeLists.txt
generated
|
|
@ -5,3 +5,13 @@ platform.cpp alloc.cpp allocprof.cpp sharecommon.cpp stack_overflow.cpp
|
|||
process.cpp)
|
||||
add_library(runtime OBJECT ${RUNTIME_OBJS})
|
||||
add_library(leanruntime ${RUNTIME_OBJS})
|
||||
if(LLVM)
|
||||
string(REPLACE ";" " " RUNTIME_OBJS_STR "${RUNTIME_OBJS};lean_inlines.c")
|
||||
add_custom_command(
|
||||
OUTPUT libleanruntime.bc
|
||||
DEPENDS ${RUNTIME_OBJS} lean_inlines.c
|
||||
# compile each runtime file with the original compile flags plus `-emit-llvm`, then `llvm-link` them together
|
||||
COMMAND bash -ec "rm -rf runtmp || true; mkdir runtmp; for f in ${RUNTIME_OBJS_STR}; do ${CMAKE_CXX_COMPILER_LAUNCHER} ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} -I$<JOIN:$<TARGET_PROPERTY:leanruntime,INCLUDE_DIRECTORIES>, -I> $([[ $f = \*.cpp ]] || echo \"-x c\") \"${CMAKE_CURRENT_SOURCE_DIR}/$f\" -S -emit-llvm -o runtmp/$f.ll; done; llvm-link runtmp/*.ll -o libleanruntime.bc"
|
||||
VERBATIM)
|
||||
add_custom_target(runtime_bc DEPENDS libleanruntime.bc)
|
||||
endif()
|
||||
|
|
|
|||
3
stage0/src/runtime/lean_inlines.c
generated
Normal file
3
stage0/src/runtime/lean_inlines.c
generated
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// generate LLVM IR for `static inline` definitions in lean.h for the LLVM backend
|
||||
#define static extern // work around clang not emitting code for unused `static` definitions
|
||||
#include <lean/lean.h>
|
||||
6
stage0/src/shell/CMakeLists.txt
generated
6
stage0/src/shell/CMakeLists.txt
generated
|
|
@ -12,9 +12,9 @@ if(LLVM)
|
|||
set(LLVM_SYSTEM_LIBS "-lz")
|
||||
endif()
|
||||
if(${STATIC} AND NOT ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin"))
|
||||
set(LEAN_EXE_LINKER_FLAGS "`${LLVM_TOOLS_BINARY_DIR}/llvm-config --link-static --ldflags --libs nativecodegen` -Wl,-Bstatic ${LLVM_SYSTEM_LIBS} -Wl,-Bdynamic")
|
||||
set(LEAN_EXE_LINKER_FLAGS "`llvm-config --link-static --ldflags --libs nativecodegen` -Wl,-Bstatic ${LLVM_SYSTEM_LIBS} -Wl,-Bdynamic")
|
||||
else()
|
||||
set(LEAN_EXE_LINKER_FLAGS "`${LLVM_TOOLS_BINARY_DIR}/llvm-config --ldflags --libs nativecodegen` ${LLVM_SYSTEM_LIBS}")
|
||||
set(LEAN_EXE_LINKER_FLAGS "`llvm-config --ldflags --libs nativecodegen` ${LLVM_SYSTEM_LIBS}")
|
||||
endif()
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(LEAN_EXE_LINKER_FLAGS "${LEAN_EXE_LINKER_FLAGS} -lole32 -luuid")
|
||||
|
|
@ -27,7 +27,7 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
|||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/lean${CMAKE_EXECUTABLE_SUFFIX}
|
||||
COMMAND sh -c "LEANC_GMP=${GMP_LIBRARIES} LEAN_CXX='${CMAKE_CXX_COMPILER_LAUNCHER} ${CMAKE_CXX_COMPILER}' ${CMAKE_BINARY_DIR}/bin/leanc $<TARGET_OBJECTS:shell> ${CMAKE_EXE_LINKER_FLAGS} ${LEAN_EXE_LINKER_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} -o ${CMAKE_BINARY_DIR}/bin/lean${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
VERBATIM
|
||||
DEPENDS Init Std Lean leancpp shell)
|
||||
DEPENDS Init Std Lean leancpp shell $<IF:$<BOOL:${LLVM}>,runtime_bc,>)
|
||||
|
||||
add_custom_target(lean ALL
|
||||
DEPENDS ${CMAKE_BINARY_DIR}/bin/lean${CMAKE_EXECUTABLE_SUFFIX})
|
||||
|
|
|
|||
65
stage0/stdlib/Init/Data/UInt.c
generated
65
stage0/stdlib/Init/Data/UInt.c
generated
|
|
@ -22,13 +22,16 @@ lean_object* l_UInt16_modn___boxed(lean_object*, lean_object*);
|
|||
static lean_object* l_instSubUInt64___closed__1;
|
||||
static lean_object* l_instSubUInt32___closed__1;
|
||||
lean_object* l_UInt8_modn___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_UInt16_toUInt32___boxed(lean_object*);
|
||||
static lean_object* l_instHModUInt32NatUInt32___closed__1;
|
||||
size_t l_USize_div(size_t, size_t);
|
||||
size_t l_UInt32_toUSize(uint32_t);
|
||||
static lean_object* l_instShiftRightUInt32___closed__1;
|
||||
uint32_t l_UInt16_toUInt32(uint16_t);
|
||||
static lean_object* l_instAddUInt8___closed__1;
|
||||
uint32_t lean_uint32_modn(uint32_t, lean_object*);
|
||||
static lean_object* l_instAddUSize___closed__1;
|
||||
uint64_t l_UInt8_toUInt64(uint8_t);
|
||||
lean_object* l_instComplementUInt8;
|
||||
static lean_object* l_instDivUInt64___closed__1;
|
||||
static lean_object* l_instHModUSizeNatUSize___closed__1;
|
||||
|
|
@ -81,6 +84,7 @@ lean_object* l_USize_land___boxed(lean_object*, lean_object*);
|
|||
lean_object* l_instShiftRightUInt32;
|
||||
size_t l_USize_complement(size_t);
|
||||
lean_object* l_UInt64_land___boxed(lean_object*, lean_object*);
|
||||
uint64_t l_UInt16_toUInt64(uint16_t);
|
||||
static lean_object* l_instAddUInt32___closed__1;
|
||||
lean_object* l_instMulUInt32;
|
||||
static lean_object* l_instAndOpUInt8___closed__1;
|
||||
|
|
@ -158,6 +162,7 @@ lean_object* l_instHModUInt8NatUInt8;
|
|||
uint64_t l_instOfNatUInt64(lean_object*);
|
||||
lean_object* l_instAndOpUInt32;
|
||||
static lean_object* l_instSubUInt8___closed__1;
|
||||
uint16_t l_UInt8_toUInt16(uint8_t);
|
||||
uint8_t l_UInt8_complement(uint8_t);
|
||||
lean_object* l_instShiftLeftUInt32;
|
||||
lean_object* l_UInt8_add___boxed(lean_object*, lean_object*);
|
||||
|
|
@ -225,6 +230,7 @@ static lean_object* l_instComplementUInt32___closed__1;
|
|||
uint32_t lean_uint32_of_nat(lean_object*);
|
||||
uint64_t l_UInt64_mul(uint64_t, uint64_t);
|
||||
size_t l_USize_land(size_t, size_t);
|
||||
lean_object* l_UInt8_toUInt16___boxed(lean_object*);
|
||||
lean_object* l_UInt16_shiftLeft___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_USize_mod___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_instDivUInt16;
|
||||
|
|
@ -275,6 +281,7 @@ lean_object* l_instDivUInt8;
|
|||
lean_object* l_USize_mul___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_UInt64_decLt___boxed(lean_object*, lean_object*);
|
||||
uint8_t l_Nat_toUInt8(lean_object*);
|
||||
uint8_t l_UInt16_toUInt8(uint16_t);
|
||||
uint8_t l_UInt64_decLe(uint64_t, uint64_t);
|
||||
static lean_object* l_instShiftRightUInt16___closed__1;
|
||||
lean_object* l_instAndOpUSize;
|
||||
|
|
@ -299,6 +306,7 @@ lean_object* l_UInt16_mod___boxed(lean_object*, lean_object*);
|
|||
lean_object* l_USize_toUInt32___boxed(lean_object*);
|
||||
uint32_t l_UInt32_lor(uint32_t, uint32_t);
|
||||
lean_object* l_UInt16_lor___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_UInt8_toUInt64___boxed(lean_object*);
|
||||
static lean_object* l_instShiftLeftUInt32___closed__1;
|
||||
lean_object* l_UInt32_modn___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_instXorUInt64;
|
||||
|
|
@ -309,6 +317,7 @@ lean_object* l_UInt8_mul___boxed(lean_object*, lean_object*);
|
|||
lean_object* l_UInt16_shiftRight___boxed(lean_object*, lean_object*);
|
||||
static lean_object* l_instXorUInt32___closed__1;
|
||||
lean_object* l_UInt64_add___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_UInt16_toUInt64___boxed(lean_object*);
|
||||
lean_object* l_UInt64_lor___boxed(lean_object*, lean_object*);
|
||||
static lean_object* l_instDivUInt8___closed__1;
|
||||
static lean_object* l_instShiftRightUInt8___closed__1;
|
||||
|
|
@ -336,6 +345,7 @@ static lean_object* l_instShiftLeftUSize___closed__1;
|
|||
static lean_object* l_instShiftRightUInt64___closed__1;
|
||||
static lean_object* l_instSubUInt16___closed__1;
|
||||
uint8_t l_UInt16_decLe(uint16_t, uint16_t);
|
||||
lean_object* l_UInt16_toUInt8___boxed(lean_object*);
|
||||
uint8_t l_instDecidableLt__4(size_t, size_t);
|
||||
lean_object* l_instSubUInt32;
|
||||
lean_object* l_UInt64_toUInt8___boxed(lean_object*);
|
||||
|
|
@ -1005,6 +1015,28 @@ x_6 = lean_box(x_5);
|
|||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* l_UInt16_toUInt8___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint16_t x_2; uint8_t x_3; lean_object* x_4;
|
||||
x_2 = lean_unbox(x_1);
|
||||
lean_dec(x_1);
|
||||
x_3 = ((uint8_t)x_2);
|
||||
x_4 = lean_box(x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_UInt8_toUInt16___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_2; uint16_t x_3; lean_object* x_4;
|
||||
x_2 = lean_unbox(x_1);
|
||||
lean_dec(x_1);
|
||||
x_3 = ((uint16_t)x_2);
|
||||
x_4 = lean_box(x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_UInt16_shiftRight___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -1535,6 +1567,17 @@ x_4 = lean_box_uint32(x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_UInt16_toUInt32___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint16_t x_2; uint32_t x_3; lean_object* x_4;
|
||||
x_2 = lean_unbox(x_1);
|
||||
lean_dec(x_1);
|
||||
x_3 = ((uint32_t)x_2);
|
||||
x_4 = lean_box_uint32(x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
uint32_t l_instOfNatUInt32(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -1969,6 +2012,28 @@ x_4 = lean_box_uint32(x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_UInt8_toUInt64___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_2; uint64_t x_3; lean_object* x_4;
|
||||
x_2 = lean_unbox(x_1);
|
||||
lean_dec(x_1);
|
||||
x_3 = ((uint64_t)x_2);
|
||||
x_4 = lean_box_uint64(x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_UInt16_toUInt64___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
uint16_t x_2; uint64_t x_3; lean_object* x_4;
|
||||
x_2 = lean_unbox(x_1);
|
||||
lean_dec(x_1);
|
||||
x_3 = ((uint64_t)x_2);
|
||||
x_4 = lean_box_uint64(x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_UInt32_toUInt64___boxed(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
1728
stage0/stdlib/Init/Meta.c
generated
1728
stage0/stdlib/Init/Meta.c
generated
File diff suppressed because it is too large
Load diff
719
stage0/stdlib/Lean/Data/Json/FromToJson.c
generated
719
stage0/stdlib/Lean/Data/Json/FromToJson.c
generated
|
|
@ -1,6 +1,6 @@
|
|||
// Lean compiler output
|
||||
// Module: Lean.Data.Json.FromToJson
|
||||
// Imports: Init Lean.Data.Json.Basic
|
||||
// Imports: Init Lean.Data.Json.Basic Lean.Data.Json.Printer
|
||||
#include <lean/lean.h>
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
|
@ -15,12 +15,14 @@ extern "C" {
|
|||
#endif
|
||||
lean_object* l_Lean_instToJsonJson;
|
||||
lean_object* l_Lean_instToJsonArray(lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Json_parseTagged___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_instFromJsonOption___rarg___closed__1;
|
||||
lean_object* l_Lean_instToJsonBool___boxed(lean_object*);
|
||||
size_t l_USize_add(size_t, size_t);
|
||||
lean_object* l_Lean_instToJsonOption___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Json_instToJsonStructured_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_instFromJsonNat;
|
||||
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
|
||||
lean_object* l_Lean_instToJsonArray___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Json_getInt_x3f___boxed(lean_object*);
|
||||
lean_object* lean_array_uget(lean_object*, size_t);
|
||||
|
|
@ -33,31 +35,47 @@ lean_object* l_Lean_instFromJsonString;
|
|||
lean_object* l_Lean_Json_toStructured_x3f___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_id___rarg___boxed(lean_object*);
|
||||
static lean_object* l_Lean_instFromJsonString___closed__1;
|
||||
static lean_object* l_Lean_Json_parseTagged___closed__1;
|
||||
lean_object* l_Lean_Json_getStr_x3f(lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_push(lean_object*, lean_object*);
|
||||
lean_object* lean_array_get_size(lean_object*);
|
||||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_instFromJsonBool___closed__1;
|
||||
lean_object* l_Lean_Json_instToJsonStructured_match__1(lean_object*);
|
||||
static lean_object* l_Lean_instToJsonJson___closed__1;
|
||||
lean_object* l_Lean_instFromJsonArray_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_instFromJsonOption_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Json_opt(lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged_match__3(lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_instToJsonArray___spec__1___rarg(lean_object*, size_t, size_t, lean_object*);
|
||||
uint8_t l_USize_decLt(size_t, size_t);
|
||||
static lean_object* l_Lean_Json_parseTagged___closed__6;
|
||||
lean_object* l_Lean_instToJsonNat(lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_instFromJsonArray___spec__1(lean_object*);
|
||||
static lean_object* l_Lean_instFromJsonJsonNumber___closed__1;
|
||||
lean_object* l_Lean_instFromJsonOption___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged_match__4(lean_object*);
|
||||
static lean_object* l_Lean_instFromJsonNat___closed__1;
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_instFromJsonArray___spec__1___rarg(lean_object*, size_t, size_t, lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Json_parseTagged___closed__4;
|
||||
lean_object* l_Lean_instToJsonInt(lean_object*);
|
||||
static lean_object* l_Lean_instFromJsonInt___closed__1;
|
||||
lean_object* l_Lean_instFromJsonInt;
|
||||
lean_object* l_Nat_repr(lean_object*);
|
||||
lean_object* l_Lean_instFromJsonJson(lean_object*);
|
||||
lean_object* l_Lean_instFromJsonBool;
|
||||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Json_parseTagged___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*);
|
||||
lean_object* l_Lean_Json_getNat_x3f___boxed(lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
lean_object* l_Lean_Json_instToJsonStructured(lean_object*);
|
||||
lean_object* l_Lean_instToJsonOption_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged_match__1(lean_object*);
|
||||
static lean_object* l_Lean_instFromJsonArray___rarg___closed__1;
|
||||
lean_object* l_Lean_Name_getString_x21(lean_object*);
|
||||
lean_object* l_Lean_instFromJsonOption_match__1(lean_object*);
|
||||
lean_object* l_Lean_Json_opt___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_JsonNumber_fromNat(lean_object*);
|
||||
|
|
@ -65,27 +83,38 @@ lean_object* l_Lean_Json_getObjValD(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_instFromJsonOption(lean_object*);
|
||||
static lean_object* l_Lean_instFromJsonArray___rarg___closed__2;
|
||||
lean_object* l_Lean_instToJsonString(lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged_match__2(lean_object*);
|
||||
lean_object* l_Lean_Json_getBool_x3f___boxed(lean_object*);
|
||||
lean_object* l_Lean_instToJsonJsonNumber(lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_instFromJsonArray(lean_object*);
|
||||
lean_object* l_Lean_instToJsonOption_match__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Json_instFromJsonStructured_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_instFromJsonArray___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Json_getArr_x3f(lean_object*);
|
||||
lean_object* l_Lean_instToJsonBool(uint8_t);
|
||||
lean_object* l_Lean_Json_instToJsonStructured___boxed(lean_object*);
|
||||
lean_object* l_Lean_Json_instFromJsonStructured_match__1(lean_object*);
|
||||
lean_object* l_Lean_instFromJsonArray___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_instFromJsonJsonNumber;
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_instToJsonArray___spec__1(lean_object*);
|
||||
static lean_object* l_Lean_Json_parseTagged___closed__3;
|
||||
lean_object* l_Array_mapMUnsafe_map___at_Lean_instToJsonArray___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged_match__3___rarg(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Json_parseTagged___closed__5;
|
||||
lean_object* l_Lean_instFromJsonArray_match__1(lean_object*);
|
||||
static lean_object* l_Lean_Json_instFromJsonStructured___closed__1;
|
||||
lean_object* l_Lean_Json_getObjVal_x3f(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Json_getObjValAs_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Json_instFromJsonStructured___closed__2;
|
||||
lean_object* l_Lean_instToJsonOption(lean_object*);
|
||||
static lean_object* l_Lean_Json_parseTagged___closed__2;
|
||||
lean_object* l_Lean_Json_instFromJsonStructured(lean_object*);
|
||||
lean_object* l_Lean_Json_instFromJsonStructured___boxed(lean_object*);
|
||||
lean_object* l_Lean_Json_parseTagged_match__4___rarg(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Json_parseTagged___closed__7;
|
||||
lean_object* l_Lean_instFromJsonJson(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -935,8 +964,679 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Json_opt___rarg), 3, 0);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5;
|
||||
lean_dec(x_2);
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_1);
|
||||
x_5 = lean_apply_1(x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7;
|
||||
lean_dec(x_3);
|
||||
x_6 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_1);
|
||||
x_7 = lean_apply_1(x_2, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged_match__1(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Json_parseTagged_match__1___rarg), 3, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged_match__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5;
|
||||
lean_dec(x_2);
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_1);
|
||||
x_5 = lean_apply_1(x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7;
|
||||
lean_dec(x_3);
|
||||
x_6 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_1);
|
||||
x_7 = lean_apply_1(x_2, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged_match__2(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Json_parseTagged_match__2___rarg), 3, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged_match__3___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5;
|
||||
lean_dec(x_2);
|
||||
x_4 = lean_box(0);
|
||||
x_5 = lean_apply_1(x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7;
|
||||
lean_dec(x_3);
|
||||
x_6 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_1);
|
||||
x_7 = lean_apply_1(x_2, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged_match__3(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Json_parseTagged_match__3___rarg), 3, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged_match__4___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 0)
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5;
|
||||
lean_dec(x_2);
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_1);
|
||||
x_5 = lean_apply_1(x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7;
|
||||
lean_dec(x_3);
|
||||
x_6 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_1);
|
||||
x_7 = lean_apply_1(x_2, x_6);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged_match__4(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Json_parseTagged_match__4___rarg), 3, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Json_parseTagged___spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_6;
|
||||
x_6 = x_4 < x_3;
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_7, 0, x_5);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_8 = lean_array_uget(x_2, x_4);
|
||||
x_9 = l_Lean_Name_getString_x21(x_8);
|
||||
lean_dec(x_8);
|
||||
x_10 = l_Lean_Json_getObjVal_x3f(x_1, x_9);
|
||||
lean_dec(x_9);
|
||||
if (lean_obj_tag(x_10) == 0)
|
||||
{
|
||||
uint8_t x_11;
|
||||
lean_dec(x_5);
|
||||
x_11 = !lean_is_exclusive(x_10);
|
||||
if (x_11 == 0)
|
||||
{
|
||||
return x_10;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13;
|
||||
x_12 = lean_ctor_get(x_10, 0);
|
||||
lean_inc(x_12);
|
||||
lean_dec(x_10);
|
||||
x_13 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_13, 0, x_12);
|
||||
return x_13;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17;
|
||||
x_14 = lean_ctor_get(x_10, 0);
|
||||
lean_inc(x_14);
|
||||
lean_dec(x_10);
|
||||
x_15 = lean_array_push(x_5, x_14);
|
||||
x_16 = 1;
|
||||
x_17 = x_4 + x_16;
|
||||
x_4 = x_17;
|
||||
x_5 = x_15;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Json_parseTagged___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("incorrect number of fields: ");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Json_parseTagged___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string(" ≟ ");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Json_parseTagged___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Json_parseTagged___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = lean_unsigned_to_nat(1u);
|
||||
x_2 = lean_mk_empty_array_with_capacity(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Json_parseTagged___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = lean_unsigned_to_nat(0u);
|
||||
x_2 = lean_mk_empty_array_with_capacity(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Json_parseTagged___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("incorrect tag: ");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Json_parseTagged___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Json_parseTagged___closed__5;
|
||||
x_2 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; uint8_t x_6;
|
||||
x_5 = lean_unsigned_to_nat(0u);
|
||||
x_6 = lean_nat_dec_eq(x_3, x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = l_Lean_Json_getObjVal_x3f(x_1, x_2);
|
||||
if (lean_obj_tag(x_7) == 0)
|
||||
{
|
||||
uint8_t x_8;
|
||||
lean_dec(x_3);
|
||||
x_8 = !lean_is_exclusive(x_7);
|
||||
if (x_8 == 0)
|
||||
{
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10;
|
||||
x_9 = lean_ctor_get(x_7, 0);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_7);
|
||||
x_10 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_10, 0, x_9);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lean_obj_tag(x_4) == 0)
|
||||
{
|
||||
uint8_t x_11;
|
||||
x_11 = !lean_is_exclusive(x_7);
|
||||
if (x_11 == 0)
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; uint8_t x_14;
|
||||
x_12 = lean_ctor_get(x_7, 0);
|
||||
x_13 = lean_unsigned_to_nat(1u);
|
||||
x_14 = lean_nat_dec_eq(x_3, x_13);
|
||||
if (x_14 == 0)
|
||||
{
|
||||
lean_object* x_15;
|
||||
lean_free_object(x_7);
|
||||
x_15 = l_Lean_Json_getArr_x3f(x_12);
|
||||
lean_dec(x_12);
|
||||
if (lean_obj_tag(x_15) == 0)
|
||||
{
|
||||
uint8_t x_16;
|
||||
lean_dec(x_3);
|
||||
x_16 = !lean_is_exclusive(x_15);
|
||||
if (x_16 == 0)
|
||||
{
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18;
|
||||
x_17 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_15);
|
||||
x_18 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_18, 0, x_17);
|
||||
return x_18;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_19;
|
||||
x_19 = !lean_is_exclusive(x_15);
|
||||
if (x_19 == 0)
|
||||
{
|
||||
lean_object* x_20; lean_object* x_21; uint8_t x_22;
|
||||
x_20 = lean_ctor_get(x_15, 0);
|
||||
x_21 = lean_array_get_size(x_20);
|
||||
x_22 = lean_nat_dec_eq(x_21, x_3);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31;
|
||||
lean_dec(x_20);
|
||||
x_23 = l_Nat_repr(x_21);
|
||||
x_24 = l_Lean_Json_parseTagged___closed__1;
|
||||
x_25 = lean_string_append(x_24, x_23);
|
||||
lean_dec(x_23);
|
||||
x_26 = l_Lean_Json_parseTagged___closed__2;
|
||||
x_27 = lean_string_append(x_25, x_26);
|
||||
x_28 = l_Nat_repr(x_3);
|
||||
x_29 = lean_string_append(x_27, x_28);
|
||||
lean_dec(x_28);
|
||||
x_30 = l_Lean_Json_parseTagged___closed__3;
|
||||
x_31 = lean_string_append(x_29, x_30);
|
||||
lean_ctor_set_tag(x_15, 0);
|
||||
lean_ctor_set(x_15, 0, x_31);
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_21);
|
||||
lean_dec(x_3);
|
||||
return x_15;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_32; lean_object* x_33; uint8_t x_34;
|
||||
x_32 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_15);
|
||||
x_33 = lean_array_get_size(x_32);
|
||||
x_34 = lean_nat_dec_eq(x_33, x_3);
|
||||
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_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44;
|
||||
lean_dec(x_32);
|
||||
x_35 = l_Nat_repr(x_33);
|
||||
x_36 = l_Lean_Json_parseTagged___closed__1;
|
||||
x_37 = lean_string_append(x_36, x_35);
|
||||
lean_dec(x_35);
|
||||
x_38 = l_Lean_Json_parseTagged___closed__2;
|
||||
x_39 = lean_string_append(x_37, x_38);
|
||||
x_40 = l_Nat_repr(x_3);
|
||||
x_41 = lean_string_append(x_39, x_40);
|
||||
lean_dec(x_40);
|
||||
x_42 = l_Lean_Json_parseTagged___closed__3;
|
||||
x_43 = lean_string_append(x_41, x_42);
|
||||
x_44 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_44, 0, x_43);
|
||||
return x_44;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_45;
|
||||
lean_dec(x_33);
|
||||
lean_dec(x_3);
|
||||
x_45 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_45, 0, x_32);
|
||||
return x_45;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_46; lean_object* x_47;
|
||||
lean_dec(x_3);
|
||||
x_46 = l_Lean_Json_parseTagged___closed__4;
|
||||
x_47 = lean_array_push(x_46, x_12);
|
||||
lean_ctor_set(x_7, 0, x_47);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_48; lean_object* x_49; uint8_t x_50;
|
||||
x_48 = lean_ctor_get(x_7, 0);
|
||||
lean_inc(x_48);
|
||||
lean_dec(x_7);
|
||||
x_49 = lean_unsigned_to_nat(1u);
|
||||
x_50 = lean_nat_dec_eq(x_3, x_49);
|
||||
if (x_50 == 0)
|
||||
{
|
||||
lean_object* x_51;
|
||||
x_51 = l_Lean_Json_getArr_x3f(x_48);
|
||||
lean_dec(x_48);
|
||||
if (lean_obj_tag(x_51) == 0)
|
||||
{
|
||||
lean_object* x_52; lean_object* x_53; lean_object* x_54;
|
||||
lean_dec(x_3);
|
||||
x_52 = lean_ctor_get(x_51, 0);
|
||||
lean_inc(x_52);
|
||||
if (lean_is_exclusive(x_51)) {
|
||||
lean_ctor_release(x_51, 0);
|
||||
x_53 = x_51;
|
||||
} else {
|
||||
lean_dec_ref(x_51);
|
||||
x_53 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_53)) {
|
||||
x_54 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_54 = x_53;
|
||||
}
|
||||
lean_ctor_set(x_54, 0, x_52);
|
||||
return x_54;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58;
|
||||
x_55 = lean_ctor_get(x_51, 0);
|
||||
lean_inc(x_55);
|
||||
if (lean_is_exclusive(x_51)) {
|
||||
lean_ctor_release(x_51, 0);
|
||||
x_56 = x_51;
|
||||
} else {
|
||||
lean_dec_ref(x_51);
|
||||
x_56 = lean_box(0);
|
||||
}
|
||||
x_57 = lean_array_get_size(x_55);
|
||||
x_58 = lean_nat_dec_eq(x_57, x_3);
|
||||
if (x_58 == 0)
|
||||
{
|
||||
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_dec(x_55);
|
||||
x_59 = l_Nat_repr(x_57);
|
||||
x_60 = l_Lean_Json_parseTagged___closed__1;
|
||||
x_61 = lean_string_append(x_60, x_59);
|
||||
lean_dec(x_59);
|
||||
x_62 = l_Lean_Json_parseTagged___closed__2;
|
||||
x_63 = lean_string_append(x_61, x_62);
|
||||
x_64 = l_Nat_repr(x_3);
|
||||
x_65 = lean_string_append(x_63, x_64);
|
||||
lean_dec(x_64);
|
||||
x_66 = l_Lean_Json_parseTagged___closed__3;
|
||||
x_67 = lean_string_append(x_65, x_66);
|
||||
if (lean_is_scalar(x_56)) {
|
||||
x_68 = lean_alloc_ctor(0, 1, 0);
|
||||
} else {
|
||||
x_68 = x_56;
|
||||
lean_ctor_set_tag(x_68, 0);
|
||||
}
|
||||
lean_ctor_set(x_68, 0, x_67);
|
||||
return x_68;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_69;
|
||||
lean_dec(x_57);
|
||||
lean_dec(x_3);
|
||||
if (lean_is_scalar(x_56)) {
|
||||
x_69 = lean_alloc_ctor(1, 1, 0);
|
||||
} else {
|
||||
x_69 = x_56;
|
||||
}
|
||||
lean_ctor_set(x_69, 0, x_55);
|
||||
return x_69;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_70; lean_object* x_71; lean_object* x_72;
|
||||
lean_dec(x_3);
|
||||
x_70 = l_Lean_Json_parseTagged___closed__4;
|
||||
x_71 = lean_array_push(x_70, x_48);
|
||||
x_72 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_72, 0, x_71);
|
||||
return x_72;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_73; lean_object* x_74; lean_object* x_75; size_t x_76; size_t x_77; lean_object* x_78; lean_object* x_79;
|
||||
lean_dec(x_3);
|
||||
x_73 = lean_ctor_get(x_7, 0);
|
||||
lean_inc(x_73);
|
||||
lean_dec(x_7);
|
||||
x_74 = lean_ctor_get(x_4, 0);
|
||||
x_75 = lean_array_get_size(x_74);
|
||||
x_76 = lean_usize_of_nat(x_75);
|
||||
lean_dec(x_75);
|
||||
x_77 = 0;
|
||||
x_78 = l_Lean_Json_parseTagged___closed__5;
|
||||
x_79 = l_Array_forInUnsafe_loop___at_Lean_Json_parseTagged___spec__1(x_73, x_74, x_76, x_77, x_78);
|
||||
lean_dec(x_73);
|
||||
if (lean_obj_tag(x_79) == 0)
|
||||
{
|
||||
uint8_t x_80;
|
||||
x_80 = !lean_is_exclusive(x_79);
|
||||
if (x_80 == 0)
|
||||
{
|
||||
return x_79;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_81; lean_object* x_82;
|
||||
x_81 = lean_ctor_get(x_79, 0);
|
||||
lean_inc(x_81);
|
||||
lean_dec(x_79);
|
||||
x_82 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_82, 0, x_81);
|
||||
return x_82;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_83;
|
||||
x_83 = !lean_is_exclusive(x_79);
|
||||
if (x_83 == 0)
|
||||
{
|
||||
return x_79;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_84; lean_object* x_85;
|
||||
x_84 = lean_ctor_get(x_79, 0);
|
||||
lean_inc(x_84);
|
||||
lean_dec(x_79);
|
||||
x_85 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_85, 0, x_84);
|
||||
return x_85;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_86;
|
||||
lean_dec(x_3);
|
||||
x_86 = l_Lean_Json_getStr_x3f(x_1);
|
||||
if (lean_obj_tag(x_86) == 0)
|
||||
{
|
||||
uint8_t x_87;
|
||||
x_87 = !lean_is_exclusive(x_86);
|
||||
if (x_87 == 0)
|
||||
{
|
||||
return x_86;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_88; lean_object* x_89;
|
||||
x_88 = lean_ctor_get(x_86, 0);
|
||||
lean_inc(x_88);
|
||||
lean_dec(x_86);
|
||||
x_89 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_89, 0, x_88);
|
||||
return x_89;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_90;
|
||||
x_90 = !lean_is_exclusive(x_86);
|
||||
if (x_90 == 0)
|
||||
{
|
||||
lean_object* x_91; uint8_t x_92;
|
||||
x_91 = lean_ctor_get(x_86, 0);
|
||||
x_92 = lean_string_dec_eq(x_91, x_2);
|
||||
if (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_object* x_99;
|
||||
x_93 = l_Lean_Json_parseTagged___closed__6;
|
||||
x_94 = lean_string_append(x_93, x_91);
|
||||
lean_dec(x_91);
|
||||
x_95 = l_Lean_Json_parseTagged___closed__2;
|
||||
x_96 = lean_string_append(x_94, x_95);
|
||||
x_97 = lean_string_append(x_96, x_2);
|
||||
x_98 = l_Lean_Json_parseTagged___closed__3;
|
||||
x_99 = lean_string_append(x_97, x_98);
|
||||
lean_ctor_set_tag(x_86, 0);
|
||||
lean_ctor_set(x_86, 0, x_99);
|
||||
return x_86;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_100;
|
||||
lean_free_object(x_86);
|
||||
lean_dec(x_91);
|
||||
x_100 = l_Lean_Json_parseTagged___closed__7;
|
||||
return x_100;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_101; uint8_t x_102;
|
||||
x_101 = lean_ctor_get(x_86, 0);
|
||||
lean_inc(x_101);
|
||||
lean_dec(x_86);
|
||||
x_102 = lean_string_dec_eq(x_101, x_2);
|
||||
if (x_102 == 0)
|
||||
{
|
||||
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;
|
||||
x_103 = l_Lean_Json_parseTagged___closed__6;
|
||||
x_104 = lean_string_append(x_103, x_101);
|
||||
lean_dec(x_101);
|
||||
x_105 = l_Lean_Json_parseTagged___closed__2;
|
||||
x_106 = lean_string_append(x_104, x_105);
|
||||
x_107 = lean_string_append(x_106, x_2);
|
||||
x_108 = l_Lean_Json_parseTagged___closed__3;
|
||||
x_109 = lean_string_append(x_107, x_108);
|
||||
x_110 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_110, 0, x_109);
|
||||
return x_110;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_111;
|
||||
lean_dec(x_101);
|
||||
x_111 = l_Lean_Json_parseTagged___closed__7;
|
||||
return x_111;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_forInUnsafe_loop___at_Lean_Json_parseTagged___spec__1___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_3);
|
||||
lean_dec(x_3);
|
||||
x_7 = lean_unbox_usize(x_4);
|
||||
lean_dec(x_4);
|
||||
x_8 = l_Array_forInUnsafe_loop___at_Lean_Json_parseTagged___spec__1(x_1, x_2, x_6, x_7, x_5);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Json_parseTagged___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_Json_parseTagged(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* initialize_Init(lean_object*);
|
||||
lean_object* initialize_Lean_Data_Json_Basic(lean_object*);
|
||||
lean_object* initialize_Lean_Data_Json_Printer(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
lean_object* initialize_Lean_Data_Json_FromToJson(lean_object* w) {
|
||||
lean_object * res;
|
||||
|
|
@ -948,6 +1648,9 @@ lean_dec_ref(res);
|
|||
res = initialize_Lean_Data_Json_Basic(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Lean_Data_Json_Printer(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_instToJsonJson___closed__1 = _init_l_Lean_instToJsonJson___closed__1();
|
||||
lean_mark_persistent(l_Lean_instToJsonJson___closed__1);
|
||||
l_Lean_instToJsonJson = _init_l_Lean_instToJsonJson();
|
||||
|
|
@ -982,6 +1685,20 @@ l_Lean_Json_instFromJsonStructured___closed__1 = _init_l_Lean_Json_instFromJsonS
|
|||
lean_mark_persistent(l_Lean_Json_instFromJsonStructured___closed__1);
|
||||
l_Lean_Json_instFromJsonStructured___closed__2 = _init_l_Lean_Json_instFromJsonStructured___closed__2();
|
||||
lean_mark_persistent(l_Lean_Json_instFromJsonStructured___closed__2);
|
||||
l_Lean_Json_parseTagged___closed__1 = _init_l_Lean_Json_parseTagged___closed__1();
|
||||
lean_mark_persistent(l_Lean_Json_parseTagged___closed__1);
|
||||
l_Lean_Json_parseTagged___closed__2 = _init_l_Lean_Json_parseTagged___closed__2();
|
||||
lean_mark_persistent(l_Lean_Json_parseTagged___closed__2);
|
||||
l_Lean_Json_parseTagged___closed__3 = _init_l_Lean_Json_parseTagged___closed__3();
|
||||
lean_mark_persistent(l_Lean_Json_parseTagged___closed__3);
|
||||
l_Lean_Json_parseTagged___closed__4 = _init_l_Lean_Json_parseTagged___closed__4();
|
||||
lean_mark_persistent(l_Lean_Json_parseTagged___closed__4);
|
||||
l_Lean_Json_parseTagged___closed__5 = _init_l_Lean_Json_parseTagged___closed__5();
|
||||
lean_mark_persistent(l_Lean_Json_parseTagged___closed__5);
|
||||
l_Lean_Json_parseTagged___closed__6 = _init_l_Lean_Json_parseTagged___closed__6();
|
||||
lean_mark_persistent(l_Lean_Json_parseTagged___closed__6);
|
||||
l_Lean_Json_parseTagged___closed__7 = _init_l_Lean_Json_parseTagged___closed__7();
|
||||
lean_mark_persistent(l_Lean_Json_parseTagged___closed__7);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
2502
stage0/stdlib/Lean/Elab/Deriving/FromToJson.c
generated
2502
stage0/stdlib/Lean/Elab/Deriving/FromToJson.c
generated
File diff suppressed because it is too large
Load diff
23
stage0/stdlib/Lean/Elab/InfoTree.c
generated
23
stage0/stdlib/Lean/Elab/InfoTree.c
generated
|
|
@ -939,11 +939,12 @@ x_1 = lean_box(0);
|
|||
x_2 = l_Lean_Elab_instInhabitedTermInfo___closed__4;
|
||||
x_3 = l_Lean_Elab_instInhabitedTermInfo___closed__6;
|
||||
x_4 = lean_box(0);
|
||||
x_5 = lean_alloc_ctor(0, 4, 0);
|
||||
x_5 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
lean_ctor_set(x_5, 2, x_3);
|
||||
lean_ctor_set(x_5, 3, x_4);
|
||||
lean_ctor_set(x_5, 1, x_1);
|
||||
lean_ctor_set(x_5, 2, x_2);
|
||||
lean_ctor_set(x_5, 3, x_3);
|
||||
lean_ctor_set(x_5, 4, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
|
|
@ -4031,7 +4032,7 @@ if (x_16 == 0)
|
|||
{
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
x_17 = lean_ctor_get(x_15, 0);
|
||||
x_18 = lean_ctor_get(x_2, 0);
|
||||
x_18 = lean_ctor_get(x_2, 1);
|
||||
lean_inc(x_18);
|
||||
x_19 = l_Std_fmt___at_Lean_Level_PP_Result_format___spec__1(x_18);
|
||||
x_20 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
|
|
@ -4056,7 +4057,7 @@ x_28 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatElabInfo___closed__2;
|
|||
x_29 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_27);
|
||||
lean_ctor_set(x_29, 1, x_28);
|
||||
x_30 = lean_ctor_get(x_2, 3);
|
||||
x_30 = lean_ctor_get(x_2, 4);
|
||||
lean_inc(x_30);
|
||||
lean_dec(x_2);
|
||||
x_31 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatStxRange(x_3, x_30);
|
||||
|
|
@ -4078,7 +4079,7 @@ x_35 = lean_ctor_get(x_15, 1);
|
|||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_15);
|
||||
x_36 = lean_ctor_get(x_2, 0);
|
||||
x_36 = lean_ctor_get(x_2, 1);
|
||||
lean_inc(x_36);
|
||||
x_37 = l_Std_fmt___at_Lean_Level_PP_Result_format___spec__1(x_36);
|
||||
x_38 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
|
|
@ -4103,7 +4104,7 @@ x_46 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatElabInfo___closed__2;
|
|||
x_47 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_47, 0, x_45);
|
||||
lean_ctor_set(x_47, 1, x_46);
|
||||
x_48 = lean_ctor_get(x_2, 3);
|
||||
x_48 = lean_ctor_get(x_2, 4);
|
||||
lean_inc(x_48);
|
||||
lean_dec(x_2);
|
||||
x_49 = l___private_Lean_Elab_InfoTree_0__Lean_Elab_formatStxRange(x_3, x_48);
|
||||
|
|
@ -4208,9 +4209,9 @@ lean_object* l_Lean_Elab_FieldInfo_format(lean_object* x_1, lean_object* x_2, le
|
|||
_start:
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_4 = lean_ctor_get(x_2, 1);
|
||||
x_4 = lean_ctor_get(x_2, 2);
|
||||
lean_inc(x_4);
|
||||
x_5 = lean_ctor_get(x_2, 2);
|
||||
x_5 = lean_ctor_get(x_2, 3);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_1);
|
||||
x_6 = lean_alloc_closure((void*)(l_Lean_Elab_FieldInfo_format___lambda__1___boxed), 8, 3);
|
||||
|
|
@ -9026,7 +9027,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_1 = l_Lean_Elab_assignInfoHoleId___rarg___lambda__2___closed__4;
|
||||
x_2 = l_Lean_Elab_assignInfoHoleId___rarg___lambda__2___closed__5;
|
||||
x_3 = lean_unsigned_to_nat(336u);
|
||||
x_3 = lean_unsigned_to_nat(339u);
|
||||
x_4 = lean_unsigned_to_nat(2u);
|
||||
x_5 = l_Lean_Elab_assignInfoHoleId___rarg___lambda__2___closed__3;
|
||||
x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
|
||||
|
|
|
|||
6984
stage0/stdlib/Lean/Elab/StructInst.c
generated
6984
stage0/stdlib/Lean/Elab/StructInst.c
generated
File diff suppressed because it is too large
Load diff
6
stage0/stdlib/Lean/Elab/Tactic/Simp.c
generated
6
stage0/stdlib/Lean/Elab/Tactic/Simp.c
generated
|
|
@ -961,7 +961,7 @@ x_1 = l_Lean_Meta_Simp_defaultMaxSteps;
|
|||
x_2 = lean_unsigned_to_nat(2u);
|
||||
x_3 = 0;
|
||||
x_4 = 1;
|
||||
x_5 = lean_alloc_ctor(0, 2, 10);
|
||||
x_5 = lean_alloc_ctor(0, 2, 9);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2, x_3);
|
||||
|
|
@ -973,7 +973,6 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 5, x_4);
|
|||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 6, x_4);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 7, x_4);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 8, x_4);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 9, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
|
|
@ -985,7 +984,7 @@ x_1 = l_Lean_Meta_Simp_defaultMaxSteps;
|
|||
x_2 = lean_unsigned_to_nat(2u);
|
||||
x_3 = 1;
|
||||
x_4 = 0;
|
||||
x_5 = lean_alloc_ctor(0, 2, 10);
|
||||
x_5 = lean_alloc_ctor(0, 2, 9);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2, x_3);
|
||||
|
|
@ -997,7 +996,6 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 5, x_3);
|
|||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 6, x_3);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 7, x_3);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 8, x_3);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 9, x_3);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
stage0/stdlib/Lean/Environment.c
generated
2
stage0/stdlib/Lean/Environment.c
generated
|
|
@ -13165,7 +13165,7 @@ static lean_object* _init_l_Lean_Environment_evalConstCheck___rarg___closed__1()
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("unknow constant '");
|
||||
x_1 = lean_mk_string("unknown constant '");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
18
stage0/stdlib/Lean/Hygiene.c
generated
18
stage0/stdlib/Lean/Hygiene.c
generated
|
|
@ -26,6 +26,7 @@ lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
|
|||
lean_object* l___private_Lean_Hygiene_0__Lean_mkInaccessibleUserName(uint8_t, lean_object*);
|
||||
uint8_t l_Lean_getSanitizeNames(lean_object*);
|
||||
lean_object* l_Lean_sanitizeName(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Unhygienic_instMonadQuotationUnhygienic___closed__11;
|
||||
lean_object* lean_array_get_size(lean_object*);
|
||||
lean_object* l_Lean_Unhygienic_run(lean_object*);
|
||||
|
|
@ -95,7 +96,6 @@ uint8_t l_Lean_sanitizeNamesDefault;
|
|||
static lean_object* l_Lean_Unhygienic_instMonadQuotationUnhygienic___closed__9;
|
||||
lean_object* l___private_Lean_Hygiene_0__Lean_sanitizeSyntaxAux_match__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Hygiene_0__Lean_mkInaccessibleUserName_match__1(lean_object*);
|
||||
lean_object* lean_mk_syntax_ident(lean_object*);
|
||||
lean_object* l_Lean_Unhygienic_instMonadQuotationUnhygienic___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Unhygienic_run___rarg___closed__1;
|
||||
lean_object* l___private_Lean_Hygiene_0__Lean_sanitizeSyntaxAux___boxed__const__1;
|
||||
|
|
@ -1175,8 +1175,7 @@ x_10 = lean_ctor_get(x_1, 2);
|
|||
lean_inc(x_10);
|
||||
x_11 = lean_ctor_get(x_1, 3);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_1);
|
||||
x_12 = lean_apply_4(x_2, x_8, x_9, x_10, x_11);
|
||||
x_12 = lean_apply_5(x_2, x_1, x_8, x_9, x_10, x_11);
|
||||
return x_12;
|
||||
}
|
||||
default:
|
||||
|
|
@ -1383,7 +1382,6 @@ case 3:
|
|||
lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_33 = lean_ctor_get(x_1, 2);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_1);
|
||||
x_34 = lean_ctor_get(x_2, 2);
|
||||
lean_inc(x_34);
|
||||
x_35 = l_Std_RBNode_find___at___private_Lean_Hygiene_0__Lean_sanitizeSyntaxAux___spec__2(x_34, x_33);
|
||||
|
|
@ -1395,7 +1393,8 @@ x_36 = l_Lean_Name_hasMacroScopes(x_33);
|
|||
if (x_36 == 0)
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38;
|
||||
x_37 = lean_mk_syntax_ident(x_33);
|
||||
x_37 = l_Lean_mkIdentFrom(x_1, x_33);
|
||||
lean_dec(x_1);
|
||||
x_38 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_37);
|
||||
lean_ctor_set(x_38, 1, x_2);
|
||||
|
|
@ -1410,7 +1409,8 @@ if (x_40 == 0)
|
|||
{
|
||||
lean_object* x_41; lean_object* x_42;
|
||||
x_41 = lean_ctor_get(x_39, 0);
|
||||
x_42 = lean_mk_syntax_ident(x_41);
|
||||
x_42 = l_Lean_mkIdentFrom(x_1, x_41);
|
||||
lean_dec(x_1);
|
||||
lean_ctor_set(x_39, 0, x_42);
|
||||
return x_39;
|
||||
}
|
||||
|
|
@ -1422,7 +1422,8 @@ x_44 = lean_ctor_get(x_39, 1);
|
|||
lean_inc(x_44);
|
||||
lean_inc(x_43);
|
||||
lean_dec(x_39);
|
||||
x_45 = lean_mk_syntax_ident(x_43);
|
||||
x_45 = l_Lean_mkIdentFrom(x_1, x_43);
|
||||
lean_dec(x_1);
|
||||
x_46 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_46, 0, x_45);
|
||||
lean_ctor_set(x_46, 1, x_44);
|
||||
|
|
@ -1437,7 +1438,8 @@ lean_dec(x_33);
|
|||
x_47 = lean_ctor_get(x_35, 0);
|
||||
lean_inc(x_47);
|
||||
lean_dec(x_35);
|
||||
x_48 = lean_mk_syntax_ident(x_47);
|
||||
x_48 = l_Lean_mkIdentFrom(x_1, x_47);
|
||||
lean_dec(x_1);
|
||||
x_49 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_49, 0, x_48);
|
||||
lean_ctor_set(x_49, 1, x_2);
|
||||
|
|
|
|||
4
stage0/stdlib/Lean/Meta/Tactic/Simp/Rewrite.c
generated
4
stage0/stdlib/Lean/Meta/Tactic/Simp/Rewrite.c
generated
|
|
@ -9317,7 +9317,7 @@ _start:
|
|||
lean_object* x_10; uint8_t x_11;
|
||||
x_10 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_10);
|
||||
x_11 = lean_ctor_get_uint8(x_10, sizeof(void*)*2 + 9);
|
||||
x_11 = lean_ctor_get_uint8(x_10, sizeof(void*)*2 + 8);
|
||||
lean_dec(x_10);
|
||||
if (x_11 == 0)
|
||||
{
|
||||
|
|
@ -9656,7 +9656,7 @@ if (lean_obj_tag(x_11) == 0)
|
|||
lean_object* x_12; uint8_t x_13;
|
||||
x_12 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_12);
|
||||
x_13 = lean_ctor_get_uint8(x_12, sizeof(void*)*2 + 9);
|
||||
x_13 = lean_ctor_get_uint8(x_12, sizeof(void*)*2 + 8);
|
||||
lean_dec(x_12);
|
||||
if (x_13 == 0)
|
||||
{
|
||||
|
|
|
|||
3
stage0/stdlib/Lean/Meta/Tactic/Simp/Types.c
generated
3
stage0/stdlib/Lean/Meta/Tactic/Simp/Types.c
generated
|
|
@ -157,7 +157,7 @@ x_1 = l_Lean_Meta_Simp_defaultMaxSteps;
|
|||
x_2 = lean_unsigned_to_nat(2u);
|
||||
x_3 = 0;
|
||||
x_4 = 1;
|
||||
x_5 = lean_alloc_ctor(0, 2, 10);
|
||||
x_5 = lean_alloc_ctor(0, 2, 9);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2, x_3);
|
||||
|
|
@ -169,7 +169,6 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 5, x_4);
|
|||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 6, x_4);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 7, x_4);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 8, x_4);
|
||||
lean_ctor_set_uint8(x_5, sizeof(void*)*2 + 9, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
597
stage0/stdlib/Lean/Server/Completion.c
generated
597
stage0/stdlib/Lean/Server/Completion.c
generated
|
|
@ -44,6 +44,7 @@ lean_object* lean_array_uget(lean_object*, size_t);
|
|||
lean_object* l_Std_AssocList_forM___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___closed__1;
|
||||
lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Server_Completion_0__Lean_Server_Completion_getDotCompletionTypeNames_visit___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___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__2(lean_object*);
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__17(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_SMap_forM___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_append___rarg(lean_object*, lean_object*);
|
||||
|
|
@ -55,7 +56,7 @@ lean_object* l_Lean_Elab_Info_occursBefore_x3f(lean_object*, lean_object*);
|
|||
uint8_t l_Lean_Elab_Info_isSmaller(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___boxed(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___lambda__2___closed__1;
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___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*);
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___lambda__1___closed__1;
|
||||
lean_object* l_Lean_Meta_getExpectedNumArgs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -126,6 +127,7 @@ extern lean_object* l_Lean_Parser_instInhabitedParserCategory;
|
|||
lean_object* l_Lean_Server_Completion_completionBlackListExt___elambda__3___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Completion_find_x3f_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__40(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__1(lean_object*);
|
||||
lean_object* l_Lean_ScopedEnvExtension_getState___at_Lean_Parser_isParserCategory___spec__1(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_isTypeApplicable_match__1(lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_runM___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -161,7 +163,7 @@ lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*);
|
|||
lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__35___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_Server_Completion_0__Lean_Server_Completion_idCompletionCore___lambda__6(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_dotCompletion___lambda__2___closed__3;
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_foldlM___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__23(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_foldlMAux___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__24___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Completion_find_x3f_choose_match__1(lean_object*);
|
||||
|
|
@ -172,7 +174,7 @@ lean_object* l_Std_PersistentHashMap_forM___at___private_Lean_Server_Completion_
|
|||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletion___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Name_toString(lean_object*, uint8_t);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_matchAtomic___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_isTypeApplicable___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, 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_forIn_loop___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__1(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*);
|
||||
|
|
@ -206,6 +208,7 @@ lean_object* l_Lean_Server_Completion_find_x3f_choose(lean_object*, lean_object*
|
|||
lean_object* l_Array_foldlMUnsafe_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__30___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_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__6;
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__2___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentArray_forInAux___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__37___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_foldlM___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_addCompletionItem(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -213,19 +216,15 @@ lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at___private_Lean_Serv
|
|||
lean_object* l_Std_PersistentHashMap_foldlMAux_traverse___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__26___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*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Server_Completion_0__Lean_Server_Completion_isDotCompletionMethod___spec__1___closed__1;
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_forInUnsafe_loop___at___private_Lean_Server_Completion_0__Lean_Server_Completion_isDotCompletionMethod___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_FileMap_toPosition(lean_object*, lean_object*);
|
||||
static lean_object* l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1;
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_dotCompletion___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__4;
|
||||
lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_forM___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__22___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2;
|
||||
uint8_t l_Lean_Expr_isConstOf(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_addCompletionItemForDecl_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__8;
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__2;
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_matchDecl_x3f_match__1(lean_object*);
|
||||
lean_object* l_Lean_Expr_consumeMData(lean_object*);
|
||||
|
|
@ -236,7 +235,7 @@ lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_getDot
|
|||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_isDotCompletionMethod_match__1(lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_foldlMAux___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Expr_Data_binderInfo(uint64_t);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___boxed(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_SavedState_restore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_isRec___at___private_Lean_Server_Completion_0__Lean_Server_Completion_isBlackListed___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
|
|
@ -263,6 +262,7 @@ lean_object* l_Lean_Server_Completion_State_itemsMain___default;
|
|||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_dotCompletion(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_EnvExtensionInterfaceUnsafe_instInhabitedExt___lambda__1(lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion(lean_object*, lean_object*);
|
||||
lean_object* l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_LocalDecl_type(lean_object*);
|
||||
lean_object* l_List_forM___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__19(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_isBlackListed___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -343,9 +343,13 @@ lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_getDot
|
|||
lean_object* lean_completion_add_to_black_list(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___lambda__1___closed__6;
|
||||
static lean_object* l_Lean_Server_Completion_initFn____x40_Lean_Server_Completion___hyg_6____closed__2;
|
||||
lean_object* l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___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_foldlMUnsafe_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___spec__31(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Completion_find_x3f_choose_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__3;
|
||||
static lean_object* l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2;
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__1___rarg(lean_object*, lean_object*);
|
||||
static lean_object* l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1;
|
||||
lean_object* l_List_forIn_loop___at___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore___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___private_Lean_Server_Completion_0__Lean_Server_Completion_getDotCompletionTypeNames_visit_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_NameSet_contains(lean_object*, lean_object*);
|
||||
|
|
@ -365,7 +369,6 @@ lean_object* l_Std_PersistentHashMap_foldlMAux___at___private_Lean_Server_Comple
|
|||
lean_object* l_Lean_Server_Completion_completionBlackListExt___elambda__1___boxed(lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_consumeImplicitPrefix___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_isTypeApplicable_match__1___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_isDotCompletionMethod___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_idCompletionCore_match__4(lean_object*);
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_addCompletionItemForDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -12530,7 +12533,44 @@ lean_dec(x_2);
|
|||
return x_8;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1() {
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__1___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_3 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_3);
|
||||
x_4 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_4);
|
||||
lean_dec(x_1);
|
||||
x_5 = lean_apply_2(x_2, x_3, x_4);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__1(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__1___rarg), 2, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__2___rarg(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = lean_apply_1(x_2, x_1);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__2(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion_match__2___rarg), 2, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -12538,7 +12578,7 @@ x_1 = lean_mk_string("(");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2() {
|
||||
static lean_object* _init_l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -12546,170 +12586,320 @@ x_1 = lean_mk_string("), ");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___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) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_3) == 0)
|
||||
{
|
||||
return x_2;
|
||||
lean_object* x_10; lean_object* x_11;
|
||||
x_10 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_10, 0, x_4);
|
||||
x_11 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_11, 0, x_10);
|
||||
lean_ctor_set(x_11, 1, x_9);
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
x_4 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_4);
|
||||
x_5 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_5);
|
||||
x_6 = lean_ctor_get(x_3, 2);
|
||||
lean_inc(x_6);
|
||||
x_7 = lean_ctor_get(x_3, 3);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_3);
|
||||
x_8 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(x_1, x_2, x_4);
|
||||
x_9 = 1;
|
||||
lean_inc(x_5);
|
||||
x_10 = l_Lean_Name_toString(x_5, x_9);
|
||||
x_11 = lean_ctor_get(x_6, 0);
|
||||
lean_inc(x_11);
|
||||
x_12 = l_Lean_KVMap_findCore(x_1, x_5);
|
||||
lean_dec(x_5);
|
||||
x_13 = lean_ctor_get(x_6, 2);
|
||||
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_26; uint8_t x_72;
|
||||
x_12 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_12);
|
||||
x_13 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_6);
|
||||
x_14 = lean_box(0);
|
||||
if (lean_obj_tag(x_12) == 0)
|
||||
x_14 = lean_ctor_get(x_3, 2);
|
||||
lean_inc(x_14);
|
||||
x_15 = lean_ctor_get(x_3, 3);
|
||||
lean_inc(x_15);
|
||||
lean_dec(x_3);
|
||||
x_16 = l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(x_1, x_2, x_12, x_4, x_5, x_6, x_7, x_8, x_9);
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_17);
|
||||
x_18 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_16);
|
||||
x_19 = lean_ctor_get(x_17, 0);
|
||||
lean_inc(x_19);
|
||||
if (lean_is_exclusive(x_17)) {
|
||||
lean_ctor_release(x_17, 0);
|
||||
x_20 = x_17;
|
||||
} else {
|
||||
lean_dec_ref(x_17);
|
||||
x_20 = lean_box(0);
|
||||
}
|
||||
x_72 = l_Lean_Name_isPrefixOf(x_1, x_13);
|
||||
if (x_72 == 0)
|
||||
{
|
||||
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;
|
||||
x_15 = lean_data_value_to_string(x_11);
|
||||
x_16 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1;
|
||||
x_17 = lean_string_append(x_16, x_15);
|
||||
lean_dec(x_15);
|
||||
x_18 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2;
|
||||
x_19 = lean_string_append(x_17, x_18);
|
||||
x_20 = lean_string_append(x_19, x_13);
|
||||
if (lean_obj_tag(x_1) == 1)
|
||||
{
|
||||
if (lean_obj_tag(x_13) == 1)
|
||||
{
|
||||
lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; uint8_t x_77;
|
||||
x_73 = lean_ctor_get(x_1, 0);
|
||||
x_74 = lean_ctor_get(x_1, 1);
|
||||
x_75 = lean_ctor_get(x_13, 0);
|
||||
lean_inc(x_75);
|
||||
x_76 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_76);
|
||||
x_77 = lean_name_eq(x_73, x_75);
|
||||
lean_dec(x_75);
|
||||
if (x_77 == 0)
|
||||
{
|
||||
lean_object* x_78;
|
||||
lean_dec(x_76);
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_13);
|
||||
x_21 = l_Lean_Server_Completion_completionBlackListExt___elambda__4___rarg___closed__2;
|
||||
x_22 = lean_string_append(x_20, x_21);
|
||||
x_23 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_23, 0, x_22);
|
||||
x_24 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_24, 0, x_10);
|
||||
lean_ctor_set(x_24, 1, x_23);
|
||||
lean_ctor_set(x_24, 2, x_14);
|
||||
x_25 = lean_array_push(x_8, x_24);
|
||||
x_2 = x_25;
|
||||
x_3 = x_7;
|
||||
goto _start;
|
||||
x_78 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_78, 0, x_19);
|
||||
x_21 = x_78;
|
||||
x_22 = x_18;
|
||||
goto block_25;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_27;
|
||||
lean_dec(x_11);
|
||||
x_27 = !lean_is_exclusive(x_12);
|
||||
if (x_27 == 0)
|
||||
uint8_t x_79;
|
||||
x_79 = l_String_isPrefixOf(x_74, x_76);
|
||||
lean_dec(x_76);
|
||||
if (x_79 == 0)
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38;
|
||||
x_28 = lean_ctor_get(x_12, 0);
|
||||
x_29 = lean_data_value_to_string(x_28);
|
||||
x_30 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1;
|
||||
x_31 = lean_string_append(x_30, x_29);
|
||||
lean_object* x_80;
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_13);
|
||||
x_80 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_80, 0, x_19);
|
||||
x_21 = x_80;
|
||||
x_22 = x_18;
|
||||
goto block_25;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_81;
|
||||
x_81 = lean_box(0);
|
||||
x_26 = x_81;
|
||||
goto block_71;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_82;
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_13);
|
||||
x_82 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_82, 0, x_19);
|
||||
x_21 = x_82;
|
||||
x_22 = x_18;
|
||||
goto block_25;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_83;
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_13);
|
||||
x_83 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_83, 0, x_19);
|
||||
x_21 = x_83;
|
||||
x_22 = x_18;
|
||||
goto block_25;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_84;
|
||||
x_84 = lean_box(0);
|
||||
x_26 = x_84;
|
||||
goto block_71;
|
||||
}
|
||||
block_25:
|
||||
{
|
||||
lean_object* x_23;
|
||||
x_23 = lean_ctor_get(x_21, 0);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_21);
|
||||
x_3 = x_15;
|
||||
x_4 = x_23;
|
||||
x_9 = x_22;
|
||||
goto _start;
|
||||
}
|
||||
block_71:
|
||||
{
|
||||
uint8_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32;
|
||||
lean_dec(x_26);
|
||||
x_27 = 1;
|
||||
lean_inc(x_13);
|
||||
x_28 = l_Lean_Name_toString(x_13, x_27);
|
||||
x_29 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_29);
|
||||
x_30 = l_Lean_KVMap_findCore(x_2, x_13);
|
||||
lean_dec(x_13);
|
||||
x_31 = lean_ctor_get(x_14, 2);
|
||||
lean_inc(x_31);
|
||||
lean_dec(x_14);
|
||||
x_32 = lean_box(0);
|
||||
if (lean_obj_tag(x_30) == 0)
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44;
|
||||
x_33 = lean_data_value_to_string(x_29);
|
||||
x_34 = l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1;
|
||||
x_35 = lean_string_append(x_34, x_33);
|
||||
lean_dec(x_33);
|
||||
x_36 = l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2;
|
||||
x_37 = lean_string_append(x_35, x_36);
|
||||
x_38 = lean_string_append(x_37, x_31);
|
||||
lean_dec(x_31);
|
||||
x_39 = l_Lean_Server_Completion_completionBlackListExt___elambda__4___rarg___closed__2;
|
||||
x_40 = lean_string_append(x_38, x_39);
|
||||
x_41 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_41, 0, x_40);
|
||||
x_42 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_42, 0, x_28);
|
||||
lean_ctor_set(x_42, 1, x_41);
|
||||
lean_ctor_set(x_42, 2, x_32);
|
||||
x_43 = lean_array_push(x_19, x_42);
|
||||
if (lean_is_scalar(x_20)) {
|
||||
x_44 = lean_alloc_ctor(1, 1, 0);
|
||||
} else {
|
||||
x_44 = x_20;
|
||||
}
|
||||
lean_ctor_set(x_44, 0, x_43);
|
||||
x_21 = x_44;
|
||||
x_22 = x_18;
|
||||
goto block_25;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_45;
|
||||
lean_dec(x_29);
|
||||
x_32 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2;
|
||||
x_33 = lean_string_append(x_31, x_32);
|
||||
x_34 = lean_string_append(x_33, x_13);
|
||||
lean_dec(x_13);
|
||||
x_35 = l_Lean_Server_Completion_completionBlackListExt___elambda__4___rarg___closed__2;
|
||||
x_36 = lean_string_append(x_34, x_35);
|
||||
lean_ctor_set(x_12, 0, x_36);
|
||||
x_37 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_37, 0, x_10);
|
||||
lean_ctor_set(x_37, 1, x_12);
|
||||
lean_ctor_set(x_37, 2, x_14);
|
||||
x_38 = lean_array_push(x_8, x_37);
|
||||
x_2 = x_38;
|
||||
x_3 = x_7;
|
||||
goto _start;
|
||||
x_45 = !lean_is_exclusive(x_30);
|
||||
if (x_45 == 0)
|
||||
{
|
||||
lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57;
|
||||
x_46 = lean_ctor_get(x_30, 0);
|
||||
x_47 = lean_data_value_to_string(x_46);
|
||||
x_48 = l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1;
|
||||
x_49 = lean_string_append(x_48, x_47);
|
||||
lean_dec(x_47);
|
||||
x_50 = l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2;
|
||||
x_51 = lean_string_append(x_49, x_50);
|
||||
x_52 = lean_string_append(x_51, x_31);
|
||||
lean_dec(x_31);
|
||||
x_53 = l_Lean_Server_Completion_completionBlackListExt___elambda__4___rarg___closed__2;
|
||||
x_54 = lean_string_append(x_52, x_53);
|
||||
lean_ctor_set(x_30, 0, x_54);
|
||||
x_55 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_55, 0, x_28);
|
||||
lean_ctor_set(x_55, 1, x_30);
|
||||
lean_ctor_set(x_55, 2, x_32);
|
||||
x_56 = lean_array_push(x_19, x_55);
|
||||
if (lean_is_scalar(x_20)) {
|
||||
x_57 = lean_alloc_ctor(1, 1, 0);
|
||||
} else {
|
||||
x_57 = x_20;
|
||||
}
|
||||
lean_ctor_set(x_57, 0, x_56);
|
||||
x_21 = x_57;
|
||||
x_22 = x_18;
|
||||
goto block_25;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51;
|
||||
x_40 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_40);
|
||||
lean_dec(x_12);
|
||||
x_41 = lean_data_value_to_string(x_40);
|
||||
x_42 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1;
|
||||
x_43 = lean_string_append(x_42, x_41);
|
||||
lean_dec(x_41);
|
||||
x_44 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2;
|
||||
x_45 = lean_string_append(x_43, x_44);
|
||||
x_46 = lean_string_append(x_45, x_13);
|
||||
lean_dec(x_13);
|
||||
x_47 = l_Lean_Server_Completion_completionBlackListExt___elambda__4___rarg___closed__2;
|
||||
x_48 = lean_string_append(x_46, x_47);
|
||||
x_49 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_49, 0, x_48);
|
||||
x_50 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_50, 0, x_10);
|
||||
lean_ctor_set(x_50, 1, x_49);
|
||||
lean_ctor_set(x_50, 2, x_14);
|
||||
x_51 = lean_array_push(x_8, x_50);
|
||||
x_2 = x_51;
|
||||
x_3 = x_7;
|
||||
goto _start;
|
||||
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_58 = lean_ctor_get(x_30, 0);
|
||||
lean_inc(x_58);
|
||||
lean_dec(x_30);
|
||||
x_59 = lean_data_value_to_string(x_58);
|
||||
x_60 = l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1;
|
||||
x_61 = lean_string_append(x_60, x_59);
|
||||
lean_dec(x_59);
|
||||
x_62 = l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2;
|
||||
x_63 = lean_string_append(x_61, x_62);
|
||||
x_64 = lean_string_append(x_63, x_31);
|
||||
lean_dec(x_31);
|
||||
x_65 = l_Lean_Server_Completion_completionBlackListExt___elambda__4___rarg___closed__2;
|
||||
x_66 = lean_string_append(x_64, x_65);
|
||||
x_67 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_67, 0, x_66);
|
||||
x_68 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_68, 0, x_28);
|
||||
lean_ctor_set(x_68, 1, x_67);
|
||||
lean_ctor_set(x_68, 2, x_32);
|
||||
x_69 = lean_array_push(x_19, x_68);
|
||||
if (lean_is_scalar(x_20)) {
|
||||
x_70 = lean_alloc_ctor(1, 1, 0);
|
||||
} else {
|
||||
x_70 = x_20;
|
||||
}
|
||||
lean_ctor_set(x_70, 0, x_69);
|
||||
x_21 = x_70;
|
||||
x_22 = x_18;
|
||||
goto block_25;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
}
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___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_6; lean_object* x_7; lean_object* x_8; uint8_t x_9;
|
||||
x_6 = lean_st_ref_get(x_4, x_5);
|
||||
x_7 = lean_ctor_get(x_6, 1);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_6);
|
||||
x_8 = l_Lean_getOptionDecls(x_7);
|
||||
x_9 = !lean_is_exclusive(x_8);
|
||||
if (x_9 == 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; uint8_t x_15;
|
||||
x_7 = lean_st_ref_get(x_5, x_6);
|
||||
x_8 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_7);
|
||||
x_9 = l_Lean_getOptionDecls(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_4, 0);
|
||||
x_13 = l_Lean_Server_Completion_completionBlackListExt___elambda__2___closed__1;
|
||||
x_14 = l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(x_1, x_12, x_10, x_13, x_2, x_3, x_4, x_5, x_11);
|
||||
x_15 = !lean_is_exclusive(x_14);
|
||||
if (x_15 == 0)
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17;
|
||||
x_10 = lean_ctor_get(x_8, 0);
|
||||
x_11 = lean_ctor_get(x_3, 0);
|
||||
x_12 = l_Lean_Server_Completion_completionBlackListExt___elambda__2___closed__1;
|
||||
x_13 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(x_11, x_12, x_10);
|
||||
x_14 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_sortCompletionItems(x_13);
|
||||
x_15 = 1;
|
||||
x_16 = lean_alloc_ctor(0, 1, 1);
|
||||
lean_ctor_set(x_16, 0, x_14);
|
||||
lean_ctor_set_uint8(x_16, sizeof(void*)*1, x_15);
|
||||
x_17 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_17, 0, x_16);
|
||||
lean_ctor_set(x_8, 0, x_17);
|
||||
return x_8;
|
||||
lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; lean_object* x_21;
|
||||
x_16 = lean_ctor_get(x_14, 0);
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_16);
|
||||
x_18 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_sortCompletionItems(x_17);
|
||||
x_19 = 1;
|
||||
x_20 = lean_alloc_ctor(0, 1, 1);
|
||||
lean_ctor_set(x_20, 0, x_18);
|
||||
lean_ctor_set_uint8(x_20, sizeof(void*)*1, x_19);
|
||||
x_21 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_21, 0, x_20);
|
||||
lean_ctor_set(x_14, 0, x_21);
|
||||
return x_14;
|
||||
}
|
||||
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; uint8_t x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_18 = lean_ctor_get(x_8, 0);
|
||||
x_19 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_19);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_8);
|
||||
x_20 = lean_ctor_get(x_3, 0);
|
||||
x_21 = l_Lean_Server_Completion_completionBlackListExt___elambda__2___closed__1;
|
||||
x_22 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(x_20, x_21, x_18);
|
||||
x_23 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_sortCompletionItems(x_22);
|
||||
x_24 = 1;
|
||||
x_25 = lean_alloc_ctor(0, 1, 1);
|
||||
lean_ctor_set(x_25, 0, x_23);
|
||||
lean_ctor_set_uint8(x_25, sizeof(void*)*1, x_24);
|
||||
x_26 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_26, 0, x_25);
|
||||
x_27 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_26);
|
||||
lean_ctor_set(x_27, 1, x_19);
|
||||
return x_27;
|
||||
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29;
|
||||
x_22 = lean_ctor_get(x_14, 0);
|
||||
x_23 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_23);
|
||||
lean_inc(x_22);
|
||||
lean_dec(x_14);
|
||||
x_24 = lean_ctor_get(x_22, 0);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_22);
|
||||
x_25 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_sortCompletionItems(x_24);
|
||||
x_26 = 1;
|
||||
x_27 = lean_alloc_ctor(0, 1, 1);
|
||||
lean_ctor_set(x_27, 0, x_25);
|
||||
lean_ctor_set_uint8(x_27, sizeof(void*)*1, x_26);
|
||||
x_28 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_28, 0, x_27);
|
||||
x_29 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_28);
|
||||
lean_ctor_set(x_29, 1, x_23);
|
||||
return x_29;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12791,52 +12981,56 @@ lean_ctor_set(x_3, 1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__8() {
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___lambda__1___boxed), 5, 0);
|
||||
return x_1;
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9;
|
||||
x_4 = lean_unsigned_to_nat(1u);
|
||||
x_5 = l_Lean_Syntax_getArg(x_2, x_4);
|
||||
x_6 = l_Lean_Syntax_getId(x_5);
|
||||
lean_dec(x_5);
|
||||
x_7 = lean_alloc_closure((void*)(l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___lambda__1___boxed), 6, 1);
|
||||
lean_closure_set(x_7, 0, x_6);
|
||||
x_8 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__7;
|
||||
x_9 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_1, x_8, x_7, x_3);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion(lean_object* x_1, lean_object* x_2) {
|
||||
lean_object* l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_3 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__7;
|
||||
x_4 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__8;
|
||||
x_5 = l_Lean_Elab_ContextInfo_runMetaM___rarg(x_1, x_3, x_4, x_2);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(x_1, x_2, x_3);
|
||||
lean_object* x_10;
|
||||
x_10 = l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_4;
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___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) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_6;
|
||||
x_6 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___lambda__1(x_1, x_2, x_3, x_4, x_5);
|
||||
lean_object* x_7;
|
||||
x_7 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___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);
|
||||
lean_dec(x_1);
|
||||
return x_6;
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
lean_object* l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
x_3 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion(x_1, x_2);
|
||||
lean_object* x_4;
|
||||
x_4 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion(x_1, x_2, x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
return x_3;
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___spec__1(lean_object* x_1, lean_object* x_2) {
|
||||
|
|
@ -13954,42 +14148,33 @@ return x_23;
|
|||
}
|
||||
case 3:
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25;
|
||||
lean_dec(x_13);
|
||||
lean_object* x_24; lean_object* x_25; lean_object* x_26;
|
||||
x_24 = lean_ctor_get(x_11, 0);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_11);
|
||||
x_25 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion(x_24, x_4);
|
||||
x_25 = lean_ctor_get(x_13, 0);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_13);
|
||||
x_26 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion(x_24, x_25, x_4);
|
||||
lean_dec(x_25);
|
||||
lean_dec(x_24);
|
||||
return x_25;
|
||||
return x_26;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
lean_object* x_26; lean_object* x_27;
|
||||
lean_object* x_27; lean_object* x_28;
|
||||
lean_dec(x_13);
|
||||
x_26 = lean_ctor_get(x_11, 0);
|
||||
lean_inc(x_26);
|
||||
x_27 = lean_ctor_get(x_11, 0);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_11);
|
||||
x_27 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion(x_26, x_4);
|
||||
lean_dec(x_26);
|
||||
return x_27;
|
||||
x_28 = l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion(x_27, x_4);
|
||||
lean_dec(x_27);
|
||||
return x_28;
|
||||
}
|
||||
default:
|
||||
{
|
||||
lean_object* x_28;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_11);
|
||||
x_28 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_8);
|
||||
lean_ctor_set(x_28, 1, x_4);
|
||||
return x_28;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_29;
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_11);
|
||||
x_29 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_8);
|
||||
|
|
@ -13998,6 +14183,18 @@ return x_29;
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_30;
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
x_30 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_8);
|
||||
lean_ctor_set(x_30, 1, x_4);
|
||||
return x_30;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* initialize_Init(lean_object*);
|
||||
lean_object* initialize_Lean_Environment(lean_object*);
|
||||
|
|
@ -14116,10 +14313,10 @@ l___private_Lean_Server_Completion_0__Lean_Server_Completion_dotCompletion___lam
|
|||
lean_mark_persistent(l___private_Lean_Server_Completion_0__Lean_Server_Completion_dotCompletion___lambda__2___closed__8);
|
||||
l___private_Lean_Server_Completion_0__Lean_Server_Completion_dotCompletion___lambda__3___closed__1 = _init_l___private_Lean_Server_Completion_0__Lean_Server_Completion_dotCompletion___lambda__3___closed__1();
|
||||
lean_mark_persistent(l___private_Lean_Server_Completion_0__Lean_Server_Completion_dotCompletion___lambda__3___closed__1);
|
||||
l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1 = _init_l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1();
|
||||
lean_mark_persistent(l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1);
|
||||
l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2 = _init_l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2();
|
||||
lean_mark_persistent(l_Std_RBNode_fold___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2);
|
||||
l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1 = _init_l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1();
|
||||
lean_mark_persistent(l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__1);
|
||||
l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2 = _init_l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2();
|
||||
lean_mark_persistent(l_Std_RBNode_forIn_visit___at___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___spec__1___closed__2);
|
||||
l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__1 = _init_l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__1();
|
||||
lean_mark_persistent(l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__1);
|
||||
l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__2 = _init_l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__2();
|
||||
|
|
@ -14134,8 +14331,6 @@ l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___
|
|||
lean_mark_persistent(l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__6);
|
||||
l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__7 = _init_l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__7();
|
||||
lean_mark_persistent(l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__7);
|
||||
l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__8 = _init_l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__8();
|
||||
lean_mark_persistent(l___private_Lean_Server_Completion_0__Lean_Server_Completion_optionCompletion___closed__8);
|
||||
l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___lambda__1___closed__1 = _init_l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___lambda__1___closed__1();
|
||||
lean_mark_persistent(l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___lambda__1___closed__1);
|
||||
l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___lambda__1___closed__2 = _init_l___private_Lean_Server_Completion_0__Lean_Server_Completion_tacticCompletion___lambda__1___closed__2();
|
||||
|
|
|
|||
741
stage0/stdlib/Lean/Server/FileWorker.c
generated
741
stage0/stdlib/Lean/Server/FileWorker.c
generated
|
|
@ -326,7 +326,9 @@ static lean_object* l_List_getLast_x21___at_Lean_Server_FileWorker_updateDocumen
|
|||
lean_object* l_Lean_Server_FileWorker_mainLoop_match__1(lean_object*);
|
||||
lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_FileWorker_unfoldCmdSnaps___spec__3(lean_object*);
|
||||
lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___lambda__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_FileWorker_mainLoop_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_eprint___at_IO_eprintln___spec__1(lean_object*, lean_object*);
|
||||
static lean_object* l_IO_FS_Stream_readRequestAs___at_Lean_Server_FileWorker_initAndRunWorker___spec__2___closed__34;
|
||||
lean_object* l_String_trim(lean_object*);
|
||||
|
|
@ -526,6 +528,18 @@ return x_17;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5;
|
||||
x_4 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
x_5 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_5, 0, x_4);
|
||||
lean_ctor_set(x_5, 1, x_3);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -621,6 +635,7 @@ lean_inc(x_22);
|
|||
x_23 = lean_ctor_get(x_22, 0);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_22);
|
||||
lean_inc(x_2);
|
||||
x_24 = l_Lean_Server_Snapshots_compileNextCmd(x_23, x_2, x_21);
|
||||
if (lean_obj_tag(x_24) == 0)
|
||||
{
|
||||
|
|
@ -638,6 +653,7 @@ if (lean_obj_tag(x_28) == 0)
|
|||
uint8_t x_29;
|
||||
lean_dec(x_25);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_29 = !lean_is_exclusive(x_27);
|
||||
if (x_29 == 0)
|
||||
|
|
@ -691,328 +707,170 @@ return x_38;
|
|||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_39;
|
||||
x_39 = !lean_is_exclusive(x_28);
|
||||
if (x_39 == 0)
|
||||
{
|
||||
lean_object* x_40;
|
||||
x_40 = lean_ctor_get(x_28, 0);
|
||||
lean_dec(x_40);
|
||||
lean_dec(x_28);
|
||||
if (lean_obj_tag(x_25) == 0)
|
||||
{
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44;
|
||||
x_41 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_41);
|
||||
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_ctor_get(x_27, 1);
|
||||
lean_inc(x_39);
|
||||
lean_dec(x_27);
|
||||
x_42 = lean_ctor_get(x_25, 0);
|
||||
lean_inc(x_42);
|
||||
x_40 = lean_ctor_get(x_25, 0);
|
||||
lean_inc(x_40);
|
||||
lean_dec(x_25);
|
||||
x_43 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_42);
|
||||
x_44 = l_Lean_Server_publishMessages(x_1, x_43, x_4, x_41);
|
||||
if (lean_obj_tag(x_44) == 0)
|
||||
{
|
||||
uint8_t x_45;
|
||||
x_45 = !lean_is_exclusive(x_44);
|
||||
x_41 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_2);
|
||||
lean_dec(x_2);
|
||||
x_42 = lean_ctor_get(x_41, 2);
|
||||
lean_inc(x_42);
|
||||
lean_dec(x_41);
|
||||
x_43 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_40);
|
||||
x_44 = lean_ctor_get(x_43, 2);
|
||||
lean_inc(x_44);
|
||||
x_45 = lean_nat_dec_lt(x_42, x_44);
|
||||
lean_dec(x_44);
|
||||
lean_dec(x_42);
|
||||
if (x_45 == 0)
|
||||
{
|
||||
lean_object* x_46;
|
||||
x_46 = lean_ctor_get(x_44, 0);
|
||||
lean_dec(x_46);
|
||||
lean_ctor_set(x_28, 0, x_42);
|
||||
lean_ctor_set(x_44, 0, x_28);
|
||||
return x_44;
|
||||
lean_object* x_46; lean_object* x_47;
|
||||
lean_dec(x_43);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_46 = lean_box(0);
|
||||
x_47 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___lambda__1(x_40, x_46, x_39);
|
||||
return x_47;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_47; lean_object* x_48;
|
||||
x_47 = lean_ctor_get(x_44, 1);
|
||||
lean_inc(x_47);
|
||||
lean_dec(x_44);
|
||||
lean_ctor_set(x_28, 0, x_42);
|
||||
x_48 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_28);
|
||||
lean_ctor_set(x_48, 1, x_47);
|
||||
return x_48;
|
||||
}
|
||||
}
|
||||
else
|
||||
lean_object* x_48;
|
||||
x_48 = l_Lean_Server_publishMessages(x_1, x_43, x_4, x_39);
|
||||
if (lean_obj_tag(x_48) == 0)
|
||||
{
|
||||
uint8_t x_49;
|
||||
lean_dec(x_42);
|
||||
lean_free_object(x_28);
|
||||
x_49 = !lean_is_exclusive(x_44);
|
||||
if (x_49 == 0)
|
||||
{
|
||||
return x_44;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_50; lean_object* x_51; lean_object* x_52;
|
||||
x_50 = lean_ctor_get(x_44, 0);
|
||||
x_51 = lean_ctor_get(x_44, 1);
|
||||
lean_inc(x_51);
|
||||
lean_object* x_49; lean_object* x_50; lean_object* x_51;
|
||||
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_44);
|
||||
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_dec(x_48);
|
||||
x_51 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___lambda__1(x_40, x_49, x_50);
|
||||
lean_dec(x_49);
|
||||
return x_51;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_52;
|
||||
lean_dec(x_40);
|
||||
x_52 = !lean_is_exclusive(x_48);
|
||||
if (x_52 == 0)
|
||||
{
|
||||
return x_48;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_53; lean_object* x_54; lean_object* x_55;
|
||||
lean_free_object(x_28);
|
||||
x_53 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_53);
|
||||
lean_dec(x_27);
|
||||
x_54 = lean_ctor_get(x_25, 0);
|
||||
x_53 = lean_ctor_get(x_48, 0);
|
||||
x_54 = lean_ctor_get(x_48, 1);
|
||||
lean_inc(x_54);
|
||||
lean_dec(x_25);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_1);
|
||||
x_55 = l_Lean_Server_publishMessages(x_1, x_54, x_4, x_53);
|
||||
if (lean_obj_tag(x_55) == 0)
|
||||
{
|
||||
lean_object* x_56; lean_object* x_57;
|
||||
x_56 = lean_ctor_get(x_55, 1);
|
||||
lean_inc(x_56);
|
||||
lean_dec(x_55);
|
||||
x_57 = l_Lean_Server_publishProgressDone(x_1, x_4, x_56);
|
||||
lean_dec(x_1);
|
||||
if (lean_obj_tag(x_57) == 0)
|
||||
{
|
||||
uint8_t x_58;
|
||||
x_58 = !lean_is_exclusive(x_57);
|
||||
if (x_58 == 0)
|
||||
{
|
||||
lean_object* x_59; lean_object* x_60;
|
||||
x_59 = lean_ctor_get(x_57, 0);
|
||||
lean_dec(x_59);
|
||||
x_60 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1;
|
||||
lean_ctor_set(x_57, 0, x_60);
|
||||
return x_57;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_61; lean_object* x_62; lean_object* x_63;
|
||||
x_61 = lean_ctor_get(x_57, 1);
|
||||
lean_inc(x_61);
|
||||
lean_dec(x_57);
|
||||
x_62 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1;
|
||||
x_63 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_63, 0, x_62);
|
||||
lean_ctor_set(x_63, 1, x_61);
|
||||
return x_63;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_64;
|
||||
x_64 = !lean_is_exclusive(x_57);
|
||||
if (x_64 == 0)
|
||||
{
|
||||
return x_57;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_65; lean_object* x_66; lean_object* x_67;
|
||||
x_65 = lean_ctor_get(x_57, 0);
|
||||
x_66 = lean_ctor_get(x_57, 1);
|
||||
lean_inc(x_66);
|
||||
lean_inc(x_65);
|
||||
lean_dec(x_57);
|
||||
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_4);
|
||||
lean_dec(x_1);
|
||||
x_68 = !lean_is_exclusive(x_55);
|
||||
if (x_68 == 0)
|
||||
{
|
||||
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
|
||||
{
|
||||
lean_object* x_69; lean_object* x_70; lean_object* x_71;
|
||||
x_69 = lean_ctor_get(x_55, 0);
|
||||
x_70 = lean_ctor_get(x_55, 1);
|
||||
lean_inc(x_70);
|
||||
lean_inc(x_69);
|
||||
lean_dec(x_55);
|
||||
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_dec(x_28);
|
||||
if (lean_obj_tag(x_25) == 0)
|
||||
{
|
||||
lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75;
|
||||
x_72 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_72);
|
||||
lean_object* x_56; lean_object* x_57; lean_object* x_58;
|
||||
lean_dec(x_2);
|
||||
x_56 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_56);
|
||||
lean_dec(x_27);
|
||||
x_73 = lean_ctor_get(x_25, 0);
|
||||
lean_inc(x_73);
|
||||
lean_dec(x_25);
|
||||
x_74 = l_Lean_Server_Snapshots_Snapshot_msgLog(x_73);
|
||||
x_75 = l_Lean_Server_publishMessages(x_1, x_74, x_4, x_72);
|
||||
if (lean_obj_tag(x_75) == 0)
|
||||
{
|
||||
lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79;
|
||||
x_76 = lean_ctor_get(x_75, 1);
|
||||
lean_inc(x_76);
|
||||
if (lean_is_exclusive(x_75)) {
|
||||
lean_ctor_release(x_75, 0);
|
||||
lean_ctor_release(x_75, 1);
|
||||
x_77 = x_75;
|
||||
} else {
|
||||
lean_dec_ref(x_75);
|
||||
x_77 = lean_box(0);
|
||||
}
|
||||
x_78 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_78, 0, x_73);
|
||||
if (lean_is_scalar(x_77)) {
|
||||
x_79 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_79 = x_77;
|
||||
}
|
||||
lean_ctor_set(x_79, 0, x_78);
|
||||
lean_ctor_set(x_79, 1, x_76);
|
||||
return x_79;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83;
|
||||
lean_dec(x_73);
|
||||
x_80 = lean_ctor_get(x_75, 0);
|
||||
lean_inc(x_80);
|
||||
x_81 = lean_ctor_get(x_75, 1);
|
||||
lean_inc(x_81);
|
||||
if (lean_is_exclusive(x_75)) {
|
||||
lean_ctor_release(x_75, 0);
|
||||
lean_ctor_release(x_75, 1);
|
||||
x_82 = x_75;
|
||||
} else {
|
||||
lean_dec_ref(x_75);
|
||||
x_82 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_82)) {
|
||||
x_83 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_83 = x_82;
|
||||
}
|
||||
lean_ctor_set(x_83, 0, x_80);
|
||||
lean_ctor_set(x_83, 1, x_81);
|
||||
return x_83;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_84; lean_object* x_85; lean_object* x_86;
|
||||
x_84 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_84);
|
||||
lean_dec(x_27);
|
||||
x_85 = lean_ctor_get(x_25, 0);
|
||||
lean_inc(x_85);
|
||||
x_57 = lean_ctor_get(x_25, 0);
|
||||
lean_inc(x_57);
|
||||
lean_dec(x_25);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_1);
|
||||
x_86 = l_Lean_Server_publishMessages(x_1, x_85, x_4, x_84);
|
||||
if (lean_obj_tag(x_86) == 0)
|
||||
x_58 = l_Lean_Server_publishMessages(x_1, x_57, x_4, x_56);
|
||||
if (lean_obj_tag(x_58) == 0)
|
||||
{
|
||||
lean_object* x_87; lean_object* x_88;
|
||||
x_87 = lean_ctor_get(x_86, 1);
|
||||
lean_inc(x_87);
|
||||
lean_dec(x_86);
|
||||
x_88 = l_Lean_Server_publishProgressDone(x_1, x_4, x_87);
|
||||
lean_object* x_59; lean_object* x_60;
|
||||
x_59 = lean_ctor_get(x_58, 1);
|
||||
lean_inc(x_59);
|
||||
lean_dec(x_58);
|
||||
x_60 = l_Lean_Server_publishProgressDone(x_1, x_4, x_59);
|
||||
lean_dec(x_1);
|
||||
if (lean_obj_tag(x_88) == 0)
|
||||
if (lean_obj_tag(x_60) == 0)
|
||||
{
|
||||
lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92;
|
||||
x_89 = lean_ctor_get(x_88, 1);
|
||||
lean_inc(x_89);
|
||||
if (lean_is_exclusive(x_88)) {
|
||||
lean_ctor_release(x_88, 0);
|
||||
lean_ctor_release(x_88, 1);
|
||||
x_90 = x_88;
|
||||
} else {
|
||||
lean_dec_ref(x_88);
|
||||
x_90 = lean_box(0);
|
||||
}
|
||||
x_91 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1;
|
||||
if (lean_is_scalar(x_90)) {
|
||||
x_92 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_92 = x_90;
|
||||
}
|
||||
lean_ctor_set(x_92, 0, x_91);
|
||||
lean_ctor_set(x_92, 1, x_89);
|
||||
return x_92;
|
||||
uint8_t x_61;
|
||||
x_61 = !lean_is_exclusive(x_60);
|
||||
if (x_61 == 0)
|
||||
{
|
||||
lean_object* x_62; lean_object* x_63;
|
||||
x_62 = lean_ctor_get(x_60, 0);
|
||||
lean_dec(x_62);
|
||||
x_63 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1;
|
||||
lean_ctor_set(x_60, 0, x_63);
|
||||
return x_60;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96;
|
||||
x_93 = lean_ctor_get(x_88, 0);
|
||||
lean_inc(x_93);
|
||||
x_94 = lean_ctor_get(x_88, 1);
|
||||
lean_inc(x_94);
|
||||
if (lean_is_exclusive(x_88)) {
|
||||
lean_ctor_release(x_88, 0);
|
||||
lean_ctor_release(x_88, 1);
|
||||
x_95 = x_88;
|
||||
} else {
|
||||
lean_dec_ref(x_88);
|
||||
x_95 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_95)) {
|
||||
x_96 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_96 = x_95;
|
||||
}
|
||||
lean_ctor_set(x_96, 0, x_93);
|
||||
lean_ctor_set(x_96, 1, x_94);
|
||||
return x_96;
|
||||
lean_object* x_64; lean_object* x_65; lean_object* x_66;
|
||||
x_64 = lean_ctor_get(x_60, 1);
|
||||
lean_inc(x_64);
|
||||
lean_dec(x_60);
|
||||
x_65 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___closed__1;
|
||||
x_66 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_66, 0, x_65);
|
||||
lean_ctor_set(x_66, 1, x_64);
|
||||
return x_66;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100;
|
||||
uint8_t x_67;
|
||||
x_67 = !lean_is_exclusive(x_60);
|
||||
if (x_67 == 0)
|
||||
{
|
||||
return x_60;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_68; lean_object* x_69; lean_object* x_70;
|
||||
x_68 = lean_ctor_get(x_60, 0);
|
||||
x_69 = lean_ctor_get(x_60, 1);
|
||||
lean_inc(x_69);
|
||||
lean_inc(x_68);
|
||||
lean_dec(x_60);
|
||||
x_70 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_70, 0, x_68);
|
||||
lean_ctor_set(x_70, 1, x_69);
|
||||
return x_70;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_71;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_97 = lean_ctor_get(x_86, 0);
|
||||
lean_inc(x_97);
|
||||
x_98 = lean_ctor_get(x_86, 1);
|
||||
lean_inc(x_98);
|
||||
if (lean_is_exclusive(x_86)) {
|
||||
lean_ctor_release(x_86, 0);
|
||||
lean_ctor_release(x_86, 1);
|
||||
x_99 = x_86;
|
||||
} else {
|
||||
lean_dec_ref(x_86);
|
||||
x_99 = lean_box(0);
|
||||
x_71 = !lean_is_exclusive(x_58);
|
||||
if (x_71 == 0)
|
||||
{
|
||||
return x_58;
|
||||
}
|
||||
if (lean_is_scalar(x_99)) {
|
||||
x_100 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_100 = x_99;
|
||||
}
|
||||
lean_ctor_set(x_100, 0, x_97);
|
||||
lean_ctor_set(x_100, 1, x_98);
|
||||
return x_100;
|
||||
else
|
||||
{
|
||||
lean_object* x_72; lean_object* x_73; lean_object* x_74;
|
||||
x_72 = lean_ctor_get(x_58, 0);
|
||||
x_73 = lean_ctor_get(x_58, 1);
|
||||
lean_inc(x_73);
|
||||
lean_inc(x_72);
|
||||
lean_dec(x_58);
|
||||
x_74 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_74, 0, x_72);
|
||||
lean_ctor_set(x_74, 1, x_73);
|
||||
return x_74;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1020,52 +878,53 @@ return x_100;
|
|||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_101;
|
||||
uint8_t x_75;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_101 = !lean_is_exclusive(x_24);
|
||||
if (x_101 == 0)
|
||||
x_75 = !lean_is_exclusive(x_24);
|
||||
if (x_75 == 0)
|
||||
{
|
||||
return x_24;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_102; lean_object* x_103; lean_object* x_104;
|
||||
x_102 = lean_ctor_get(x_24, 0);
|
||||
x_103 = lean_ctor_get(x_24, 1);
|
||||
lean_inc(x_103);
|
||||
lean_inc(x_102);
|
||||
lean_object* x_76; lean_object* x_77; lean_object* x_78;
|
||||
x_76 = lean_ctor_get(x_24, 0);
|
||||
x_77 = lean_ctor_get(x_24, 1);
|
||||
lean_inc(x_77);
|
||||
lean_inc(x_76);
|
||||
lean_dec(x_24);
|
||||
x_104 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_104, 0, x_102);
|
||||
lean_ctor_set(x_104, 1, x_103);
|
||||
return x_104;
|
||||
x_78 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_78, 0, x_76);
|
||||
lean_ctor_set(x_78, 1, x_77);
|
||||
return x_78;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_105;
|
||||
uint8_t x_79;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_105 = !lean_is_exclusive(x_20);
|
||||
if (x_105 == 0)
|
||||
x_79 = !lean_is_exclusive(x_20);
|
||||
if (x_79 == 0)
|
||||
{
|
||||
return x_20;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_106; lean_object* x_107; lean_object* x_108;
|
||||
x_106 = lean_ctor_get(x_20, 0);
|
||||
x_107 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_107);
|
||||
lean_inc(x_106);
|
||||
lean_object* x_80; lean_object* x_81; lean_object* x_82;
|
||||
x_80 = lean_ctor_get(x_20, 0);
|
||||
x_81 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_81);
|
||||
lean_inc(x_80);
|
||||
lean_dec(x_20);
|
||||
x_108 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_108, 0, x_106);
|
||||
lean_ctor_set(x_108, 1, x_107);
|
||||
return x_108;
|
||||
x_82 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_82, 0, x_80);
|
||||
lean_ctor_set(x_82, 1, x_81);
|
||||
return x_82;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1080,6 +939,15 @@ lean_dec(x_1);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___lambda__1(x_1, x_2, x_3);
|
||||
lean_dec(x_2);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_FileWorker_0__Lean_Server_FileWorker_nextCmdSnap___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -8990,182 +8858,179 @@ _start:
|
|||
{
|
||||
if (lean_obj_tag(x_3) == 0)
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8;
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
x_5 = lean_ctor_get(x_3, 0);
|
||||
x_6 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_1);
|
||||
x_7 = l_Lean_Server_Requests_RequestError_toLspResponseError(x_2, x_5);
|
||||
x_8 = l_IO_FS_Stream_writeLspResponseError(x_6, x_7, x_4);
|
||||
lean_dec(x_7);
|
||||
return x_8;
|
||||
x_6 = l_Lean_Server_Requests_RequestError_toLspResponseError(x_1, x_5);
|
||||
x_7 = l_IO_FS_Stream_writeLspResponseError(x_2, x_6, x_4);
|
||||
lean_dec(x_6);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_9 = lean_ctor_get(x_3, 0);
|
||||
x_10 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_1);
|
||||
lean_inc(x_9);
|
||||
x_11 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_11, 0, x_2);
|
||||
lean_ctor_set(x_11, 1, x_9);
|
||||
x_12 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__1(x_10, x_11, x_4);
|
||||
lean_dec(x_11);
|
||||
return x_12;
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
x_8 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_8);
|
||||
x_9 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_9, 0, x_1);
|
||||
lean_ctor_set(x_9, 1, x_8);
|
||||
x_10 = l_IO_FS_Stream_writeLspResponse___at_Lean_Server_FileWorker_handleRequest___spec__1(x_2, x_9, x_4);
|
||||
lean_dec(x_9);
|
||||
return x_10;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Server_FileWorker_handleRequest(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_4, 3);
|
||||
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_ctor_get(x_4, 1);
|
||||
lean_inc(x_6);
|
||||
x_7 = lean_ctor_get(x_4, 4);
|
||||
x_7 = lean_ctor_get(x_4, 2);
|
||||
lean_inc(x_7);
|
||||
x_8 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_8, 0, x_6);
|
||||
lean_ctor_set(x_8, 1, x_7);
|
||||
x_9 = l_Lean_Server_Requests_handleLspRequest(x_2, x_3, x_8, x_5);
|
||||
if (lean_obj_tag(x_9) == 0)
|
||||
x_8 = lean_ctor_get(x_4, 3);
|
||||
lean_inc(x_8);
|
||||
x_9 = lean_ctor_get(x_4, 4);
|
||||
lean_inc(x_9);
|
||||
x_10 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_10, 0, x_8);
|
||||
lean_ctor_set(x_10, 1, x_9);
|
||||
lean_ctor_set(x_10, 2, x_7);
|
||||
x_11 = l_Lean_Server_Requests_handleLspRequest(x_2, x_3, x_10, x_5);
|
||||
if (lean_obj_tag(x_11) == 0)
|
||||
{
|
||||
lean_object* x_10;
|
||||
x_10 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_10);
|
||||
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;
|
||||
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_object* x_12;
|
||||
x_12 = lean_ctor_get(x_11, 0);
|
||||
lean_inc(x_12);
|
||||
lean_dec(x_10);
|
||||
x_13 = lean_ctor_get(x_4, 1);
|
||||
if (lean_obj_tag(x_12) == 0)
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18;
|
||||
x_13 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_13);
|
||||
lean_inc(x_1);
|
||||
x_14 = l_Lean_Server_Requests_RequestError_toLspResponseError(x_1, x_12);
|
||||
lean_dec(x_11);
|
||||
x_14 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_14);
|
||||
lean_dec(x_12);
|
||||
x_15 = lean_alloc_closure((void*)(l_IO_FS_Stream_writeLspResponseError___boxed), 3, 2);
|
||||
lean_closure_set(x_15, 0, x_13);
|
||||
lean_closure_set(x_15, 1, x_14);
|
||||
x_16 = l_Task_Priority_default;
|
||||
x_17 = lean_io_as_task(x_15, x_16, x_11);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19; lean_object* x_20;
|
||||
x_18 = lean_ctor_get(x_17, 0);
|
||||
lean_inc(x_18);
|
||||
x_19 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_19);
|
||||
lean_dec(x_17);
|
||||
x_20 = l_Lean_Server_FileWorker_queueRequest(x_1, x_18, x_4, x_19);
|
||||
lean_dec(x_4);
|
||||
return x_20;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_21;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_21 = !lean_is_exclusive(x_17);
|
||||
if (x_21 == 0)
|
||||
{
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_22; lean_object* x_23; lean_object* x_24;
|
||||
x_22 = lean_ctor_get(x_17, 0);
|
||||
x_23 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_23);
|
||||
lean_inc(x_22);
|
||||
lean_dec(x_17);
|
||||
x_24 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_24, 0, x_22);
|
||||
lean_ctor_set(x_24, 1, x_23);
|
||||
return x_24;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29;
|
||||
x_25 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_9);
|
||||
x_26 = lean_ctor_get(x_10, 0);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_10);
|
||||
lean_inc(x_1);
|
||||
lean_inc(x_4);
|
||||
x_27 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__1___boxed), 4, 2);
|
||||
lean_closure_set(x_27, 0, x_4);
|
||||
lean_closure_set(x_27, 1, x_1);
|
||||
x_28 = l_Task_Priority_default;
|
||||
x_29 = lean_io_map_task(x_27, x_26, x_28, x_25);
|
||||
if (lean_obj_tag(x_29) == 0)
|
||||
x_15 = l_Lean_Server_Requests_RequestError_toLspResponseError(x_1, x_14);
|
||||
lean_dec(x_14);
|
||||
x_16 = lean_alloc_closure((void*)(l_IO_FS_Stream_writeLspResponseError___boxed), 3, 2);
|
||||
lean_closure_set(x_16, 0, x_6);
|
||||
lean_closure_set(x_16, 1, x_15);
|
||||
x_17 = l_Task_Priority_default;
|
||||
x_18 = lean_io_as_task(x_16, x_17, x_13);
|
||||
if (lean_obj_tag(x_18) == 0)
|
||||
{
|
||||
lean_object* x_30; lean_object* x_31; lean_object* x_32;
|
||||
x_30 = lean_ctor_get(x_29, 0);
|
||||
lean_inc(x_30);
|
||||
x_31 = lean_ctor_get(x_29, 1);
|
||||
lean_object* x_19; lean_object* x_20; lean_object* x_21;
|
||||
x_19 = lean_ctor_get(x_18, 0);
|
||||
lean_inc(x_19);
|
||||
x_20 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_18);
|
||||
x_21 = l_Lean_Server_FileWorker_queueRequest(x_1, x_19, x_4, x_20);
|
||||
lean_dec(x_4);
|
||||
return x_21;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_22;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_22 = !lean_is_exclusive(x_18);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
return x_18;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_23 = lean_ctor_get(x_18, 0);
|
||||
x_24 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_24);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_18);
|
||||
x_25 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_25, 0, x_23);
|
||||
lean_ctor_set(x_25, 1, x_24);
|
||||
return x_25;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_26 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_11);
|
||||
x_27 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_12);
|
||||
lean_inc(x_1);
|
||||
x_28 = lean_alloc_closure((void*)(l_Lean_Server_FileWorker_handleRequest___lambda__1___boxed), 4, 2);
|
||||
lean_closure_set(x_28, 0, x_1);
|
||||
lean_closure_set(x_28, 1, x_6);
|
||||
x_29 = l_Task_Priority_default;
|
||||
x_30 = lean_io_map_task(x_28, x_27, x_29, x_26);
|
||||
if (lean_obj_tag(x_30) == 0)
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
x_31 = lean_ctor_get(x_30, 0);
|
||||
lean_inc(x_31);
|
||||
lean_dec(x_29);
|
||||
x_32 = l_Lean_Server_FileWorker_queueRequest(x_1, x_30, x_4, x_31);
|
||||
x_32 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_30);
|
||||
x_33 = l_Lean_Server_FileWorker_queueRequest(x_1, x_31, x_4, x_32);
|
||||
lean_dec(x_4);
|
||||
return x_32;
|
||||
return x_33;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_33;
|
||||
uint8_t x_34;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_33 = !lean_is_exclusive(x_29);
|
||||
if (x_33 == 0)
|
||||
x_34 = !lean_is_exclusive(x_30);
|
||||
if (x_34 == 0)
|
||||
{
|
||||
return x_29;
|
||||
return x_30;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36;
|
||||
x_34 = lean_ctor_get(x_29, 0);
|
||||
x_35 = lean_ctor_get(x_29, 1);
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37;
|
||||
x_35 = lean_ctor_get(x_30, 0);
|
||||
x_36 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_36);
|
||||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_29);
|
||||
x_36 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_36, 0, x_34);
|
||||
lean_ctor_set(x_36, 1, x_35);
|
||||
return x_36;
|
||||
lean_dec(x_30);
|
||||
x_37 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_37, 0, x_35);
|
||||
lean_ctor_set(x_37, 1, x_36);
|
||||
return x_37;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_37;
|
||||
uint8_t x_38;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_37 = !lean_is_exclusive(x_9);
|
||||
if (x_37 == 0)
|
||||
x_38 = !lean_is_exclusive(x_11);
|
||||
if (x_38 == 0)
|
||||
{
|
||||
return x_9;
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_38; lean_object* x_39; lean_object* x_40;
|
||||
x_38 = lean_ctor_get(x_9, 0);
|
||||
x_39 = lean_ctor_get(x_9, 1);
|
||||
lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
x_39 = lean_ctor_get(x_11, 0);
|
||||
x_40 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_40);
|
||||
lean_inc(x_39);
|
||||
lean_inc(x_38);
|
||||
lean_dec(x_9);
|
||||
x_40 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_40, 0, x_38);
|
||||
lean_ctor_set(x_40, 1, x_39);
|
||||
return x_40;
|
||||
lean_dec(x_11);
|
||||
x_41 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_41, 0, x_39);
|
||||
lean_ctor_set(x_41, 1, x_40);
|
||||
return x_41;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3513
stage0/stdlib/Lean/Server/FileWorker/RequestHandling.c
generated
3513
stage0/stdlib/Lean/Server/FileWorker/RequestHandling.c
generated
File diff suppressed because it is too large
Load diff
54
stage0/stdlib/Lean/Server/FileWorker/Utils.c
generated
54
stage0/stdlib/Lean/Server/FileWorker/Utils.c
generated
|
|
@ -13,11 +13,17 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
static lean_object* l_Lean_Server_FileWorker_logSnapContent___closed__3;
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__12;
|
||||
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
|
||||
static lean_object* l_Lean_Server_FileWorker_logSnapContent___closed__2;
|
||||
static lean_object* l_Lean_Server_FileWorker_logSnapContent___closed__1;
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__13;
|
||||
lean_object* l_Lean_Server_FileWorker_logSnapContent___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_FileWorker_logSnapContent(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_FileWorker_logSnapContent___closed__4;
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__2;
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__21;
|
||||
lean_object* l_Lean_Server_FileWorker_instInhabitedCancelToken;
|
||||
|
|
@ -26,7 +32,6 @@ lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg(lean_object*, lea
|
|||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__17;
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__4;
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__14;
|
||||
lean_object* l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__8;
|
||||
lean_object* l_Lean_Server_FileWorker_CancelToken_check(lean_object*);
|
||||
lean_object* l_IO_eprintln___at___private_Init_System_IO_0__IO_eprintlnAux___spec__1(lean_object*, lean_object*);
|
||||
|
|
@ -43,8 +48,6 @@ static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___clo
|
|||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__18;
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__5;
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__22;
|
||||
static lean_object* l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__1;
|
||||
lean_object* l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1(lean_object*, lean_object*, uint8_t);
|
||||
lean_object* l_Lean_Server_FileWorker_instCoeErrorElabTaskError(lean_object*);
|
||||
lean_object* l_Lean_Server_FileWorker_CancelToken_check___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -58,14 +61,11 @@ static uint32_t l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed_
|
|||
lean_object* l_Lean_Server_FileWorker_CancelToken_set___boxed(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__16;
|
||||
lean_object* l_Lean_Server_FileWorker_CancelToken_set(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__3;
|
||||
lean_object* l_IO_mkRef___rarg(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__4;
|
||||
static lean_object* l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__19;
|
||||
static lean_object* l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__2;
|
||||
uint32_t lean_uint32_of_nat(lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
static lean_object* _init_l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__1() {
|
||||
static lean_object* _init_l_Lean_Server_FileWorker_logSnapContent___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -73,7 +73,7 @@ x_1 = lean_mk_string("[");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__2() {
|
||||
static lean_object* _init_l_Lean_Server_FileWorker_logSnapContent___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -81,23 +81,23 @@ x_1 = lean_mk_string(", ");
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__3() {
|
||||
static lean_object* _init_l_Lean_Server_FileWorker_logSnapContent___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("]: `");
|
||||
x_1 = lean_mk_string("]: ```\n");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__4() {
|
||||
static lean_object* _init_l_Lean_Server_FileWorker_logSnapContent___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string("`");
|
||||
x_1 = lean_mk_string("\n```");
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_Lean_Server_FileWorker_logSnapContent(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22;
|
||||
|
|
@ -105,10 +105,10 @@ x_4 = lean_ctor_get(x_1, 0);
|
|||
lean_inc(x_4);
|
||||
lean_inc(x_4);
|
||||
x_5 = l_Nat_repr(x_4);
|
||||
x_6 = l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__1;
|
||||
x_6 = l_Lean_Server_FileWorker_logSnapContent___closed__1;
|
||||
x_7 = lean_string_append(x_6, x_5);
|
||||
lean_dec(x_5);
|
||||
x_8 = l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__2;
|
||||
x_8 = l_Lean_Server_FileWorker_logSnapContent___closed__2;
|
||||
x_9 = lean_string_append(x_7, x_8);
|
||||
x_10 = l_Lean_Server_Snapshots_Snapshot_endPos(x_1);
|
||||
lean_dec(x_1);
|
||||
|
|
@ -116,7 +116,7 @@ lean_inc(x_10);
|
|||
x_11 = l_Nat_repr(x_10);
|
||||
x_12 = lean_string_append(x_9, x_11);
|
||||
lean_dec(x_11);
|
||||
x_13 = l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__3;
|
||||
x_13 = l_Lean_Server_FileWorker_logSnapContent___closed__3;
|
||||
x_14 = lean_string_append(x_12, x_13);
|
||||
x_15 = lean_ctor_get(x_2, 0);
|
||||
x_16 = lean_unsigned_to_nat(1u);
|
||||
|
|
@ -127,17 +127,17 @@ lean_dec(x_17);
|
|||
lean_dec(x_4);
|
||||
x_19 = lean_string_append(x_14, x_18);
|
||||
lean_dec(x_18);
|
||||
x_20 = l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__4;
|
||||
x_20 = l_Lean_Server_FileWorker_logSnapContent___closed__4;
|
||||
x_21 = lean_string_append(x_19, x_20);
|
||||
x_22 = l_IO_eprintln___at___private_Init_System_IO_0__IO_eprintlnAux___spec__1(x_21, x_3);
|
||||
return x_22;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
lean_object* l_Lean_Server_FileWorker_logSnapContent___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent(x_1, x_2, x_3);
|
||||
x_4 = l_Lean_Server_FileWorker_logSnapContent(x_1, x_2, x_3);
|
||||
lean_dec(x_2);
|
||||
return x_4;
|
||||
}
|
||||
|
|
@ -599,14 +599,14 @@ lean_dec_ref(res);
|
|||
res = initialize_Lean_Server_AsyncList(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__1 = _init_l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__1();
|
||||
lean_mark_persistent(l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__1);
|
||||
l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__2 = _init_l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__2();
|
||||
lean_mark_persistent(l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__2);
|
||||
l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__3 = _init_l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__3();
|
||||
lean_mark_persistent(l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__3);
|
||||
l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__4 = _init_l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__4();
|
||||
lean_mark_persistent(l___private_Lean_Server_FileWorker_Utils_0__Lean_Server_FileWorker_logSnapContent___closed__4);
|
||||
l_Lean_Server_FileWorker_logSnapContent___closed__1 = _init_l_Lean_Server_FileWorker_logSnapContent___closed__1();
|
||||
lean_mark_persistent(l_Lean_Server_FileWorker_logSnapContent___closed__1);
|
||||
l_Lean_Server_FileWorker_logSnapContent___closed__2 = _init_l_Lean_Server_FileWorker_logSnapContent___closed__2();
|
||||
lean_mark_persistent(l_Lean_Server_FileWorker_logSnapContent___closed__2);
|
||||
l_Lean_Server_FileWorker_logSnapContent___closed__3 = _init_l_Lean_Server_FileWorker_logSnapContent___closed__3();
|
||||
lean_mark_persistent(l_Lean_Server_FileWorker_logSnapContent___closed__3);
|
||||
l_Lean_Server_FileWorker_logSnapContent___closed__4 = _init_l_Lean_Server_FileWorker_logSnapContent___closed__4();
|
||||
lean_mark_persistent(l_Lean_Server_FileWorker_logSnapContent___closed__4);
|
||||
l_Lean_Server_FileWorker_instInhabitedCancelToken = _init_l_Lean_Server_FileWorker_instInhabitedCancelToken();
|
||||
lean_mark_persistent(l_Lean_Server_FileWorker_instInhabitedCancelToken);
|
||||
l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__1 = _init_l_Lean_Server_FileWorker_instInhabitedEditableDocument___closed__1();
|
||||
|
|
|
|||
79
stage0/stdlib/Lean/Server/InfoUtils.c
generated
79
stage0/stdlib/Lean/Server/InfoUtils.c
generated
|
|
@ -185,6 +185,7 @@ lean_object* l___private_Std_Data_PersistentArray_0__Std_PersistentArray_foldlMA
|
|||
lean_object* l_Lean_Elab_Info_fmtHover_x3f___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Std_Data_PersistentArray_0__Std_PersistentArray_foldlFromMAux___at_Lean_Elab_InfoTree_foldInfo_go___spec__15___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_InfoTree_termGoalAt_x3f_getHeadFnPos_x3f___closed__2;
|
||||
lean_object* l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_List_elem___at_Lean_Elab_InfoTree_termGoalAt_x3f___spec__2___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Nat_repr(lean_object*);
|
||||
lean_object* l_Lean_Elab_InfoTree_deepestNodes_go_match__1(lean_object*, lean_object*);
|
||||
|
|
@ -268,7 +269,6 @@ static lean_object* l___private_Lean_Server_InfoUtils_0__String_reprRange____x40
|
|||
lean_object* l_Lean_Elab_InfoTree_termGoalAt_x3f_getHeadFnPos_x3f(lean_object*, uint8_t);
|
||||
lean_object* l_Lean_Elab_Info_tailPos_x3f(lean_object*);
|
||||
lean_object* l_Lean_Syntax_getArgs(lean_object*);
|
||||
lean_object* l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_InfoUtils_0__String_reprRange____x40_Lean_Server_InfoUtils___hyg_33____closed__9;
|
||||
lean_object* l_Lean_Syntax_getRange_x3f(lean_object*, uint8_t);
|
||||
lean_object* l_Lean_Syntax_getKind(lean_object*);
|
||||
|
|
@ -362,6 +362,7 @@ static lean_object* l_Lean_Elab_Info_fmtHover_x3f_fmtTerm_x3f___closed__8;
|
|||
lean_object* l_Lean_Elab_Info_fmtHover_x3f_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_instInhabitedPersistentArrayNode(lean_object*);
|
||||
lean_object* l_Lean_Elab_InfoTree_foldInfo(lean_object*);
|
||||
lean_object* l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_ContextInfo_runMetaM___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_List_map___at_Lean_Elab_InfoTree_smallestInfo_x3f___spec__1___closed__4;
|
||||
lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Elab_InfoTree_foldInfo_go___spec__24___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -3371,7 +3372,7 @@ case 4:
|
|||
{
|
||||
lean_object* x_6; lean_object* x_7;
|
||||
x_6 = lean_ctor_get(x_1, 0);
|
||||
x_7 = lean_ctor_get(x_6, 3);
|
||||
x_7 = lean_ctor_get(x_6, 4);
|
||||
lean_inc(x_7);
|
||||
return x_7;
|
||||
}
|
||||
|
|
@ -3464,7 +3465,7 @@ case 4:
|
|||
{
|
||||
lean_object* x_4; lean_object* x_5;
|
||||
x_4 = lean_ctor_get(x_1, 0);
|
||||
x_5 = lean_ctor_get(x_4, 1);
|
||||
x_5 = lean_ctor_get(x_4, 2);
|
||||
lean_inc(x_5);
|
||||
return x_5;
|
||||
}
|
||||
|
|
@ -5160,7 +5161,7 @@ lean_object* x_68; lean_object* x_69; lean_object* x_70;
|
|||
x_68 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_68);
|
||||
lean_dec(x_1);
|
||||
x_69 = lean_ctor_get(x_68, 2);
|
||||
x_69 = lean_ctor_get(x_68, 3);
|
||||
lean_inc(x_69);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
|
|
@ -5188,7 +5189,7 @@ if (x_74 == 0)
|
|||
{
|
||||
lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85;
|
||||
x_75 = lean_ctor_get(x_73, 0);
|
||||
x_76 = lean_ctor_get(x_68, 0);
|
||||
x_76 = lean_ctor_get(x_68, 1);
|
||||
lean_inc(x_76);
|
||||
lean_dec(x_68);
|
||||
x_77 = l_Std_fmt___at_Lean_Level_PP_Result_format___spec__1(x_76);
|
||||
|
|
@ -5220,7 +5221,7 @@ x_87 = lean_ctor_get(x_73, 1);
|
|||
lean_inc(x_87);
|
||||
lean_inc(x_86);
|
||||
lean_dec(x_73);
|
||||
x_88 = lean_ctor_get(x_68, 0);
|
||||
x_88 = lean_ctor_get(x_68, 1);
|
||||
lean_inc(x_88);
|
||||
lean_dec(x_68);
|
||||
x_89 = l_Std_fmt___at_Lean_Level_PP_Result_format___spec__1(x_88);
|
||||
|
|
@ -5464,6 +5465,52 @@ return x_27;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
|
||||
_start:
|
||||
{
|
||||
if (lean_obj_tag(x_1) == 4)
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11;
|
||||
x_8 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_1);
|
||||
x_9 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_8);
|
||||
x_10 = l_Lean_findDocString_x3f___at_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___spec__1(x_9, 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);
|
||||
x_11 = !lean_is_exclusive(x_10);
|
||||
if (x_11 == 0)
|
||||
{
|
||||
return x_10;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
x_12 = lean_ctor_get(x_10, 0);
|
||||
x_13 = lean_ctor_get(x_10, 1);
|
||||
lean_inc(x_13);
|
||||
lean_inc(x_12);
|
||||
lean_dec(x_10);
|
||||
x_14 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_14, 0, x_12);
|
||||
lean_ctor_set(x_14, 1, x_13);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_15; lean_object* x_16;
|
||||
x_15 = lean_box(0);
|
||||
x_16 = l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__2(x_1, x_15, x_3, x_4, x_5, x_6, x_7);
|
||||
lean_dec(x_1);
|
||||
return x_16;
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_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) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -5471,18 +5518,23 @@ if (lean_obj_tag(x_1) == 1)
|
|||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9;
|
||||
x_7 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_7);
|
||||
x_8 = lean_ctor_get(x_7, 3);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_7);
|
||||
x_9 = l_Lean_Expr_constName_x3f(x_8);
|
||||
lean_dec(x_8);
|
||||
if (lean_obj_tag(x_9) == 0)
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11;
|
||||
x_10 = lean_box(0);
|
||||
x_11 = l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__2(x_1, x_10, x_2, x_3, x_4, x_5, x_6);
|
||||
x_11 = l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__3(x_1, x_10, x_2, x_3, x_4, x_5, x_6);
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; uint8_t x_14;
|
||||
lean_dec(x_1);
|
||||
x_12 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_12);
|
||||
lean_dec(x_9);
|
||||
|
|
@ -5515,7 +5567,7 @@ else
|
|||
{
|
||||
lean_object* x_18; lean_object* x_19;
|
||||
x_18 = lean_box(0);
|
||||
x_19 = l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__2(x_1, x_18, x_2, x_3, x_4, x_5, x_6);
|
||||
x_19 = l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__3(x_1, x_18, x_2, x_3, x_4, x_5, x_6);
|
||||
return x_19;
|
||||
}
|
||||
}
|
||||
|
|
@ -5555,13 +5607,13 @@ lean_dec(x_1);
|
|||
return x_8;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___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_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
lean_dec(x_1);
|
||||
return x_7;
|
||||
lean_object* x_8;
|
||||
x_8 = l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7);
|
||||
lean_dec(x_2);
|
||||
return x_8;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Info_fmtHover_x3f___lambda__1___closed__1() {
|
||||
|
|
@ -5694,7 +5746,6 @@ lean_inc(x_5);
|
|||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_11 = l_Lean_Elab_Info_fmtHover_x3f_fmtDoc_x3f(x_1, x_3, x_4, x_5, x_6, x_9);
|
||||
lean_dec(x_1);
|
||||
if (lean_obj_tag(x_11) == 0)
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
|
|
|
|||
54
stage0/stdlib/Lean/Server/Requests.c
generated
54
stage0/stdlib/Lean/Server/Requests.c
generated
|
|
@ -24,7 +24,6 @@ lean_object* lean_io_error_to_string(lean_object*);
|
|||
lean_object* l_Lean_Server_Requests_RequestError_methodNotFound(lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_RequestM_bindTask(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Requests_0__Lean_Server_Requests_parseParams___rarg___closed__2;
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__3;
|
||||
lean_object* l_Std_PersistentHashMap_insertAux_traverse___at_Lean_Server_Requests_registerLspRequestHandler___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_RequestError_toLspResponseError(lean_object*, lean_object*);
|
||||
size_t l_USize_sub(size_t, size_t);
|
||||
|
|
@ -38,15 +37,14 @@ lean_object* lean_array_get_size(lean_object*);
|
|||
static lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_Requests_RequestM_withWaitFindSnap___spec__1___closed__1;
|
||||
lean_object* l_Std_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*);
|
||||
lean_object* lean_string_append(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__5;
|
||||
lean_object* l_Lean_Server_Requests_routeLspRequest_match__1(lean_object*);
|
||||
size_t l_USize_shiftRight(size_t, size_t);
|
||||
lean_object* l_Lean_Server_Requests_handleLspRequest(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__3;
|
||||
lean_object* l_Lean_Server_Requests_RequestM_bindTask___rarg___lambda__1(lean_object*);
|
||||
uint8_t l_Std_PersistentHashMap_containsAtAux___at_Lean_Server_Requests_registerLspRequestHandler___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_io_map_task(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_nat_add(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__1;
|
||||
lean_object* l_Lean_Server_Requests_requestHandlers;
|
||||
lean_object* l_Lean_Server_Requests_RequestError_methodNotFound___boxed(lean_object*);
|
||||
lean_object* lean_io_bind_task(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -61,6 +59,7 @@ lean_object* l_Lean_Json_compress(lean_object*);
|
|||
lean_object* lean_st_ref_take(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_Requests_RequestError_fileChanged___closed__1;
|
||||
static lean_object* l_Lean_Server_Requests_registerLspRequestHandler___lambda__4___closed__1;
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__4;
|
||||
lean_object* l_Lean_Server_Requests_RequestError_instCoeErrorRequestError(lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_RequestM_mapTask(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_RequestM_bindTask___rarg___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -74,7 +73,7 @@ lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
|
|||
static lean_object* l_Lean_Server_Requests_handleLspRequest___closed__1;
|
||||
lean_object* l_Lean_Server_Requests_handleLspRequest___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_contains___at_Lean_Server_Requests_registerLspRequestHandler___spec__5___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489_(lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497_(lean_object*);
|
||||
lean_object* lean_task_map(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_registerLspRequestHandler___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_Requests_registerLspRequestHandler___lambda__4___closed__2;
|
||||
|
|
@ -91,15 +90,16 @@ uint8_t l_Std_PersistentHashMap_containsAux___at_Lean_Server_Requests_registerLs
|
|||
static size_t l_Std_PersistentHashMap_insertAux___at_Lean_Server_Requests_registerLspRequestHandler___spec__2___closed__2;
|
||||
size_t l_USize_mul(size_t, size_t);
|
||||
lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_Requests_RequestM_withWaitFindSnap___spec__2___lambda__1(lean_object*);
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__2;
|
||||
lean_object* l_Lean_Server_Requests_routeLspRequest(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_registerLspRequestHandler(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Task_Priority_default;
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__1;
|
||||
lean_object* l_Std_PersistentHashMap_containsAtAux___at_Lean_Server_Requests_registerLspRequestHandler___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_String_decEq___boxed(lean_object*, lean_object*);
|
||||
static lean_object* l_Std_PersistentHashMap_insertAux___at_Lean_Server_Requests_registerLspRequestHandler___spec__2___closed__3;
|
||||
size_t l_USize_land(size_t, size_t);
|
||||
lean_object* l_Lean_Server_Requests_registerLspRequestHandler___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__2;
|
||||
lean_object* l_Lean_Server_Requests_registerLspRequestHandler___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Server_Requests_0__Lean_Server_Requests_parseParams(lean_object*);
|
||||
static lean_object* l___private_Lean_Server_Requests_0__Lean_Server_Requests_parseParams___rarg___closed__3;
|
||||
|
|
@ -111,7 +111,6 @@ lean_object* l_Lean_Server_Requests_RequestM_withWaitFindSnap(lean_object*);
|
|||
uint8_t l_USize_decLe(size_t, size_t);
|
||||
static lean_object* l_Lean_Server_Requests_registerLspRequestHandler___closed__1;
|
||||
lean_object* l_Lean_Server_Requests_registerLspRequestHandler___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__4;
|
||||
static lean_object* l___private_Lean_Server_AsyncList_0__IO_AsyncList_coeErr___at_Lean_Server_Requests_RequestM_withWaitFindSnap___spec__2___closed__1;
|
||||
lean_object* l_Std_PersistentHashMap_findAtAux___at___private_Lean_Server_Requests_0__Lean_Server_Requests_lookupLspRequestHandler___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_RequestM_asTask_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -130,6 +129,7 @@ lean_object* l___private_Lean_Server_Requests_0__Lean_Server_Requests_lookupLspR
|
|||
lean_object* l_Std_PersistentHashMap_findAux___at___private_Lean_Server_Requests_0__Lean_Server_Requests_lookupLspRequestHandler___spec__2___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_RequestM_asTask(lean_object*);
|
||||
lean_object* l_IO_mkRef___rarg(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__5;
|
||||
lean_object* l_Lean_Server_Requests_RequestM_mapTask___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_IO_AsyncList_waitFind_x3f___at_Lean_Server_Requests_RequestM_withWaitFindSnap___spec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Server_Requests_RequestM_withWaitFindSnap___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1298,7 +1298,7 @@ x_2 = lean_alloc_closure((void*)(l_Lean_Server_Requests_RequestM_withWaitFindSna
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__1() {
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -1306,17 +1306,17 @@ x_1 = lean_alloc_closure((void*)(l_String_decEq___boxed), 2, 0);
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__2() {
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__1;
|
||||
x_1 = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__1;
|
||||
x_2 = lean_alloc_closure((void*)(l_instBEq___rarg), 3, 1);
|
||||
lean_closure_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__3() {
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -1324,21 +1324,21 @@ x_1 = l_Std_PersistentHashMap_mkEmptyEntriesArray(lean_box(0), lean_box(0));
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__4() {
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__3;
|
||||
x_1 = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__3;
|
||||
x_2 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__5() {
|
||||
static lean_object* _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__4;
|
||||
x_1 = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__4;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
|
|
@ -1346,11 +1346,11 @@ lean_ctor_set(x_3, 1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489_(lean_object* x_1) {
|
||||
lean_object* l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3;
|
||||
x_2 = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__5;
|
||||
x_2 = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__5;
|
||||
x_3 = l_IO_mkRef___rarg(x_2, x_1);
|
||||
return x_3;
|
||||
}
|
||||
|
|
@ -3167,17 +3167,17 @@ l_IO_AsyncList_waitFind_x3f___at_Lean_Server_Requests_RequestM_withWaitFindSnap_
|
|||
lean_mark_persistent(l_IO_AsyncList_waitFind_x3f___at_Lean_Server_Requests_RequestM_withWaitFindSnap___spec__1___closed__2);
|
||||
l_Lean_Server_Requests_RequestM_withWaitFindSnap___rarg___lambda__1___closed__1 = _init_l_Lean_Server_Requests_RequestM_withWaitFindSnap___rarg___lambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_RequestM_withWaitFindSnap___rarg___lambda__1___closed__1);
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__1 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__1();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__1);
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__2 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__2();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__2);
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__3 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__3();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__3);
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__4 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__4();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__4);
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__5 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__5();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489____closed__5);
|
||||
res = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_489_(lean_io_mk_world());
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__1 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__1();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__1);
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__2 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__2();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__2);
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__3 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__3();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__3);
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__4 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__4();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__4);
|
||||
l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__5 = _init_l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__5();
|
||||
lean_mark_persistent(l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497____closed__5);
|
||||
res = l_Lean_Server_Requests_initFn____x40_Lean_Server_Requests___hyg_497_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
l_Lean_Server_Requests_requestHandlers = lean_io_result_get_value(res);
|
||||
lean_mark_persistent(l_Lean_Server_Requests_requestHandlers);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue